Changeset 3226
- Timestamp:
- 05/24/2016 05:43:23 AM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r3225 r3226 24 24 add_action( 'widgets_init', array( $this, 'register_widgets' ) ); 25 25 add_filter( 'post_type_link', array( $this, 'package_link' ), 10, 2 ); 26 add_filter( 'term_link', array( $this, 'term_link' ), 10, 3);26 add_filter( 'term_link', array( $this, 'term_link' ), 10, 2 ); 27 27 add_filter( 'pre_insert_term', array( $this, 'pre_insert_term_prevent' ) ); 28 28 add_action( 'pre_get_posts', array( $this, 'use_plugins_in_query' ) ); … … 224 224 } 225 225 226 if ( 'en_US' != get_locale() ) { 227 add_filter( 'get_term', array( __NAMESPACE__ . '\i18n', 'translate_term' ) ); 228 } 229 226 230 // Instantiate our copy of the Jetpack_Search class. 227 231 if ( class_exists( 'Jetpack' ) && ! class_exists( 'Jetpack_Search' ) ) { … … 363 367 * @param string $termlink The generated term link. 364 368 * @param \WP_Term $term The term the link is for. 365 * @param string $taxonomy The taxonomy the term is in. 366 */ 367 public function term_link( $termlink, $term, $taxonomy ) { 368 if ( 'plugin_business_model' == $taxonomy ) { 369 */ 370 public function term_link( $termlink, $term ) { 371 if ( 'plugin_business_model' == $term->taxonomy ) { 369 372 return false; 370 373 } 371 if ( 'plugin_built_for' == $t axonomy ) {374 if ( 'plugin_built_for' == $term->taxonomy ) { 372 375 return $this->package_link( false, $this->get_plugin_post( $term->slug ) ); 373 376 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php
r3225 r3226 43 43 <li><?php printf( __( 'Active installs: %s', 'wporg-plugins' ), Template::active_installs( false ) ); ?></li> 44 44 <li><?php printf( __( 'Category: %s', 'wporg-plugins' ), get_the_term_list( get_post()->ID, 'plugin_category', '', ', ' ) ); ?></li> 45 <?php if ( $ works_with= get_the_term_list( get_post()->ID, 'plugin_built_for', '', ', ' ) ) : ?>46 <li><?php printf( __( 'Designed to work with: %s', 'wporg-plugins' ), $ works_with); ?></li>45 <?php if ( $built_for = get_the_term_list( get_post()->ID, 'plugin_built_for', '', ', ' ) ) : ?> 46 <li><?php printf( __( 'Designed to work with: %s', 'wporg-plugins' ), $built_for ); ?></li> 47 47 <?php endif; ?> 48 48 <?php if ( $business_model = get_the_term_list( get_post()->ID, 'plugin_business_model', '', ', ' ) ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.