Changeset 3064990
- Timestamp:
- 04/04/2024 06:20:21 PM (2 years ago)
- Location:
- punchlist/trunk
- Files:
-
- 2 edited
-
bootstrap.php (modified) (2 diffs)
-
src/Preview.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
punchlist/trunk/bootstrap.php
r3064960 r3064990 135 135 { 136 136 if (check_ajax_referer('pl_create_project_edit_screen')) { 137 $postId = (int) $_POST['post_ID'];137 $postId = isset($_POST['post_ID']) ? (int) $_POST['post_ID'] : null; 138 138 if ($postId) { 139 139 if (!in_array(get_post_status($postId), ['publish', 'future', 'draft', 'pending'])) { … … 166 166 { 167 167 if (check_ajax_referer('pl_create_project_edit_screen')) { 168 $postId = (int) $_POST['post_ID'];168 $postId = isset($_POST['post_ID']) ? (int) $_POST['post_ID'] : null; 169 169 170 170 if ($postId) { -
punchlist/trunk/src/Preview.php
r3064960 r3064990 67 67 public static function showPreview($query) 68 68 { 69 $pluid = sanitize_text_field($_GET['pluid']);70 $postId = (int) $_GET['post_to_preview'];69 $pluid = isset($_GET['pluid']) ? sanitize_text_field($_GET['pluid']) : null; 70 $postId = isset($_GET['post_to_preview']) ? (int) $_GET['post_to_preview'] : null; 71 71 if ($pluid && $postId && self::verifyPreviewCode($postId, $pluid)) { 72 72 add_filter('posts_results', [__CLASS__, 'makePostViewable'], 10, 2);
Note: See TracChangeset
for help on using the changeset viewer.