Making WordPress.org


Ignore:
Timestamp:
01/20/2017 04:16:22 AM (9 years ago)
Author:
pento
Message:

make/cli: Redirect the CLI handbook edit links to GitHub.

The CLI HAndbook is being maintained on GitHub, so it's confusing to be showing edit links that go to wp-admin. Instead, let's sent editors to the GitHub source.

File:
1 edited

Legend:

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

    r4736 r4745  
    1010
    1111require_once dirname( __FILE__ ) . '/inc/class-markdown-import.php';
     12require_once dirname( __FILE__ ) . '/inc/class-handbook.php';
    1213
    1314/**
     
    1718add_action( 'edit_form_after_title', array( 'WPOrg_Cli\Markdown_Import', 'action_edit_form_after_title' ) );
    1819add_action( 'save_post', array( 'WPOrg_Cli\Markdown_Import', 'action_save_post' ) );
     20
     21add_filter( 'get_edit_post_link', array( 'WPOrg_Cli\Handbook', 'redirect_edit_link_to_github' ), 10, 2 );
     22add_filter( 'o2_filter_post_actions', array( 'WPOrg_Cli\Handbook', 'redirect_o2_edit_link_to_github' ), 11, 2 );
    1923
    2024add_action( 'wp_head', function(){
Note: See TracChangeset for help on using the changeset viewer.