| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -namespace PXLBSAdminify\Inc\Admin\Options; | |
| 3 | +namespace WPAdminify\Inc\Admin\Options; | |
| 4 | 4 | |
| 5 | -use PXLBSAdminify\Inc\Utils; | |
| 6 | -use PXLBSAdminify\Inc\Admin\AdminSettingsModel; | |
| 5 | +use WPAdminify\Inc\Utils; | |
| 6 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | if (!defined('ABSPATH')) { |
| 10 | 10 | die; |
| @@ -77,20 +77,17 @@ | ||
| 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. | |
| 82 | 81 | if ( !empty( $_POST['adminify_transient']['reset'] ) ) { |
| 83 | 82 | |
| 84 | - delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 83 | + delete_option( '_wpadminify_custom_js_css' ); | |
| 85 | 84 | |
| 86 | - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 87 | 85 | } else if ( !empty( $_POST['adminify_transient']['reset_section'] ) && isset( $_POST['adminify_transient']['section'] ) ) { |
| 88 | 86 | |
| 89 | - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 90 | - $section = sanitize_text_field( wp_unslash( $_POST['adminify_transient']['section'] ) ); | |
| 87 | + $section = $_POST['adminify_transient']['section']; | |
| 91 | 88 | if ( $class->pre_sections[ $section - 2 ]['id'] === 'custom_css_js' ) { |
| 92 | - delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 89 | + delete_option( '_wpadminify_custom_js_css' ); | |
| 93 | 90 | } |
| 94 | 91 | |
| 95 | 92 | } |
| 96 | 93 | } |
| @@ -111,9 +108,9 @@ | ||
| 111 | 108 | |
| 112 | 109 | if ( !Utils::is_plugin_active( 'adminify-header-footer-scripts/adminify-header-footer-scripts.php' ) ) { |
| 113 | 110 | $frontend_custom_scripts[] = [ |
| 114 | 111 | 'type' => 'notice', |
| 115 | - 'title' => ' ', | |
| 112 | + 'title' => __(' ', 'adminify'), | |
| 116 | 113 | 'class' => 'adminify-missing-plugins adminify-one-col', |
| 117 | 114 | 'style' => 'warning', |
| 118 | 115 | 'content' => Utils::missing_plugin_notice('Custom Header & Footer'), |
| 119 | 116 | ]; |
| @@ -118,12 +115,12 @@ | ||
| 118 | 115 | 'content' => Utils::missing_plugin_notice('Custom Header & Footer'), |
| 119 | 116 | ]; |
| 120 | 117 | } else { |
| 121 | 118 | |
| 122 | - add_action( "adminify_pxlbsadminify_settings_save_after", [ $this, 'maybe_trigger_reset' ], 10, 2 ); | |
| 119 | + add_action( "adminify__wpadminify_save_after", [ $this, 'maybe_trigger_reset' ], 10, 2 ); | |
| 123 | 120 | |
| 124 | - if ( class_exists( '\PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings' ) ) { | |
| 125 | - $customHeaderFooterSettings = new \PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 121 | + if ( class_exists( '\WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings' ) ) { | |
| 122 | + $customHeaderFooterSettings = new \WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 126 | 123 | $frontend_custom_scripts = $customHeaderFooterSettings->get_fields(); |
| 127 | 124 | } |
| 128 | 125 | } |
| 129 | 126 | |