WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #14808, comment 8


Ignore:
Timestamp:
04/12/2016 03:25:43 PM (5 years ago)
Author:
exthilion
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14808, comment 8

    initial v1  
    77 * Filter the function documentation URL in theme editor.
    88 *
    9  * @param string $url
     9 * @param string $url a default url if $provider doesn't provide a custom url
    1010 * @param string $provider Name of the theme or plugin
    1111 * @param string $file full path of the file being edited
     
    1313 */
    1414function child_documentation_url( $url, $provider, $file ) {
    15 
    16         if ( 'My Awesome Theme' != $theme )
     15        // Check if $provider is handled by this filter. If not, use default.
     16        if ( 'My Awesome Theme or Plugin' != $provider )
    1717                return $url;
    18 
     18        // Provide some kind of logic here to generate correct documentation url for $file.
    1919        return 'http://my.example.com/?theme= ' . $provider . '&function=';
    20 
    2120}
    2221}}}