Make WordPress Core

Ticket #11377: add_plugins_page.patch

File add_plugins_page.patch, 1.3 KB (added by williamsba1, 15 years ago)

function add_plugins_page

  • plugin.php

     
    6767 */
    6868function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
    6969
    70         $default_headers = array( 
    71                 'Name' => 'Plugin Name', 
    72                 'PluginURI' => 'Plugin URI', 
    73                 'Version' => 'Version', 
    74                 'Description' => 'Description', 
    75                 'Author' => 'Author', 
    76                 'AuthorURI' => 'Author URI', 
    77                 'TextDomain' => 'Text Domain', 
    78                 'DomainPath' => 'Domain Path' 
     70        $default_headers = array(
     71                'Name' => 'Plugin Name',
     72                'PluginURI' => 'Plugin URI',
     73                'Version' => 'Version',
     74                'Description' => 'Description',
     75                'Author' => 'Author',
     76                'AuthorURI' => 'Author URI',
     77                'TextDomain' => 'Text Domain',
     78                'DomainPath' => 'Domain Path'
    7979                );
    8080
    8181        $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' );
     
    726726        return add_submenu_page( 'edit-comments.php', $page_title, $menu_title, $access_level, $file, $function );
    727727}
    728728
     729function add_plugins_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
     730        return add_submenu_page( 'plugins.php', $page_title, $menu_title, $access_level, $file, $function );
     731}
     732
    729733//
    730734// Pluggable Menu Support -- Private
    731735//