Ticket #57506: 57506.functions1.patch
File 57506.functions1.patch, 2.4 KB (added by , 19 months ago) |
---|
-
src/wp-content/themes/twentytwentythree/functions.php
1 <?php 2 /** 3 * Twenty Twenty-Three functions and definitions 4 * 5 * @link https://developer.wordpress.org/themes/basics/theme-functions/ 6 * 7 * @package WordPress 8 * @subpackage Twenty_Twenty_Three 9 * @since Twenty Twenty-Three 1.2 10 */ 11 12 13 /** 14 * Modifies the theme JSON data. 15 * 16 * @since Twenty Twenty-Three 1.2 Reverse Quote block border in right-to-left languages. 17 * 18 * @param object $theme_json The original theme JSON data. 19 * @return object The modified theme JSON data. 20 */ 21 function twentytwentythree_modify_theme_json( $theme_json ) { 22 if ( is_rtl() ) { 23 $new_data = array( 24 'version' => 2, 25 'styles' => array( 26 'blocks' => array( 27 'core/quote' => array( 28 'border' => array( 29 'left' => array( 30 'width' => '0px' 31 ), 32 'right' => array( 33 'color' => 'inherit', 34 'style' => 'solid', 35 'width' => '1px' 36 ) 37 ) 38 ) 39 ) 40 ) 41 ); 42 43 // Returns the modified theme JSON data. 44 return $theme_json->update_with( $new_data ); 45 } 46 47 // Returns the original theme JSON data. 48 return $theme_json; 49 } 50 51 // Runs the filter after theme setup. 52 function twentytwentythree_apply_theme_json_theme_filters() { 53 add_filter( 'wp_theme_json_data_theme', 'twentytwentythree_modify_theme_json' ); 54 } 55 add_action( 'after_setup_theme', 'twentytwentythree_apply_theme_json_theme_filters' ); 56 -
src/wp-content/themes/twentytwentythree/theme.json
Property changes on: src/wp-content/themes/twentytwentythree/functions.php ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property
539 539 }, 540 540 "core/quote": { 541 541 "border": { 542 "width": "1px" 542 "left": { 543 "color": "inherit", 544 "style": "solid", 545 "width": "1px" 546 } 543 547 }, 544 548 "elements": { 545 549 "cite": {