Changeset 12643 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
- Timestamp:
- 06/09/2023 07:43:23 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r12617 r12643 439 439 440 440 /** 441 * Filter the archive title to use custom string for business model. 442 * 443 * @param string $title Archive title to be displayed. 444 * @return string Updated title. 445 */ 446 function update_archive_title( $title ) { 447 if ( is_tax( 'plugin_business_model', 'community' ) ) { 448 return __( 'Community Plugins', 'wporg-plugins' ); 449 } else if ( is_tax( 'plugin_business_model', 'commercial' ) ) { 450 return __( 'Commercial Plugins', 'wporg-plugins' ); 451 } 452 return $title; 453 } 454 add_filter( 'get_the_archive_title', __NAMESPACE__ . '\update_archive_title' ); 455 456 /** 457 * Filter the archive description to use custom string for business model. 458 * 459 * @param string $description Archive description to be displayed. 460 * @return string Updated description. 461 */ 462 function update_archive_description( $description ) { 463 if ( is_tax( 'plugin_business_model', 'community' ) ) { 464 return __( 'These plugins are developed and supported by a community.', 'wporg-plugins' ); 465 } else if ( is_tax( 'plugin_business_model', 'commercial' ) ) { 466 return __( 'These plugins are free, but also have paid versions available.', 'wporg-plugins' ); 467 } 468 return $description; 469 } 470 add_filter( 'get_the_archive_description', __NAMESPACE__ . '\update_archive_description' ); 471 472 /** 441 473 * Custom template tags for this theme. 442 474 */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)