| @@ -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; |
| @@ -67,36 +67,9 @@ | ||
| 67 | 67 | 'default' => $this->get_default_field('devtools_tabs')['custom_js'], |
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - /** | |
| 72 | - * Maybe Trigger Reset | |
| 73 | - * | |
| 74 | - * @param [type] $data | |
| 75 | - * @param [type] $class | |
| 76 | - * | |
| 77 | - * @return void | |
| 78 | - */ | |
| 79 | - public function maybe_trigger_reset( $data, $class ) { | |
| 80 | 71 | |
| 81 | - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 82 | - if ( !empty( $_POST['adminify_transient']['reset'] ) ) { | |
| 83 | - | |
| 84 | - delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 85 | - | |
| 86 | - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 87 | - } else if ( !empty( $_POST['adminify_transient']['reset_section'] ) && isset( $_POST['adminify_transient']['section'] ) ) { | |
| 88 | - | |
| 89 | - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, no state change. | |
| 90 | - $section = sanitize_text_field( wp_unslash( $_POST['adminify_transient']['section'] ) ); | |
| 91 | - if ( $class->pre_sections[ $section - 2 ]['id'] === 'custom_css_js' ) { | |
| 92 | - delete_option( 'pxlbsadminify_custom_js_css' ); | |
| 93 | - } | |
| 94 | - | |
| 95 | - } | |
| 96 | - } | |
| 97 | - | |
| 98 | - | |
| 99 | 72 | /** |
| 100 | 73 | * Tabs: Frontend & Backend |
| 101 | 74 | * |
| 102 | 75 | * @param [type] $fields |
| @@ -111,19 +84,16 @@ | ||
| 111 | 84 | |
| 112 | 85 | if ( !Utils::is_plugin_active( 'adminify-header-footer-scripts/adminify-header-footer-scripts.php' ) ) { |
| 113 | 86 | $frontend_custom_scripts[] = [ |
| 114 | 87 | 'type' => 'notice', |
| 115 | - 'title' => ' ', | |
| 88 | + 'title' => __(' ', 'adminify'), | |
| 116 | 89 | 'class' => 'adminify-missing-plugins adminify-one-col', |
| 117 | 90 | 'style' => 'warning', |
| 118 | 91 | 'content' => Utils::missing_plugin_notice('Custom Header & Footer'), |
| 119 | 92 | ]; |
| 120 | 93 | } else { |
| 121 | - | |
| 122 | - add_action( "adminify_pxlbsadminify_settings_save_after", [ $this, 'maybe_trigger_reset' ], 10, 2 ); | |
| 123 | - | |
| 124 | - if ( class_exists( '\PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings' ) ) { | |
| 125 | - $customHeaderFooterSettings = new \PXLBSAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 94 | + if(class_exists('\WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings')){ | |
| 95 | + $customHeaderFooterSettings = new \WPAdminify\Modules\CustomHeaderFooter\Inc\CustomHeaderFooter\CustomHeaderFooterSettings(); | |
| 126 | 96 | $frontend_custom_scripts = $customHeaderFooterSettings->get_fields(); |
| 127 | 97 | } |
| 128 | 98 | } |
| 129 | 99 | |
| @@ -152,8 +122,9 @@ | ||
| 152 | 122 | return; |
| 153 | 123 | } |
| 154 | 124 | |
| 155 | 125 | $fields = array(); |
| 126 | + // $this->devtools_admin_area_custom_css_js_fields( $fields ); | |
| 156 | 127 | $this->devtools_tabbed_settings( $fields ); |
| 157 | 128 | |
| 158 | 129 | // DevTools Section |
| 159 | 130 | \ADMINIFY::createSection( |