*/
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
*/
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
* @param string $excluded_categories
*/
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
* @param string $excluded_categories
*/
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
// right now if one can edit, one can delete
return user_can_edit_post($user_id, $post_id, $blog_id);
// right now if one can edit, one can delete
return user_can_edit_post($user_id, $post_id, $blog_id);
$author_data = get_userdata($user_id);
return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
$author_data = get_userdata($user_id);
return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
* @return bool returns true if $user_id can edit $post_id's date
*/
function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
* @return bool returns true if $user_id can edit $post_id's date
*/
function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
$author_data = get_userdata($user_id);
return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
$author_data = get_userdata($user_id);
return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
* @return bool returns true if $user_id can edit $post_id's comments
*/
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
* @return bool returns true if $user_id can edit $post_id's comments
*/
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
// right now if one can edit a post, one can edit comments made on it
return user_can_edit_post($user_id, $post_id, $blog_id);
// right now if one can edit a post, one can edit comments made on it
return user_can_edit_post($user_id, $post_id, $blog_id);
* @return bool returns true if $user_id can delete $post_id's comments
*/
function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
* @return bool returns true if $user_id can delete $post_id's comments
*/
function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
// right now if one can edit comments, one can delete comments
return user_can_edit_post_comments($user_id, $post_id, $blog_id);
// right now if one can edit comments, one can delete comments
return user_can_edit_post_comments($user_id, $post_id, $blog_id);
function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
$show_description = true, $show_rating = false,
$limit = -1, $show_updated = 0) {
function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
$show_description = true, $show_rating = false,
$limit = -1, $show_updated = 0) {
$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
*/
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
*/
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
*/
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
$orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
*/
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
$orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
$optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
$recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
$optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
$recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
$selected = 0, $exclude = 0) {
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
$selected = 0, $exclude = 0) {
* @return null|string
*/
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
* @return null|string
*/
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
return wp_list_authors($args);
$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
return wp_list_authors($args);
* @return string|null
*/
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
* @return string|null
*/
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
return wp_get_archives($args);
}
$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
return wp_get_archives($args);
}
*/
function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
$pagelink='%', $more_file='') {
*/
function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
$pagelink='%', $more_file='') {
$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
return wp_link_pages($args);
$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
return wp_link_pages($args);
*/
function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
*/
function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
* @param string $order Sort link categories by 'name' or 'id'
*/
function get_links_list($order = 'name') {
* @param string $order Sort link categories by 'name' or 'id'
*/
function get_links_list($order = 'name') {
* @param bool $count the number of links in the db
*/
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
* @param bool $count the number of links in the db
*/
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
* @return mixed Value of the 'link_rating' field, false otherwise.
*/
function get_linkrating( $link ) {
* @return mixed Value of the 'link_rating' field, false otherwise.
*/
function get_linkrating( $link ) {
return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
}
return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
}
* @return int The new user's ID.
*/
function create_user($username, $password, $email) {
* @return int The new user's ID.
*/
function create_user($username, $password, $email) {
* @return array The comment data
*/
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
* @return array The comment data
*/
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
* @return string
*/
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
* @return string
*/
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
* @param int $encode_html Optional. How to encode the content.
*/
function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
* @param int $encode_html Optional. How to encode the content.
*/
function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content_rss', $content);
if ( $cut && !$encode_html )
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content_rss', $content);
if ( $cut && !$encode_html )
* @return string HTML stripped out of content with links at the bottom.
*/
function make_url_footnote( $content ) {
* @return string HTML stripped out of content with links at the bottom.
*/
function make_url_footnote( $content ) {
preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
$links_summary = "\n";
for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
$links_summary = "\n";
for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
* @return string Translated context string without pipe
*/
function _c( $text, $domain = 'default' ) {
* @return string Translated context string without pipe
*/
function _c( $text, $domain = 'default' ) {
* @return string Translated text
*/
function translate_with_context( $text, $domain = 'default' ) {
* @return string Translated text
*/
function translate_with_context( $text, $domain = 'default' ) {
* @return string The translated singular or plural form.
*/
function _nc( $single, $plural, $number, $domain = 'default' ) {
* @return string The translated singular or plural form.
*/
function _nc( $single, $plural, $number, $domain = 'default' ) {
return before_last_bar( _n( $single, $plural, $number, $domain ) );
}
return before_last_bar( _n( $single, $plural, $number, $domain ) );
}
* @return string
*/
function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
* @return string
*/
function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
* @return array Icon URL and full path to file, respectively.
*/
function get_attachment_icon_src( $id = 0, $fullsize = false ) {
* @return array Icon URL and full path to file, respectively.
*/
function get_attachment_icon_src( $id = 0, $fullsize = false ) {
* @return false|string HTML content.
*/
function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
* @return false|string HTML content.
*/
function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
* @return object|array Bookmark object or array, depending on the type specified by `$output`.
*/
function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
* @return object|array Bookmark object or array, depending on the type specified by `$output`.
*/
function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
* @return string The cleaned URL.
*/
function sanitize_url( $url, $protocols = null ) {
* @return string The cleaned URL.
*/
function sanitize_url( $url, $protocols = null ) {
* @param string $url The URL to be cleaned.
* @param array $protocols Optional. An array of acceptable protocols.
* @param string $context Optional. How the URL will be used. Default is 'display'.
* @param string $url The URL to be cleaned.
* @param array $protocols Optional. An array of acceptable protocols.
* @param string $context Optional. How the URL will be used. Default is 'display'.
return esc_url( $url, $protocols, $context );
}
/**
* Escape single quotes, specialchar double quotes, and fix line endings.
*
return esc_url( $url, $protocols, $context );
}
/**
* Escape single quotes, specialchar double quotes, and fix line endings.
*
* @return string Escaped `$string`.
*/
function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
* @return string Escaped `$string`.
*/
function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
- _deprecated_function( __FUNCTION__, '2.8', 'esc_html()' );
- if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args
+ _deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
+ if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
*
* Allows $name to be an array that accepts either three elements to grab the
* first element and the third for the name or just uses the first element of
* the array for the name.
*
*
* Allows $name to be an array that accepts either three elements to grab the
* first element and the third for the name or just uses the first element of
* the array for the name.
*
- * Passes to {@link wp_register_sidebar_widget()} after argument list and
- * backwards compatibility is complete.
+ * Passes to wp_register_sidebar_widget() after argument list and backward
+ * compatibility is complete.
* @param mixed $params ,... Widget parameters.
*/
function register_sidebar_widget($name, $output_callback, $classname = '') {
* @param mixed $params ,... Widget parameters.
*/
function register_sidebar_widget($name, $output_callback, $classname = '') {
* @param int $height Widget height.
*/
function register_widget_control($name, $control_callback, $width = '', $height = '') {
* @param int $height Widget height.
*/
function register_widget_control($name, $control_callback, $width = '', $height = '') {
* @return bool True deletion completed and false if user_id is not a number.
*/
function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
* @return bool True deletion completed and false if user_id is not a number.
*/
function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
* @return bool True on successful update, false on failure.
*/
function update_usermeta( $user_id, $meta_key, $meta_value ) {
* @return bool True on successful update, false on failure.
*/
function update_usermeta( $user_id, $meta_key, $meta_value ) {
* @param bool $add Optional, default is true. Add or remove links. Defaults to true.
*/
function automatic_feed_links( $add = true ) {
* @param bool $add Optional, default is true. Add or remove links. Defaults to true.
*/
function automatic_feed_links( $add = true ) {
* @return string The author's field from the current author's DB object.
*/
function get_profile( $field, $user = false ) {
* @return string The author's field from the current author's DB object.
*/
function get_profile( $field, $user = false ) {
// Fixes for browsers' JavaScript bugs.
global $is_macIE, $is_winIE;
// Fixes for browsers' JavaScript bugs.
global $is_macIE, $is_winIE;
* @return mixed Get the term id or Term Object, if exists.
*/
function is_term( $term, $taxonomy = '', $parent = 0 ) {
* @return mixed Get the term id or Term Object, if exists.
*/
function is_term( $term, $taxonomy = '', $parent = 0 ) {
* @param bool $extended Optional. Unused.
*/
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
* @param bool $extended Optional. Unused.
*/
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
* @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
*/
function get_user_metavalues($ids) {
* @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
*/
function get_user_metavalues($ids) {
* @return object|array The now sanitized User Object or Array (will be the same type as $user)
*/
function sanitize_user_object($user, $context = 'display') {
* @return object|array The now sanitized User Object or Array (will be the same type as $user)
*/
function sanitize_user_object($user, $context = 'display') {
* @return string
*/
function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
* @return string
*/
function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
// If there is no post stop.
$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
// If there is no post stop.
* @param string $excluded_categories Optional. Excluded categories IDs.
*/
function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
* @param string $excluded_categories Optional. Excluded categories IDs.
*/
function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
}
echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
}
$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
return apply_filters( "index_rel_link", $link );
$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
return apply_filters( "index_rel_link", $link );
if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
$post = get_post($GLOBALS['post']->post_parent);
if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
$post = get_post($GLOBALS['post']->post_parent);
* @param string $title Optional. Link title format. Default '%title'.
*/
function parent_post_rel_link( $title = '%title' ) {
* @param string $title Optional. Link title format. Default '%title'.
*/
function parent_post_rel_link( $title = '%title' ) {
* @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
*/
function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
* @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
*/
function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
* @return bool True if the current users belong to $blog_id, false if not.
*/
function is_blog_user( $blog_id = 0 ) {
* @return bool True if the current users belong to $blog_id, false if not.
*/
function is_blog_user( $blog_id = 0 ) {
*
* @param string $filename File name.
* @param string $mode Type of access you required to the stream.
*
* @param string $filename File name.
* @param string $mode Type of access you required to the stream.
* @return array|null Null, if theme name does not exist. Theme data, if exists.
*/
function get_theme( $theme ) {
* @return array|null Null, if theme name does not exist. Theme data, if exists.
*/
function get_theme( $theme ) {
* @return string The pre block without paragraph/line-break conversion.
*/
function clean_pre($matches) {
* @return string The pre block without paragraph/line-break conversion.
*/
function clean_pre($matches) {
* @param callable $admin_head_callback Call on custom header administration screen.
* @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
*/
function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
* @param callable $admin_head_callback Call on custom header administration screen.
* @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
*/
function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
- _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' );
+ _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
$args = array(
'wp-head-callback' => $wp_head_callback,
'admin-head-callback' => $admin_head_callback,
$args = array(
'wp-head-callback' => $wp_head_callback,
'admin-head-callback' => $admin_head_callback,
* @param callable $admin_head_callback Call on custom background administration screen.
* @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
*/
function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
* @param callable $admin_head_callback Call on custom background administration screen.
* @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
*/
function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
- _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' );
+ _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-background\', $args )' );
* @param WP_Post &$post Post object, passed by reference (unused).
*/
function _get_post_ancestors( &$post ) {
* @param WP_Post &$post Post object, passed by reference (unused).
*/
function _get_post_ancestors( &$post ) {
* @return resource The resulting image resource on success, Error string on failure.
*/
function wp_load_image( $file ) {
* @return resource The resulting image resource on success, Error string on failure.
*/
function wp_load_image( $file ) {
if ( ! function_exists('imagecreatefromstring') )
return __('The GD image library is not installed.');
if ( ! function_exists('imagecreatefromstring') )
return __('The GD image library is not installed.');
- // Set artificially high because GD uses uncompressed images in memory
- @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+ // Set artificially high because GD uses uncompressed images in memory.
+ wp_raise_memory_limit( 'image' );
+
* @return mixed WP_Error on failure. String with new destination path.
*/
function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
* @return mixed WP_Error on failure. String with new destination path.
*/
function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
* @return WP_Post|null Post object or array holding post contents and information
*/
function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
* @return WP_Post|null Post object or array holding post contents and information
*/
function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
* @return bool False if does not authenticate, true if username and password authenticates.
*/
function user_pass_ok($user_login, $user_pass) {
* @return bool False if does not authenticate, true if username and password authenticates.
*/
function user_pass_ok($user_login, $user_pass) {
$user = wp_authenticate( $user_login, $user_pass );
if ( is_wp_error( $user ) )
return false;
$user = wp_authenticate( $user_login, $user_pass );
if ( is_wp_error( $user ) )
return false;
- $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
+ $units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
$log = log( $bytes, KB_IN_BYTES );
$power = (int) $log;
$size = pow( KB_IN_BYTES, $log - $power );
$log = log( $bytes, KB_IN_BYTES );
$power = (int) $log;
$size = pow( KB_IN_BYTES, $log - $power );
if ( ! isset( $wp_rich_edit_exists ) )
$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
if ( ! isset( $wp_rich_edit_exists ) )
$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
* @return string text, safe for inclusion in LIKE query.
*/
function like_escape($text) {
* @return string text, safe for inclusion in LIKE query.
*/
function like_escape($text) {
return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
}
return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
}
*
* This filter is first evaluated, and the value returned, if an empty string
* is passed to wp_richedit_pre(). If an empty string is passed, it results
*
* This filter is first evaluated, and the value returned, if an empty string
* is passed to wp_richedit_pre(). If an empty string is passed, it results
* Formats text for the HTML editor.
*
* Unless $output is empty it will pass through htmlspecialchars before the
* Formats text for the HTML editor.
*
* Unless $output is empty it will pass through htmlspecialchars before the
if ( !empty($output) )
$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
/**
if ( !empty($output) )
$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
/**
* @return bool|string False on failure and string of headers if HEAD request.
*/
function wp_get_http( $url, $file_path = false, $red = 1 ) {
* @return bool|string False on failure and string of headers if HEAD request.
*/
function wp_get_http( $url, $file_path = false, $red = 1 ) {
* @return bool True if forced, false if not forced.
*/
function force_ssl_login( $force = null ) {
* @return bool True if forced, false if not forced.
*/
function force_ssl_login( $force = null ) {
- * @ignore
- * @since 4.4.0
- * @access private
- * @deprecated 4.5.0 Use wp_get_upload_dir()
- * @see wp_get_upload_dir()
+ * Deprecated function that previously assisted in turning Google Video URLs
+ * into embeds but that service has since been shut down.
+ *
+ * @since 2.9.0
+ * @deprecated 4.6.0
-function _wp_upload_dir_baseurl() {
- _deprecated_function( __FUNCTION__, '4.5', 'wp_get_upload_dir()' );
- $upload_dir = wp_get_upload_dir();
- return $upload_dir['baseurl'];
+function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
+ _deprecated_function( __FUNCTION__, '4.6.0' );
+
+ return '';