Making WordPress.org

Changeset 4802


Ignore:
Timestamp:
01/26/2017 09:59:20 PM (9 years ago)
Author:
danielbachhuber
Message:

make/cli: More precise filter execution

On WordPress.org, it appears this filter is unhooked too early

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-cli/inc/class-handbook.php

    r4791 r4802  
    1212        if ( ! is_singular( 'handbook' )
    1313            || ! is_main_query()
    14             || ! in_the_loop() ) {
     14            || ! in_the_loop()
     15            || get_the_ID() !== get_queried_object_id() ) {
    1516            return $title;
    1617        }
    17 
    18         // Unhook, so the filter is only run once on the page
    19         remove_filter( 'the_title', array( 'WPOrg_Cli\Handbook', 'filter_the_title_edit_link' ) );
    2018
    2119        $markdown_source = self::get_markdown_edit_link( get_the_ID() );
Note: See TracChangeset for help on using the changeset viewer.