Changeset 681209
- Timestamp:
- 03/13/2013 01:32:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-backgrounds-lite/trunk/inoplugs_background_plugin.php
r659146 r681209 181 181 182 182 // verify nonce 183 if ( !wp_verify_nonce($_POST['ino_meta_box_nonce'], basename(__FILE__))) {183 if (isset($_POST['ino_meta_box_nonce']) && !wp_verify_nonce($_POST['ino_meta_box_nonce'], basename(__FILE__))) { 184 184 return $post_id; 185 185 } … … 191 191 192 192 // check permissions 193 if ( 'page' == $_POST['post_type']) {193 if (isset($_POST['post_type']) && 'page' == $_POST['post_type']) { 194 194 if (!current_user_can('edit_page', $post_id)) { 195 195 return $post_id; … … 201 201 foreach ($ino_meta_box[0]['fields'] as $field) { 202 202 $old = get_post_meta($post_id, $field['id'], true); 203 $new = $_POST[$field['id']]; 203 if(isset($_POST[$field['id']])){ 204 $new = $_POST[$field['id']]; 205 }else{ 206 $new = ''; 207 } 204 208 205 209 if ($new && $new != $old) { … … 231 235 232 236 function inowpblite_addAdminPage() { 233 add_options_page(__('WP-Backgrounds Lite',INO_WPBLITE_TEXTDOMAIN), 'WP-Backgrounds Lite', 8, 'WP-Backgrounds', 'inowpblite_adminmenu');237 add_options_page(__('WP-Backgrounds Lite',INO_WPBLITE_TEXTDOMAIN), 'WP-Backgrounds Lite', 'manage_options', 'WP-Backgrounds', 'inowpblite_adminmenu'); 234 238 } 235 239
Note: See TracChangeset
for help on using the changeset viewer.