- 954AB7DC135ABBA9B25AF8DABAEADAAF7408DDCE076578572097832E83AEE55FF27350822D39A773141B2F1487555CB54AE6A28ED16F0B74A03E78C772205BCB
+ 8E27BD6E9C5553D9DBB52D0B1E7FF7B30ED8FD004F2650A0F2659C817B8B2FA341B18661BD3B1688ACA72C9413CC7AB7634E079247DD7821FCE0E5506214312F
mp-wp/wp-admin/plugins.php
(10 . 7)(10 . 7)
29812 require_once('admin.php');
29813
29814 $action = '';
29815 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'clear-recent-list') as $action_key ) {
29816 foreach( array('activate-selected', 'deactivate-selected', 'clear-recent-list') as $action_key ) {
29817 if( isset($_POST[$action_key]) ) {
29818 $action = $action_key;
29819 break;
(80 . 91)(80 . 12)
29821 wp_redirect('plugins.php?deactivate-multi=true');
29822 exit;
29823 break;
29824 case 'delete-selected':
29825 if ( ! current_user_can('delete_plugins') )
29826 wp_die(__('You do not have sufficient permissions to delete plugins for this blog.'));
29827
29828 check_admin_referer('bulk-manage-plugins');
29829
29830 $plugins = $_REQUEST['checked']; //$_POST = from the plugin form; $_GET = from the FTP details screen.
29831
29832 $title = __('Delete Plugin');
29833 $parent_file = 'plugins.php';
29834
29835 if ( ! isset($_REQUEST['verify-delete']) ) {
29836 wp_enqueue_script('jquery');
29837 require_once('admin-header.php');
29838 ?>
29839 <div class="wrap">
29840 <h2><?php _e('Delete Plugin(s)'); ?></h2>
29841 <?php
29842 $files_to_delete = $plugin_info = array();
29843 foreach ( (array) $plugins as $plugin ) {
29844 if ( '.' == dirname($plugin) ) {
29845 $files_to_delete[] = WP_PLUGIN_DIR . '/' . $plugin;
29846 if( $data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin) )
29847 $plugin_info[ $plugin ] = $data;
29848 } else {
29849 //Locate all the files in that folder:
29850 $files = list_files( WP_PLUGIN_DIR . '/' . dirname($plugin) );
29851 if( $files ) {
29852 $files_to_delete = array_merge($files_to_delete, $files);
29853 }
29854 //Get plugins list from that folder
29855 if ( $folder_plugins = get_plugins( '/' . dirname($plugin)) )
29856 $plugin_info = array_merge($plugin_info, $folder_plugins);
29857 }
29858 }
29859 ?>
29860 <p><?php _e('Deleting the selected plugins will remove the following plugin(s) and their files:'); ?></p>
29861 <ul>
29862 <?php
29863 foreach ( $plugin_info as $plugin )
29864 echo '<li>', sprintf(__('%s by %s'), $plugin['Name'], $plugin['Author']), '</li>';
29865 ?>
29866 </ul>
29867 <p><?php _e('Are you sure you wish to delete these files?') ?></p>
29868 <form method="post" action="<?php echo clean_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;">
29869 <input type="hidden" name="verify-delete" value="1" />
29870 <input type="hidden" name="delete-selected" value="1" />
29871 <?php
29872 foreach ( (array)$plugins as $plugin )
29873 echo '<input type="hidden" name="checked[]" value="' . attribute_escape($plugin) . '" />';
29874 ?>
29875 <?php wp_nonce_field('bulk-manage-plugins') ?>
29876 <input type="submit" name="submit" value="<?php _e('Yes, Delete these files') ?>" class="button" />
29877 </form>
29878 <form method="post" action="<?php echo clean_url(wp_get_referer()); ?>" style="display:inline;">
29879 <input type="submit" name="submit" value="<?php _e('No, Return me to the plugin list') ?>" class="button" />
29880 </form>
29881
29882 <p><a href="#" onclick="jQuery('#files-list').toggle(); return false;"><?php _e('Click to view entire list of files which will be deleted'); ?></a></p>
29883 <div id="files-list" style="display:none;">
29884 <ul>
29885 <?php
29886 foreach ( (array)$files_to_delete as $file )
29887 echo '<li>' . str_replace(WP_PLUGIN_DIR, '', $file) . '</li>';
29888 ?>
29889 </ul>
29890 </div>
29891 </div>
29892 <?php
29893 require_once('admin-footer.php');
29894 exit;
29895 } //Endif verify-delete
29896 $delete_result = delete_plugins($plugins);
29897
29898 wp_cache_delete('plugins', 'plugins');
29899 break;
29900 case 'clear-recent-list':
29901 update_option('recently_activated', array());
29902 break;
29903 }
29904 }
29905
29906 wp_enqueue_script('plugin-install');
29907 add_thickbox();
29908
29909 $title = __('Manage Plugins');
29910 require_once('admin-header.php');
29911
(183 . 12)(104 . 6)
29913 }
29914 ?>
29915 </div>
29916 <?php elseif ( 'delete-selected' == $action ) :
29917 if ( is_wp_error($delete_result) ) : ?>
29918 <div id="message" class="updated fade"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
29919 <?php else : ?>
29920 <div id="message" class="updated fade"><p><?php _e('The selected plugins have been <strong>deleted</strong>.'); ?></p></div>
29921 <?php endif; ?>
29922 <?php elseif ( isset($_GET['activate']) ) : ?>
29923 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
29924 <?php elseif (isset($_GET['activate-multi'])) : ?>
(249 . 24)(164 . 13)
29926 <table class="widefat" cellspacing="0" id="<?php echo $context ?>-plugins-table">
29927 <thead>
29928 <tr>
29929 <th scope="col" class="check-column"><input type="checkbox" /></th>
29930 <th scope="col" class="check-column"> </th>
29931 <th scope="col"><?php _e('Plugin'); ?></th>
29932 <th scope="col" class="num"><?php _e('Version'); ?></th>
29933 <th scope="col"><?php _e('Description'); ?></th>
29934 <th scope="col" class="action-links"><?php _e('Action'); ?></th>
29935 </tr>
29936 </thead>
29937
29938 <tfoot>
29939 <tr>
29940 <th scope="col" class="check-column"><input type="checkbox" /></th>
29941 <th scope="col"><?php _e('Plugin'); ?></th>
29942 <th scope="col" class="num"><?php _e('Version'); ?></th>
29943 <th scope="col"><?php _e('Description'); ?></th>
29944 <th scope="col" class="action-links"><?php _e('Action'); ?></th>
29945 </tr>
29946 </tfoot>
29947
29948 <tbody class="plugins">
29949 <?php
29950
(283 . 15)(187 . 12)
29952 else //Inactive or Recently deactivated
29953 $action_links[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>';
29954
29955 if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
29956 $action_links[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';
29957
29958 $action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, $plugin_data, $context );
29959 $action_links = apply_filters( "plugin_action_links_$plugin_file", $action_links, $plugin_file, $plugin_data, $context );
29960
29961 echo "
29962 <tr class='$context'>
29963 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . attribute_escape($plugin_file) . "' /></th>
29964 <td scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . attribute_escape($plugin_file) . "' /></td>
29965 <td class='name'>{$plugin_data['Title']}</td>
29966 <td class='vers'>{$plugin_data['Version']}</td>
29967 <td class='desc'><p>{$plugin_data['Description']}</p></td>
(325 . 9)(226 . 6)
29969 <?php if ( 'active' == $context ) : ?>
29970 <option value="deactivate-selected"><?php _e('Deactivate'); ?></option>
29971 <?php endif; ?>
29972 <?php if( current_user_can('delete_plugins') && ( 'recent' == $context || 'inactive' == $context ) ) : ?>
29973 <option value="delete-selected"><?php _e('Delete'); ?></option>
29974 <?php endif; ?>
29975 </select>
29976 <input type="submit" name="doaction_active" value="<?php _e('Apply'); ?>" class="button-secondary action" />
29977 <?php if( 'recent' == $context ) : ?>
(384 . 11)(282 . 6)
29979 <p><?php _e('You do not appear to have any plugins available at this time.') ?></p>
29980 <?php endif; ?>
29981
29982 <h2><?php _e('Get More Plugins'); ?></h2>
29983 <p><?php _e('You can find additional plugins for your site by using the new <a href="plugin-install.php">Plugin Browser/Installer</a> functionality, Or by browsing the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> directly and installing manually.'); ?></p>
29984 <p><?php printf(__('To <em>manually</em> install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory.'), WP_PLUGIN_DIR); ?></p>
29985 <p><?php _e('Once a plugin has been installed, you may activate it here.'); ?></p>
29986
29987 </div>
29988
29989 <?php