Edit File by line
/home/barbar84/www/wp-inclu...
File: deprecated.php
* Add callbacks for image header display.
[3000] Fix | Delete
*
[3001] Fix | Delete
* @since 2.1.0
[3002] Fix | Delete
* @deprecated 3.4.0 Use add_theme_support()
[3003] Fix | Delete
* @see add_theme_support()
[3004] Fix | Delete
*
[3005] Fix | Delete
* @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
[3006] Fix | Delete
* @param callable $admin_head_callback Call on custom header administration screen.
[3007] Fix | Delete
* @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
[3008] Fix | Delete
*/
[3009] Fix | Delete
function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
[3010] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
[3011] Fix | Delete
$args = array(
[3012] Fix | Delete
'wp-head-callback' => $wp_head_callback,
[3013] Fix | Delete
'admin-head-callback' => $admin_head_callback,
[3014] Fix | Delete
);
[3015] Fix | Delete
if ( $admin_preview_callback )
[3016] Fix | Delete
$args['admin-preview-callback'] = $admin_preview_callback;
[3017] Fix | Delete
return add_theme_support( 'custom-header', $args );
[3018] Fix | Delete
}
[3019] Fix | Delete
[3020] Fix | Delete
/**
[3021] Fix | Delete
* Remove image header support.
[3022] Fix | Delete
*
[3023] Fix | Delete
* @since 3.1.0
[3024] Fix | Delete
* @deprecated 3.4.0 Use remove_theme_support()
[3025] Fix | Delete
* @see remove_theme_support()
[3026] Fix | Delete
*
[3027] Fix | Delete
* @return null|bool Whether support was removed.
[3028] Fix | Delete
*/
[3029] Fix | Delete
function remove_custom_image_header() {
[3030] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-header\' )' );
[3031] Fix | Delete
return remove_theme_support( 'custom-header' );
[3032] Fix | Delete
}
[3033] Fix | Delete
[3034] Fix | Delete
/**
[3035] Fix | Delete
* Add callbacks for background image display.
[3036] Fix | Delete
*
[3037] Fix | Delete
* @since 3.0.0
[3038] Fix | Delete
* @deprecated 3.4.0 Use add_theme_support()
[3039] Fix | Delete
* @see add_theme_support()
[3040] Fix | Delete
*
[3041] Fix | Delete
* @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
[3042] Fix | Delete
* @param callable $admin_head_callback Call on custom background administration screen.
[3043] Fix | Delete
* @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
[3044] Fix | Delete
*/
[3045] Fix | Delete
function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
[3046] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-background\', $args )' );
[3047] Fix | Delete
$args = array();
[3048] Fix | Delete
if ( $wp_head_callback )
[3049] Fix | Delete
$args['wp-head-callback'] = $wp_head_callback;
[3050] Fix | Delete
if ( $admin_head_callback )
[3051] Fix | Delete
$args['admin-head-callback'] = $admin_head_callback;
[3052] Fix | Delete
if ( $admin_preview_callback )
[3053] Fix | Delete
$args['admin-preview-callback'] = $admin_preview_callback;
[3054] Fix | Delete
return add_theme_support( 'custom-background', $args );
[3055] Fix | Delete
}
[3056] Fix | Delete
[3057] Fix | Delete
/**
[3058] Fix | Delete
* Remove custom background support.
[3059] Fix | Delete
*
[3060] Fix | Delete
* @since 3.1.0
[3061] Fix | Delete
* @deprecated 3.4.0 Use add_custom_background()
[3062] Fix | Delete
* @see add_custom_background()
[3063] Fix | Delete
*
[3064] Fix | Delete
* @return null|bool Whether support was removed.
[3065] Fix | Delete
*/
[3066] Fix | Delete
function remove_custom_background() {
[3067] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-background\' )' );
[3068] Fix | Delete
return remove_theme_support( 'custom-background' );
[3069] Fix | Delete
}
[3070] Fix | Delete
[3071] Fix | Delete
/**
[3072] Fix | Delete
* Retrieve theme data from parsed theme file.
[3073] Fix | Delete
*
[3074] Fix | Delete
* @since 1.5.0
[3075] Fix | Delete
* @deprecated 3.4.0 Use wp_get_theme()
[3076] Fix | Delete
* @see wp_get_theme()
[3077] Fix | Delete
*
[3078] Fix | Delete
* @param string $theme_file Theme file path.
[3079] Fix | Delete
* @return array Theme data.
[3080] Fix | Delete
*/
[3081] Fix | Delete
function get_theme_data( $theme_file ) {
[3082] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
[3083] Fix | Delete
$theme = new WP_Theme( wp_basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
[3084] Fix | Delete
[3085] Fix | Delete
$theme_data = array(
[3086] Fix | Delete
'Name' => $theme->get('Name'),
[3087] Fix | Delete
'URI' => $theme->display('ThemeURI', true, false),
[3088] Fix | Delete
'Description' => $theme->display('Description', true, false),
[3089] Fix | Delete
'Author' => $theme->display('Author', true, false),
[3090] Fix | Delete
'AuthorURI' => $theme->display('AuthorURI', true, false),
[3091] Fix | Delete
'Version' => $theme->get('Version'),
[3092] Fix | Delete
'Template' => $theme->get('Template'),
[3093] Fix | Delete
'Status' => $theme->get('Status'),
[3094] Fix | Delete
'Tags' => $theme->get('Tags'),
[3095] Fix | Delete
'Title' => $theme->get('Name'),
[3096] Fix | Delete
'AuthorName' => $theme->get('Author'),
[3097] Fix | Delete
);
[3098] Fix | Delete
[3099] Fix | Delete
foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) {
[3100] Fix | Delete
if ( ! isset( $theme_data[ $extra_header ] ) )
[3101] Fix | Delete
$theme_data[ $extra_header ] = $theme->get( $extra_header );
[3102] Fix | Delete
}
[3103] Fix | Delete
[3104] Fix | Delete
return $theme_data;
[3105] Fix | Delete
}
[3106] Fix | Delete
[3107] Fix | Delete
/**
[3108] Fix | Delete
* Alias of update_post_cache().
[3109] Fix | Delete
*
[3110] Fix | Delete
* @see update_post_cache() Posts and pages are the same, alias is intentional
[3111] Fix | Delete
*
[3112] Fix | Delete
* @since 1.5.1
[3113] Fix | Delete
* @deprecated 3.4.0 Use update_post_cache()
[3114] Fix | Delete
* @see update_post_cache()
[3115] Fix | Delete
*
[3116] Fix | Delete
* @param array $pages list of page objects
[3117] Fix | Delete
*/
[3118] Fix | Delete
function update_page_cache( &$pages ) {
[3119] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'update_post_cache()' );
[3120] Fix | Delete
[3121] Fix | Delete
update_post_cache( $pages );
[3122] Fix | Delete
}
[3123] Fix | Delete
[3124] Fix | Delete
/**
[3125] Fix | Delete
* Will clean the page in the cache.
[3126] Fix | Delete
*
[3127] Fix | Delete
* Clean (read: delete) page from cache that matches $id. Will also clean cache
[3128] Fix | Delete
* associated with 'all_page_ids' and 'get_pages'.
[3129] Fix | Delete
*
[3130] Fix | Delete
* @since 2.0.0
[3131] Fix | Delete
* @deprecated 3.4.0 Use clean_post_cache
[3132] Fix | Delete
* @see clean_post_cache()
[3133] Fix | Delete
*
[3134] Fix | Delete
* @param int $id Page ID to clean
[3135] Fix | Delete
*/
[3136] Fix | Delete
function clean_page_cache( $id ) {
[3137] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.0', 'clean_post_cache()' );
[3138] Fix | Delete
[3139] Fix | Delete
clean_post_cache( $id );
[3140] Fix | Delete
}
[3141] Fix | Delete
[3142] Fix | Delete
/**
[3143] Fix | Delete
* Retrieve nonce action "Are you sure" message.
[3144] Fix | Delete
*
[3145] Fix | Delete
* Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3.
[3146] Fix | Delete
*
[3147] Fix | Delete
* @since 2.0.4
[3148] Fix | Delete
* @deprecated 3.4.1 Use wp_nonce_ays()
[3149] Fix | Delete
* @see wp_nonce_ays()
[3150] Fix | Delete
*
[3151] Fix | Delete
* @param string $action Nonce action.
[3152] Fix | Delete
* @return string Are you sure message.
[3153] Fix | Delete
*/
[3154] Fix | Delete
function wp_explain_nonce( $action ) {
[3155] Fix | Delete
_deprecated_function( __FUNCTION__, '3.4.1', 'wp_nonce_ays()' );
[3156] Fix | Delete
return __( 'Are you sure you want to do this?' );
[3157] Fix | Delete
}
[3158] Fix | Delete
[3159] Fix | Delete
/**
[3160] Fix | Delete
* Display "sticky" CSS class, if a post is sticky.
[3161] Fix | Delete
*
[3162] Fix | Delete
* @since 2.7.0
[3163] Fix | Delete
* @deprecated 3.5.0 Use post_class()
[3164] Fix | Delete
* @see post_class()
[3165] Fix | Delete
*
[3166] Fix | Delete
* @param int $post_id An optional post ID.
[3167] Fix | Delete
*/
[3168] Fix | Delete
function sticky_class( $post_id = null ) {
[3169] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
[3170] Fix | Delete
if ( is_sticky( $post_id ) )
[3171] Fix | Delete
echo ' sticky';
[3172] Fix | Delete
}
[3173] Fix | Delete
[3174] Fix | Delete
/**
[3175] Fix | Delete
* Retrieve post ancestors.
[3176] Fix | Delete
*
[3177] Fix | Delete
* This is no longer needed as WP_Post lazy-loads the ancestors
[3178] Fix | Delete
* property with get_post_ancestors().
[3179] Fix | Delete
*
[3180] Fix | Delete
* @since 2.3.4
[3181] Fix | Delete
* @deprecated 3.5.0 Use get_post_ancestors()
[3182] Fix | Delete
* @see get_post_ancestors()
[3183] Fix | Delete
*
[3184] Fix | Delete
* @param WP_Post $post Post object, passed by reference (unused).
[3185] Fix | Delete
*/
[3186] Fix | Delete
function _get_post_ancestors( &$post ) {
[3187] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0' );
[3188] Fix | Delete
}
[3189] Fix | Delete
[3190] Fix | Delete
/**
[3191] Fix | Delete
* Load an image from a string, if PHP supports it.
[3192] Fix | Delete
*
[3193] Fix | Delete
* @since 2.1.0
[3194] Fix | Delete
* @deprecated 3.5.0 Use wp_get_image_editor()
[3195] Fix | Delete
* @see wp_get_image_editor()
[3196] Fix | Delete
*
[3197] Fix | Delete
* @param string $file Filename of the image to load.
[3198] Fix | Delete
* @return resource|GdImage|string The resulting image resource or GdImage instance on success,
[3199] Fix | Delete
* error string on failure.
[3200] Fix | Delete
*/
[3201] Fix | Delete
function wp_load_image( $file ) {
[3202] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
[3203] Fix | Delete
[3204] Fix | Delete
if ( is_numeric( $file ) )
[3205] Fix | Delete
$file = get_attached_file( $file );
[3206] Fix | Delete
[3207] Fix | Delete
if ( ! is_file( $file ) ) {
[3208] Fix | Delete
/* translators: %s: File name. */
[3209] Fix | Delete
return sprintf( __( 'File “%s” doesn’t exist?' ), $file );
[3210] Fix | Delete
}
[3211] Fix | Delete
[3212] Fix | Delete
if ( ! function_exists('imagecreatefromstring') )
[3213] Fix | Delete
return __('The GD image library is not installed.');
[3214] Fix | Delete
[3215] Fix | Delete
// Set artificially high because GD uses uncompressed images in memory.
[3216] Fix | Delete
wp_raise_memory_limit( 'image' );
[3217] Fix | Delete
[3218] Fix | Delete
$image = imagecreatefromstring( file_get_contents( $file ) );
[3219] Fix | Delete
[3220] Fix | Delete
if ( ! is_gd_image( $image ) ) {
[3221] Fix | Delete
/* translators: %s: File name. */
[3222] Fix | Delete
return sprintf( __( 'File “%s” is not an image.' ), $file );
[3223] Fix | Delete
}
[3224] Fix | Delete
[3225] Fix | Delete
return $image;
[3226] Fix | Delete
}
[3227] Fix | Delete
[3228] Fix | Delete
/**
[3229] Fix | Delete
* Scale down an image to fit a particular size and save a new copy of the image.
[3230] Fix | Delete
*
[3231] Fix | Delete
* The PNG transparency will be preserved using the function, as well as the
[3232] Fix | Delete
* image type. If the file going in is PNG, then the resized image is going to
[3233] Fix | Delete
* be PNG. The only supported image types are PNG, GIF, and JPEG.
[3234] Fix | Delete
*
[3235] Fix | Delete
* Some functionality requires API to exist, so some PHP version may lose out
[3236] Fix | Delete
* support. This is not the fault of WordPress (where functionality is
[3237] Fix | Delete
* downgraded, not actual defects), but of your PHP version.
[3238] Fix | Delete
*
[3239] Fix | Delete
* @since 2.5.0
[3240] Fix | Delete
* @deprecated 3.5.0 Use wp_get_image_editor()
[3241] Fix | Delete
* @see wp_get_image_editor()
[3242] Fix | Delete
*
[3243] Fix | Delete
* @param string $file Image file path.
[3244] Fix | Delete
* @param int $max_w Maximum width to resize to.
[3245] Fix | Delete
* @param int $max_h Maximum height to resize to.
[3246] Fix | Delete
* @param bool $crop Optional. Whether to crop image or resize. Default false.
[3247] Fix | Delete
* @param string $suffix Optional. File suffix. Default null.
[3248] Fix | Delete
* @param string $dest_path Optional. New image file path. Default null.
[3249] Fix | Delete
* @param int $jpeg_quality Optional. Image quality percentage. Default 90.
[3250] Fix | Delete
* @return mixed WP_Error on failure. String with new destination path.
[3251] Fix | Delete
*/
[3252] Fix | Delete
function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
[3253] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
[3254] Fix | Delete
[3255] Fix | Delete
$editor = wp_get_image_editor( $file );
[3256] Fix | Delete
if ( is_wp_error( $editor ) )
[3257] Fix | Delete
return $editor;
[3258] Fix | Delete
$editor->set_quality( $jpeg_quality );
[3259] Fix | Delete
[3260] Fix | Delete
$resized = $editor->resize( $max_w, $max_h, $crop );
[3261] Fix | Delete
if ( is_wp_error( $resized ) )
[3262] Fix | Delete
return $resized;
[3263] Fix | Delete
[3264] Fix | Delete
$dest_file = $editor->generate_filename( $suffix, $dest_path );
[3265] Fix | Delete
$saved = $editor->save( $dest_file );
[3266] Fix | Delete
[3267] Fix | Delete
if ( is_wp_error( $saved ) )
[3268] Fix | Delete
return $saved;
[3269] Fix | Delete
[3270] Fix | Delete
return $dest_file;
[3271] Fix | Delete
}
[3272] Fix | Delete
[3273] Fix | Delete
/**
[3274] Fix | Delete
* Retrieve a single post, based on post ID.
[3275] Fix | Delete
*
[3276] Fix | Delete
* Has categories in 'post_category' property or key. Has tags in 'tags_input'
[3277] Fix | Delete
* property or key.
[3278] Fix | Delete
*
[3279] Fix | Delete
* @since 1.0.0
[3280] Fix | Delete
* @deprecated 3.5.0 Use get_post()
[3281] Fix | Delete
* @see get_post()
[3282] Fix | Delete
*
[3283] Fix | Delete
* @param int $postid Post ID.
[3284] Fix | Delete
* @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
[3285] Fix | Delete
* @return WP_Post|null Post object or array holding post contents and information
[3286] Fix | Delete
*/
[3287] Fix | Delete
function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
[3288] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
[3289] Fix | Delete
return get_post( $postid, $mode );
[3290] Fix | Delete
}
[3291] Fix | Delete
[3292] Fix | Delete
/**
[3293] Fix | Delete
* Check that the user login name and password is correct.
[3294] Fix | Delete
*
[3295] Fix | Delete
* @since 0.71
[3296] Fix | Delete
* @deprecated 3.5.0 Use wp_authenticate()
[3297] Fix | Delete
* @see wp_authenticate()
[3298] Fix | Delete
*
[3299] Fix | Delete
* @param string $user_login User name.
[3300] Fix | Delete
* @param string $user_pass User password.
[3301] Fix | Delete
* @return bool False if does not authenticate, true if username and password authenticates.
[3302] Fix | Delete
*/
[3303] Fix | Delete
function user_pass_ok($user_login, $user_pass) {
[3304] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_authenticate()' );
[3305] Fix | Delete
$user = wp_authenticate( $user_login, $user_pass );
[3306] Fix | Delete
if ( is_wp_error( $user ) )
[3307] Fix | Delete
return false;
[3308] Fix | Delete
[3309] Fix | Delete
return true;
[3310] Fix | Delete
}
[3311] Fix | Delete
[3312] Fix | Delete
/**
[3313] Fix | Delete
* Callback formerly fired on the save_post hook. No longer needed.
[3314] Fix | Delete
*
[3315] Fix | Delete
* @since 2.3.0
[3316] Fix | Delete
* @deprecated 3.5.0
[3317] Fix | Delete
*/
[3318] Fix | Delete
function _save_post_hook() {}
[3319] Fix | Delete
[3320] Fix | Delete
/**
[3321] Fix | Delete
* Check if the installed version of GD supports particular image type
[3322] Fix | Delete
*
[3323] Fix | Delete
* @since 2.9.0
[3324] Fix | Delete
* @deprecated 3.5.0 Use wp_image_editor_supports()
[3325] Fix | Delete
* @see wp_image_editor_supports()
[3326] Fix | Delete
*
[3327] Fix | Delete
* @param string $mime_type
[3328] Fix | Delete
* @return bool
[3329] Fix | Delete
*/
[3330] Fix | Delete
function gd_edit_image_support($mime_type) {
[3331] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_image_editor_supports()' );
[3332] Fix | Delete
[3333] Fix | Delete
if ( function_exists('imagetypes') ) {
[3334] Fix | Delete
switch( $mime_type ) {
[3335] Fix | Delete
case 'image/jpeg':
[3336] Fix | Delete
return (imagetypes() & IMG_JPG) != 0;
[3337] Fix | Delete
case 'image/png':
[3338] Fix | Delete
return (imagetypes() & IMG_PNG) != 0;
[3339] Fix | Delete
case 'image/gif':
[3340] Fix | Delete
return (imagetypes() & IMG_GIF) != 0;
[3341] Fix | Delete
}
[3342] Fix | Delete
} else {
[3343] Fix | Delete
switch( $mime_type ) {
[3344] Fix | Delete
case 'image/jpeg':
[3345] Fix | Delete
return function_exists('imagecreatefromjpeg');
[3346] Fix | Delete
case 'image/png':
[3347] Fix | Delete
return function_exists('imagecreatefrompng');
[3348] Fix | Delete
case 'image/gif':
[3349] Fix | Delete
return function_exists('imagecreatefromgif');
[3350] Fix | Delete
}
[3351] Fix | Delete
}
[3352] Fix | Delete
return false;
[3353] Fix | Delete
}
[3354] Fix | Delete
[3355] Fix | Delete
/**
[3356] Fix | Delete
* Converts an integer byte value to a shorthand byte value.
[3357] Fix | Delete
*
[3358] Fix | Delete
* @since 2.3.0
[3359] Fix | Delete
* @deprecated 3.6.0 Use size_format()
[3360] Fix | Delete
* @see size_format()
[3361] Fix | Delete
*
[3362] Fix | Delete
* @param int $bytes An integer byte value.
[3363] Fix | Delete
* @return string A shorthand byte value.
[3364] Fix | Delete
*/
[3365] Fix | Delete
function wp_convert_bytes_to_hr( $bytes ) {
[3366] Fix | Delete
_deprecated_function( __FUNCTION__, '3.6.0', 'size_format()' );
[3367] Fix | Delete
[3368] Fix | Delete
$units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
[3369] Fix | Delete
$log = log( $bytes, KB_IN_BYTES );
[3370] Fix | Delete
$power = (int) $log;
[3371] Fix | Delete
$size = KB_IN_BYTES ** ( $log - $power );
[3372] Fix | Delete
[3373] Fix | Delete
if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
[3374] Fix | Delete
$unit = $units[ $power ];
[3375] Fix | Delete
} else {
[3376] Fix | Delete
$size = $bytes;
[3377] Fix | Delete
$unit = $units[0];
[3378] Fix | Delete
}
[3379] Fix | Delete
[3380] Fix | Delete
return $size . $unit;
[3381] Fix | Delete
}
[3382] Fix | Delete
[3383] Fix | Delete
/**
[3384] Fix | Delete
* Formerly used internally to tidy up the search terms.
[3385] Fix | Delete
*
[3386] Fix | Delete
* @since 2.9.0
[3387] Fix | Delete
* @access private
[3388] Fix | Delete
* @deprecated 3.7.0
[3389] Fix | Delete
*
[3390] Fix | Delete
* @param string $t Search terms to "tidy", e.g. trim.
[3391] Fix | Delete
* @return string Trimmed search terms.
[3392] Fix | Delete
*/
[3393] Fix | Delete
function _search_terms_tidy( $t ) {
[3394] Fix | Delete
_deprecated_function( __FUNCTION__, '3.7.0' );
[3395] Fix | Delete
return trim( $t, "\"'\n\r " );
[3396] Fix | Delete
}
[3397] Fix | Delete
[3398] Fix | Delete
/**
[3399] Fix | Delete
* Determine if TinyMCE is available.
[3400] Fix | Delete
*
[3401] Fix | Delete
* Checks to see if the user has deleted the tinymce files to slim down
[3402] Fix | Delete
* their WordPress installation.
[3403] Fix | Delete
*
[3404] Fix | Delete
* @since 2.1.0
[3405] Fix | Delete
* @deprecated 3.9.0
[3406] Fix | Delete
*
[3407] Fix | Delete
* @return bool Whether TinyMCE exists.
[3408] Fix | Delete
*/
[3409] Fix | Delete
function rich_edit_exists() {
[3410] Fix | Delete
global $wp_rich_edit_exists;
[3411] Fix | Delete
_deprecated_function( __FUNCTION__, '3.9.0' );
[3412] Fix | Delete
[3413] Fix | Delete
if ( ! isset( $wp_rich_edit_exists ) )
[3414] Fix | Delete
$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
[3415] Fix | Delete
[3416] Fix | Delete
return $wp_rich_edit_exists;
[3417] Fix | Delete
}
[3418] Fix | Delete
[3419] Fix | Delete
/**
[3420] Fix | Delete
* Old callback for tag link tooltips.
[3421] Fix | Delete
*
[3422] Fix | Delete
* @since 2.7.0
[3423] Fix | Delete
* @access private
[3424] Fix | Delete
* @deprecated 3.9.0
[3425] Fix | Delete
*
[3426] Fix | Delete
* @param int $count Number of topics.
[3427] Fix | Delete
* @return int Number of topics.
[3428] Fix | Delete
*/
[3429] Fix | Delete
function default_topic_count_text( $count ) {
[3430] Fix | Delete
return $count;
[3431] Fix | Delete
}
[3432] Fix | Delete
[3433] Fix | Delete
/**
[3434] Fix | Delete
* Formerly used to escape strings before inserting into the DB.
[3435] Fix | Delete
*
[3436] Fix | Delete
* Has not performed this function for many, many years. Use wpdb::prepare() instead.
[3437] Fix | Delete
*
[3438] Fix | Delete
* @since 0.71
[3439] Fix | Delete
* @deprecated 3.9.0
[3440] Fix | Delete
*
[3441] Fix | Delete
* @param string $content The text to format.
[3442] Fix | Delete
* @return string The very same text.
[3443] Fix | Delete
*/
[3444] Fix | Delete
function format_to_post( $content ) {
[3445] Fix | Delete
_deprecated_function( __FUNCTION__, '3.9.0' );
[3446] Fix | Delete
return $content;
[3447] Fix | Delete
}
[3448] Fix | Delete
[3449] Fix | Delete
/**
[3450] Fix | Delete
* Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
[3451] Fix | Delete
*
[3452] Fix | Delete
* @since 2.5.0
[3453] Fix | Delete
* @deprecated 4.0.0 Use wpdb::esc_like()
[3454] Fix | Delete
* @see wpdb::esc_like()
[3455] Fix | Delete
*
[3456] Fix | Delete
* @param string $text The text to be escaped.
[3457] Fix | Delete
* @return string text, safe for inclusion in LIKE query.
[3458] Fix | Delete
*/
[3459] Fix | Delete
function like_escape($text) {
[3460] Fix | Delete
_deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
[3461] Fix | Delete
return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
[3462] Fix | Delete
}
[3463] Fix | Delete
[3464] Fix | Delete
/**
[3465] Fix | Delete
* Determines if the URL can be accessed over SSL.
[3466] Fix | Delete
*
[3467] Fix | Delete
* Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
[3468] Fix | Delete
* the URL using https as the scheme.
[3469] Fix | Delete
*
[3470] Fix | Delete
* @since 2.5.0
[3471] Fix | Delete
* @deprecated 4.0.0
[3472] Fix | Delete
*
[3473] Fix | Delete
* @param string $url The URL to test.
[3474] Fix | Delete
* @return bool Whether SSL access is available.
[3475] Fix | Delete
*/
[3476] Fix | Delete
function url_is_accessable_via_ssl( $url ) {
[3477] Fix | Delete
_deprecated_function( __FUNCTION__, '4.0.0' );
[3478] Fix | Delete
[3479] Fix | Delete
$response = wp_remote_get( set_url_scheme( $url, 'https' ) );
[3480] Fix | Delete
[3481] Fix | Delete
if ( !is_wp_error( $response ) ) {
[3482] Fix | Delete
$status = wp_remote_retrieve_response_code( $response );
[3483] Fix | Delete
if ( 200 == $status || 401 == $status ) {
[3484] Fix | Delete
return true;
[3485] Fix | Delete
}
[3486] Fix | Delete
}
[3487] Fix | Delete
[3488] Fix | Delete
return false;
[3489] Fix | Delete
}
[3490] Fix | Delete
[3491] Fix | Delete
/**
[3492] Fix | Delete
* Start preview theme output buffer.
[3493] Fix | Delete
*
[3494] Fix | Delete
* Will only perform task if the user has permissions and template and preview
[3495] Fix | Delete
* query variables exist.
[3496] Fix | Delete
*
[3497] Fix | Delete
* @since 2.6.0
[3498] Fix | Delete
* @deprecated 4.3.0
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function