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
/home/sportsfe.../httpdocs/clone/wp-inclu.../block-su...
File: duotone.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Duotone block support flag.
[2] Fix | Delete
*
[3] Fix | Delete
* Parts of this source were derived and modified from TinyColor,
[4] Fix | Delete
* released under the MIT license.
[5] Fix | Delete
*
[6] Fix | Delete
* https://github.com/bgrins/TinyColor
[7] Fix | Delete
*
[8] Fix | Delete
* Copyright (c), Brian Grinstead, http://briangrinstead.com
[9] Fix | Delete
*
[10] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining
[11] Fix | Delete
* a copy of this software and associated documentation files (the
[12] Fix | Delete
* "Software"), to deal in the Software without restriction, including
[13] Fix | Delete
* without limitation the rights to use, copy, modify, merge, publish,
[14] Fix | Delete
* distribute, sublicense, and/or sell copies of the Software, and to
[15] Fix | Delete
* permit persons to whom the Software is furnished to do so, subject to
[16] Fix | Delete
* the following conditions:
[17] Fix | Delete
*
[18] Fix | Delete
* The above copyright notice and this permission notice shall be
[19] Fix | Delete
* included in all copies or substantial portions of the Software.
[20] Fix | Delete
*
[21] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
[22] Fix | Delete
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
[23] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
[24] Fix | Delete
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
[25] Fix | Delete
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
[26] Fix | Delete
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
[27] Fix | Delete
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[28] Fix | Delete
*
[29] Fix | Delete
* @package WordPress
[30] Fix | Delete
* @since 5.8.0
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
// Register the block support.
[34] Fix | Delete
WP_Block_Supports::get_instance()->register(
[35] Fix | Delete
'duotone',
[36] Fix | Delete
array(
[37] Fix | Delete
'register_attribute' => array( 'WP_Duotone', 'register_duotone_support' ),
[38] Fix | Delete
)
[39] Fix | Delete
);
[40] Fix | Delete
[41] Fix | Delete
// Add classnames to blocks using duotone support.
[42] Fix | Delete
add_filter( 'render_block', array( 'WP_Duotone', 'render_duotone_support' ), 10, 3 );
[43] Fix | Delete
add_filter( 'render_block_core/image', array( 'WP_Duotone', 'restore_image_outer_container' ), 10, 1 );
[44] Fix | Delete
[45] Fix | Delete
// Enqueue styles.
[46] Fix | Delete
// Block styles (core-block-supports-inline-css) before the style engine (wp_enqueue_stored_styles).
[47] Fix | Delete
// Global styles (global-styles-inline-css) after the other global styles (wp_enqueue_global_styles).
[48] Fix | Delete
add_action( 'wp_enqueue_scripts', array( 'WP_Duotone', 'output_block_styles' ), 9 );
[49] Fix | Delete
add_action( 'wp_enqueue_scripts', array( 'WP_Duotone', 'output_global_styles' ), 11 );
[50] Fix | Delete
[51] Fix | Delete
// Add SVG filters to the footer. Also, for classic themes, output block styles (core-block-supports-inline-css).
[52] Fix | Delete
add_action( 'wp_footer', array( 'WP_Duotone', 'output_footer_assets' ), 10 );
[53] Fix | Delete
[54] Fix | Delete
// Add styles and SVGs for use in the editor via the EditorStyles component.
[55] Fix | Delete
add_filter( 'block_editor_settings_all', array( 'WP_Duotone', 'add_editor_settings' ), 10 );
[56] Fix | Delete
[57] Fix | Delete
// Migrate the old experimental duotone support flag.
[58] Fix | Delete
add_filter( 'block_type_metadata_settings', array( 'WP_Duotone', 'migrate_experimental_duotone_support_flag' ), 10, 2 );
[59] Fix | Delete
[60] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function