From f3f25ca97e459e460d2cb6a45448f2ba88353086 Mon Sep 17 00:00:00 2001 From: Arnaud Broes Date: Mon, 4 Nov 2019 10:14:04 +0100 Subject: [PATCH] Refactor aioseop-count-chars.js (#2976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor aioseop-count-chars.js #2755 * Clear preview snippet description when "Autogenerated Descriptions" is disabled #2975 * Fix #2927, #2747, #2337 * Set character treshold to 55 for OG:title and OG:description #2413 * Change let to var + minify * Use minified JavaScript files instead * Fix variable naming * Fix Grunt issues * Revert minified js * 3.3 (#17) * Add PHPCompatibility sniffs to PHPCS & fix issues (#2907) * Add PHPCompatibility sniffs to PHPCS #2851 * Ignore Composer & VScode for Git #2851 * Fix PHP compatibility issues (1) #2851 * Don't check PHP compatibility of unit tests #2851 * Fix PHP compatibility issues (2) #2851 * Move parse_ini_string() to compatibility/php-functions.php #2851 * Fix typo #2851 * Fix typo (2) #2851 * Add Grunt task set for Travis CI builds #2851 * Add Travis CI support for PHPCompatibility #2851 * Print installed sniffs after "composer install" in Travis CI #2851 * Delete composer.lock #2851 * Move parse_ini_string() from aioseop_functions.php to compatibility/php-functions.php #2851 * Remove compat-gutenberg.php * Readd compat-gutenberg.php * Fix Grunt #2851 * Fix path to compat files #2851 * Add package-lock.json to .gitignore #2851 * Add composer.lock to .gitignore #2851 * Fix phpDoc in compatibility/php-funcitons.php #2851 * Change schema person's name & logo to add the option of manually enteā€¦ (#2920) * Change schema person's name & logo to add the option of manually entered name & image * Grunt * Add Schema to AMP plugin (#2879) * Fix loose comparator in AMP Head causing a return with empty description * Move AMP hooks to separate function for AMP hooks * Add remove hook for AMP Schema * Add AIOSEOP's Schema to AMP * Dev-change aioseop_amp_description filter to only affect meta descriptions * Add filter aioseop_amp_schema to enable/disable schema on AMP posts * Dev-Fix disable schema filter and no meta desc. * Invert if statement and add third decimal to phpDoc since tags #506 * Add third decimal to phpDoc since tag (2) #506 * Fix Grunt issue * Fix Grunt issue (2) * Change bin path for phpcs (#2966) * Change bin path for phpcs #2965 * Delete phpcs and phpcompatibility script entries #2965 * Add new line to init-grunt.sh #2965 * Refactor operations in All_in_One_SEO_Pack_Opengraph::add_meta() (#2941) * Change variable variables to direct variables * Change early initialize thumbnail variable to use image variable * Change operations from call filter to call method * Add filter documentation * Change to group operations together * Add dev notes * Grunt * Dev-Fix filter params * Dev-Add dev note * Dev-Fix error on SSL enabled site * Dev-Change duplicate code to function * Only output meta descriptions if autogenerate descriptions is enabled (#2947) * Fix issue 2439 * Dev-Change to strict comparator * Dev-Fix empty value check * Dev-Change applied changes The excerpt was being added elsewhere as a final fallback * Revert previous changes #2439 * Refactor code #2439 * Remove unneeded check #2439 * Fix Grunt issue * Fix SEO for search results page (#2964) * Added/updated help text for new Schema fields (#2959) * #2958 Added/updated help text for new Schema fields * Add missing i18n domains #2958 * Resolves semperfiwebdesign/all-in-one-seo-pack#2411 (#2955) * 3.2.10 to 3.3 (#2986) * Update help text for Sitemap Indexes setting (#2961) * Only show Welcome Screen on major version updates (#2922) * add get_major_version function #2662 * only show welcome screen on major version updates #2662 * remove function * move function to aioseop_functions.php * Remove class keywords #2662 * Grunt & WPCS * Fix conflict between Chromium v77.0.3865.75 and Gutenberg (#2921) * Fix conflict between Chromium v77.0.3865.75 and Gutenberg #2914 * Grunt fixes #2914 * Revert removed package tag #2914 * Target WP 5.0 <= X < 5.3 #2914 * Move echo statement inside version check #2914 * Do proper version checks #2914 * Fix phpDoc #2914 * Add filter hook to disable schema.org markup (#2915) * Add filter hook to disable schema.org markup * fix return value for schema filter * Grunt fix #2913 * reversing schema filter logic and using a boolean instead of string * Update help text for Sitemap Indexes setting #2954 * Remove version check for Gutenberg/Chrome compatibility fix and check if user agent is set (#2928) * Fix conflict between Chromium v77.0.3865.75 and Gutenberg #2914 * Grunt fixes #2914 * Revert removed package tag #2914 * Target WP 5.0 <= X < 5.3 #2914 * Move echo statement inside version check #2914 * Do proper version checks #2914 * Fix phpDoc #2914 * Only show Welcome Screen on major version updates (#2922) * add get_major_version function #2662 * only show welcome screen on major version updates #2662 * remove function * move function to aioseop_functions.php * Remove class keywords #2662 * Grunt & WPCS * Fix conflict between Chromium v77.0.3865.75 and Gutenberg (#2921) * Fix conflict between Chromium v77.0.3865.75 and Gutenberg #2914 * Grunt fixes #2914 * Revert removed package tag #2914 * Target WP 5.0 <= X < 5.3 #2914 * Move echo statement inside version check #2914 * Do proper version checks #2914 * Fix phpDoc #2914 * Add filter hook to disable schema.org markup (#2915) * Add filter hook to disable schema.org markup * fix return value for schema filter * Grunt fix #2913 * reversing schema filter logic and using a boolean instead of string * Remove WP v5.3 version check and move function out of action hook #2914 * Invert version_compare and prefix functions #2914 * Fix phpDocs #2914 * Rename compat-gutenberg.php to gutenberg-chrome.php #2914 * Fix undefined index HTTP_USER_AGENT #2952 * version bump to 3.2.10 * Update readme.txt * Delete duplicate file * Fix file paths * Fix Grunt issues #2990 * Add characterCounter to ignored JS variables * Fix bugs * Update character counter when editor changes #2977 * Fix bug where counter background colour doesn't change * PR comments * Support non-default plugin path * Remove unused code * Remove unneeded variable declaration * Include post-new.php as edit page * Use legacy code for taxonomies * Fix Grunt issues * Revert minified scripts * Variable alignment * Use let (ES6) and align variables --- .jshintrc | 6 +- aioseop_class.php | 46 ++- css/modules/aioseop_module.css | 7 +- css/modules/aioseop_module.min.css | 2 +- js/admin/aioseop-count-chars-old.js | 90 ++++++ js/admin/aioseop-count-chars-old.min.js | 1 + js/admin/aioseop-count-chars.js | 401 ++++++++++++++++++++---- js/admin/aioseop-count-chars.min.js | 2 +- js/admin/aioseop-preview-snippet.js | 301 +++++++++--------- js/admin/aioseop-preview-snippet.min.js | 2 +- modules/aioseop_opengraph.php | 52 +-- 11 files changed, 665 insertions(+), 245 deletions(-) create mode 100644 js/admin/aioseop-count-chars-old.js create mode 100644 js/admin/aioseop-count-chars-old.min.js diff --git a/.jshintrc b/.jshintrc index 31fb46956..5e9a25847 100644 --- a/.jshintrc +++ b/.jshintrc @@ -3,7 +3,7 @@ "curly": true, "eqeqeq": true, "eqnull": true, - "esversion": 5, + "esversion": 6, "expr": true, "immed": true, "jquery": true, @@ -34,6 +34,8 @@ "aioseop_count_chars", "aioseop_preview_snippet", "tinymce", - "XRegExp" + "XRegExp", + "aioseopCharacterCounter", + "aioseopOGCharacterCounter" ] } diff --git a/aioseop_class.php b/aioseop_class.php index 268f66b1f..b5076e3dd 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -3676,16 +3676,42 @@ public function admin_enqueue_scripts( $hook_suffix ) { add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 ); add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 ); - $extra_title_len = 0; + $count_chars_data = array(); switch ( $hook_suffix ) { + case 'term.php': + // Legacy code for taxonomy terms until we refactor all title format related code. + $count_chars_data['aiosp_title_extra'] = 0; + wp_enqueue_script( + 'aioseop-count-chars-old', + AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars-old.js', + array(), + AIOSEOP_VERSION, + true + ); + wp_localize_script( 'aioseop-count-chars-old', 'aioseop_count_chars', $count_chars_data ); + break; case 'post.php': case 'post-new.php': + $title_format = $this->get_preview_snippet_title(); + $extra_title_length = strlen( preg_replace( '//', '', $title_format ) ); + + $snippet_preview_data = array( + 'isGutenberg' => $is_gutenberg, + 'autogenerateDescriptions' => $aioseop_options['aiosp_generate_descriptions'], + 'skipExcerpt' => $aioseop_options['aiosp_skip_excerpt'], + ); + + $count_chars_data['extraTitleLength'] = $extra_title_length; + $count_chars_data['isGutenberg'] = $is_gutenberg; + $count_chars_data['autogenerateDescriptions'] = $aioseop_options['aiosp_generate_descriptions']; + wp_enqueue_script( 'aioseop-preview-snippet', AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-preview-snippet.js', array(), AIOSEOP_VERSION ); + wp_localize_script( 'aioseop-preview-snippet', 'aioseop_preview_snippet', $snippet_preview_data ); wp_enqueue_script( 'xregexp', @@ -3693,25 +3719,19 @@ public function admin_enqueue_scripts( $hook_suffix ) { array(), '3.2.0' ); - - $snippet_preview_data = array( - 'isGutenberg' => $is_gutenberg, - 'autogenerateDescriptions' => $aioseop_options['aiosp_generate_descriptions'], - 'skipExcerpt' => $aioseop_options['aiosp_skip_excerpt'], - ); - wp_localize_script( 'aioseop-preview-snippet', 'aioseop_preview_snippet', $snippet_preview_data ); // No break required. case 'toplevel_page_' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class': + $count_chars_data['pluginDirName'] = AIOSEOP_PLUGIN_DIRNAME; + $count_chars_data['currentPage'] = $hook_suffix; + wp_enqueue_script( 'aioseop-count-chars', AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars.js', array(), - AIOSEOP_VERSION - ); - $count_chars_data = array( - 'extraTitleLength' => (int) $extra_title_len, + AIOSEOP_VERSION, + true ); - wp_localize_script( 'aioseop-count-chars', 'aioseop_count_chars', $count_chars_data ); + wp_localize_script( 'aioseop-count-chars', 'aioseopCharacterCounter', $count_chars_data ); break; } parent::admin_enqueue_scripts( $hook_suffix ); diff --git a/css/modules/aioseop_module.css b/css/modules/aioseop_module.css index be005ea50..50d1b92fa 100644 --- a/css/modules/aioseop_module.css +++ b/css/modules/aioseop_module.css @@ -1538,16 +1538,15 @@ div#aioseop_snippet > div > span { border: 0; } -/* the good, the bad and the ugly character counts */ -.aioseop_count_good { +.aioseop_count_chars_below_treshold { color: #515151 !important; background-color: #eee !important; } -.aioseop_count_bad { +.aioseop_count_chars_near_treshold { color: #515151 !important; background-color: #ff0 !important; } -.aioseop_count_ugly { +.aioseop_count_chars_past_treshold { color: #fff !important; background-color: #f00 !important; } diff --git a/css/modules/aioseop_module.min.css b/css/modules/aioseop_module.min.css index 752218c22..6d886d44f 100644 --- a/css/modules/aioseop_module.min.css +++ b/css/modules/aioseop_module.min.css @@ -1 +1 @@ -.all-in-one-seo_page_aiosp_opengraph #wpbody-content,[class*=all-in-one-seo-pack] #wpbody-content{min-width:900px}.form-table.aioseop{clear:none}.form-table.aioseop td{vertical-align:top;padding:16px 0 10px 0;line-height:20px;font-size:12px}.form-table.aioseop th{width:200px;padding:10px 0 12px 9px}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:left;float:left;max-width:30px;min-width:20px;padding-top:2px;outline:0;color:#888;font-family:sans-serif;line-height:1.4em}.aioseop_help_text_link span{font-size:14px}.aioseop_help_text_link:before{content:"\f223";font-size:22px;font-family:dashicons;vertical-align:middle;margin-right:4px}#aioseop-support .aioseop_metabox_text,#aioseop-support a{font-size:14px;color:#000;text-decoration:none}.aioseop_meta_box_help>label{position:absolute;margin-left:8px}.aioseop_help_text_link img{width:40px;float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:right;text-align:right;min-width:56px;max-width:90px;text-decoration:none;height:15px;padding-top:1px;position:relative}.aioseop_meta_box_help span{vertical-align:middle}.aioseop_tabs .aioseop_meta_box_help,.aioseop_tabs .aioseop_meta_box_help:active{margin-top:10px}.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active{margin-bottom:20px}.aioseop_label{color:#5f5f5f;font-weight:600;line-height:19px;display:inline-block;float:left;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:2px 0;width:81%;min-width:120px;max-width:250px;cursor:default;font-size:13.5px}.aioseop_option_div{max-height:360px;min-height:37px;width:95%;overflow-y:auto}.aioseop_overflowed{border:1px solid #e1e1e1}.aioseop input[type=text],.aioseop input[type=url]{color:#515151;min-height:35px;padding:10px;font-size:14px;width:95%;max-width:600px}.aioseop textarea{color:#515151;padding:10px;margin:1px;font-size:14px;line-height:25px;width:95%;max-width:600px;min-height:36px}.aioseop input,.aioseop textarea{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop input:focus,.aioseop textarea:focus{box-shadow:0 0 0 1px #007cba}.aioseop textarea::-webkit-scrollbar{width:12px}.aioseop textarea::-webkit-scrollbar-track{background:#f1f1f1}.aioseop textarea::-webkit-scrollbar-thumb{background:#aeaeae}.aioseop textarea::-webkit-scrollbar-thumb:hover{background:#888}.aioseop_help_text_div{text-align:left;width:100%;margin:0}.aioseop_help_text{font-size:12px;float:left;clear:left;color:#797979;line-height:15px;font-style:italic}.aioseop_head_tagline{color:#5f5f5f;font-size:13px}.aioseop_head_nav{float:left;font-size:18px;margin:0 0 16px 0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;background-color:#fff;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;color:#000;font-weight:700;text-shadow:#fff 0 1px 0;text-decoration:none}.aioseop_head_nav_tab.aioseop_head_nav_active{opacity:1;margin-bottom:-1px;border-width:1px}.aioseop_head_nav_tab:first-child{margin-left:0}.aioseop_head_nav_tab:hover{opacity:1}.aioseop_header{float:left;clear:left}.aioseop_advert{padding:10px;margin-bottom:30px;border:1px solid #ddd;height:200px;width:423px}.aioseop_nopad{padding-left:0;padding-top:0}.aioseop_nopad_all{padding:0;height:220px;width:445px;margin-bottom:20px;border:none}.aioseop_adverts{float:right}.wincherad{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;margin-bottom:0;border:none}#wincher21{background-image:url(../../modules/images/banner21.jpg)}#wincher22{background-image:url(../../modules/images/banner22.jpg)}.aioseop_content{min-width:760px;clear:left}.aioseop_options_wrapper .hndle{font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:400;min-height:18px;padding:7px 10px;margin:0;line-height:1}.aioseop_options_wrapper .submit input.button-primary{margin-bottom:5px}#aiosp_feature_manager_metabox.postbox{margin-top:20px;float:left}.aioseop_advert p{margin:25px 0 25px 0}.aioseop_options_wrapper .postarea{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.aioseop_advert h3{padding:0;margin-top:6px}.aioseop_metabox_text p{margin:0;width:101%}.aioseop_sidebar{width:457px;margin-left:10px}.aioseop_metabox_text{margin-bottom:0}.aioseop_metabox_wrapper{padding:0}.aioseop_metabox_text :last-child{margin:0}.aioseop_metabox_feature{margin-top:20px}.aioseop_translations{margin-top:15px}.aioseop_option_label{float:left;margin:0;padding-top:3px;padding-bottom:3px;width:37%;min-width:150px;max-width:360px;min-height:30px}.aioseop_metabox_text h2{font-size:30px;padding:0;font-weight:700;line-height:29px}#aioseop-about{width:443px;margin-bottom:20px}#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2{font-size:13px}.aioseop_sidebar #mc-embedded-subscribe-form{margin:0 0 10px 0;background:#fff;padding:10px 10px;border:1px solid #ddd}#aioseop-about .aioseop_metabox_text ul{list-style-type:disc;padding-left:15px}.aioseop input[readonly]{background-color:#eee;margin:5px 1px 5px 1px!important}.aioseop_settings_left{float:left;padding:0;margin:0;width:100%}body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}#aioseop_top_button{margin-top:5px;height:30px}#aioseop-list #mce-EMAIL{margin-top:5px;width:250px}.aioseop_top{margin:10px 10px 0 0}.aioseop_top #aioseop-list{margin-bottom:0}.aioseop_top #aioseop-list.postbox.closed{overflow:hidden}.aioseop_right_sidebar{float:right;margin-top:55px}#aiosp_settings_form .button-primary.hidden{display:none}form#edittag div#aiosp_menulabel_wrapper,form#edittag div#aiosp_sitemap_exclude_wrapper,form#edittag div#aiosp_titleatr_wrapper{display:none}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>#aioseop_top_button{height:5px;position:absolute;top:0;width:97%}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>.aioseop_settings_left{margin-top:10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin-top:30px}div#aiosp_feature_manager_metabox .inside{padding:8px}div.aioseop_feature{position:relative;display:inline-block;float:left;vertical-align:top;width:240px;height:288px;margin:8px;border:1px solid #dedede;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;padding:10px 0;-webkit-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-webkit-transition-duration:.4s;-moz-transition-duration:.4s}.aioseop_feature .flag{float:right;margin-right:-7px;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px 6px 5px;position:relative}.aioseop_feature .flag:before{border-color:#d23d46 #d23d46 #d23d46 transparent;border-style:solid;border-width:14px 4px 15px 10px;content:"";left:-14px;position:absolute;top:0}.aioseop_feature .flag:after{border-color:#892026 transparent transparent;border-style:solid;border-width:6px 6px 6px 0;bottom:-12px;content:"";position:absolute;right:0}.aioseop_feature .flag.pro{display:none}#aioseop_coming_soon .free.flag,.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag{display:none}#aioseop_coming_soon .flag.pro{display:block;margin-top:-30px}.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro{display:none}.aioseop_feature h3{font-size:17px;margin:0;padding:0 10px 5px 10px;font-weight:400;font-style:normal;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.aioseop_feature p{line-height:150%;font-size:12px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin-bottom:20px;color:#666;padding:0 10px}.aioseop_feature p.aioseop_desc{min-height:80px}.aioseop_feature .feature_button{float:right;display:inline-block;position:relative;margin:0 10px 10px 0;min-width:80px;text-align:center}.aioseop_feature .feature_button:before{content:"Activate"}.aioseop_feature .active.feature_button:before{content:"Deactivate"}div.aioseop_feature .aioseop_featured_image{min-height:100px;background-repeat:no-repeat;display:block;margin:0 auto;width:133px}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Standard.png)}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}.All_in_One_SEO_Pack_Sitemap>form>.wrap>.form-table,.All_in_One_SEO_Pack_Video_Sitemap>form>.wrap>.form-table{max-width:500px;clear:none}.aioseop_follow_button{min-height:50px;background-repeat:no-repeat;display:inline-block;width:100px;background-size:auto 50px!important;margin-right:0}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-standard.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-standard.png)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx){div.aioseop_feature .aioseop_featured_image{background-size:auto 100px!important}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Retina.png)}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Retina.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-retina.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-retina.png)}}.aioseop_options{width:100%;margin:18px 0 10px 0}.aioseop_wrapper{width:100%;padding-left:5px}.aioseop_input{clear:left;width:98%;padding:5px 1%;display:inline-block}.aioseop_option_input{float:left;width:61%;margin:0;padding-left:1px;min-width:160px}#aiosp_sitemap_addl_pages_metabox .aioseop_options,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options{width:97%;margin:5px}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper{display:block;width:100%;float:none;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input{display:block;width:100%}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper{padding:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label{width:70%;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label{height:30px!important}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date{height:36px}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type{margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary{margin-left:0!important}#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div{position:absolute;width:auto;margin:5px 0 10px 0}#aiosp_sitemap_addl_pages_metabox table.aioseop_table,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 5px 10px}.selectize-control.aioseop-exclude-terms{position:static;width:95%;max-width:600px}.selectize-input{padding:10px 0 10px 10px!important;border:1px solid #8d96a0!important}table.aioseop_table tr:nth-child(odd){background-color:#eee}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd){background-color:rgba(238,238,238,.5)}table.aioseop_table td{width:23%}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{width:80%;max-width:800px;display:block;border-top:1px solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{width:18%;border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info{margin-top:10px;border:1px solid #dfdfdf;width:80%;max-width:800px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th{background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);padding:5px;border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item{display:inline-block;width:30%;vertical-align:top}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even){font-weight:700}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd){width:70%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}table.aioseop_table td,table.aioseop_table th{padding:3px}.aioseop_no_label .aioseop_option_input,.aioseop_top_label .aioseop_option_input{width:100%}#aiosp_settings_form .postbox{margin:20px 0 0 0}.aioseop_settings_left .postbox{float:left;width:100%}.aioseop_option_setting_label{min-height:35px;display:inline-block;white-space:nowrap;overflow:hidden;padding-left:1px;max-width:229px;min-width:160px;width:33%}.aioseop_settings_left .postbox .inside{padding:0;margin:0;clear:right}#aiosp_robots_rules{clear:left;margin-left:20px;max-width:1072px}#aiosp_robots_default_metabox .aioseop_wrapper{width:31%;min-width:165px;display:inline-block;max-width:265px}#aiosp_robots_default_metabox .aioseop_help_text_div{position:absolute;margin:5px 0 10px 0}#aiosp_robots_default_metabox .aioseop_option_input{width:94%;min-width:94%}#aiosp_robots_default_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 0 10px 0}#aiosp_robots_default_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}#aiosp_robots_default_metabox table.aioseop_table td:first-child{white-space:nowrap}.aioseop.aioseop_options.aiosp_robots_settings h3{margin:1.5em .6em .3em}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:left;width:92%;max-width:100%}#aiosp_sitemap_status_metabox .handlediv.button-link{display:none}#aiosp_sitemap_status_metabox.closed .inside{display:block}.aioseop_top_label{width:96%;margin:0 10px}.aioseop_hidden_type{margin:0;padding:0;height:0}#aiosp_title_metabox #aiosp_force_rewrites_wrapper{display:none;height:0}.aioseop_module.error.below-h2{padding:5px 0;margin:0 477px 15px 0!important}#aioseop_opengraph_settings .inside{margin:0}#aioseop_opengraph_settings_image_wrapper img{width:auto;height:75px}#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label{max-width:160px;min-width:100px;width:30%}.aioseop_input input[type=checkbox],.aioseop_input input[type=radio]{border:1.25px solid #6c7781;vertical-align:text-bottom;margin-top:8px}.aioseop_input input[type=checkbox]:before{margin:-3px 0 0 -5px;color:#fff}.aioseop_input input[type=radio]{border-radius:8px}.aioseop_input input[type=radio]:before{content:none!important}.aioseop_input input[type=checkbox]:checked,.aioseop_input input[type=radio]:checked{background:#11a0d2}#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div{max-height:initial}#aiosp{width:auto}.aioseop_input.aioseop_top_label .aioseop_option_input{margin:0 0 10px 0}.aiosp_file_editor_settings>.aioseop_textarea_type .aioseop_option_div{max-height:none}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{max-height:none}.aioseop_option_input .widefat td{vertical-align:middle}.entry-row.robots.quirks{font-weight:700;opacity:1}.entry-row.robots{opacity:.8}.entry-row.robots.invalid{opacity:1;font-weight:700}.invalid .entry_label{font-weight:700}.aioseop .aioseop_option_input tbody{background:#fcfcfc}.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody{background:0 0}.entry-row.robots div{height:20px;vertical-align:middle;width:90%;margin:0 0 4px 0}.robots img{margin:0 0 0 2px;opacity:.6}.aioseop_option_docs{width:98%;display:none;border:1px solid #d3d3d3;margin-top:20px;padding:1%;background-color:#eee}.aioseop_option_docs h3{background:0 0}div.aioseop_notice{position:relative}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;right:10px}.aioseop_error_notice{color:red;font-weight:700}.aioseop_input select{border-radius:4px;border:1px solid #8d96a0}.aioseop_help_text ul{margin:15px 0 0 20px}.aioseop_help_text ul li{line-height:20px;margin:0}.aioseop_sidebar #side-sortables{width:98%}.aioseop_header_tabs.hide,.aioseop_tabs.hide{display:block!important}.aioseop_header_tabs li a.aioseop_header_tab{font-size:14px;line-height:37px;text-decoration:none;cursor:pointer;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none!important;padding:0 .5em!important;color:#5f5f5f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_tab{padding:10px}.aioseop_loading{background-image:url(../../images/activity.gif);display:inline-block;width:24px;height:24px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs.ui-widget-content{background:0 0!important}.aioseop_tab.ui-widget-content{border:1px solid #aaa!important}.aioseop_tab.ui-widget-content a.aioseop_help_text_link{color:#757575!important}.aioseop_tabs.ui-widget{font-size:13px!important;border:none!important}.aioseop_tabs .ui-widget-header{border:none!important;background:0 0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.aioseop_tabs ul{margin-left:.2em!important}.aioseop_tabs .ui-tabs .ui-tabs-panel{border-width:inherit!important}.aioseop_tabs .ui-state-default,.aioseop_tabs .ui-widget-content .ui-state-default,.aioseop_tabs .ui-widget-header .ui-state-default{background-image:none!important}.aioseop_tabs .ui-state-active a{font-weight:700!important}.aiosp_delete{background-image:url(../../images/delete.png);display:inline-block;width:16px;height:16px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:477px}.aioseop_tabs_div{margin-top:10px}#aiosp_settings_form ul.sfwd_debug_settings li strong{display:block;float:left;text-align:right;background-color:#ddd;margin-right:8px;padding:1px 8px 1px 1px;overflow:auto;width:200px;min-height:16px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong{background-color:#ccc}#aiosp_settings_form ul.sfwd_debug_settings li{clear:left;margin:0;padding:0;background-color:#eee;overflow:auto;max-width:75%;min-width:800px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n){background-color:#ddd}div.sfwd_debug_mail_sent{background-color:#080;border:1px solid #0a0;margin:10px 0 10px 0;width:598px;color:#fff;text-align:center}div.sfwd_debug_error{background-color:red;color:#fff;border:1px solid #a00;margin:10px 0 10px 0;width:598px;text-align:center;font-weight:bolder}#aiosp_performance_status_wrapper .aioseop_option_div{max-height:420px}#aioseop_coming_soon,#aioseop_coming_soon2{padding-top:40px;text-align:center;height:258px;font-size:16px}.MRL{margin-left:20px!important;margin-bottom:10px!important}.postbox-container .aioseop_option_div{width:100%}.postbox-container .aioseop_option_div input[type=text],.postbox-container .aioseop_option_div textarea{width:99%;max-width:900px}.postbox-container .aioseop_option_label{max-width:none;height:auto!important}.postbox-container .aioseop_wrapper{padding:0}.postbox-container .aioseop_input{width:100%;margin-bottom:10px;padding:0}.postbox-container .aioseop_option_input{width:63%;padding:0}.postbox-container div#aiosp_upgrade_wrapper{float:none;width:auto;margin:0;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input{display:block;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input{float:none;width:auto;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div{width:auto;min-height:0;padding:10px 0}.aioseop_tabs .aioseop_options{margin:0}#aioseop_opengraph_settings .aioseop_options{clear:both;margin-top:35px}div#aiosp_snippet_wrapper{border-radius:4px;border:1px solid #8d96a0;clear:both;padding:10px 10px 0;width:auto;margin:0 1px 15px}#aiosp_snippet_wrapper>.aioseop_input:first-child{margin-bottom:0}div#aiosp_snippet_wrapper .aioseop_option_label{height:auto!important}#aiosp_snippet_wrapper>.aioseop_input:first-child .aioseop_option_label{padding:0;min-height:inherit}div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input{margin:0;width:99%}div#aioseop_snippet{font-family:arial,sans-serif;font-size:13px}div#aioseop_snippet>h3{margin:10px 0 5px;font-size:18px;border:0;background:inherit;font-weight:400}div#aioseop_snippet>h3>a{color:#12c;text-decoration:none;cursor:pointer}div#aioseop_snippet>div{color:#545454;max-width:48em}div#aioseop_snippet>div>div{display:block;margin-bottom:1px}div#aioseop_snippet>div>div>cite{color:#00852b;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_good{color:#515151!important;background-color:#eee!important}.aioseop_count_bad{color:#515151!important;background-color:#ff0!important}.aioseop_count_ugly{color:#fff!important;background-color:red!important}textarea.robots-text{color:#000;background-color:#eee;height:100%;margin:0 0 0 10px}div#aiosp_sitemap_status_metabox .toggle-indicator{display:none}.required.email{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_options_wrapper .ui-sortable-handle span{font-size:16px;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#000}.aioseop_file_upload{border:none!important}.aioseop_upload_image_button{float:left;margin:0 0 5px 0!important}.aioseop_delete_files_button{margin:0 5px 10px 0!important}.aioseop_rename_files_button{margin:0 0 10px 0!important}.aioseop_reset_settings_button,.aioseop_update_options_button{margin:10px 0 0 0!important}#aiosp_robots_default_metabox .aioseop_option_label{margin-left:10px}#aiosp_robots_default_metabox .add-edit-rule{margin-left:5px}#aiosp_file_editor_htaccess_metabox{margin:0!important}.aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value]{background-color:#0e7bbe;background-image:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div{background-color:#fff;padding:15px;border:1px solid #8d96a0;border-radius:4px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2190 ';padding-right:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-title{clear:both;text-align:center;font-weight:700;padding:10px 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar{border:1px solid #007cba;border-collapse:collapse}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead{background-color:#f1f1f1;border-bottom:1px solid #8d96a0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td,body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead th{width:2rem;height:2rem;text-align:center}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a{text-decoration:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a:hover{border:1px solid #8d96a0;padding:5px 7px} \ No newline at end of file +.all-in-one-seo_page_aiosp_opengraph #wpbody-content,[class*=all-in-one-seo-pack] #wpbody-content{min-width:900px}.form-table.aioseop{clear:none}.form-table.aioseop td{vertical-align:top;padding:16px 0 10px 0;line-height:20px;font-size:12px}.form-table.aioseop th{width:200px;padding:10px 0 12px 9px}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:left;float:left;max-width:30px;min-width:20px;padding-top:2px;outline:0;color:#888;font-family:sans-serif;line-height:1.4em}.aioseop_help_text_link span{font-size:14px}.aioseop_help_text_link:before{content:"\f223";font-size:22px;font-family:dashicons;vertical-align:middle;margin-right:4px}#aioseop-support .aioseop_metabox_text,#aioseop-support a{font-size:14px;color:#000;text-decoration:none}.aioseop_meta_box_help>label{position:absolute;margin-left:8px}.aioseop_help_text_link img{width:40px;float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:right;text-align:right;min-width:56px;max-width:90px;text-decoration:none;height:15px;padding-top:1px;position:relative}.aioseop_meta_box_help span{vertical-align:middle}.aioseop_tabs .aioseop_meta_box_help,.aioseop_tabs .aioseop_meta_box_help:active{margin-top:10px}.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active{margin-bottom:20px}.aioseop_label{color:#5f5f5f;font-weight:600;line-height:19px;display:inline-block;float:left;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:2px 0;width:81%;min-width:120px;max-width:250px;cursor:default;font-size:13.5px}.aioseop_option_div{max-height:360px;min-height:37px;width:95%;overflow-y:auto}.aioseop_overflowed{border:1px solid #e1e1e1}.aioseop input[type=text],.aioseop input[type=url]{color:#515151;min-height:35px;padding:10px;font-size:14px;width:95%;max-width:600px}.aioseop textarea{color:#515151;padding:10px;margin:1px;font-size:14px;line-height:25px;width:95%;max-width:600px;min-height:36px}.aioseop input,.aioseop textarea{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop input:focus,.aioseop textarea:focus{box-shadow:0 0 0 1px #007cba}.aioseop textarea::-webkit-scrollbar{width:12px}.aioseop textarea::-webkit-scrollbar-track{background:#f1f1f1}.aioseop textarea::-webkit-scrollbar-thumb{background:#aeaeae}.aioseop textarea::-webkit-scrollbar-thumb:hover{background:#888}.aioseop_help_text_div{text-align:left;width:100%;margin:0}.aioseop_help_text{font-size:12px;float:left;clear:left;color:#797979;line-height:15px;font-style:italic}.aioseop_head_tagline{color:#5f5f5f;font-size:13px}.aioseop_head_nav{float:left;font-size:18px;margin:0 0 16px 0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;background-color:#fff;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;color:#000;font-weight:700;text-shadow:#fff 0 1px 0;text-decoration:none}.aioseop_head_nav_tab.aioseop_head_nav_active{opacity:1;margin-bottom:-1px;border-width:1px}.aioseop_head_nav_tab:first-child{margin-left:0}.aioseop_head_nav_tab:hover{opacity:1}.aioseop_header{float:left;clear:left}.aioseop_advert{padding:10px;margin-bottom:30px;border:1px solid #ddd;height:200px;width:423px}.aioseop_nopad{padding-left:0;padding-top:0}.aioseop_nopad_all{padding:0;height:220px;width:445px;margin-bottom:20px;border:none}.aioseop_adverts{float:right}.wincherad{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;margin-bottom:0;border:none}#wincher21{background-image:url(../../modules/images/banner21.jpg)}#wincher22{background-image:url(../../modules/images/banner22.jpg)}.aioseop_content{min-width:760px;clear:left}.aioseop_options_wrapper .hndle{font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:400;min-height:18px;padding:7px 10px;margin:0;line-height:1}.aioseop_options_wrapper .submit input.button-primary{margin-bottom:5px}#aiosp_feature_manager_metabox.postbox{margin-top:20px;float:left}.aioseop_advert p{margin:25px 0 25px 0}.aioseop_options_wrapper .postarea{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.aioseop_advert h3{padding:0;margin-top:6px}.aioseop_metabox_text p{margin:0;width:101%}.aioseop_sidebar{width:457px;margin-left:10px}.aioseop_metabox_text{margin-bottom:0}.aioseop_metabox_wrapper{padding:0}.aioseop_metabox_text :last-child{margin:0}.aioseop_metabox_feature{margin-top:20px}.aioseop_translations{margin-top:15px}.aioseop_option_label{float:left;margin:0;padding-top:3px;padding-bottom:3px;width:37%;min-width:150px;max-width:360px;min-height:30px}.aioseop_metabox_text h2{font-size:30px;padding:0;font-weight:700;line-height:29px}#aioseop-about{width:443px;margin-bottom:20px}#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2{font-size:13px}.aioseop_sidebar #mc-embedded-subscribe-form{margin:0 0 10px 0;background:#fff;padding:10px 10px;border:1px solid #ddd}#aioseop-about .aioseop_metabox_text ul{list-style-type:disc;padding-left:15px}.aioseop input[readonly]{background-color:#eee;margin:5px 1px 5px 1px!important}.aioseop_settings_left{float:left;padding:0;margin:0;width:100%}body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}#aioseop_top_button{margin-top:5px;height:30px}#aioseop-list #mce-EMAIL{margin-top:5px;width:250px}.aioseop_top{margin:10px 10px 0 0}.aioseop_top #aioseop-list{margin-bottom:0}.aioseop_top #aioseop-list.postbox.closed{overflow:hidden}.aioseop_right_sidebar{float:right;margin-top:55px}#aiosp_settings_form .button-primary.hidden{display:none}form#edittag div#aiosp_menulabel_wrapper,form#edittag div#aiosp_sitemap_exclude_wrapper,form#edittag div#aiosp_titleatr_wrapper{display:none}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>#aioseop_top_button{height:5px;position:absolute;top:0;width:97%}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>.aioseop_settings_left{margin-top:10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin-top:30px}div#aiosp_feature_manager_metabox .inside{padding:8px}div.aioseop_feature{position:relative;display:inline-block;float:left;vertical-align:top;width:240px;height:288px;margin:8px;border:1px solid #dedede;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;padding:10px 0;-webkit-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-webkit-transition-duration:.4s;-moz-transition-duration:.4s}.aioseop_feature .flag{float:right;margin-right:-7px;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px 6px 5px;position:relative}.aioseop_feature .flag:before{border-color:#d23d46 #d23d46 #d23d46 transparent;border-style:solid;border-width:14px 4px 15px 10px;content:"";left:-14px;position:absolute;top:0}.aioseop_feature .flag:after{border-color:#892026 transparent transparent;border-style:solid;border-width:6px 6px 6px 0;bottom:-12px;content:"";position:absolute;right:0}.aioseop_feature .flag.pro{display:none}#aioseop_coming_soon .free.flag,.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag{display:none}#aioseop_coming_soon .flag.pro{display:block;margin-top:-30px}.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro{display:none}.aioseop_feature h3{font-size:17px;margin:0;padding:0 10px 5px 10px;font-weight:400;font-style:normal;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.aioseop_feature p{line-height:150%;font-size:12px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin-bottom:20px;color:#666;padding:0 10px}.aioseop_feature p.aioseop_desc{min-height:80px}.aioseop_feature .feature_button{float:right;display:inline-block;position:relative;margin:0 10px 10px 0;min-width:80px;text-align:center}.aioseop_feature .feature_button:before{content:"Activate"}.aioseop_feature .active.feature_button:before{content:"Deactivate"}div.aioseop_feature .aioseop_featured_image{min-height:100px;background-repeat:no-repeat;display:block;margin:0 auto;width:133px}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Standard.png)}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}.All_in_One_SEO_Pack_Sitemap>form>.wrap>.form-table,.All_in_One_SEO_Pack_Video_Sitemap>form>.wrap>.form-table{max-width:500px;clear:none}.aioseop_follow_button{min-height:50px;background-repeat:no-repeat;display:inline-block;width:100px;background-size:auto 50px!important;margin-right:0}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-standard.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-standard.png)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx){div.aioseop_feature .aioseop_featured_image{background-size:auto 100px!important}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Retina.png)}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Retina.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-retina.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-retina.png)}}.aioseop_options{width:100%;margin:18px 0 10px 0}.aioseop_wrapper{width:100%;padding-left:5px}.aioseop_input{clear:left;width:98%;padding:5px 1%;display:inline-block}.aioseop_option_input{float:left;width:61%;margin:0;padding-left:1px;min-width:160px}#aiosp_sitemap_addl_pages_metabox .aioseop_options,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options{width:97%;margin:5px}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper{display:block;width:100%;float:none;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input{display:block;width:100%}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper{padding:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label{width:70%;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label{height:30px!important}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date{height:36px}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type{margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary{margin-left:0!important}#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div{position:absolute;width:auto;margin:5px 0 10px 0}#aiosp_sitemap_addl_pages_metabox table.aioseop_table,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 5px 10px}.selectize-control.aioseop-exclude-terms{position:static;width:95%;max-width:600px}.selectize-input{padding:10px 0 10px 10px!important;border:1px solid #8d96a0!important}table.aioseop_table tr:nth-child(odd){background-color:#eee}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd){background-color:rgba(238,238,238,.5)}table.aioseop_table td{width:23%}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{width:80%;max-width:800px;display:block;border-top:1px solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{width:18%;border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info{margin-top:10px;border:1px solid #dfdfdf;width:80%;max-width:800px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th{background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);padding:5px;border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item{display:inline-block;width:30%;vertical-align:top}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even){font-weight:700}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd){width:70%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}table.aioseop_table td,table.aioseop_table th{padding:3px}.aioseop_no_label .aioseop_option_input,.aioseop_top_label .aioseop_option_input{width:100%}#aiosp_settings_form .postbox{margin:20px 0 0 0}.aioseop_settings_left .postbox{float:left;width:100%}.aioseop_option_setting_label{min-height:35px;display:inline-block;white-space:nowrap;overflow:hidden;padding-left:1px;max-width:229px;min-width:160px;width:33%}.aioseop_settings_left .postbox .inside{padding:0;margin:0;clear:right}#aiosp_robots_rules{clear:left;margin-left:20px;max-width:1072px}#aiosp_robots_default_metabox .aioseop_wrapper{width:31%;min-width:165px;display:inline-block;max-width:265px}#aiosp_robots_default_metabox .aioseop_help_text_div{position:absolute;margin:5px 0 10px 0}#aiosp_robots_default_metabox .aioseop_option_input{width:94%;min-width:94%}#aiosp_robots_default_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 0 10px 0}#aiosp_robots_default_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}#aiosp_robots_default_metabox table.aioseop_table td:first-child{white-space:nowrap}.aioseop.aioseop_options.aiosp_robots_settings h3{margin:1.5em .6em .3em}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:left;width:92%;max-width:100%}#aiosp_sitemap_status_metabox .handlediv.button-link{display:none}#aiosp_sitemap_status_metabox.closed .inside{display:block}.aioseop_top_label{width:96%;margin:0 10px}.aioseop_hidden_type{margin:0;padding:0;height:0}#aiosp_title_metabox #aiosp_force_rewrites_wrapper{display:none;height:0}.aioseop_module.error.below-h2{padding:5px 0;margin:0 477px 15px 0!important}#aioseop_opengraph_settings .inside{margin:0}#aioseop_opengraph_settings_image_wrapper img{width:auto;height:75px}#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label{max-width:160px;min-width:100px;width:30%}.aioseop_input input[type=checkbox],.aioseop_input input[type=radio]{border:1.25px solid #6c7781;vertical-align:text-bottom;margin-top:8px}.aioseop_input input[type=checkbox]:before{margin:-3px 0 0 -5px;color:#fff}.aioseop_input input[type=radio]{border-radius:8px}.aioseop_input input[type=radio]:before{content:none!important}.aioseop_input input[type=checkbox]:checked,.aioseop_input input[type=radio]:checked{background:#11a0d2}#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div{max-height:initial}#aiosp{width:auto}.aioseop_input.aioseop_top_label .aioseop_option_input{margin:0 0 10px 0}.aiosp_file_editor_settings>.aioseop_textarea_type .aioseop_option_div{max-height:none}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{max-height:none}.aioseop_option_input .widefat td{vertical-align:middle}.entry-row.robots.quirks{font-weight:700;opacity:1}.entry-row.robots{opacity:.8}.entry-row.robots.invalid{opacity:1;font-weight:700}.invalid .entry_label{font-weight:700}.aioseop .aioseop_option_input tbody{background:#fcfcfc}.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody{background:0 0}.entry-row.robots div{height:20px;vertical-align:middle;width:90%;margin:0 0 4px 0}.robots img{margin:0 0 0 2px;opacity:.6}.aioseop_option_docs{width:98%;display:none;border:1px solid #d3d3d3;margin-top:20px;padding:1%;background-color:#eee}.aioseop_option_docs h3{background:0 0}div.aioseop_notice{position:relative}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;right:10px}.aioseop_error_notice{color:red;font-weight:700}.aioseop_input select{border-radius:4px;border:1px solid #8d96a0}.aioseop_help_text ul{margin:15px 0 0 20px}.aioseop_help_text ul li{line-height:20px;margin:0}.aioseop_sidebar #side-sortables{width:98%}.aioseop_header_tabs.hide,.aioseop_tabs.hide{display:block!important}.aioseop_header_tabs li a.aioseop_header_tab{font-size:14px;line-height:37px;text-decoration:none;cursor:pointer;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none!important;padding:0 .5em!important;color:#5f5f5f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_tab{padding:10px}.aioseop_loading{background-image:url(../../images/activity.gif);display:inline-block;width:24px;height:24px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs.ui-widget-content{background:0 0!important}.aioseop_tab.ui-widget-content{border:1px solid #aaa!important}.aioseop_tab.ui-widget-content a.aioseop_help_text_link{color:#757575!important}.aioseop_tabs.ui-widget{font-size:13px!important;border:none!important}.aioseop_tabs .ui-widget-header{border:none!important;background:0 0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.aioseop_tabs ul{margin-left:.2em!important}.aioseop_tabs .ui-tabs .ui-tabs-panel{border-width:inherit!important}.aioseop_tabs .ui-state-default,.aioseop_tabs .ui-widget-content .ui-state-default,.aioseop_tabs .ui-widget-header .ui-state-default{background-image:none!important}.aioseop_tabs .ui-state-active a{font-weight:700!important}.aiosp_delete{background-image:url(../../images/delete.png);display:inline-block;width:16px;height:16px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:477px}.aioseop_tabs_div{margin-top:10px}#aiosp_settings_form ul.sfwd_debug_settings li strong{display:block;float:left;text-align:right;background-color:#ddd;margin-right:8px;padding:1px 8px 1px 1px;overflow:auto;width:200px;min-height:16px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong{background-color:#ccc}#aiosp_settings_form ul.sfwd_debug_settings li{clear:left;margin:0;padding:0;background-color:#eee;overflow:auto;max-width:75%;min-width:800px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n){background-color:#ddd}div.sfwd_debug_mail_sent{background-color:#080;border:1px solid #0a0;margin:10px 0 10px 0;width:598px;color:#fff;text-align:center}div.sfwd_debug_error{background-color:red;color:#fff;border:1px solid #a00;margin:10px 0 10px 0;width:598px;text-align:center;font-weight:bolder}#aiosp_performance_status_wrapper .aioseop_option_div{max-height:420px}#aioseop_coming_soon,#aioseop_coming_soon2{padding-top:40px;text-align:center;height:258px;font-size:16px}.MRL{margin-left:20px!important;margin-bottom:10px!important}.postbox-container .aioseop_option_div{width:100%}.postbox-container .aioseop_option_div input[type=text],.postbox-container .aioseop_option_div textarea{width:99%;max-width:900px}.postbox-container .aioseop_option_label{max-width:none;height:auto!important}.postbox-container .aioseop_wrapper{padding:0}.postbox-container .aioseop_input{width:100%;margin-bottom:10px;padding:0}.postbox-container .aioseop_option_input{width:63%;padding:0}.postbox-container div#aiosp_upgrade_wrapper{float:none;width:auto;margin:0;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input{display:block;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input{float:none;width:auto;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div{width:auto;min-height:0;padding:10px 0}.aioseop_tabs .aioseop_options{margin:0}#aioseop_opengraph_settings .aioseop_options{clear:both;margin-top:35px}div#aiosp_snippet_wrapper{border-radius:4px;border:1px solid #8d96a0;clear:both;padding:10px 10px 0;width:auto;margin:0 1px 15px}#aiosp_snippet_wrapper>.aioseop_input:first-child{margin-bottom:0}div#aiosp_snippet_wrapper .aioseop_option_label{height:auto!important}#aiosp_snippet_wrapper>.aioseop_input:first-child .aioseop_option_label{padding:0;min-height:inherit}div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input{margin:0;width:99%}div#aioseop_snippet{font-family:arial,sans-serif;font-size:13px}div#aioseop_snippet>h3{margin:10px 0 5px;font-size:18px;border:0;background:inherit;font-weight:400}div#aioseop_snippet>h3>a{color:#12c;text-decoration:none;cursor:pointer}div#aioseop_snippet>div{color:#545454;max-width:48em}div#aioseop_snippet>div>div{display:block;margin-bottom:1px}div#aioseop_snippet>div>div>cite{color:#00852b;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_chars_below_treshold{color:#515151!important;background-color:#eee!important}.aioseop_count_chars_near_treshold{color:#515151!important;background-color:#ff0!important}.aioseop_count_chars_past_treshold{color:#fff!important;background-color:red!important}textarea.robots-text{color:#000;background-color:#eee;height:100%;margin:0 0 0 10px}div#aiosp_sitemap_status_metabox .toggle-indicator{display:none}.required.email{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_options_wrapper .ui-sortable-handle span{font-size:16px;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#000}.aioseop_file_upload{border:none!important}.aioseop_upload_image_button{float:left;margin:0 0 5px 0!important}.aioseop_delete_files_button{margin:0 5px 10px 0!important}.aioseop_rename_files_button{margin:0 0 10px 0!important}.aioseop_reset_settings_button,.aioseop_update_options_button{margin:10px 0 0 0!important}#aiosp_robots_default_metabox .aioseop_option_label{margin-left:10px}#aiosp_robots_default_metabox .add-edit-rule{margin-left:5px}#aiosp_file_editor_htaccess_metabox{margin:0!important}.aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value]{background-color:#0e7bbe;background-image:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div{background-color:#fff;padding:15px;border:1px solid #8d96a0;border-radius:4px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2190 ';padding-right:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-title{clear:both;text-align:center;font-weight:700;padding:10px 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar{border:1px solid #007cba;border-collapse:collapse}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead{background-color:#f1f1f1;border-bottom:1px solid #8d96a0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td,body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead th{width:2rem;height:2rem;text-align:center}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a{text-decoration:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a:hover{border:1px solid #8d96a0;padding:5px 7px} \ No newline at end of file diff --git a/js/admin/aioseop-count-chars-old.js b/js/admin/aioseop-count-chars-old.js new file mode 100644 index 000000000..0852aa0fa --- /dev/null +++ b/js/admin/aioseop-count-chars-old.js @@ -0,0 +1,90 @@ +/** + * Script for Counting Characters + * + * @summary Binds input elements and counts characters for Title and Description on Post Edit, Post New, + * & AIOSEOP General Settings screens. + * + * @author Michael Torbert. + * @author Semper Fi Web Design. + * @copyright https://semperplugins.com + * @version 2.9.2 + */ + +var aiosp_title_extra = parseInt( aioseop_count_chars.aiosp_title_extra, 10 ); // jshint ignore:line + +jQuery( document ).ready( function() { + aioseopInitCounting(); +}); + +/** + * Preview Snippet + * + * @since ? + * @since 2.9.2 Move from PHP value to JS file + */ +jQuery(document).ready( function() { + jQuery("#aiosp_title_wrapper").bind("input", function() { + jQuery("#aiosp_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm, "")); + }); + jQuery("#aiosp_description_wrapper").bind("input", function() { + jQuery("#aioseop_snippet_description").text(jQuery("#aiosp_description_wrapper textarea").val().replace(/<(?:.|\n)*?>/gm, "")); + }); +}); + +/** + * AIOSEOP Init Counting + * + * @since ? + */ +function aioseopInitCounting(){ + /* count them characters */ + jQuery( '.aioseop_count_chars' ).on('keyup keydown', function(){ + aioseopCountChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0)); + }); + jQuery( '.aioseop_count_chars' ).each(function(){ + aioseopCountChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0)); + }); +} + +/** + * @summary Counts characters. + * + * @since 1.0.0 + * @since 2.9.1 Fix JS conflict with LearnDash and function name. + * + * @param Object $field. + * @param Object $cntfield. + * @return Mixed. + */ +function aioseopCountChars( field, cntfield ) { + var extra = 0; + var field_size; + if ( ( field.attr('name') === 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { + extra = aiosp_title_extra; + } + cntfield.val( field.val().length + extra ); + if ( typeof field.attr('size') !== 'undefined' ) { + field_size = field.attr('size'); + } else { + field_size = field.attr('rows') * field.attr('cols'); + } + field_size = parseInt(field_size, 10); + if ( field_size < 10 ) { + return; + } + if ( cntfield.val() > field_size ) { + cntfield.removeClass().addClass('aioseop_count_ugly'); + } else if ( ( 'aiosp_title' === field.attr('name' ) ) || ( 'aiosp_home_title' === field.attr('name') ) ) { + if ( cntfield.val() > ( field_size - 6 ) ) { + cntfield.removeClass().addClass('aioseop_count_bad'); + } else { + cntfield.removeClass().addClass('aioseop_count_good'); + } + } else { + if ( cntfield.val() > ( field_size - 10 ) ) { + cntfield.removeClass().addClass('aioseop_count_bad'); + } else { + cntfield.removeClass().addClass('aioseop_count_good'); + } + } +} diff --git a/js/admin/aioseop-count-chars-old.min.js b/js/admin/aioseop-count-chars-old.min.js new file mode 100644 index 000000000..9003c5373 --- /dev/null +++ b/js/admin/aioseop-count-chars-old.min.js @@ -0,0 +1 @@ +var aiosp_title_extra=parseInt(aioseop_count_chars.aiosp_title_extra,10);function aioseopInitCounting(){jQuery(".aioseop_count_chars").on("keyup keydown",function(){aioseopCountChars(jQuery(this).eq(0),jQuery(this).parent().find('[name="'+jQuery(this).attr("data-length-field")+'"]').eq(0))}),jQuery(".aioseop_count_chars").each(function(){aioseopCountChars(jQuery(this).eq(0),jQuery(this).parent().find('[name="'+jQuery(this).attr("data-length-field")+'"]').eq(0))})}function aioseopCountChars(e,t){var a,o=0;"aiosp_title"===e.attr("name")&&void 0!==aiosp_title_extra&&(o=aiosp_title_extra),t.val(e.val().length+o),a=void 0!==e.attr("size")?e.attr("size"):e.attr("rows")*e.attr("cols"),(a=parseInt(a,10))<10||(t.val()>a?t.removeClass().addClass("aioseop_count_ugly"):"aiosp_title"===e.attr("name")||"aiosp_home_title"===e.attr("name")?t.val()>a-6?t.removeClass().addClass("aioseop_count_bad"):t.removeClass().addClass("aioseop_count_good"):t.val()>a-10?t.removeClass().addClass("aioseop_count_bad"):t.removeClass().addClass("aioseop_count_good"))}jQuery(document).ready(function(){aioseopInitCounting()}),jQuery(document).ready(function(){jQuery("#aiosp_title_wrapper").bind("input",function(){jQuery("#aiosp_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm,""))}),jQuery("#aiosp_description_wrapper").bind("input",function(){jQuery("#aioseop_snippet_description").text(jQuery("#aiosp_description_wrapper textarea").val().replace(/<(?:.|\n)*?>/gm,""))})}); \ No newline at end of file diff --git a/js/admin/aioseop-count-chars.js b/js/admin/aioseop-count-chars.js index f33d796c9..96385b9c7 100644 --- a/js/admin/aioseop-count-chars.js +++ b/js/admin/aioseop-count-chars.js @@ -3,69 +3,360 @@ * * @since 2.9.2 * @since 3.2.0 Moved to its own file. + * @since 3.3.0 Full refactoring. */ +$(function () { // eslint-disable-line max-statements -var aiosp_title_extra = parseInt( aioseop_count_chars.extraTitleLength, 10 ); + "use strict"; -jQuery( document ).ready( function() { - aioseopInitCounting(); -}); + let isGutenberg; + let autogenerateDescriptions; + let extraTitleLength; + let pluginDirName; + let currentPage; + let inputField; + let counterField; + let fieldSize; + let timeout = 0; -/** - * AIOSEOP Init Counting - * - * @since ? - */ -function aioseopInitCounting(){ - /* count them characters */ - jQuery( '.aioseop_count_chars' ).on('keyup keydown', function(){ - aioseopCountChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0)); - }); - jQuery( '.aioseop_count_chars' ).each(function(){ - aioseopCountChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0)); - }); -} + if ('undefined' !== typeof aioseopCharacterCounter) { + isGutenberg = aioseopCharacterCounter.isGutenberg; + autogenerateDescriptions = aioseopCharacterCounter.autogenerateDescriptions; + extraTitleLength = +aioseopCharacterCounter.extraTitleLength; + pluginDirName = aioseopCharacterCounter.pluginDirName; + currentPage = aioseopCharacterCounter.currentPage; + } + else if ('undefined' !== typeof aioseopOGCharacterCounter) { + pluginDirName = aioseopOGCharacterCounter.pluginDirName; + currentPage = aioseopOGCharacterCounter.currentPage; + } + aioseopAddEventListeners(); + // Fire once on page load. + aioseopCountChars(); -/** - * @summary Counts characters. - * - * @since 1.0.0 - * @since 2.9.1 Fix JS conflict with LearnDash and function name. - * - * @param Object $field. - * @param Object $cntfield. - * @return Mixed. - */ -function aioseopCountChars( field, cntfield ) { - var extra = 0; - var field_size; - if ( ( field.attr('name') === 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { - extra = aiosp_title_extra; - } - cntfield.val( field.val().length + extra ); - if ( typeof field.attr('size') !== 'undefined' ) { - field_size = field.attr('size'); - } else { - field_size = field.attr('rows') * field.attr('cols'); - } - field_size = parseInt(field_size, 10); - if ( field_size < 10 ) { - return; - } - if ( cntfield.val() > field_size ) { - cntfield.removeClass().addClass('aioseop_count_ugly'); - } else if ( ( 'aiosp_title' === field.attr('name' ) ) || ( 'aiosp_home_title' === field.attr('name') ) ) { - if ( cntfield.val() > ( field_size - 6 ) ) { - cntfield.removeClass().addClass('aioseop_count_bad'); + /** + * Adds the relevant event listeners. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopAddEventListeners() { + aioseopAddGeneralListener(); + + if (!aioseopIsEditPage()) { + return; + } + + if ('false' === isGutenberg) { + aioseopAddClassicEditorListener(); } else { - cntfield.removeClass().addClass('aioseop_count_good'); + aioseopAddGutenbergEditorListener(); } - } else { - if ( cntfield.val() > ( field_size - 10 ) ) { - cntfield.removeClass().addClass('aioseop_count_bad'); + } + + /** + * Adds the general/shared events listeners. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopAddGeneralListener() { + $('.aioseop_count_chars').on('keyup', function () { + aioseopCountChars(); + }); + } + + /** + * Adds the event listeners for the Classic Editor. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopAddClassicEditorListener() { + setTimeout(function () { + tinymce.editors[0].on('KeyUp', function () { + aioseopCountChars(); + }); + }, 1000); + + $('#title, #excerpt').on('keyup', function () { + aioseopCountChars(); + }); + } + + /** + * Adds the event listener for the Gutenberg Editor. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopAddGutenbergEditorListener() { + window._wpLoadBlockEditor.then(function () { + setTimeout(function () { + // https://developer.wordpress.org/block-editor/packages/packages-data/ + wp.data.subscribe(function () { + clearTimeout(timeout); + timeout = setTimeout(function () { + aioseopCountChars(); + }, 200); + }); + }); + }); + } + + /** + * Get the character count for all fields on the Edit page. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopCountChars() { + let countCharsFields; + switch (currentPage) { + case 'toplevel_page_all-in-one-seo-packp/aioseop_class': + case 'aiosp_opengraph_description': { + countCharsFields = [ + aioseopDefineTitleField, + aioseopDefineDescriptionField + ]; + break; + } + default: { + countCharsFields = [ + aioseopDefineTitleField, + aioseopDefineDescriptionField, + aioseopDefineOGTitleField, + aioseopDefineOGDescriptionField + ]; + break; + } + } + + countCharsFields.forEach(function (defineField) { + defineField(); + aioseopCountCharsHelper(); + }); + } + + /** + * Counts the characters of a certain field and shows this on the front-end. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopCountCharsHelper() { + let extra = 0; + + if ('undefined' !== typeof inputField.attr('size')) { + fieldSize = +inputField.attr('size'); } else { - cntfield.removeClass().addClass('aioseop_count_good'); + fieldSize = +inputField.attr('rows') * +inputField.attr('cols'); + } + + if (('aiosp_title' === inputField.attr('name')) && ('undefined' !== typeof extraTitleLength)) { + extra = extraTitleLength; } + + if (0 === +inputField.length) { + aioseopChangeCountBackground(); + return; + } + + counterField.val(+inputField.val().length + extra); + + aioseopCheckIfAutogenerated(); + aioseopChangeCountBackground(); } -} + + /** + * Checks if the title or description is autogenerated and, if so, counts the characters of the preview snippet. + * + * @since 3.3.0 + */ + function aioseopCheckIfAutogenerated() { + if ( + (!aioseopIsEditPage()) || + (('on' !== autogenerateDescriptions) && ('aiosp_description' === inputField.attr('name'))) || + (('on' !== autogenerateDescriptions) && ('aioseop_opengraph_settings_desc' === inputField.attr('name'))) || + 0 !== +inputField.val().length + ) { + return; + } + + let descriptionField; + switch (inputField.attr('name')) { + case 'aiosp_title': + case 'aioseop_opengraph_settings_title': + counterField.val(+$('#aiosp_snippet_title').parent()[0].innerText.length); + break; + default: + descriptionField = $('[name=aiosp_description]')[0].placeholder; + counterField.val(+descriptionField.length); + if (' ...' === descriptionField.slice(descriptionField.length - 4)) { + counterField.val(descriptionField.length - 4); + } + break; + } + } + + /** + * Changes the background colour of the character counter field based on the amount of characters. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopChangeCountBackground() { + if (+counterField.val() > +fieldSize) { + counterField.removeClass().addClass('aioseop_count_chars_past_treshold'); + return; + } + + switch (inputField.attr('name')) { + case 'aiosp_title': + case 'aiosp_home_title': + aioseopChangeCountBackgroundHelper(6); + break; + case 'aioseop_opengraph_settings_title': + case 'aiosp_opengraph_hometitle': + aioseopChangeCountBackgroundHelper(40); + break; + case 'aioseop_opengraph_settings_desc': + case 'aiosp_opengraph_description': + aioseopChangeCountBackgroundHelper(145); + break; + default: + aioseopChangeCountBackgroundHelper(10); + break; + } + } + + /** + * Helper function for aioseopChangeCountBackground(). + * + * @since 3.3.0 + * + * @param int characterTreshold The amount of characters that have to be deducted from the field size to set the treshold. + * @return void + */ + function aioseopChangeCountBackgroundHelper(characterTreshold) { + if (+counterField.val() > (+fieldSize - +characterTreshold)) { + counterField.removeClass().addClass('aioseop_count_chars_near_treshold'); + } else { + counterField.removeClass().addClass('aioseop_count_chars_below_treshold'); + } + } + + /** + * Sets the current input field and counter field based on the title field. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopDefineTitleField() { + let titleField; + switch (currentPage) { + case 'toplevel_page_' + pluginDirName + '/aioseop_class': { + titleField = 'aiosp_home_title'; + break; + } + case 'all-in-one-seo_page_aiosp_opengraph': { + titleField = 'aiosp_opengraph_hometitle'; + break; + } + default: { + titleField = 'aiosp_title'; + break; + } + } + aioseopDefineFieldHelper(titleField); + } + + /** + * Sets the current input field and counter field based on the Open Graph title field. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopDefineOGTitleField() { + aioseopDefineFieldHelper('aioseop_opengraph_settings_title'); + } + + /** + * Sets the current input field and counter field based on the Open Graph description field. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopDefineOGDescriptionField() { + let descriptionField; + switch (currentPage) { + case 'toplevel_page_' + pluginDirName + '/aioseop_class': { + descriptionField = 'aiosp_home_description'; + break; + } + case 'all-in-one-seo_page_aiosp_opengraph': { + descriptionField = 'aiosp_opengraph_description'; + break; + } + default: { + descriptionField = 'aiosp_description'; + break; + } + } + + aioseopDefineFieldHelper(descriptionField); + } + + /** + * Sets the current input field and counter field based on the description field. + * + * @since 3.3.0 + * + * @return void + */ + function aioseopDefineDescriptionField() { + aioseopDefineFieldHelper('aioseop_opengraph_settings_desc'); + } + + /** + * Helper function. Sets the current input field and counter field. + * + * @since 3.3.0 + * + * @param string fieldName The name of the current field. + */ + function aioseopDefineFieldHelper(fieldName) { + inputField = $('[name="' + fieldName + '"]'); + counterField = inputField.parent().find('[name="' + inputField.attr('data-length-field') + '"]'); + } + + /** + * Checks whether the current page is the Edit page. + * + * @since 3.3.0 + * + * @return bool Whether the current page is the Edit page. + */ + function aioseopIsEditPage() { + if ( + ('post.php' !== currentPage) && + ('post-new.php' !== currentPage) && + ('term.php' !== currentPage) + ) { + return false; + } + return true; + } + +}); diff --git a/js/admin/aioseop-count-chars.min.js b/js/admin/aioseop-count-chars.min.js index 354054bb3..7abe5ceb9 100644 --- a/js/admin/aioseop-count-chars.min.js +++ b/js/admin/aioseop-count-chars.min.js @@ -1 +1 @@ -var aiosp_title_extra=parseInt(aioseop_count_chars.extraTitleLength,10);function aioseopInitCounting(){jQuery(".aioseop_count_chars").on("keyup keydown",function(){aioseopCountChars(jQuery(this).eq(0),jQuery(this).parent().find('[name="'+jQuery(this).attr("data-length-field")+'"]').eq(0))}),jQuery(".aioseop_count_chars").each(function(){aioseopCountChars(jQuery(this).eq(0),jQuery(this).parent().find('[name="'+jQuery(this).attr("data-length-field")+'"]').eq(0))})}function aioseopCountChars(a,t){var e,o=0;"aiosp_title"===a.attr("name")&&void 0!==aiosp_title_extra&&(o=aiosp_title_extra),t.val(a.val().length+o),e=void 0!==a.attr("size")?a.attr("size"):a.attr("rows")*a.attr("cols"),(e=parseInt(e,10))<10||(t.val()>e?t.removeClass().addClass("aioseop_count_ugly"):"aiosp_title"===a.attr("name")||"aiosp_home_title"===a.attr("name")?t.val()>e-6?t.removeClass().addClass("aioseop_count_bad"):t.removeClass().addClass("aioseop_count_good"):t.val()>e-10?t.removeClass().addClass("aioseop_count_bad"):t.removeClass().addClass("aioseop_count_good"))}jQuery(document).ready(function(){aioseopInitCounting()}); \ No newline at end of file +var pluginDirName,currentPage;if("undefined"!=typeof aioseopCharacterCounter){var aioseopCharacterCounterIsGutenberg=aioseopCharacterCounter.isGutenberg,aioseopCharacterCounterAutogenerateDescriptions=aioseopCharacterCounter.autogenerateDescriptions,extraTitleLength=+aioseopCharacterCounter.extraTitleLength;currentPage=aioseopCharacterCounter.currentPage,pluginDirName=aioseopCharacterCounter.pluginDirName}else"undefined"!=typeof aioseopOGCharacterCounter&&(pluginDirName=aioseopOGCharacterCounter.pluginDirName,currentPage=aioseopOGCharacterCounter.currentPage);$(function(){"use strict";var a,t,o,e=0;function n(){var e;switch(currentPage){case"toplevel_page_all-in-one-seo-packp/aioseop_class":case"aiosp_opengraph_description":e=[p,l];break;default:e=[p,l,c,u]}for(var a=0;a+o)t.removeClass().addClass("aioseop_count_chars_past_treshold");else switch(a.attr("name")){case"aiosp_title":case"aiosp_home_title":s(6);break;case"aioseop_opengraph_settings_title":case"aiosp_opengraph_hometitle":s(40);break;case"aioseop_opengraph_settings_desc":case"aiosp_opengraph_description":s(145);break;default:s(10)}}function s(e){+t.val()>+o-+e?t.removeClass().addClass("aioseop_count_chars_near_treshold"):t.removeClass().addClass("aioseop_count_chars_below_treshold")}function p(){var e;switch(currentPage){case"toplevel_page_"+pluginDirName+"/aioseop_class":e="aiosp_home_title";break;case"all-in-one-seo_page_aiosp_opengraph":e="aiosp_opengraph_hometitle";break;default:e="aiosp_title"}_(e)}function c(){_("aioseop_opengraph_settings_title")}function u(){var e;switch(currentPage){case"toplevel_page_"+pluginDirName+"/aioseop_class":e="aiosp_home_description";break;case"all-in-one-seo_page_aiosp_opengraph":e="aiosp_opengraph_description";break;default:e="aiosp_description"}_(e)}function l(){_("aioseop_opengraph_settings_desc")}function _(e){a=$('[name="'+e+'"]'),t=a.parent().find('[name="'+a.attr("data-length-field")+'"]')}function g(){return"post.php"===currentPage||"post-new.php"===currentPage||"term.php"===currentPage}!function(){if($(".aioseop_count_chars").on("keyup",function(){n()}),!g())return;"false"===aioseopCharacterCounterIsGutenberg?(setTimeout(function(){tinymce.editors[0].on("KeyUp",function(){n()})},1e3),$("#title, #excerpt").on("keyup",function(){n()})):window._wpLoadBlockEditor.then(function(){setTimeout(function(){wp.data.subscribe(function(){clearTimeout(e),e=setTimeout(function(){n()},200)})})})}(),n()}); \ No newline at end of file diff --git a/js/admin/aioseop-preview-snippet.js b/js/admin/aioseop-preview-snippet.js index 55ec5a951..11e473d96 100644 --- a/js/admin/aioseop-preview-snippet.js +++ b/js/admin/aioseop-preview-snippet.js @@ -7,176 +7,177 @@ * @package xregexp */ -var docTitle = ''; -var snippetTitle = ''; -var snippetDescription = ''; -var aioseopTitle = ''; -var aioseopDescription = ''; -var timeout = 0; - -var isGutenberg = aioseop_preview_snippet.isGutenberg; -var autogenerateDescriptions = aioseop_preview_snippet.autogenerateDescriptions; -var skipExcerpt = aioseop_preview_snippet.skipExcerpt; - -$(function() { - snippetTitle = $('#aiosp_snippet_title'); - snippetDescription = $('#aioseop_snippet_description'); - aioseopTitle = $('input[name="aiosp_title"]'); - aioseopDescription = $('textarea[name="aiosp_description"]'); +$(function () { - aioseopUpdateMetabox(); -}); + "use strict"; -/** - * The aioseopUpdateMetabox() function. - * - * Updates the preview snippet and input field placeholders in the meta box when a change happens. - * - * @since 3.3.0 - */ -function aioseopUpdateMetabox() { - var inputFields = [aioseopTitle, aioseopDescription]; + let docTitle = ''; + let snippetTitle = $('#aiosp_snippet_title'); + let snippetDescription = $('#aioseop_snippet_description'); + let aioseopTitle = $('input[name="aiosp_title"]'); + let aioseopDescription = $('textarea[name="aiosp_description"]'); + let timeout = 0; + let isGutenberg = aioseop_preview_snippet.isGutenberg; + let autogenerateDescriptions = aioseop_preview_snippet.autogenerateDescriptions; + let skipExcerpt = aioseop_preview_snippet.skipExcerpt; - if ('false' === isGutenberg) { - docTitle = $('#title'); - var postExcerpt = $('#excerpt'); + aioseopUpdateMetabox(); - inputFields.push(docTitle, postExcerpt); + /** + * The aioseopUpdateMetabox() function. + * + * Updates the preview snippet and input field placeholders in the meta box when a change happens. + * + * @since 3.3.0 + */ + function aioseopUpdateMetabox() { + let inputFields = [aioseopTitle, aioseopDescription]; + + if ('false' === isGutenberg) { + docTitle = $('#title'); + let postExcerpt = $('#excerpt'); + + inputFields.push(docTitle, postExcerpt); + + setTimeout(function () { + tinymce.editors[0].on('KeyUp', function () { + aioseopUpdatePreviewSnippet(); + }); + }, 1000); + } + else { + window._wpLoadBlockEditor.then(function () { + setTimeout(function () { + // https://developer.wordpress.org/block-editor/packages/packages-data/ + wp.data.subscribe(function () { + clearTimeout(timeout); + // This is needed because the code otherwise is triggered dozens of times. + timeout = setTimeout(function () { + aioseopUpdatePreviewSnippet(); + }, 200); + }); + }); + }); + } - setTimeout(function () { - tinymce.editors[0].on('KeyUp', function () { + inputFields.forEach(addEvent); + function addEvent(item) { + item.on('input', function () { aioseopUpdatePreviewSnippet(); }); - }, 1000); - } - else { - window._wpLoadBlockEditor.then(function() { - setTimeout(function() { - // https://developer.wordpress.org/block-editor/packages/packages-data/ - wp.data.subscribe(function() { - clearTimeout(timeout); - // This is needed because the code otherwise is triggered dozens of times. - timeout = setTimeout(function() { - aioseopUpdatePreviewSnippet(); - }, 100); - }); - }); - }); - } + } - inputFields.forEach(addEvent); - function addEvent(item) { - item.on('input', function() { + //Run once on page load. + timeout = setTimeout(function () { aioseopUpdatePreviewSnippet(); - }); + }, 1000); } - //Run once on page load. - timeout = setTimeout(function() { - aioseopUpdatePreviewSnippet(); - }, 1000); -} + /** + * AIOSEOP Update Preview Snippet + * + * @uses wp.data.select().getEditedPostAttribute() + * @link https://developer.wordpress.org/block-editor/data/data-core-editor/#getEditedPostAttribute + * + * @since 3.3 + */ + function aioseopUpdatePreviewSnippet() { + let postTitle = ''; + let postContent = ''; + let postExcerpt = ''; + + if ('false' === isGutenberg) { + postTitle = aioseopStripMarkup($.trim($('#title').val())); + postContent = aioseopShortenDescription($('#content_ifr').contents().find('body')[0].innerHTML); + postExcerpt = aioseopShortenDescription($.trim($('#excerpt').val())); + } + else { + postTitle = aioseopStripMarkup($.trim($('#post-title-0').val())); + postContent = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('content')); + postExcerpt = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('excerpt')); + } -/** - * AIOSEOP Update Preview Snippet - * - * @uses wp.data.select().getEditedPostAttribute() - * @link https://developer.wordpress.org/block-editor/data/data-core-editor/#getEditedPostAttribute - * - * @since 3.3 - */ -function aioseopUpdatePreviewSnippet() { - var postTitle = ''; - var postContent = ''; - var postExcerpt = ''; - - if ('false' === isGutenberg) { - postTitle = aioseopStripMarkup($.trim($('#title').val())); - postContent = aioseopShortenDescription($('#content_ifr').contents().find('body')[0].innerHTML); - postExcerpt = aioseopShortenDescription($.trim($('#excerpt').val())); - } - else { - postTitle = aioseopStripMarkup($.trim($('#post-title-0').val())); - postContent = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('content')); - postExcerpt = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('excerpt')); - } + let metaboxTitle = aioseopStripMarkup($.trim($('input[name="aiosp_title').val())); + let metaboxDescription = aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val())); - var metaboxTitle = aioseopStripMarkup($.trim($('input[name="aiosp_title').val())); - var metaboxDescription = aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val())); - - snippetTitle.text(postTitle); - aioseopTitle.attr('placeholder', postTitle); + snippetTitle.text(postTitle); + aioseopTitle.attr('placeholder', postTitle); - if('' !== metaboxTitle) { - snippetTitle.text(metaboxTitle); - } + if ('' !== metaboxTitle) { + snippetTitle.text(metaboxTitle); + } - if('on' === autogenerateDescriptions) { - snippetDescription.text(postContent); - aioseopDescription.attr('placeholder', postContent); - - if('on' !== skipExcerpt & '' !== postExcerpt) { - snippetDescription.text(postExcerpt); - aioseopDescription.attr('placeholder', postExcerpt); + if ('on' === autogenerateDescriptions) { + snippetDescription.text(postContent); + aioseopDescription.attr('placeholder', postContent); + + if ('on' !== skipExcerpt & '' !== postExcerpt) { + snippetDescription.text(postExcerpt); + aioseopDescription.attr('placeholder', postExcerpt); + } + } else { + snippetDescription.text(""); + aioseopDescription.attr('placeholder', ""); + } + + if ('' !== metaboxDescription) { + snippetDescription.text(metaboxDescription); + aioseopDescription.attr('placeholder', metaboxDescription); } } - if('' !== metaboxDescription) { - snippetDescription.text(metaboxDescription); - aioseopDescription.attr('placeholder', metaboxDescription); + /** + * The aioseopShortenDescription() function. + * + * Shortens the description to max. 160 characters without truncation. + * + * @since 3.3.0 + * + * @param string description + */ + function aioseopShortenDescription(description) { + description = aioseopStripMarkup(description); + if (160 < description.length) { + let excessLength = description.length - 160; + let regex = new XRegExp("[^\\pZ\\pP]*.{" + excessLength + "}$"); + description = XRegExp.replace(description, regex, ''); + description = description + " ..."; + } + return description; } -} -/** - * The aioseopShortenDescription() function. - * - * Shortens the description to max. 160 characters without truncation. - * - * @since 3.3.0 - * - * @param string description - */ -function aioseopShortenDescription(description) { - description = aioseopStripMarkup(description); - if (160 < description.length) { - var excessLength = description.length - 160; - var regex = new XRegExp("[^\\pZ\\pP]*.{" + excessLength + "}$"); - description = XRegExp.replace(description, regex, ''); - description = description + " ..."; + /** + * The aioseopStripMarkup() function. + * + * Strips all editor markup from a string. + * + * @since 3.3.0 + * + * @param string content + * @return string + */ + function aioseopStripMarkup(content) { + // Remove all HTML tags. + content = content.replace(/(<[^ >][^>]*>)?/gm, ''); + // Remove all line breaks. + content = content.replace(/\s\s+/g, ' '); + return aioseopDecodeHtmlEntities(content.trim()); } - return description; -} -/** - * The aioseopStripMarkup() function. - * - * Strips all editor markup from a string. - * - * @since 3.3.0 - * - * @param string content - * @return string - */ -function aioseopStripMarkup(content) { - // Remove all HTML tags. - content = content.replace(/(<[^ >][^>]*>)?/gm, ''); - // Remove all line breaks. - content = content.replace(/\s\s+/g, ' '); - return aioseopDecodeHtmlEntities(content.trim()); -} + /** + * The aioseopDecodeHtmlEntities() function. + * + * Decodes HTML entities to characters. + * + * @since 3.3.0 + * + * @param string encodedString + * @return string + */ + function aioseopDecodeHtmlEntities(encodedString) { + let textArea = document.createElement('textarea'); + textArea.innerHTML = encodedString; + return textArea.value; + } -/** - * The aioseopDecodeHtmlEntities() function. - * - * Decodes HTML entities to characters. - * - * @since 3.3.0 - * - * @param string encodedString - * @return string - */ -function aioseopDecodeHtmlEntities(encodedString) { - var textArea = document.createElement('textarea'); - textArea.innerHTML = encodedString; - return textArea.value; -} +}); diff --git a/js/admin/aioseop-preview-snippet.min.js b/js/admin/aioseop-preview-snippet.min.js index 00a5a337d..22d1c2990 100644 --- a/js/admin/aioseop-preview-snippet.min.js +++ b/js/admin/aioseop-preview-snippet.min.js @@ -1 +1 @@ -var docTitle="",snippetTitle="",snippetDescription="",aioseopTitle="",aioseopDescription="",timeout=0,isGutenberg=aioseop_preview_snippet.isGutenberg,autogenerateDescriptions=aioseop_preview_snippet.autogenerateDescriptions,skipExcerpt=aioseop_preview_snippet.skipExcerpt;function aioseopUpdateMetabox(){var e=[aioseopTitle,aioseopDescription];if("false"===isGutenberg){docTitle=$("#title");var t=$("#excerpt");e.push(docTitle,t),setTimeout(function(){tinymce.editors[0].on("KeyUp",function(){aioseopUpdatePreviewSnippet()})},1e3)}else window._wpLoadBlockEditor.then(function(){setTimeout(function(){wp.data.subscribe(function(){clearTimeout(timeout),timeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},100)})})});e.forEach(function(e){e.on("input",function(){aioseopUpdatePreviewSnippet()})}),timeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},1e3)}function aioseopUpdatePreviewSnippet(){var e="",t="",i="";i="false"===isGutenberg?(e=aioseopStripMarkup($.trim($("#title").val())),t=aioseopShortenDescription($("#content_ifr").contents().find("body")[0].innerHTML),aioseopShortenDescription($.trim($("#excerpt").val()))):(e=aioseopStripMarkup($.trim($("#post-title-0").val())),t=aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("content")),aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("excerpt")));var o=aioseopStripMarkup($.trim($('input[name="aiosp_title').val())),p=aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val()));snippetTitle.text(e),aioseopTitle.attr("placeholder",e),""!==o&&snippetTitle.text(o),"on"===autogenerateDescriptions&&(snippetDescription.text(t),aioseopDescription.attr("placeholder",t),"on"!==skipExcerpt&""!==i&&(snippetDescription.text(i),aioseopDescription.attr("placeholder",i))),""!==p&&(snippetDescription.text(p),aioseopDescription.attr("placeholder",p))}function aioseopShortenDescription(e){if(160<(e=aioseopStripMarkup(e)).length){var t=e.length-160,i=new XRegExp("[^\\pZ\\pP]*.{"+t+"}$");e=XRegExp.replace(e,i,""),e+=" ..."}return e}function aioseopStripMarkup(e){return aioseopDecodeHtmlEntities((e=(e=e.replace(/(<[^ >][^>]*>)?/gm,"")).replace(/\s\s+/g," ")).trim())}function aioseopDecodeHtmlEntities(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}$(function(){snippetTitle=$("#aiosp_snippet_title"),snippetDescription=$("#aioseop_snippet_description"),aioseopTitle=$('input[name="aiosp_title"]'),aioseopDescription=$('textarea[name="aiosp_description"]'),aioseopUpdateMetabox()}); \ No newline at end of file +var docTitle="",snippetTitle="",snippetDescription="",aioseopTitle="",aioseopDescription="",aioseopPreviewTimeout=0,aioseopPreviewIsGutenberg=aioseop_preview_snippet.isGutenberg,aioseopPreviewAutogenerateDescriptions=aioseop_preview_snippet.autogenerateDescriptions,skipExcerpt=aioseop_preview_snippet.skipExcerpt;function aioseopUpdateMetabox(){var e=[aioseopTitle,aioseopDescription];if("false"===aioseopPreviewIsGutenberg){docTitle=$("#title");var i=$("#excerpt");e.push(docTitle,i),setTimeout(function(){tinymce.editors[0].on("KeyUp",function(){aioseopUpdatePreviewSnippet()})},1e3)}else window._wpLoadBlockEditor.then(function(){setTimeout(function(){wp.data.subscribe(function(){clearTimeout(aioseopPreviewTimeout),aioseopPreviewTimeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},200)})})});e.forEach(function(e){e.on("input",function(){aioseopUpdatePreviewSnippet()})}),aioseopPreviewTimeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},1e3)}function aioseopUpdatePreviewSnippet(){var e="",i="",t="";t="false"===aioseopPreviewIsGutenberg?(e=aioseopStripMarkup($.trim($("#title").val())),i=aioseopShortenDescription($("#content_ifr").contents().find("body")[0].innerHTML),aioseopShortenDescription($.trim($("#excerpt").val()))):(e=aioseopStripMarkup($.trim($("#post-title-0").val())),i=aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("content")),aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("excerpt")));var o=aioseopStripMarkup($.trim($('input[name="aiosp_title').val())),p=aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val()));snippetTitle.text(e),aioseopTitle.attr("placeholder",e),""!==o&&snippetTitle.text(o),"on"===aioseopPreviewAutogenerateDescriptions?(snippetDescription.text(i),aioseopDescription.attr("placeholder",i),"on"!==skipExcerpt&""!==t&&(snippetDescription.text(t),aioseopDescription.attr("placeholder",t))):(snippetDescription.text(""),aioseopDescription.attr("placeholder","")),""!==p&&(snippetDescription.text(p),aioseopDescription.attr("placeholder",p))}function aioseopShortenDescription(e){if(160<(e=aioseopStripMarkup(e)).length){var i=e.length-160,t=new XRegExp("[^\\pZ\\pP]*.{"+i+"}$");e=XRegExp.replace(e,t,""),e+=" ..."}return e}function aioseopStripMarkup(e){return aioseopDecodeHtmlEntities((e=(e=e.replace(/(<[^ >][^>]*>)?/gm,"")).replace(/\s\s+/g," ")).trim())}function aioseopDecodeHtmlEntities(e){var i=document.createElement("textarea");return i.innerHTML=e,i.value}$(function(){"use strict";snippetTitle=$("#aiosp_snippet_title"),snippetDescription=$("#aioseop_snippet_description"),aioseopTitle=$('input[name="aiosp_title"]'),aioseopDescription=$('textarea[name="aiosp_description"]'),aioseopUpdateMetabox()}); \ No newline at end of file diff --git a/modules/aioseop_opengraph.php b/modules/aioseop_opengraph.php index ccfe49e9b..39e93caf6 100644 --- a/modules/aioseop_opengraph.php +++ b/modules/aioseop_opengraph.php @@ -1884,24 +1884,40 @@ function settings_update() { * @param string $hook_suffix */ public function admin_enqueue_scripts( $hook_suffix ) { - wp_enqueue_script( - 'aioseop-opengraph-script', - AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_opengraph.js', - array(), - AIOSEOP_VERSION - ); - - wp_enqueue_script( - 'aioseop-count-chars', - AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars.js', - array(), - AIOSEOP_VERSION - ); - - $count_chars_data = array( - 'extraTitleLength' => 0, - ); - wp_localize_script( 'aioseop-count-chars', 'aioseop_count_chars', $count_chars_data ); + switch ( $hook_suffix ) { + case 'term.php': + // Legacy code for taxonomy terms until we refactor all title format related code. + $count_chars_data['aiosp_title_extra'] = 0; + wp_enqueue_script( + 'aioseop-count-chars-old', + AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars-old.js', + array(), + AIOSEOP_VERSION, + true + ); + break; + default: + wp_enqueue_script( + 'aioseop-opengraph-script', + AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_opengraph.js', + array(), + AIOSEOP_VERSION + ); + + wp_enqueue_script( + 'aioseop-count-chars', + AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars.js', + array(), + AIOSEOP_VERSION + ); + + $count_chars_data = array( + 'pluginDirName' => AIOSEOP_PLUGIN_DIRNAME, + 'currentPage' => $hook_suffix, + ); + wp_localize_script( 'aioseop-count-chars', 'aioseopOGCharacterCounter', $count_chars_data ); + break; + } // Dev note: If certain JS files need to be restricted to select screens, then follow concept // used in `All_in_One_SEO_Pack::admin_enqueue_scripts()` (v2.9.1); which uses the `$hook_suffix`