Changeset 13354
- Timestamp:
- 03/19/2024 06:34:18 AM (2 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
-
class-i18n.php (modified) (2 diffs)
-
class-plugin-directory.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-i18n.php
r8613 r13354 23 23 $term->name = esc_html( translate_with_gettext_context( html_entity_decode( $term->name ), 'Plugin Category Name', 'wporg-plugins' ) ); 24 24 } elseif ( 'plugin_section' == $term->taxonomy ) { 25 $original = $term->name; 25 26 $term->name = esc_html( translate_with_gettext_context( html_entity_decode( $term->name ), 'Plugin Section Name', 'wporg-plugins' ) ); 27 28 // Some strings already exist without the context, try those. 29 if ( $term->name === $original ) { 30 $term->name = esc_html( translate( html_entity_decode( $term->name ), 'wporg-plugins' ) ); 31 } 32 26 33 if ( $term->description ) { 27 34 $term->description = esc_html( translate_with_gettext_context( html_entity_decode( $term->description ), 'Plugin Section Description', 'wporg-plugins' ) ); … … 73 80 // Section terms. 74 81 _x( 'Adopt Me', 'Plugin Section Name', 'wporg-plugins' ); 75 _x( 'Beta ', 'Plugin Section Name', 'wporg-plugins' );76 _x( 'Block s', 'Plugin Section Name', 'wporg-plugins' );82 _x( 'Beta Plugins', 'Plugin Section Name', 'wporg-plugins' ); 83 _x( 'Block-Enabled Plugins', 'Plugin Section Name', 'wporg-plugins' ); 77 84 _x( 'My Favorites', 'Plugin Section Name', 'wporg-plugins' ); 78 _x( 'Featured', 'Plugin Section Name', 'wporg-plugins' ); 79 _x( 'Popular', 'Plugin Section Name', 'wporg-plugins' ); 80 _x( 'Blocks', 'Plugin Section Name', 'wporg-plugins' ); 85 _x( 'Featured Plugins', 'Plugin Section Name', 'wporg-plugins' ); 86 _x( 'Popular Plugins', 'Plugin Section Name', 'wporg-plugins' ); 87 /* translators: Block plugins are single-block plugins, not block-enabled plugins. */ 88 _x( 'Block Plugins', 'Plugin Section Name', 'wporg-plugins' ); 89 _x( 'New Plugins', 'Plugin Section Name', 'wporg-plugins' ); 90 _x( 'Updated Plugins', 'Plugin Section Name', 'wporg-plugins' ); 81 91 82 92 // Section descriptions. 83 93 _x( 'Plugins that have been offered for adoption by others.', 'Plugin Section Description', 'wporg-plugins' ); 84 94 _x( 'Beta plugins are in development for possible inclusion in a future version of WordPress.', 'Plugin Section Description', 'wporg-plugins' ); 85 _x( 'Plugins that offer blocks.', 'Plugin Section Description', 'wporg-plugins' );86 _x( 'Plugins contained within this category get displayed on the Featured tab.', 'Plugin Section Description', 'wporg-plugins' );87 95 _x( 'The below plugins have been marked as favorites.', 'Plugin Section Description', 'wporg-plugins' ); 88 96 _x( 'Plugins that offer blocks for the block-based editor.', 'Plugin Section Description', 'wporg-plugins' ); 97 _x( 'Block Plugins as used in the Block Directory.', 'Plugin Section Description', 'wporg-plugins' ); 89 98 } 90 99 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r13349 r13354 47 47 add_filter( 'query_vars', array( $this, 'filter_query_vars' ), 1 ); 48 48 add_filter( 'single_term_title', array( $this, 'filter_single_term_title' ) ); 49 add_filter( 'get_the_archive_title_prefix', array( $this, 'filter_get_the_archive_title_prefix' ) ); 49 50 add_filter( 'the_content', array( $this, 'filter_rel_nofollow_ugc' ) ); 50 51 add_action( 'wp_head', array( Template::class, 'json_ld_schema' ), 1 ); … … 1348 1349 1349 1350 return $name; 1351 } 1352 1353 /** 1354 * Remove the prefix for the browse sections. 1355 * These should display "Term" rather than "Browse: Term". 1356 * 1357 * @param string $prefix the prefix for the archive. 1358 * @return string 1359 */ 1360 function filter_get_the_archive_title_prefix( $prefix ) { 1361 if ( is_tax( 'plugin_section' ) ) { 1362 $prefix = ''; 1363 } 1364 1365 return $prefix; 1350 1366 } 1351 1367
Note: See TracChangeset
for help on using the changeset viewer.