Changeset 3226 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 05/24/2016 05:43:23 AM (9 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.