includes/class-sensei-lesson.php 1 location
|
@@ 249-251 (lines=3) @@
|
246 |
|
public function meta_box_save ( $post_id ) { |
247 |
|
|
248 |
|
// Verify the nonce before proceeding. |
249 |
|
if ( ( get_post_type( $post_id ) != $this->token ) || !isset( $_POST[ 'woo_' . $this->token . '_nonce'] ) || ! wp_verify_nonce( $_POST[ 'woo_' . $this->token . '_nonce' ], 'sensei-save-post-meta' ) ) { |
250 |
|
return $post_id; |
251 |
|
} // End If Statement |
252 |
|
// Get the post type object. |
253 |
|
$post_type = get_post_type_object( get_post_type( $post_id ) ); |
254 |
|
// Check if the current user has permission to edit the post. |
includes/class-sensei-modules.php 1 location
|
@@ 228-231 (lines=4) @@
|
225 |
|
global $post; |
226 |
|
|
227 |
|
// Verify post type and nonce |
228 |
|
if ((get_post_type() != 'lesson') || !isset($_POST['woo_lesson_' . $this->taxonomy . '_nonce'] ) |
229 |
|
||!wp_verify_nonce($_POST['woo_lesson_' . $this->taxonomy . '_nonce'], plugin_basename($this->file))) { |
230 |
|
return $post_id; |
231 |
|
} |
232 |
|
|
233 |
|
// Check if user has permissions to edit lessons |
234 |
|
$post_type = get_post_type_object($post->post_type); |