Making WordPress.org

Changeset 13954


Ignore:
Timestamp:
08/07/2024 08:46:55 AM (23 months ago)
Author:
paulkevan
Message:

Wporg-plugins-2024: remove unitentional code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php

    r13953 r13954  
    437437 */
    438438require get_stylesheet_directory() . '/inc/template-tags.php';
    439 
    440 function filter_plugin_card_classes( $taxonomies, $post_id, $classes, $css_class ) {
    441 
    442     // Only filter on `plugin-card` class.
    443     if ( 'plugin-card' != $css_class ) {
    444         print_r( $classes  );
    445         print_r( $css_class );
    446         return $taxonomies;
    447     }
    448 
    449     $filtered_taxonomies = [];
    450     $skip_taxonomy = [ 'plugin_contributors', 'plugin_committers', 'plugin_support_reps' ];
    451     foreach ( $taxonomies as $tax ) {
    452         if ( ! in_array( $tax, $skip_taxonomy ) ) {
    453             $filtered_taxonomies[] = $tax;
    454         }   
    455     }
    456     return $filtered_taxonomies;
    457 }
    458 
    459 //add_filter( 'post_class_taxonomies', __NAMESPACE__ . '\filter_plugin_card_classes', 10, 4 );
    460 
    461 
    462 add_filter( 'wp_trim_words', function( $text, $num_words, $more, $original_text ) {
    463     $text = str_replace( '\n', ' ', $text );
    464     echo $original_text;
    465     return $text;
    466 }, 10, 4 );
Note: See TracChangeset for help on using the changeset viewer.