Making WordPress.org

Changeset 4787


Ignore:
Timestamp:
01/25/2017 07:50:50 PM (10 years ago)
Author:
danielbachhuber
Message:

make/cli: Only run GitHub edit title filter once

The filter is run a second time within the loop,
when the handbook navigation links are appended.
We don't want the edit link to appear there.

File:
1 edited

Legend:

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

    r4783 r4787  
    1515                        return $title;
    1616                }
     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' ) );
    1720
    1821                $markdown_source = self::get_markdown_edit_link( get_the_ID() );
Note: See TracChangeset for help on using the changeset viewer.