equal
deleted
inserted
replaced
88 } |
88 } |
89 iframe_footer(); |
89 iframe_footer(); |
90 } elseif ( 'install-plugin' == $action ) { |
90 } elseif ( 'install-plugin' == $action ) { |
91 |
91 |
92 if ( ! current_user_can('install_plugins') ) |
92 if ( ! current_user_can('install_plugins') ) |
93 wp_die(__('You do not have sufficient permissions to install plugins for this site.')); |
93 wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) ); |
94 |
94 |
95 include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api.. |
95 include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api.. |
96 |
96 |
97 check_admin_referer('install-plugin_' . $plugin); |
97 check_admin_referer('install-plugin_' . $plugin); |
98 $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. |
98 $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. |
119 include(ABSPATH . 'wp-admin/admin-footer.php'); |
119 include(ABSPATH . 'wp-admin/admin-footer.php'); |
120 |
120 |
121 } elseif ( 'upload-plugin' == $action ) { |
121 } elseif ( 'upload-plugin' == $action ) { |
122 |
122 |
123 if ( ! current_user_can('install_plugins') ) |
123 if ( ! current_user_can('install_plugins') ) |
124 wp_die(__('You do not have sufficient permissions to install plugins for this site.')); |
124 wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) ); |
125 |
125 |
126 check_admin_referer('plugin-upload'); |
126 check_admin_referer('plugin-upload'); |
127 |
127 |
128 $file_upload = new File_Upload_Upgrader('pluginzip', 'package'); |
128 $file_upload = new File_Upload_Upgrader('pluginzip', 'package'); |
129 |
129 |
192 |
192 |
193 iframe_footer(); |
193 iframe_footer(); |
194 } elseif ( 'install-theme' == $action ) { |
194 } elseif ( 'install-theme' == $action ) { |
195 |
195 |
196 if ( ! current_user_can('install_themes') ) |
196 if ( ! current_user_can('install_themes') ) |
197 wp_die(__('You do not have sufficient permissions to install themes for this site.')); |
197 wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); |
198 |
198 |
199 include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api.. |
199 include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api.. |
200 |
200 |
201 check_admin_referer('install-theme_' . $theme); |
201 check_admin_referer('install-theme_' . $theme); |
202 $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth. |
202 $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth. |
222 include(ABSPATH . 'wp-admin/admin-footer.php'); |
222 include(ABSPATH . 'wp-admin/admin-footer.php'); |
223 |
223 |
224 } elseif ( 'upload-theme' == $action ) { |
224 } elseif ( 'upload-theme' == $action ) { |
225 |
225 |
226 if ( ! current_user_can('install_themes') ) |
226 if ( ! current_user_can('install_themes') ) |
227 wp_die(__('You do not have sufficient permissions to install themes for this site.')); |
227 wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); |
228 |
228 |
229 check_admin_referer('theme-upload'); |
229 check_admin_referer('theme-upload'); |
230 |
230 |
231 $file_upload = new File_Upload_Upgrader('themezip', 'package'); |
231 $file_upload = new File_Upload_Upgrader('themezip', 'package'); |
232 |
232 |