From ebf098d45b380d4fcdcfe9293c0fac7255a38e96 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Mon, 26 Apr 2021 23:04:20 +0100 Subject: [PATCH] chore: lint --- .../layout/class-footnotes-layout-engine.php | 30 +------------------ src/public/class-footnotes-public.php | 2 +- src/public/class-footnotes-task.php | 4 +-- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/admin/layout/class-footnotes-layout-engine.php b/src/admin/layout/class-footnotes-layout-engine.php index f70d6ca..e836201 100644 --- a/src/admin/layout/class-footnotes-layout-engine.php +++ b/src/admin/layout/class-footnotes-layout-engine.php @@ -190,38 +190,10 @@ abstract class Footnotes_Layout_Engine { * @since 1.5.0 */ private function append_scripts() { + // TODO: Move to `Footnotes_Admin`. wp_enqueue_script( 'postbox' ); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'wp-color-picker' ); - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - /*if ( true === PRODUCTION_ENV ) { - - wp_register_style( 'footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style( 'footnotes-admin' );*/ } // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing diff --git a/src/public/class-footnotes-public.php b/src/public/class-footnotes-public.php index 6f6db99..598fb65 100644 --- a/src/public/class-footnotes-public.php +++ b/src/public/class-footnotes-public.php @@ -96,7 +96,7 @@ class Footnotes_Public { $this->version = $version; $this->load_dependencies(); - + // Set conditions re-used for stylesheet enqueuing and in class/task.php. self::$a_bool_amp_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ) ); self::$a_bool_tooltips_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); diff --git a/src/public/class-footnotes-task.php b/src/public/class-footnotes-task.php index 818e689..57888df 100644 --- a/src/public/class-footnotes-task.php +++ b/src/public/class-footnotes-task.php @@ -403,11 +403,11 @@ class Footnotes_Task { require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-footnotes-convert.php'; require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-footnotes-settings.php'; require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-footnotes-template.php'; - + // TODO: Move to `Footnotes_Loader`. $this->register_hooks(); } - + /** * Register WordPress hooks to replace Footnotes in the content of a public page. *