Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r17310 r18136  
    244244                            $plugin_files[] = "$file/$subfile";
    245245                    }
     246                    closedir( $plugins_subdir );
    246247                }
    247248            } else {
     
    250251            }
    251252        }
    252     } else {
    253         return $wp_plugins;
    254     }
    255 
    256     @closedir( $plugins_dir );
    257     @closedir( $plugins_subdir );
     253        closedir( $plugins_dir );
     254    }
    258255
    259256    if ( empty($plugin_files) )
     
    706703        $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) );
    707704        // If plugin is in its own directory, recursively delete the directory.
    708         if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder
     705        if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that its not the root plugin folder
    709706            $deleted = $wp_filesystem->delete($this_plugin_dir, true);
    710707        else
     
    967964 * @param callback $function The function to be called to output the content for this page.
    968965 *
    969  * @return string The resulting page's hook_suffix
     966 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    970967 */
    971968function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    10311028 * @param callback $function The function to be called to output the content for this page.
    10321029 *
    1033  * @return string The resulting page's hook_suffix
     1030 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    10341031 */
    10351032function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    10521049 * @param callback $function The function to be called to output the content for this page.
    10531050 *
    1054  * @return string The resulting page's hook_suffix
     1051 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    10551052 */
    10561053function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    10731070 * @param callback $function The function to be called to output the content for this page.
    10741071 *
    1075  * @return string The resulting page's hook_suffix
     1072 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    10761073 */
    10771074function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    10941091 * @param callback $function The function to be called to output the content for this page.
    10951092 *
    1096  * @return string The resulting page's hook_suffix
     1093 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    10971094 */
    10981095function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    11151112 * @param callback $function The function to be called to output the content for this page.
    11161113 *
    1117  * @return string The resulting page's hook_suffix
     1114 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    11181115 */
    11191116function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    11391136 * @param callback $function The function to be called to output the content for this page.
    11401137 *
    1141  * @return string The resulting page's hook_suffix
     1138 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    11421139 */
    11431140function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    11601157 * @param callback $function The function to be called to output the content for this page.
    11611158 *
    1162  * @return string The resulting page's hook_suffix
     1159 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    11631160 */
    11641161function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    11811178 * @param callback $function The function to be called to output the content for this page.
    11821179 *
    1183  * @return string The resulting page's hook_suffix
     1180 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    11841181 */
    11851182function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    12021199 * @param callback $function The function to be called to output the content for this page.
    12031200 *
    1204  * @return string The resulting page's hook_suffix
     1201 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    12051202 */
    12061203function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    12231220 * @param callback $function The function to be called to output the content for this page.
    12241221 *
    1225  * @return string The resulting page's hook_suffix
     1222 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    12261223*/
    12271224function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
     
    12441241 * @param callback $function The function to be called to output the content for this page.
    12451242 *
    1246  * @return string The resulting page's hook_suffix
     1243 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
    12471244*/
    12481245function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
Note: See TracChangeset for help on using the changeset viewer.