[wp-trac] [WordPress Trac] #14808: Add Editor Documentation Functions URL for theme-defined functions
WordPress Trac
noreply at wordpress.org
Mon Apr 11 23:40:56 UTC 2016
#14808: Add Editor Documentation Functions URL for theme-defined functions
----------------------------------------+-----------------------------
Reporter: GamajoTech | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: good-first-bug needs-patch | Focuses:
----------------------------------------+-----------------------------
Comment (by exthilion):
I'm new to submitting patches here, so please forgive me if this isn't the
right way to approach this.
Per the patch above by @GaryJ
{{{#!php
<?php
add_filter( 'file_editor_documentation_url', 'child_documentation_url',
10, 3 );
/**
* Filter the function documentation URL in theme editor.
*
* @param string $url
* @param string $provider Name of the theme or plugin
* @param string $file full path of the file being edited
* @return string
*/
function child_documentation_url( $url, $provider, $file ) {
if ( 'My Awesome Theme' != $theme )
return $url;
return 'http://my.example.com/?theme= ' . $provider .
'&function=';
}
}}}
Seems like a trivial change, but I am also unsure of what @swissspidy
means by proper docs.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14808#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list