| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -namespace WPAdminify\Inc\Admin\Options; | |
| 3 | +namespace PXLBSAdminify\Inc\Admin\Options; | |
| 4 | 4 | |
| 5 | -use WPAdminify\Inc\Utils; | |
| 6 | -use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 5 | +use PXLBSAdminify\Inc\Utils; | |
| 6 | +use PXLBSAdminify\Inc\Admin\AdminSettingsModel; | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | if (!defined('ABSPATH')) { |
| 10 | 10 | die; |
| @@ -77,17 +77,20 @@ | ||
| 77 | 77 | * @return void |
| 78 | 78 | */ |
| 79 | 79 | public function maybe_trigger_reset( $data, $class ) { |
| 80 | 80 | |
| 81 | + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 81 | 82 | if ( !empty( $_POST['adminify_transient']['reset'] ) ) { |
| 82 | 83 | |
| 83 | - delete_option( '_wpadminify_custom_js_css' ); | |
| 84 | + delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 84 | 85 | |
| 86 | + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 85 | 87 | } else if ( !empty( $_POST['adminify_transient']['reset_section'] ) && isset( $_POST['adminify_transient']['section'] ) ) { |
| 86 | 88 | |
| 87 | - $section = $_POST['adminify_transient']['section']; | |
| 89 | + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 90 | + $section = sanitize_text_field( wp_unslash( $_POST['adminify_transient']['section'] ) ); | |
| 88 | 91 | if ( $class->pre_sections[ $section - 2 ]['id'] === 'custom_css_js' ) { |
| 89 | - delete_option( '_wpadminify_custom_js_css' ); | |
| 92 | + delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 90 | 93 | } |
| 91 | 94 | |
| 92 | 95 | } |
| 93 | 96 | } |
| @@ -115,12 +118,12 @@ | ||
| 115 | 118 | 'content' => Utils::missing_plugin_notice('Custom Header & Footer'), |
| 116 | 119 | ]; |
| 117 | 120 | } else { |
| 118 | 121 | |
| 119 | - add_action( "adminify__wpadminify_save_after", [ $this, 'maybe_trigger_reset' ], 10, 2 ); | |
| 122 | + add_action( "adminify_pxlbsadminify_settings_save_after", [ $this, 'maybe_trigger_reset' ], 10, 2 ); | |
| 120 | 123 | |
| 121 | - if ( class_exists( '\WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings' ) ) { | |
| 122 | - $customHeaderFooterSettings = new \WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 124 | + if ( class_exists( '\PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings' ) ) { | |
| 125 | + $customHeaderFooterSettings = new \PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 123 | 126 | $frontend_custom_scripts = $customHeaderFooterSettings->get_fields(); |
| 124 | 127 | } |
| 125 | 128 | } |
| 126 | 129 | |