Making WordPress.org

Changeset 8060


Ignore:
Timestamp:
01/09/2019 06:32:21 AM (6 years ago)
Author:
dd32
Message:

Forums: Simplify the <title> by removing the Forum:, Topic:, and View prefixes.

Fixes #1978.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r7988 r8060  
    7676        // Limit pagination of the 'all-topics' view
    7777        add_filter( 'bbp_after_has_topics_parse_args', array( $this, 'has_topics_all_topics' ) );
     78
     79        // Remove redundant parts of the <title>
     80        add_filter( 'bbp_raw_title_array', array( $this, 'bbp_raw_title_array' ) );
    7881    }
    7982
     
    694697        return $r;
    695698    }
     699
     700    public function bbp_raw_title_array( $title ) {
     701        if ( bbp_is_single_forum() || bbp_is_single_topic() || bbp_is_single_view() ) {
     702            $title['format'] = '%s';
     703        }
     704
     705        return $title;
     706    }
    696707}
Note: See TracChangeset for help on using the changeset viewer.