Changeset 13768
- Timestamp:
- 06/04/2024 01:59:03 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/block-config.php
r13765 r13768 15 15 add_filter( 'render_block_core/site-title', __NAMESPACE__ . '\filter_site_title_block' ); 16 16 add_filter( 'render_block_core/navigation', __NAMESPACE__ . '\filter_navigation_block', 10, 2 ); 17 add_filter( 'render_block_wporg/language-suggest', __NAMESPACE__ . '\filter_language_suggest' ); 17 18 18 19 /** … … 335 336 return $block_content; 336 337 } 338 339 340 /** 341 * Increase the visibilit of the language suggest bar to recruit translators on plugin page. 342 * 343 * @see https://github.com/WordPress/wordpress.org/issues/301 344 * 345 * @param string $block_content 346 * @return string 347 */ 348 function filter_language_suggest( $block_content ) { 349 if ( ! is_single() ) { 350 return $block_content; 351 } 352 353 $html = new \WP_HTML_Tag_Processor( $block_content ); 354 $html->next_tag(); 355 $html->add_class( 'is-style-prominent' ); 356 return $html->get_updated_html(); 357 }
Note: See TracChangeset
for help on using the changeset viewer.