Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu...
File: deprecated.php
* Filters 'img' elements in post content to add 'srcset' and 'sizes' attributes.
[4000] Fix | Delete
*
[4001] Fix | Delete
* @since 4.4.0
[4002] Fix | Delete
* @deprecated 5.5.0
[4003] Fix | Delete
*
[4004] Fix | Delete
* @see wp_image_add_srcset_and_sizes()
[4005] Fix | Delete
*
[4006] Fix | Delete
* @param string $content The raw post content to be filtered.
[4007] Fix | Delete
* @return string Converted content with 'srcset' and 'sizes' attributes added to images.
[4008] Fix | Delete
*/
[4009] Fix | Delete
function wp_make_content_images_responsive( $content ) {
[4010] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0', 'wp_filter_content_tags()' );
[4011] Fix | Delete
[4012] Fix | Delete
// This will also add the `loading` attribute to `img` tags, if enabled.
[4013] Fix | Delete
return wp_filter_content_tags( $content );
[4014] Fix | Delete
}
[4015] Fix | Delete
[4016] Fix | Delete
/**
[4017] Fix | Delete
* Turn register globals off.
[4018] Fix | Delete
*
[4019] Fix | Delete
* @since 2.1.0
[4020] Fix | Delete
* @access private
[4021] Fix | Delete
* @deprecated 5.5.0
[4022] Fix | Delete
*/
[4023] Fix | Delete
function wp_unregister_GLOBALS() {
[4024] Fix | Delete
// register_globals was deprecated in PHP 5.3 and removed entirely in PHP 5.4.
[4025] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0' );
[4026] Fix | Delete
}
[4027] Fix | Delete
[4028] Fix | Delete
/**
[4029] Fix | Delete
* Does comment contain disallowed characters or words.
[4030] Fix | Delete
*
[4031] Fix | Delete
* @since 1.5.0
[4032] Fix | Delete
* @deprecated 5.5.0 Use wp_check_comment_disallowed_list() instead.
[4033] Fix | Delete
* Please consider writing more inclusive code.
[4034] Fix | Delete
*
[4035] Fix | Delete
* @param string $author The author of the comment
[4036] Fix | Delete
* @param string $email The email of the comment
[4037] Fix | Delete
* @param string $url The url used in the comment
[4038] Fix | Delete
* @param string $comment The comment content
[4039] Fix | Delete
* @param string $user_ip The comment author's IP address
[4040] Fix | Delete
* @param string $user_agent The author's browser user agent
[4041] Fix | Delete
* @return bool True if comment contains disallowed content, false if comment does not
[4042] Fix | Delete
*/
[4043] Fix | Delete
function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
[4044] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' );
[4045] Fix | Delete
[4046] Fix | Delete
return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent );
[4047] Fix | Delete
}
[4048] Fix | Delete
[4049] Fix | Delete
/**
[4050] Fix | Delete
* Filters out `register_meta()` args based on an allowed list.
[4051] Fix | Delete
*
[4052] Fix | Delete
* `register_meta()` args may change over time, so requiring the allowed list
[4053] Fix | Delete
* to be explicitly turned off is a warranty seal of sorts.
[4054] Fix | Delete
*
[4055] Fix | Delete
* @access private
[4056] Fix | Delete
* @since 4.6.0
[4057] Fix | Delete
* @deprecated 5.5.0 Use _wp_register_meta_args_allowed_list() instead.
[4058] Fix | Delete
* Please consider writing more inclusive code.
[4059] Fix | Delete
*
[4060] Fix | Delete
* @param array $args Arguments from `register_meta()`.
[4061] Fix | Delete
* @param array $default_args Default arguments for `register_meta()`.
[4062] Fix | Delete
* @return array Filtered arguments.
[4063] Fix | Delete
*/
[4064] Fix | Delete
function _wp_register_meta_args_whitelist( $args, $default_args ) {
[4065] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0', '_wp_register_meta_args_allowed_list()' );
[4066] Fix | Delete
[4067] Fix | Delete
return _wp_register_meta_args_allowed_list( $args, $default_args );
[4068] Fix | Delete
}
[4069] Fix | Delete
[4070] Fix | Delete
/**
[4071] Fix | Delete
* Adds an array of options to the list of allowed options.
[4072] Fix | Delete
*
[4073] Fix | Delete
* @since 2.7.0
[4074] Fix | Delete
* @deprecated 5.5.0 Use add_allowed_options() instead.
[4075] Fix | Delete
* Please consider writing more inclusive code.
[4076] Fix | Delete
*
[4077] Fix | Delete
* @param array $new_options
[4078] Fix | Delete
* @param string|array $options
[4079] Fix | Delete
* @return array
[4080] Fix | Delete
*/
[4081] Fix | Delete
function add_option_whitelist( $new_options, $options = '' ) {
[4082] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' );
[4083] Fix | Delete
[4084] Fix | Delete
return add_allowed_options( $new_options, $options );
[4085] Fix | Delete
}
[4086] Fix | Delete
[4087] Fix | Delete
/**
[4088] Fix | Delete
* Removes a list of options from the allowed options list.
[4089] Fix | Delete
*
[4090] Fix | Delete
* @since 2.7.0
[4091] Fix | Delete
* @deprecated 5.5.0 Use remove_allowed_options() instead.
[4092] Fix | Delete
* Please consider writing more inclusive code.
[4093] Fix | Delete
*
[4094] Fix | Delete
* @param array $del_options
[4095] Fix | Delete
* @param string|array $options
[4096] Fix | Delete
* @return array
[4097] Fix | Delete
*/
[4098] Fix | Delete
function remove_option_whitelist( $del_options, $options = '' ) {
[4099] Fix | Delete
_deprecated_function( __FUNCTION__, '5.5.0', 'remove_allowed_options()' );
[4100] Fix | Delete
[4101] Fix | Delete
return remove_allowed_options( $del_options, $options );
[4102] Fix | Delete
}
[4103] Fix | Delete
[4104] Fix | Delete
/**
[4105] Fix | Delete
* Adds slashes to only string values in an array of values.
[4106] Fix | Delete
*
[4107] Fix | Delete
* This should be used when preparing data for core APIs that expect slashed data.
[4108] Fix | Delete
* This should not be used to escape data going directly into an SQL query.
[4109] Fix | Delete
*
[4110] Fix | Delete
* @since 5.3.0
[4111] Fix | Delete
* @deprecated 5.6.0 Use wp_slash()
[4112] Fix | Delete
*
[4113] Fix | Delete
* @see wp_slash()
[4114] Fix | Delete
*
[4115] Fix | Delete
* @param mixed $value Scalar or array of scalars.
[4116] Fix | Delete
* @return mixed Slashes $value
[4117] Fix | Delete
*/
[4118] Fix | Delete
function wp_slash_strings_only( $value ) {
[4119] Fix | Delete
return map_deep( $value, 'addslashes_strings_only' );
[4120] Fix | Delete
}
[4121] Fix | Delete
[4122] Fix | Delete
/**
[4123] Fix | Delete
* Adds slashes only if the provided value is a string.
[4124] Fix | Delete
*
[4125] Fix | Delete
* @since 5.3.0
[4126] Fix | Delete
* @deprecated 5.6.0
[4127] Fix | Delete
*
[4128] Fix | Delete
* @see wp_slash()
[4129] Fix | Delete
*
[4130] Fix | Delete
* @param mixed $value
[4131] Fix | Delete
* @return mixed
[4132] Fix | Delete
*/
[4133] Fix | Delete
function addslashes_strings_only( $value ) {
[4134] Fix | Delete
return is_string( $value ) ? addslashes( $value ) : $value;
[4135] Fix | Delete
}
[4136] Fix | Delete
[4137] Fix | Delete
/**
[4138] Fix | Delete
* Displays a `noindex` meta tag if required by the blog configuration.
[4139] Fix | Delete
*
[4140] Fix | Delete
* If a blog is marked as not being public then the `noindex` meta tag will be
[4141] Fix | Delete
* output to tell web robots not to index the page content.
[4142] Fix | Delete
*
[4143] Fix | Delete
* Typical usage is as a {@see 'wp_head'} callback:
[4144] Fix | Delete
*
[4145] Fix | Delete
* add_action( 'wp_head', 'noindex' );
[4146] Fix | Delete
*
[4147] Fix | Delete
* @see wp_no_robots()
[4148] Fix | Delete
*
[4149] Fix | Delete
* @since 2.1.0
[4150] Fix | Delete
* @deprecated 5.7.0 Use wp_robots_noindex() instead on 'wp_robots' filter.
[4151] Fix | Delete
*/
[4152] Fix | Delete
function noindex() {
[4153] Fix | Delete
_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_noindex()' );
[4154] Fix | Delete
[4155] Fix | Delete
// If the blog is not public, tell robots to go away.
[4156] Fix | Delete
if ( '0' == get_option( 'blog_public' ) ) {
[4157] Fix | Delete
wp_no_robots();
[4158] Fix | Delete
}
[4159] Fix | Delete
}
[4160] Fix | Delete
[4161] Fix | Delete
/**
[4162] Fix | Delete
* Display a `noindex` meta tag.
[4163] Fix | Delete
*
[4164] Fix | Delete
* Outputs a `noindex` meta tag that tells web robots not to index the page content.
[4165] Fix | Delete
*
[4166] Fix | Delete
* Typical usage is as a {@see 'wp_head'} callback:
[4167] Fix | Delete
*
[4168] Fix | Delete
* add_action( 'wp_head', 'wp_no_robots' );
[4169] Fix | Delete
*
[4170] Fix | Delete
* @since 3.3.0
[4171] Fix | Delete
* @since 5.3.0 Echo `noindex,nofollow` if search engine visibility is discouraged.
[4172] Fix | Delete
* @deprecated 5.7.0 Use wp_robots_no_robots() instead on 'wp_robots' filter.
[4173] Fix | Delete
*/
[4174] Fix | Delete
function wp_no_robots() {
[4175] Fix | Delete
_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_no_robots()' );
[4176] Fix | Delete
[4177] Fix | Delete
if ( get_option( 'blog_public' ) ) {
[4178] Fix | Delete
echo "<meta name='robots' content='noindex,follow' />\n";
[4179] Fix | Delete
return;
[4180] Fix | Delete
}
[4181] Fix | Delete
[4182] Fix | Delete
echo "<meta name='robots' content='noindex,nofollow' />\n";
[4183] Fix | Delete
}
[4184] Fix | Delete
[4185] Fix | Delete
/**
[4186] Fix | Delete
* Display a `noindex,noarchive` meta tag and referrer `strict-origin-when-cross-origin` meta tag.
[4187] Fix | Delete
*
[4188] Fix | Delete
* Outputs a `noindex,noarchive` meta tag that tells web robots not to index or cache the page content.
[4189] Fix | Delete
* Outputs a referrer `strict-origin-when-cross-origin` meta tag that tells the browser not to send
[4190] Fix | Delete
* the full URL as a referrer to other sites when cross-origin assets are loaded.
[4191] Fix | Delete
*
[4192] Fix | Delete
* Typical usage is as a {@see 'wp_head'} callback:
[4193] Fix | Delete
*
[4194] Fix | Delete
* add_action( 'wp_head', 'wp_sensitive_page_meta' );
[4195] Fix | Delete
*
[4196] Fix | Delete
* @since 5.0.1
[4197] Fix | Delete
* @deprecated 5.7.0 Use wp_robots_sensitive_page() instead on 'wp_robots' filter
[4198] Fix | Delete
* and wp_strict_cross_origin_referrer() on 'wp_head' action.
[4199] Fix | Delete
*
[4200] Fix | Delete
* @see wp_robots_sensitive_page()
[4201] Fix | Delete
*/
[4202] Fix | Delete
function wp_sensitive_page_meta() {
[4203] Fix | Delete
_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_sensitive_page()' );
[4204] Fix | Delete
[4205] Fix | Delete
?>
[4206] Fix | Delete
<meta name='robots' content='noindex,noarchive' />
[4207] Fix | Delete
<?php
[4208] Fix | Delete
wp_strict_cross_origin_referrer();
[4209] Fix | Delete
}
[4210] Fix | Delete
[4211] Fix | Delete
/**
[4212] Fix | Delete
* Render inner blocks from the `core/columns` block for generating an excerpt.
[4213] Fix | Delete
*
[4214] Fix | Delete
* @since 5.2.0
[4215] Fix | Delete
* @access private
[4216] Fix | Delete
* @deprecated 5.8.0 Use _excerpt_render_inner_blocks() introduced in 5.8.0.
[4217] Fix | Delete
*
[4218] Fix | Delete
* @see _excerpt_render_inner_blocks()
[4219] Fix | Delete
*
[4220] Fix | Delete
* @param array $columns The parsed columns block.
[4221] Fix | Delete
* @param array $allowed_blocks The list of allowed inner blocks.
[4222] Fix | Delete
* @return string The rendered inner blocks.
[4223] Fix | Delete
*/
[4224] Fix | Delete
function _excerpt_render_inner_columns_blocks( $columns, $allowed_blocks ) {
[4225] Fix | Delete
_deprecated_function( __FUNCTION__, '5.8.0', '_excerpt_render_inner_blocks()' );
[4226] Fix | Delete
[4227] Fix | Delete
return _excerpt_render_inner_blocks( $columns, $allowed_blocks );
[4228] Fix | Delete
}
[4229] Fix | Delete
[4230] Fix | Delete
/**
[4231] Fix | Delete
* Renders the duotone filter SVG and returns the CSS filter property to
[4232] Fix | Delete
* reference the rendered SVG.
[4233] Fix | Delete
*
[4234] Fix | Delete
* @since 5.9.0
[4235] Fix | Delete
* @deprecated 5.9.1 Use wp_get_duotone_filter_property() introduced in 5.9.1.
[4236] Fix | Delete
*
[4237] Fix | Delete
* @see wp_get_duotone_filter_property()
[4238] Fix | Delete
*
[4239] Fix | Delete
* @param array $preset Duotone preset value as seen in theme.json.
[4240] Fix | Delete
* @return string Duotone CSS filter property.
[4241] Fix | Delete
*/
[4242] Fix | Delete
function wp_render_duotone_filter_preset( $preset ) {
[4243] Fix | Delete
_deprecated_function( __FUNCTION__, '5.9.1', 'wp_get_duotone_filter_property()' );
[4244] Fix | Delete
[4245] Fix | Delete
return wp_get_duotone_filter_property( $preset );
[4246] Fix | Delete
}
[4247] Fix | Delete
[4248] Fix | Delete
/**
[4249] Fix | Delete
* Checks whether serialization of the current block's border properties should occur.
[4250] Fix | Delete
*
[4251] Fix | Delete
* @since 5.8.0
[4252] Fix | Delete
* @access private
[4253] Fix | Delete
* @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
[4254] Fix | Delete
*
[4255] Fix | Delete
* @see wp_should_skip_block_supports_serialization()
[4256] Fix | Delete
*
[4257] Fix | Delete
* @param WP_Block_Type $block_type Block type.
[4258] Fix | Delete
* @return bool Whether serialization of the current block's border properties
[4259] Fix | Delete
* should occur.
[4260] Fix | Delete
*/
[4261] Fix | Delete
function wp_skip_border_serialization( $block_type ) {
[4262] Fix | Delete
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
[4263] Fix | Delete
[4264] Fix | Delete
$border_support = isset( $block_type->supports['__experimentalBorder'] )
[4265] Fix | Delete
? $block_type->supports['__experimentalBorder']
[4266] Fix | Delete
: false;
[4267] Fix | Delete
[4268] Fix | Delete
return is_array( $border_support ) &&
[4269] Fix | Delete
array_key_exists( '__experimentalSkipSerialization', $border_support ) &&
[4270] Fix | Delete
$border_support['__experimentalSkipSerialization'];
[4271] Fix | Delete
}
[4272] Fix | Delete
[4273] Fix | Delete
/**
[4274] Fix | Delete
* Checks whether serialization of the current block's dimensions properties should occur.
[4275] Fix | Delete
*
[4276] Fix | Delete
* @since 5.9.0
[4277] Fix | Delete
* @access private
[4278] Fix | Delete
* @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
[4279] Fix | Delete
*
[4280] Fix | Delete
* @see wp_should_skip_block_supports_serialization()
[4281] Fix | Delete
*
[4282] Fix | Delete
* @param WP_Block_type $block_type Block type.
[4283] Fix | Delete
* @return bool Whether to serialize spacing support styles & classes.
[4284] Fix | Delete
*/
[4285] Fix | Delete
function wp_skip_dimensions_serialization( $block_type ) {
[4286] Fix | Delete
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
[4287] Fix | Delete
[4288] Fix | Delete
$dimensions_support = isset( $block_type->supports['__experimentalDimensions'] )
[4289] Fix | Delete
? $block_type->supports['__experimentalDimensions']
[4290] Fix | Delete
: false;
[4291] Fix | Delete
[4292] Fix | Delete
return is_array( $dimensions_support ) &&
[4293] Fix | Delete
array_key_exists( '__experimentalSkipSerialization', $dimensions_support ) &&
[4294] Fix | Delete
$dimensions_support['__experimentalSkipSerialization'];
[4295] Fix | Delete
}
[4296] Fix | Delete
[4297] Fix | Delete
/**
[4298] Fix | Delete
* Checks whether serialization of the current block's spacing properties should occur.
[4299] Fix | Delete
*
[4300] Fix | Delete
* @since 5.9.0
[4301] Fix | Delete
* @access private
[4302] Fix | Delete
* @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
[4303] Fix | Delete
*
[4304] Fix | Delete
* @see wp_should_skip_block_supports_serialization()
[4305] Fix | Delete
*
[4306] Fix | Delete
* @param WP_Block_Type $block_type Block type.
[4307] Fix | Delete
* @return bool Whether to serialize spacing support styles & classes.
[4308] Fix | Delete
*/
[4309] Fix | Delete
function wp_skip_spacing_serialization( $block_type ) {
[4310] Fix | Delete
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
[4311] Fix | Delete
[4312] Fix | Delete
$spacing_support = isset( $block_type->supports['spacing'] )
[4313] Fix | Delete
? $block_type->supports['spacing']
[4314] Fix | Delete
: false;
[4315] Fix | Delete
[4316] Fix | Delete
return is_array( $spacing_support ) &&
[4317] Fix | Delete
array_key_exists( '__experimentalSkipSerialization', $spacing_support ) &&
[4318] Fix | Delete
$spacing_support['__experimentalSkipSerialization'];
[4319] Fix | Delete
}
[4320] Fix | Delete
[4321] Fix | Delete
/**
[4322] Fix | Delete
* Inject the block editor assets that need to be loaded into the editor's iframe as an inline script.
[4323] Fix | Delete
*
[4324] Fix | Delete
* @since 5.8.0
[4325] Fix | Delete
* @deprecated 6.0.0
[4326] Fix | Delete
*/
[4327] Fix | Delete
function wp_add_iframed_editor_assets_html() {
[4328] Fix | Delete
_deprecated_function( __FUNCTION__, '6.0.0' );
[4329] Fix | Delete
}
[4330] Fix | Delete
[4331] Fix | Delete
/**
[4332] Fix | Delete
* Retrieves thumbnail for an attachment.
[4333] Fix | Delete
* Note that this works only for the (very) old image metadata style where 'thumb' was set,
[4334] Fix | Delete
* and the 'sizes' array did not exist. This function returns false for the newer image metadata style
[4335] Fix | Delete
* despite that 'thumbnail' is present in the 'sizes' array.
[4336] Fix | Delete
*
[4337] Fix | Delete
* @since 2.1.0
[4338] Fix | Delete
* @deprecated 6.1.0
[4339] Fix | Delete
*
[4340] Fix | Delete
* @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
[4341] Fix | Delete
* @return string|false Thumbnail file path on success, false on failure.
[4342] Fix | Delete
*/
[4343] Fix | Delete
function wp_get_attachment_thumb_file( $post_id = 0 ) {
[4344] Fix | Delete
_deprecated_function( __FUNCTION__, '6.1.0' );
[4345] Fix | Delete
[4346] Fix | Delete
$post_id = (int) $post_id;
[4347] Fix | Delete
$post = get_post( $post_id );
[4348] Fix | Delete
[4349] Fix | Delete
if ( ! $post ) {
[4350] Fix | Delete
return false;
[4351] Fix | Delete
}
[4352] Fix | Delete
[4353] Fix | Delete
// Use $post->ID rather than $post_id as get_post() may have used the global $post object.
[4354] Fix | Delete
$imagedata = wp_get_attachment_metadata( $post->ID );
[4355] Fix | Delete
[4356] Fix | Delete
if ( ! is_array( $imagedata ) ) {
[4357] Fix | Delete
return false;
[4358] Fix | Delete
}
[4359] Fix | Delete
[4360] Fix | Delete
$file = get_attached_file( $post->ID );
[4361] Fix | Delete
[4362] Fix | Delete
if ( ! empty( $imagedata['thumb'] ) ) {
[4363] Fix | Delete
$thumbfile = str_replace( wp_basename( $file ), $imagedata['thumb'], $file );
[4364] Fix | Delete
if ( file_exists( $thumbfile ) ) {
[4365] Fix | Delete
/**
[4366] Fix | Delete
* Filters the attachment thumbnail file path.
[4367] Fix | Delete
*
[4368] Fix | Delete
* @since 2.1.0
[4369] Fix | Delete
*
[4370] Fix | Delete
* @param string $thumbfile File path to the attachment thumbnail.
[4371] Fix | Delete
* @param int $post_id Attachment ID.
[4372] Fix | Delete
*/
[4373] Fix | Delete
return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
[4374] Fix | Delete
}
[4375] Fix | Delete
}
[4376] Fix | Delete
[4377] Fix | Delete
return false;
[4378] Fix | Delete
}
[4379] Fix | Delete
[4380] Fix | Delete
/**
[4381] Fix | Delete
* Gets the path to a translation file for loading a textdomain just in time.
[4382] Fix | Delete
*
[4383] Fix | Delete
* Caches the retrieved results internally.
[4384] Fix | Delete
*
[4385] Fix | Delete
* @since 4.7.0
[4386] Fix | Delete
* @deprecated 6.1.0
[4387] Fix | Delete
* @access private
[4388] Fix | Delete
*
[4389] Fix | Delete
* @see _load_textdomain_just_in_time()
[4390] Fix | Delete
*
[4391] Fix | Delete
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
[4392] Fix | Delete
* @param bool $reset Whether to reset the internal cache. Used by the switch to locale functionality.
[4393] Fix | Delete
* @return string|false The path to the translation file or false if no translation file was found.
[4394] Fix | Delete
*/
[4395] Fix | Delete
function _get_path_to_translation( $domain, $reset = false ) {
[4396] Fix | Delete
_deprecated_function( __FUNCTION__, '6.1.0', 'WP_Textdomain_Registry' );
[4397] Fix | Delete
[4398] Fix | Delete
static $available_translations = array();
[4399] Fix | Delete
[4400] Fix | Delete
if ( true === $reset ) {
[4401] Fix | Delete
$available_translations = array();
[4402] Fix | Delete
}
[4403] Fix | Delete
[4404] Fix | Delete
if ( ! isset( $available_translations[ $domain ] ) ) {
[4405] Fix | Delete
$available_translations[ $domain ] = _get_path_to_translation_from_lang_dir( $domain );
[4406] Fix | Delete
}
[4407] Fix | Delete
[4408] Fix | Delete
return $available_translations[ $domain ];
[4409] Fix | Delete
}
[4410] Fix | Delete
[4411] Fix | Delete
/**
[4412] Fix | Delete
* Gets the path to a translation file in the languages directory for the current locale.
[4413] Fix | Delete
*
[4414] Fix | Delete
* Holds a cached list of available .mo files to improve performance.
[4415] Fix | Delete
*
[4416] Fix | Delete
* @since 4.7.0
[4417] Fix | Delete
* @deprecated 6.1.0
[4418] Fix | Delete
* @access private
[4419] Fix | Delete
*
[4420] Fix | Delete
* @see _get_path_to_translation()
[4421] Fix | Delete
*
[4422] Fix | Delete
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
[4423] Fix | Delete
* @return string|false The path to the translation file or false if no translation file was found.
[4424] Fix | Delete
*/
[4425] Fix | Delete
function _get_path_to_translation_from_lang_dir( $domain ) {
[4426] Fix | Delete
_deprecated_function( __FUNCTION__, '6.1.0', 'WP_Textdomain_Registry' );
[4427] Fix | Delete
[4428] Fix | Delete
static $cached_mofiles = null;
[4429] Fix | Delete
[4430] Fix | Delete
if ( null === $cached_mofiles ) {
[4431] Fix | Delete
$cached_mofiles = array();
[4432] Fix | Delete
[4433] Fix | Delete
$locations = array(
[4434] Fix | Delete
WP_LANG_DIR . '/plugins',
[4435] Fix | Delete
WP_LANG_DIR . '/themes',
[4436] Fix | Delete
);
[4437] Fix | Delete
[4438] Fix | Delete
foreach ( $locations as $location ) {
[4439] Fix | Delete
$mofiles = glob( $location . '/*.mo' );
[4440] Fix | Delete
if ( $mofiles ) {
[4441] Fix | Delete
$cached_mofiles = array_merge( $cached_mofiles, $mofiles );
[4442] Fix | Delete
}
[4443] Fix | Delete
}
[4444] Fix | Delete
}
[4445] Fix | Delete
[4446] Fix | Delete
$locale = determine_locale();
[4447] Fix | Delete
$mofile = "{$domain}-{$locale}.mo";
[4448] Fix | Delete
[4449] Fix | Delete
$path = WP_LANG_DIR . '/plugins/' . $mofile;
[4450] Fix | Delete
if ( in_array( $path, $cached_mofiles, true ) ) {
[4451] Fix | Delete
return $path;
[4452] Fix | Delete
}
[4453] Fix | Delete
[4454] Fix | Delete
$path = WP_LANG_DIR . '/themes/' . $mofile;
[4455] Fix | Delete
if ( in_array( $path, $cached_mofiles, true ) ) {
[4456] Fix | Delete
return $path;
[4457] Fix | Delete
}
[4458] Fix | Delete
[4459] Fix | Delete
return false;
[4460] Fix | Delete
}
[4461] Fix | Delete
[4462] Fix | Delete
/**
[4463] Fix | Delete
* Allows multiple block styles.
[4464] Fix | Delete
*
[4465] Fix | Delete
* @since 5.9.0
[4466] Fix | Delete
* @deprecated 6.1.0
[4467] Fix | Delete
*
[4468] Fix | Delete
* @param array $metadata Metadata for registering a block type.
[4469] Fix | Delete
* @return array Metadata for registering a block type.
[4470] Fix | Delete
*/
[4471] Fix | Delete
function _wp_multiple_block_styles( $metadata ) {
[4472] Fix | Delete
_deprecated_function( __FUNCTION__, '6.1.0' );
[4473] Fix | Delete
return $metadata;
[4474] Fix | Delete
}
[4475] Fix | Delete
[4476] Fix | Delete
/**
[4477] Fix | Delete
* Generates an inline style for a typography feature e.g. text decoration,
[4478] Fix | Delete
* text transform, and font style.
[4479] Fix | Delete
*
[4480] Fix | Delete
* @since 5.8.0
[4481] Fix | Delete
* @access private
[4482] Fix | Delete
* @deprecated 6.1.0 Use wp_style_engine_get_styles() introduced in 6.1.0.
[4483] Fix | Delete
*
[4484] Fix | Delete
* @see wp_style_engine_get_styles()
[4485] Fix | Delete
*
[4486] Fix | Delete
* @param array $attributes Block's attributes.
[4487] Fix | Delete
* @param string $feature Key for the feature within the typography styles.
[4488] Fix | Delete
* @param string $css_property Slug for the CSS property the inline style sets.
[4489] Fix | Delete
* @return string CSS inline style.
[4490] Fix | Delete
*/
[4491] Fix | Delete
function wp_typography_get_css_variable_inline_style( $attributes, $feature, $css_property ) {
[4492] Fix | Delete
_deprecated_function( __FUNCTION__, '6.1.0', 'wp_style_engine_get_styles()' );
[4493] Fix | Delete
[4494] Fix | Delete
// Retrieve current attribute value or skip if not found.
[4495] Fix | Delete
$style_value = _wp_array_get( $attributes, array( 'style', 'typography', $feature ), false );
[4496] Fix | Delete
if ( ! $style_value ) {
[4497] Fix | Delete
return;
[4498] Fix | Delete
}
[4499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function