diff --git a/autodescription.php b/autodescription.php index 999232de..3bd9a399 100644 --- a/autodescription.php +++ b/autodescription.php @@ -3,7 +3,7 @@ * Plugin Name: The SEO Framework * Plugin URI: https://theseoframework.com/ * Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website. - * Version: 3.0.4-dev2018.2.23.0 + * Version: 3.0.4-dev2018.2.23.1 * Author: Sybre Waaijer * Author URI: https://theseoframework.com/ * License: GPLv3 diff --git a/inc/classes/admin-init.class.php b/inc/classes/admin-init.class.php index acd98296..43f95b56 100644 --- a/inc/classes/admin-init.class.php +++ b/inc/classes/admin-init.class.php @@ -212,6 +212,7 @@ public function _localize_admin_javascript() { * 3. Removed unused caching. * 4. Added dynamic output control. * @since 2.9.0 Added boolean $returnValue['states']['isSettingsPage'] + * @since 3.0.4 `descPixelGuideline` has been increased from "920 and 820" to "1820 and 1720" respectively. * * @return array $strings The l10n strings. */ @@ -369,7 +370,7 @@ protected function get_javascript_l10n() { 'descriptionSeparator' => $description_separator, 'titleLocation' => $title_location, 'titlePixelGuideline' => 600, - 'descPixelGuideline' => $is_post_edit ? ( $this->is_page() ? 920 : 820 ) : 920, + 'descPixelGuideline' => $is_post_edit ? ( $this->is_page() ? 1820 : 1720 ) : 1820, ), 'other' => $this->additional_js_l10n( null, array(), true ), ); diff --git a/inc/classes/admin-pages.class.php b/inc/classes/admin-pages.class.php index ed9a69c7..28238b01 100644 --- a/inc/classes/admin-pages.class.php +++ b/inc/classes/admin-pages.class.php @@ -871,18 +871,30 @@ public function get_logo_uploader_form( $input_id ) { } /** - * Outputs floating title HTML for JavaScript. + * Outputs floating and reference title HTML elements for JavaScript. * - * @since 3.0.0 + * @since 3.0.4 */ - public function output_floating_title_elements() { + public function output_js_title_elements() { ?> + + + 155 && $desc_len < 175 ) { + } elseif ( $desc_len > 300 && $desc_len < 330 ) { $notice = $i18n['length_too_long']; // Don't make it okay if it's already bad. $class = $bad === $class ? $class : $okay; - } elseif ( $desc_len >= 175 ) { + } elseif ( $desc_len >= 330 ) { $notice = $i18n['length_far_too_long']; $class = $bad; } else { diff --git a/inc/classes/generate-description.class.php b/inc/classes/generate-description.class.php index 6de0a4a4..a370599a 100644 --- a/inc/classes/generate-description.class.php +++ b/inc/classes/generate-description.class.php @@ -39,6 +39,87 @@ protected function __construct() { parent::__construct(); } + /** + * Returns the Twitter meta description. Falls back to Open Graph description. + * + * @since 3.0.4 + * @uses $this->get_open_graph_description() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the description. + * @return string Twitter Description. + */ + public function get_twitter_description( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + $desc = $this->get_custom_field( '_twitter_description', $id ) + ?: $this->get_open_graph_description( $id, false ); + + return $escape ? $this->escape_description( $desc ) : $desc; + } + + /** + * Returns the Open Graph meta description. Falls back to meta description. + * + * @since 3.0.4 + * @uses $this->get_generated_open_graph_description() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the description. + * @return string Open Graph Description. + */ + public function get_open_graph_description( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + $desc = $this->get_custom_field( '_open_graph_description', $id ) + ?: $this->get_generated_open_graph_description( $id, false ); + + return $escape ? $this->escape_description( $desc ) : $desc; + } + + /** + * Returns the autogenerated open graph meta description. Falls back to meta description. + * + * @since 3.0.4 + * @uses $this->get_generated_open_graph_description() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the description. + * @return string Autogenerated Twitter Description. + */ + public function get_generated_twitter_description( $id = null, $escape = true ) { + return $this->get_generated_open_graph_description( $id, $escape ); + } + + /** + * Returns the autogenerated open graph meta description. Falls back to meta description. + * + * @since 3.0.4 + * @uses $this->generate_description() + * @staticvar array $cache + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the description. + * @return string Autogenerated Open Graph Description. + */ + public function get_generated_open_graph_description( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + static $cache = array(); + + $desc = isset( $cache[ $id ] ) + ? $cache[ $id ] + : $cache[ $id ] = $this->generate_description( '', array( 'id' => $id, 'social' => true, 'escape' => false ) ); + + return $escape ? $this->escape_description( $desc ) : $desc; + } + /** * Creates description. Base function. * @@ -107,7 +188,10 @@ public function generate_description( $description = '', $args = array() ) { if ( \apply_filters( 'the_seo_framework_do_shortcodes_in_description', false ) ) $description = \do_shortcode( $description ); - return $this->escape_description( $description ); + if ( $args['escape'] ) + $description = $this->escape_description( $description ); + + return $description; } /** @@ -130,6 +214,7 @@ public function parse_description_args( $args = array(), $defaults = array(), $g 'is_home' => false, 'get_custom_field' => true, 'social' => false, + 'escape' => true, ); /** @@ -139,9 +224,11 @@ public function parse_description_args( $args = array(), $defaults = array(), $g * @param bool $is_home We're generating for the home page. * @param bool $get_custom_field Do not fetch custom title when false. * @param bool $social Generate Social Description when true. + * @param bool $escape Whether to escape the description. * } * * @since 2.5.0 + * @since 3.0.4 Added escape parameter. * * @param array $defaults The description defaults. * @param array $args The input args. @@ -159,6 +246,7 @@ public function parse_description_args( $args = array(), $defaults = array(), $g $args['is_home'] = isset( $args['is_home'] ) ? (bool) $args['is_home'] : $defaults['is_home']; $args['get_custom_field'] = isset( $args['get_custom_field'] ) ? (bool) $args['get_custom_field'] : $defaults['get_custom_field']; $args['social'] = isset( $args['social'] ) ? (bool) $args['social'] : $defaults['social']; + $args['escape'] = isset( $args['escape'] ) ? (bool) $args['escape'] : $defaults['escape']; return $args; } @@ -473,6 +561,7 @@ protected function generate_the_description( $args, $escape = true ) { * Returns the generated description excerpt array for the normal description tag. * * @since 2.8.0 + * @since 3.0.4 Now uses 300 characters instead of 155. * * @param int $id The post/term ID. * @param bool|object The term object. @@ -506,12 +595,13 @@ public function get_description_excerpt_normal( $id = 0, $term = false ) { * Determine if the title is far too long (72+, rather than 75 in the Title guidelines). * If this is the case, trim the "title on blogname" part from the description. * @since 2.8.0 + * @since 3.0.4 Increased to basis 300, from 155. */ if ( $additions_length > 71 ) { - $max_char_length = 155; + $max_char_length = 300; $trim = true; } else { - $max_char_length = 155 - $additions_length; + $max_char_length = 300 - $additions_length; $trim = false; } @@ -815,6 +905,7 @@ public function generate_description_title( $id = '', $term = '', $page_on_front * * @since 2.3.4 * @since 2.8.2 Now no longer escapes excerpt by accident in processing, preventing "too short" output. + * @since 3.0.4 The default $max_char_length has been increased from 155 to 300. * @staticvar array $excerpt_cache Holds the excerpt * @staticvar array $excerptlength_cache Holds the excerpt length * @@ -823,7 +914,7 @@ public function generate_description_title( $id = '', $term = '', $page_on_front * @param int $max_char_length The maximum excerpt char length. * @return string $excerpt The excerpt, not escaped. */ - public function generate_excerpt( $page_id, $term = '', $max_char_length = 155 ) { + public function generate_excerpt( $page_id, $term = '', $max_char_length = 300 ) { static $excerpt_cache = array(); static $excerptlength_cache = array(); diff --git a/inc/classes/generate-title.class.php b/inc/classes/generate-title.class.php index 0ef29180..156a4b8f 100644 --- a/inc/classes/generate-title.class.php +++ b/inc/classes/generate-title.class.php @@ -41,6 +41,87 @@ protected function __construct() { parent::__construct(); } + /** + * Returns the Twitter meta title. Falls back to Open Graph title. + * + * @since 3.0.4 + * @uses $this->get_open_graph_title() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the title. + * @return string Twitter Title. + */ + public function get_twitter_title( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + $title = $this->get_custom_field( '_twitter_title', $id ) + ?: $this->get_open_graph_title( $id, false ); + + return $escape ? $this->escape_title( $title ) : $title; + } + + /** + * Returns the Open Graph meta title. Falls back to meta title. + * + * @since 3.0.4 + * @uses $this->get_generated_open_graph_title() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the title. + * @return string Open Graph Title. + */ + public function get_open_graph_title( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + $title = $this->get_custom_field( '_open_graph_title', $id ) + ?: $this->get_generated_open_graph_title( $id, false ); + + return $escape ? $this->escape_title( $title ) : $title; + } + + /** + * Returns the autogenerated open graph meta title. Falls back to meta title. + * + * @since 3.0.4 + * @uses $this->get_generated_open_graph_title() + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the title. + * @return string Autogenerated Twitter Title. + */ + public function get_generated_twitter_title( $id = null, $escape = true ) { + return $this->get_generated_open_graph_title( $id, $escape ); + } + + /** + * Returns the autogenerated open graph meta title. Falls back to meta title. + * + * @since 3.0.4 + * @uses $this->build_title() + * @staticvar array $cache + * + * @param int|null $id The post or term ID. Falls back to queried ID. + * @param bool $escape Whether to escape the title. + * @return string Autogenerated Open Graph Title. + */ + public function get_generated_open_graph_title( $id = null, $escape = true ) { + + if ( is_null( $id ) ) + $id = $this->get_the_real_ID(); + + static $cache = array(); + + $title = isset( $cache[ $id ] ) + ? $cache[ $id ] + : $cache[ $id ] = $this->build_title( '', '', array( 'meta' => true, 'term_id' => $id, 'escape' => false ) ); + + return $escape ? $this->escape_title( $title ) : $title; + } + /** * Gets the title. Main function. * Always use this function for the title unless you're absolutely sure what you're doing. diff --git a/inc/classes/inpost.class.php b/inc/classes/inpost.class.php index 4654d9fb..ff7d9cd4 100644 --- a/inc/classes/inpost.class.php +++ b/inc/classes/inpost.class.php @@ -418,7 +418,9 @@ public function _include_primary_term_selector_template() { * Do not use. It will take a little too much time to perfect this. * * @since 2.9.0 + * @since 3.0.4 Added caching. * @access private + * @staticvar $cache * @ignore * @todo Remove and refactor caller. * @@ -426,9 +428,20 @@ public function _include_primary_term_selector_template() { * @param string $doctitle_placeholder. Passed by reference. * @param string $desc_len_parsed. Passed by reference. * @param string $description_placeholder. Passed by reference. + * @return void */ public function _get_inpost_general_tab_vars( &$tit_len_parsed, &$doctitle_placeholder, &$desc_len_parsed, &$description_placeholder ) { + static $cache = array(); + + if ( ! empty( $cache ) ) { + //! Overwrites variables passed by reference via variable variables. + foreach ( $cache as $k => $v ) { + $$k = $v; + } + return; + } + $post_id = $this->get_the_real_ID(); $is_static_frontpage = $this->is_static_frontpage( $post_id ); @@ -551,5 +564,7 @@ public function _get_inpost_general_tab_vars( &$tit_len_parsed, &$doctitle_place */ $doctitle_placeholder = $generated_doctitle; $description_placeholder = $generated_description; + + $cache = compact( 'tit_len_parsed', 'doctitle_placeholder', 'desc_len_parsed', 'description_placeholder' ); } } diff --git a/inc/classes/post-data.class.php b/inc/classes/post-data.class.php index 409ec175..678a86d1 100644 --- a/inc/classes/post-data.class.php +++ b/inc/classes/post-data.class.php @@ -98,17 +98,21 @@ public function inpost_seo_save( $post_id, $post ) { return; $defaults = array( - '_genesis_title' => '', - '_genesis_description' => '', - '_genesis_canonical_uri' => '', - 'redirect' => '', // Will be displayed in custom fields when set... - '_social_image_url' => '', - '_social_image_id' => 0, - '_genesis_noindex' => 0, - '_genesis_nofollow' => 0, - '_genesis_noarchive' => 0, - 'exclude_local_search' => 0, // Will be displayed in custom fields when set... - 'exclude_from_archive' => 0, // Will be displayed in custom fields when set... + '_genesis_title' => '', + '_genesis_description' => '', + '_genesis_canonical_uri' => '', + 'redirect' => '', // Will be displayed in custom fields when set... + '_social_image_url' => '', + '_social_image_id' => 0, + '_genesis_noindex' => 0, + '_genesis_nofollow' => 0, + '_genesis_noarchive' => 0, + 'exclude_local_search' => 0, // Will be displayed in custom fields when set... + 'exclude_from_archive' => 0, // Will be displayed in custom fields when set... + '_open_graph_title' => '', + '_open_graph_description' => '', + '_twitter_title' => '', + '_twitter_description' => '', ); /** @@ -120,10 +124,14 @@ public function inpost_seo_save( $post_id, $post ) { foreach ( (array) $data as $key => $value ) : switch ( $key ) : case '_genesis_title' : + case '_open_graph_title' : + case '_twitter_title' : $data[ $key ] = $this->s_title_raw( $value ); continue 2; case '_genesis_description' : + case '_open_graph_description' : + case '_twitter_description' : $data[ $key ] = $this->s_description_raw( $value ); continue 2; diff --git a/inc/classes/render.class.php b/inc/classes/render.class.php index 61c544a9..ea838b0b 100644 --- a/inc/classes/render.class.php +++ b/inc/classes/render.class.php @@ -230,7 +230,8 @@ public function the_description() { * Renders og:description meta tag * * @since 1.3.0 - * @uses $this->description_from_cache() + * @since 3.0.4 No longer uses $this->description_from_cache() + * @uses $this->get_open_graph_title() * * @return string The Open Graph description meta tag. */ @@ -244,7 +245,7 @@ public function og_description() { * @since 2.3.0 * @since 2.7.0 Added output within filter. */ - $description = (string) \apply_filters( 'the_seo_framework_ogdescription_output', $this->description_from_cache( true ), $this->get_the_real_ID() ); + $description = (string) \apply_filters( 'the_seo_framework_ogdescription_output', $this->get_open_graph_description(), $this->get_the_real_ID() ); if ( $description ) return '' . "\r\n"; @@ -280,8 +281,9 @@ public function og_locale() { /** * Renders the Open Graph title meta tag. * - * @uses $this->title_from_cache() * @since 2.0.3 + * @since 3.0.4 No longer uses $this->title_from_cache() + * @uses $this->get_open_graph_title() * * @return string The Open Graph title meta tag. */ @@ -295,7 +297,7 @@ public function og_title() { * @since 2.3.0 * @since 2.7.0 Added output within filter. */ - $title = (string) \apply_filters( 'the_seo_framework_ogtitle_output', $this->title_from_cache( '', '', '', true ), $this->get_the_real_ID() ); + $title = (string) \apply_filters( 'the_seo_framework_ogtitle_output', $this->get_open_graph_title(), $this->get_the_real_ID() ); if ( $title ) return '' . "\r\n"; @@ -567,8 +569,9 @@ public function twitter_creator() { /** * Renders Twitter Title meta tag. * - * @uses $this->title_from_cache() + * @uses $this->get_twitter_title() * @since 2.2.2 + * @since 3.0.4 No longer uses $this->title_from_cache() * * @return string The Twitter Title meta tag. */ @@ -582,7 +585,7 @@ public function twitter_title() { * @since 2.3.0 * @since 2.7.0 Added output within filter. */ - $title = (string) \apply_filters( 'the_seo_framework_twittertitle_output', $this->title_from_cache( '', '', '', true ), $this->get_the_real_ID() ); + $title = (string) \apply_filters( 'the_seo_framework_twittertitle_output', $this->get_twitter_title(), $this->get_the_real_ID() ); if ( $title ) return '' . "\r\n"; @@ -593,8 +596,9 @@ public function twitter_title() { /** * Renders Twitter Description meta tag. * - * @uses $this->description_from_cache() * @since 2.2.2 + * @since 3.0.4 No longer uses $this->description_from_cache() + * @uses $this->get_twitter_description() * * @return string The Twitter Descritpion meta tag. */ @@ -608,7 +612,7 @@ public function twitter_description() { * @since 2.3.0 * @since 2.7.0 Added output within filter. */ - $description = (string) \apply_filters( 'the_seo_framework_twitterdescription_output', $this->description_from_cache( true ), $this->get_the_real_ID() ); + $description = (string) \apply_filters( 'the_seo_framework_twitterdescription_output', $this->get_twitter_description(), $this->get_the_real_ID() ); if ( $description ) return '' . "\r\n"; @@ -1159,7 +1163,7 @@ public function output_published_time() { } /** - * Determines whether we can use Open Graph tags. + * Determines whether we can use Open Graph tags on the front-end. * * @since 2.6.0 * @staticvar bool $cache @@ -1177,7 +1181,7 @@ public function use_og_tags() { } /** - * Determines whether we can use Facebook tags. + * Determines whether we can use Facebook tags on the front-end. * * @since 2.6.0 * @staticvar bool $cache @@ -1195,7 +1199,7 @@ public function use_facebook_tags() { } /** - * Determines whether we can use Twitter tags. + * Determines whether we can use Twitter tags on the front-end. * * @since 2.6.0 * @since 2.8.2 : Now also considers Twitter card type output. @@ -1214,7 +1218,7 @@ public function use_twitter_tags() { } /** - * Determines whether we can use Google+ tags. + * Determines whether we can use Google+ tags on the front-end. * * @since 2.6.0 * @staticvar bool $cache diff --git a/inc/classes/site-options.class.php b/inc/classes/site-options.class.php index b3bf7050..f81fbcc1 100644 --- a/inc/classes/site-options.class.php +++ b/inc/classes/site-options.class.php @@ -122,7 +122,7 @@ public function get_default_site_options() { 'display_seo_bar_metabox' => 0, // SEO Bar post SEO Settings. 'display_pixel_counter' => 1, // Pixel counter. - 'display_character_counter' => 0, // Character counter. + 'display_character_counter' => 1, // Character counter. // General. Canonical. 'canonical_scheme' => 'automatic', // Canonical URL scheme. diff --git a/inc/compat/plugin-bbpress.php b/inc/compat/plugin-bbpress.php index c27d2715..411c8e1f 100644 --- a/inc/compat/plugin-bbpress.php +++ b/inc/compat/plugin-bbpress.php @@ -144,6 +144,7 @@ function _bbpress_filter_url_path( $path, $id = 0, $external = false ) { * This function fixes the Excerpt part. * * @since 2.9.0 + * @since 3.0.4 : Default value for $max_char_length has been increased from 155 to 300. * @access private * * @param string $excerpt The excerpt to use. @@ -152,7 +153,7 @@ function _bbpress_filter_url_path( $path, $id = 0, $external = false ) { * @param int $max_char_length Determines the maximum length of excerpt after trimming. * @return string The excerpt. */ -function _bbpress_filter_excerpt_generation( $excerpt = '', $page_id = 0, $term = '', $max_char_length = 155 ) { +function _bbpress_filter_excerpt_generation( $excerpt = '', $page_id = 0, $term = '', $max_char_length = 300 ) { if ( \is_bbpress() ) { if ( \bbp_is_topic_tag() ) { diff --git a/inc/compat/plugin-wpml.php b/inc/compat/plugin-wpml.php index 02c64324..68735c46 100644 --- a/inc/compat/plugin-wpml.php +++ b/inc/compat/plugin-wpml.php @@ -16,7 +16,7 @@ \add_action( 'current_screen', __NAMESPACE__ . '\\_wpml_do_current_screen_action' ); /** - * Adds WPML filters only on SEO plugin page. + * Adds WPML filters based on current screen. * * @since 2.8.0 * @access private diff --git a/inc/views/inpost/seo-settings-singular.php b/inc/views/inpost/seo-settings-singular.php index ea820e5a..2eb92aea 100644 --- a/inc/views/inpost/seo-settings-singular.php +++ b/inc/views/inpost/seo-settings-singular.php @@ -40,18 +40,18 @@ 'dashicon' => 'admin-generic', 'args' => array( $type ), ), - 'visibility' => array( - 'name' => __( 'Visibility', 'autodescription' ), - 'callback' => array( $this, 'singular_inpost_box_visibility_tab' ), - 'dashicon' => 'visibility', - 'args' => array( $type ), - ), 'social' => array( 'name' => __( 'Social', 'autodescription' ), 'callback' => array( $this, 'singular_inpost_box_social_tab' ), 'dashicon' => 'share', 'args' => array( $type ), ), + 'visibility' => array( + 'name' => __( 'Visibility', 'autodescription' ), + 'callback' => array( $this, 'singular_inpost_box_visibility_tab' ), + 'dashicon' => 'visibility', + 'args' => array( $type ), + ), ); /** @@ -120,7 +120,7 @@
- output_floating_title_elements(); ?> + output_js_title_elements(); ?>
@@ -146,6 +146,7 @@
+ output_js_description_elements(); ?>
get_custom_field( '_open_graph_title', $post_id ); + $custom_tw_title = $this->get_custom_field( '_twitter_title', $post_id ); + $custom_og_desc = $this->get_custom_field( '_open_graph_description', $post_id ); + $custom_tw_desc = $this->get_custom_field( '_twitter_description', $post_id ); + + //! OG input falls back to default input. + $og_tit_placeholder = $this->get_generated_open_graph_title( $post_id ); + $og_desc_placeholder = $this->get_generated_open_graph_description( $post_id ); + $og_tit_len_parsed = $custom_og_title ? html_entity_decode( $custom_og_title ) : html_entity_decode( $og_tit_placeholder ); + $og_desc_len_parsed = $custom_og_desc ? html_entity_decode( $custom_og_desc ) : html_entity_decode( $og_desc_placeholder ); + + //! Twitter input falls back to OG input. + $tw_tit_placeholder = $custom_og_title ?: $og_tit_placeholder; + $tw_desc_placeholder = $custom_og_desc ?: $og_desc_placeholder; + $tw_tit_len_parsed = $custom_tw_title ? html_entity_decode( $custom_tw_title ) : $og_tit_len_parsed; + $tw_desc_len_parsed = $custom_tw_desc ? html_entity_decode( $custom_tw_desc ) : $og_desc_len_parsed; + + $show_og = $this->is_option_checked( 'og_tags' ) && ! $this->detect_og_plugin(); + $show_tw = $this->is_option_checked( 'twitter_tags' ) && ! $this->detect_twitter_card_plugin(); + + ?> +
> +
+
+ + get_option( 'display_character_counter' ) + and $this->output_character_counter_wrap( 'autodescription_og_title', $og_tit_len_parsed ); + ?> +
+
+
+
+ +
+
+
+ +
> +
+
+ + get_option( 'display_character_counter' ) + and $this->output_character_counter_wrap( 'autodescription_og_description', $og_desc_len_parsed ); + ?> +
+
+
+ +
+
+ +
> +
+
+ + get_option( 'display_character_counter' ) + and $this->output_character_counter_wrap( 'autodescription_twitter_title', $tw_tit_len_parsed ); + ?> +
+
+
+
+ +
+
+
+ +
> +
+
+ + get_option( 'display_character_counter' ) + and $this->output_character_counter_wrap( 'autodescription_twitter_description', $tw_desc_len_parsed ); + ?> +
+
+
+ +
+
+ get_social_image( array( 'post_id' => $post_id, 'disallowed' => array( 'postmeta' ), 'escape' => false ) ); diff --git a/inc/views/inpost/seo-settings-tt.php b/inc/views/inpost/seo-settings-tt.php index 340867fa..04694fae 100644 --- a/inc/views/inpost/seo-settings-tt.php +++ b/inc/views/inpost/seo-settings-tt.php @@ -132,7 +132,7 @@
- output_floating_title_elements(); ?> + output_js_title_elements(); ?>
@@ -156,6 +156,7 @@ + output_js_description_elements(); ?> diff --git a/inc/views/metaboxes/homepage-metabox.php b/inc/views/metaboxes/homepage-metabox.php index d25fb8fe..3c3ba03a 100644 --- a/inc/views/metaboxes/homepage-metabox.php +++ b/inc/views/metaboxes/homepage-metabox.php @@ -183,7 +183,7 @@

- output_floating_title_elements(); ?> + output_js_title_elements(); ?>

+ output_js_description_elements(); ?>

description( __( 'The meta description can be used to determine the text used under the title on Search Engine results pages.', 'autodescription' ) ); diff --git a/lib/css/tsf-rtl.css b/lib/css/tsf-rtl.css index 12487e5d..5dda62d5 100644 --- a/lib/css/tsf-rtl.css +++ b/lib/css/tsf-rtl.css @@ -412,7 +412,7 @@ body.no-js .tsf-seo-bar-item { } a.tsf-tooltip-item { - cursor: auto; + cursor: pointer; } .tsf-tooltip { diff --git a/lib/css/tsf-rtl.min.css b/lib/css/tsf-rtl.min.css index a2b0b504..a6bded87 100644 --- a/lib/css/tsf-rtl.min.css +++ b/lib/css/tsf-rtl.min.css @@ -1 +1 @@ -.tsf-top-buttons,.tsf-top-wrap>h1,.tsf-top-wrap>h2{float:left}.tsf-notice{position:relative;clear:both}.tsf-notice.tsf-show-icon p:before{content:'';margin-left:12px;background:0 0;display:inline-block;font:400 14px/16px dashicons;speak:none;height:16px;text-align:center;vertical-align:middle;width:16px;line-height:14px;-webkit-font-smoothing:antialiased}.error.tsf-notice.tsf-show-icon p:before{color:#dd3811;content:"\f534"}.notice-warning.tsf-notice.tsf-show-icon p:before{color:#ffa01b;content:"\f227"}.updated.tsf-notice.tsf-show-icon p:before{color:#0cc34b;font-size:16px;content:"\f147"}a.tsf-dismiss{position:absolute;top:0;left:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer;text-decoration:none}a.tsf-dismiss:before{background:0 0;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.tsf-dismiss:hover{color:#c00}table.wp-list-table .column-name{width:15%}table.wp-list-table .column-icl_translations,table.wp-list-table .column-is_in_stock,table.wp-list-table .column-price,table.wp-list-table .column-sku,th.column-tsf-seo-bar-wrap~th{width:8%}.tsf-seo-bar-item{text-decoration:none;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tsf-title-wrap{position:relative;display:block;padding:0;height:auto;width:auto;overflow:hidden}#tsf-title-offset{visibility:hidden;height:0;display:inline-block;position:absolute;right:0;color:transparent;white-space:pre}#tsf-title-placeholder,#tsf-title-placeholder-prefix{position:absolute;color:#777;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;top:0;right:0;overflow:hidden;white-space:pre;text-overflow:ellipsis;will-change:left,right}.tsf-counter-wrap{margin-top:15px}.tsf-counter{font-weight:400;color:#666;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:contents}.tsf-count-bad{color:#dd3811}.tsf-count-okay{color:#ffa700}.tsf-count-good{color:#0cc34b}.tsf-counter-one{color:#fff;border-radius:4em;padding:0 .5em;min-width:2em;display:inline-block;text-align:center;vertical-align:baseline}.tsf-counter-one.tsf-count-bad{background-color:#dd3811}.tsf-counter-one.tsf-count-okay{background-color:#ffa700}.tsf-counter-one.tsf-count-good{background-color:#0cc34b}.tsf-tabs-content .tsf-pixel-counter-wrap{margin-right:1px;max-width:99%}.tsf-pixel-shadow-wrap{position:relative;overflow:hidden;width:0;height:0}.tsf-pixel-counter-wrap{border-bottom:1px solid #ccc;margin-top:12px;margin-bottom:3px}.tsf-pixel-counter-bar{padding-top:7px;display:block;height:3px;width:100%}.tsf-pixel-counter-fluid{display:block;pointer-events:none;height:3px;width:0;max-width:100%;background:#007bd2;box-shadow:0 1px 3px 0 #ccc;-webkit-transition:width .15s cubic-bezier(.4,0,.75,1);-o-transition:width .15s cubic-bezier(.4,0,.75,1);transition:width .15s cubic-bezier(.4,0,.75,1)}.tsf-pixel-counter-overflown .tsf-pixel-counter-fluid{background-color:#dd3811}.tsf-pixel-counter-fit .tsf-pixel-counter-fluid{background-color:#0cc34b}.tsf-description-pixel-counter-shadow,.tsf-title-pixel-counter-shadow{position:absolute;right:0;top:0;z-index:-100;overflow:visible;visibility:hidden;padding:0;margin:0;border:0;display:inline;text-decoration:none;white-space:nowrap;word-wrap:normal;zoom:1;text-overflow:clip;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none;transition:none;font-family:arial,helvetica,sans-serif;font-size:18px;font-weight:400}.tsf-description-pixel-counter-shadow{font-size:13px}#tsf-seo-bar-wrap{width:18%}th:last-of-type#tsf-seo-bar-wrap{width:160px}.tsf-seo-bar{display:block;width:95%;max-width:220px;border-radius:0;padding:3px;text-shadow:0 0 3px rgba(0,0,0,.3)}.tsf-seo-bar.tsf-100{width:100%}.tsf-seo-bar-inner-wrap{display:table;width:100%;border-radius:0;margin:0 auto;border-collapse:separate;border-spacing:0;vertical-align:middle}.tsf-seo-bar-section-wrap{display:table-cell;border-collapse:collapse}.tsf-seo-bar-item{display:table;width:100%;color:#fff;text-align:center;height:100%;min-width:12px;vertical-align:top;line-height:1.625em;box-shadow:2px 0 0 -1px rgba(0,0,0,.1) inset,-2px 0 0 -1px rgba(0,0,0,.1) inset}body.no-js .tsf-seo-bar-item{cursor:default}.tsf-seo-bar.pill,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap{border-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-item{box-shadow:2px 6px 3px -2px rgba(255,255,255,.2) inset,-2px -6px 3px -2px rgba(41,41,41,.2) inset,0 0 1px rgba(41,41,41,.6)}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type a{border-top-left-radius:30px;border-bottom-left-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap span.tsf-seo-bar-section-wrap:first-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap span.tsf-seo-bar-section-wrap:first-of-type a{border-top-right-radius:30px;border-bottom-right-radius:30px}.tsf-100{width:100%}.tsf-60{width:60%}.tsf-50{width:50%}.tsf-40{width:40%}.tsf-33{width:33.333%}.tsf-25{width:25%}.tsf-20{width:20%}.tsf-16{width:16.666%}.tsf-12-5{width:12.5%}.tsf-11{width:11.333%}.tsf-10{width:10%}.tsf-seo-bar-bad{background-color:#dd3811}.tsf-seo-bar-okay{background-color:#ffa700}.tsf-seo-bar-good{background-color:#0cc34b}.tsf-seo-bar-unknown{background-color:#007bd2}.tsf-tooltip-wrap{position:relative}.tsf-tooltip-item{cursor:help}a.tsf-tooltip-item{cursor:auto}.tsf-tooltip{position:absolute;padding:0;margin:0;bottom:0;left:0;z-index:900142;text-align:right;pointer-events:none;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-tooltip-down{bottom:auto;top:0}.tsf-tooltip-text-wrap{padding:10px 12px;font-size:1em;font-weight:500;line-height:1.625em;border-radius:3px;background:#007bd2;color:#fdfdfd;box-shadow:0 0 2px rgba(0,0,0,.6);text-shadow:none;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:pre-line;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 0 150px;flex:1 0 150px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-is-primary-term,.tsf-nav-tab{font-weight:600}.tsf-tooltip-text span{text-decoration:underline}.tsf-tooltip-text br{display:block;width:100%;content:"\A"}.tsf-ajax:before,.tsf-tooltip-arrow:after,.tsf-tooltip-arrow:before{content:""}.tsf-tooltip-arrow{position:absolute;bottom:-8px;z-index:9999999;left:0;width:0;height:0}.tsf-tooltip-down .tsf-tooltip-arrow{bottom:auto;top:-8px}.tsf-tooltip-arrow:before{border-left:9px solid transparent;border-right:9px solid transparent;border-top:9px solid rgba(0,0,0,.25);position:absolute;bottom:-1px;left:-1px}.tsf-tooltip-arrow:after{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #007bd2;position:absolute;bottom:0;left:0}.tsf-tooltip-down .tsf-tooltip-arrow:before{bottom:auto;top:0;border-top:0;border-bottom:9px solid rgba(0,0,0,.25)}.tsf-tooltip-down .tsf-tooltip-arrow:after{bottom:auto;top:1px;border-top:0;border-bottom:8px solid #007bd2}.tsf-seo-bar-wrap.column-tsf-seo-bar-temp{overflow:initial!important;min-width:160px}#col-container,#col-right{overflow:initial}.tsf-metaboxes{box-sizing:border-box;max-width:690px;padding-bottom:20px}.tsf-top-wrap{width:100%;display:inline-block;vertical-align:top}.tsf-metaboxes .metabox-holder{clear:both}.tsf-bottom-buttons{text-align:left}.tsf-metaboxes .tsf-bottom-buttons input,.tsf-metaboxes .tsf-top-buttons input{margin-left:10px}#tsf-description-separator,#tsf-title-separator{display:table;width:100%;border-collapse:collapse;border-spacing:0}#tsf-description-separator input,#tsf-title-separator input{display:none;float:left;width:0;min-width:0;opacity:0}#tsf-description-separator label,#tsf-title-separator label{display:inline-block;width:auto;min-width:28px;min-height:28px;margin:3px;-moz-margin-end:1.5px;-moz-margin-start:1.5px;padding:0 4px;border:1px solid #ccc;line-height:28px;text-align:center;cursor:pointer;box-shadow:-1px -1px 1px #aaa inset;font-size:16px}#tsf-description-separator label.tsf-recommended,#tsf-title-separator label.tsf-recommended{border:1px solid #0cc34b;box-shadow:-1px -1px 1px #0cc34b inset}#tsf-description-separator input:hover+label,#tsf-description-separator label:hover,#tsf-title-separator input:hover+label,#tsf-title-separator label:hover{box-shadow:1px 1px 1px #aaa inset;background-color:#fff}#tsf-description-separator input:checked+label,#tsf-title-separator input:checked+label{box-shadow:1px 1px 1px #333 inset;background-color:#fff}#tsf-home-title-location,#tsf-title-location{display:block}#tsf-home-title-location label span,#tsf-title-location label span,#tsf-twitter-cards label span{display:inline-block;min-width:60px;vertical-align:baseline}#tsf-twitter-cards label span{min-width:150px}#tsf-home-title-location label .tsf-sep-js,#tsf-home-title-location label span.tsf-custom-blogname-js,#tsf-home-title-location label span.tsf-custom-tagline-js,#tsf-home-title-location label span.tsf-custom-title-js,#tsf-title-location label .tsf-sep-js{display:inline;min-width:0;white-space:pre}.tsf-nav-tab-wrapper,.tsf-tab-no-js{position:relative;clear:both;width:100%;display:inline-block;border-bottom:1px solid #ccc;line-height:inherit;padding:8px 12px 0;margin:-4px -12px}.tsf-nav-tab{float:right;border:1px solid #ccc;margin-right:.5em;margin-bottom:-1px;padding:5px 14px;font-size:12px;line-height:16px;background:#f1f1f1;color:#555}.tsf-dashicons-tabs{font-size:initial;display:inline;vertical-align:text-bottom}input.tsf-tabs-radio{display:none;width:0;height:0;position:absolute;left:-9001px}.tsf-active-tab,.tsf-tabs-radio:checked+label{background-color:inherit;border-bottom-color:#fff;color:#000}.tsf-tabs-content{margin:1.33em auto 0}.tsf-content-no-js{margin:1.33em auto}body.js .tsf-tabs-content{display:none}body.js .tsf-tabs-content.tsf-active-tab-content{display:block}#tsf-inpost-box .inside,.tsf-flex{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:flex-start;justify-content:flex-start}#tsf-inpost-box.closed .inside,body.js .tsf-flex-tab-content{display:none}#tsf-inpost-box .inside{margin:0;padding:0;-webkit-flex:1 0 100%;flex:1 0 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tsf-flex-inside-wrap{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto}.tsf-flex-setting{width:100%;-webkit-flex-direction:row;flex-direction:row}.tsf-flex-setting-input,.tsf-flex-setting-label{background-color:#fff;padding:15px 12px;-webkit-flex:10 1 350px;flex:10 1 350px;box-shadow:0 0 0 1px #e9e9e9}.tsf-flex-setting-label{background-color:#f9f9f9;-webkit-flex:1 1 200px;flex:1 1 200px}.tsf-flex-setting-input{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-grow:0;flex-grow:0}.tsf-flex-setting-label-inner-wrap{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item>*{margin-right:4px}.tsf-flex-setting-label-item>:last-child{margin-right:0}.tsf-social-image-buttons{margin-top:15px;margin-left:1px}.tsf-flex-setting-input textarea{max-height:250px}input[type=radio].tsf-flex-nav-tab-radio{display:none;width:0;height:0;margin:0;padding:0;position:absolute;left:-9001px}.tsf-flex-nav-tab-wrapper{background-color:#fcfcfc;border-bottom:2px solid #dadada;-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 100%;flex:1 1 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%}.tsf-flex-nav-tab-inner{-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex:1 0 auto;flex:1 0 auto}.tsf-flex-nav-tab{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto;max-width:125px}.tsf-flex-nav-tab-label{padding:12px;text-align:center;-webkit-flex-direction:row;flex-direction:row;box-shadow:0 0 0 0 transparent inset;-webkit-transition:box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out;transition:box-shadow .15s ease-out;-webkit-align-items:center;align-items:center;-webkit-align-content:space-around;align-content:space-around}.tsf-flex-nav-dashicon,.tsf-flex-nav-name{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.tsf-flex-nav-tab .tsf-flex-nav-tab-radio:checked+.tsf-flex-nav-tab-label{box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-transition:box-shadow .25s ease-in;-o-transition:box-shadow .25s ease-in;transition:box-shadow .25s ease-in}.tsf-flex-tab-content{-webkit-flex:1 0 100%;flex:1 0 100%;max-width:100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}body.js .tsf-flex-tab-content.tsf-flex-tab-content-active{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tsf-flex-tabs-content-no-js{background-color:#f3f3f3;border-bottom:1px solid #dadada;box-shadow:0 2px 0 0 #dadada inset}.tsf-flex-tab-no-js{-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;flex:1 1 100%}.tsf-flex-tab-no-js .tsf-flex-nav-tab{padding:12px;min-width:125px;box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:0 1 auto;flex:0 1 auto}#tsf-inpost-box .hndle .tsf-tooltip-wrap a{font-size:14px;line-height:1em}.tsf-primary-term-selector{margin:0;padding:0;float:left;line-height:inherit;display:inline-block}.tsf-primary-term-selector input{vertical-align:middle;height:14px;width:14px;min-width:14px;line-height:inherit;margin:0;padding:0;pointer-events:none}.tsf-primary-term-selector input:checked:before{width:6px;height:6px;margin:3px;line-height:inherit}.tsf-primary-term-selector-help-wrap{position:absolute;top:0;left:25px}input.tsf-default-selected{border-color:#1c9d38}input.tsf-default-selected:checked:before{color:#1c9d38}input.tsf-warning-selected{border-color:#dd3811}input.tsf-warning-selected:checked:before{color:#dd3811}label.tsf-disabled{color:#999}input.tsf-disabled,label.tsf-disabled{cursor:default}.tsf-fields{font-size:13px;line-height:1.5;margin:1em 0}.tsf-fields .tsf-toblock{display:block;width:100%;margin-bottom:4px}.tsf-fields p.description{margin:7px 0 5px;color:#666}.tsf-option-spacer{margin:1em 0}.tsf-checkbox-wrapper{margin-top:15px}.tsf-checkbox-wrapper:first-child{margin-top:0}.tsf-metaboxes legend h4{margin:2px 0}.tsf-metaboxes legend p:last-of-type{margin-bottom:0}.tsf-counter .tsf-ajax{margin-right:3px}.tsf-ajax:before{display:inline-block;line-height:1;font-family:dashicons;font-style:normal;font-weight:400;font-size:1.225em;vertical-align:middle}.tsf-ajax.tsf-loading:before{content:"\f463";color:#007bd2;-webkit-animation:tsf-spin 1.5s linear infinite;-moz-animation:tsf-spin 1.5s linear infinite;-o-animation:tsf-spin 1.5s linear infinite;animation:tsf-spin 1.5s linear infinite}.tsf-ajax.tsf-error:before{content:"\f158";color:#dd3811}.tsf-ajax.tsf-success:before{content:"\f147";color:#0cc34b}a.tsf-set-social-image.button{margin-left:7px}#tsf-inpost-box input[type=text]::-webkit-input-placeholder,#tsf-inpost-box textarea::-webkit-input-placeholder,.tsf-metaboxes input[type=text]::-webkit-input-placeholder,.tsf-metaboxes textarea::-webkit-input-placeholder{-webkit-transition:color .33s ease-in,text-shadow .33s ease-in;-o-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]::-moz-placeholder,#tsf-inpost-box textarea::-moz-placeholder,.tsf-metaboxes input[type=text]::-moz-placeholder,.tsf-metaboxes textarea::-moz-placeholder{-moz-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:-ms-input-placeholder,#tsf-inpost-box textarea:-ms-input-placeholder,.tsf-metaboxes input[type=text]:-ms-input-placeholder,.tsf-metaboxes textarea:-ms-input-placeholder{transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:focus::-webkit-input-placeholder,#tsf-inpost-box textarea:focus::-webkit-input-placeholder,.tsf-metaboxes input[type=text]:focus::-webkit-input-placeholder,.tsf-metaboxes textarea:focus::-webkit-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus::-moz-placeholder,#tsf-inpost-box textarea:focus::-moz-placeholder,.tsf-metaboxe textarea:focus::-moz-placeholder,.tsf-metaboxes input[type=text]:focus::-moz-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus:-ms-input-placeholder,#tsf-inpost-box textarea:focus:-ms-input-placeholder,.tsf-metaboxes input[type=text]:focus:-ms-input-placeholder,.tsf-metaboxes textarea:focus:-ms-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}@-webkit-keyframes tsf-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes tsf-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media screen and (max-width:782px){.tsf-inpost-box p.tsf-fields,.tsf-metaboxes p.tsf-fields{line-height:2.8}#tsf-home-title-location label span,#tsf-title-location label span{min-width:40px}.wp-list-table .is-expanded td.tsf-seo-bar-wrap:not(.hidden){overflow:initial!important}.tsf-primary-term-selector input{height:18px;width:18px;min-width:18px}.tsf-primary-term-selector input:checked:before{width:8px;height:8px;margin:4px}}@media screen and (max-width:642px){.tsf-nav-desktop{display:none}}@media screen and (max-width:510px){.tsf-seo-bar.tsf-100{width:inherit}}@-moz-document url-prefix(){#tsf-description-separator label,#tsf-title-separator label{margin:3px 1px}@media only screen and (min-width:768px){.widefat tr td.column-title:nth-child(2):nth-last-child(n+6),.widefat tr td.title:nth-child(2):nth-last-child(n+6),.widefat tr th.column-title:nth-child(2):nth-last-child(n+6),.widefat tr th.title:nth-child(2):nth-last-child(n+6){min-width:1em;width:25%;max-width:100%;white-space:unset}}.tsf-default-selected{box-shadow:0 0 2px 0 #1c9d38}.tsf-warning-selected{box-shadow:0 0 2px 0 #dd3811}}.tsf-flex-hide-if-no-js,body.js .tsf-flex-hide-if-js{display:none}body.js .tsf-flex-hide-if-no-js{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex} +.tsf-top-buttons,.tsf-top-wrap>h1,.tsf-top-wrap>h2{float:left}.tsf-notice{position:relative;clear:both}.tsf-notice.tsf-show-icon p:before{content:'';margin-left:12px;background:0 0;display:inline-block;font:400 14px/16px dashicons;speak:none;height:16px;text-align:center;vertical-align:middle;width:16px;line-height:14px;-webkit-font-smoothing:antialiased}.error.tsf-notice.tsf-show-icon p:before{color:#dd3811;content:"\f534"}.notice-warning.tsf-notice.tsf-show-icon p:before{color:#ffa01b;content:"\f227"}.updated.tsf-notice.tsf-show-icon p:before{color:#0cc34b;font-size:16px;content:"\f147"}a.tsf-dismiss{position:absolute;top:0;left:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer;text-decoration:none}a.tsf-dismiss:before{background:0 0;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.tsf-dismiss:hover{color:#c00}table.wp-list-table .column-name{width:15%}table.wp-list-table .column-icl_translations,table.wp-list-table .column-is_in_stock,table.wp-list-table .column-price,table.wp-list-table .column-sku,th.column-tsf-seo-bar-wrap~th{width:8%}.tsf-seo-bar-item{text-decoration:none;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tsf-title-wrap{position:relative;display:block;padding:0;height:auto;width:auto;overflow:hidden}#tsf-title-offset{visibility:hidden;height:0;display:inline-block;position:absolute;right:0;color:transparent;white-space:pre}#tsf-title-placeholder,#tsf-title-placeholder-prefix{position:absolute;color:#777;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;top:0;right:0;overflow:hidden;white-space:pre;text-overflow:ellipsis;will-change:left,right}.tsf-counter-wrap{margin-top:15px}.tsf-counter{font-weight:400;color:#666;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:contents}.tsf-count-bad{color:#dd3811}.tsf-count-okay{color:#ffa700}.tsf-count-good{color:#0cc34b}.tsf-counter-one{color:#fff;border-radius:4em;padding:0 .5em;min-width:2em;display:inline-block;text-align:center;vertical-align:baseline}.tsf-counter-one.tsf-count-bad{background-color:#dd3811}.tsf-counter-one.tsf-count-okay{background-color:#ffa700}.tsf-counter-one.tsf-count-good{background-color:#0cc34b}.tsf-tabs-content .tsf-pixel-counter-wrap{margin-right:1px;max-width:99%}.tsf-pixel-shadow-wrap{position:relative;overflow:hidden;width:0;height:0}.tsf-pixel-counter-wrap{border-bottom:1px solid #ccc;margin-top:12px;margin-bottom:3px}.tsf-pixel-counter-bar{padding-top:7px;display:block;height:3px;width:100%}.tsf-pixel-counter-fluid{display:block;pointer-events:none;height:3px;width:0;max-width:100%;background:#007bd2;box-shadow:0 1px 3px 0 #ccc;-webkit-transition:width .15s cubic-bezier(.4,0,.75,1);-o-transition:width .15s cubic-bezier(.4,0,.75,1);transition:width .15s cubic-bezier(.4,0,.75,1)}.tsf-pixel-counter-overflown .tsf-pixel-counter-fluid{background-color:#dd3811}.tsf-pixel-counter-fit .tsf-pixel-counter-fluid{background-color:#0cc34b}.tsf-description-pixel-counter-shadow,.tsf-title-pixel-counter-shadow{position:absolute;right:0;top:0;z-index:-100;overflow:visible;visibility:hidden;padding:0;margin:0;border:0;display:inline;text-decoration:none;white-space:nowrap;word-wrap:normal;zoom:1;text-overflow:clip;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none;transition:none;font-family:arial,helvetica,sans-serif;font-size:18px;font-weight:400}.tsf-description-pixel-counter-shadow{font-size:13px}#tsf-seo-bar-wrap{width:18%}th:last-of-type#tsf-seo-bar-wrap{width:160px}.tsf-seo-bar{display:block;width:95%;max-width:220px;border-radius:0;padding:3px;text-shadow:0 0 3px rgba(0,0,0,.3)}.tsf-seo-bar.tsf-100{width:100%}.tsf-seo-bar-inner-wrap{display:table;width:100%;border-radius:0;margin:0 auto;border-collapse:separate;border-spacing:0;vertical-align:middle}.tsf-seo-bar-section-wrap{display:table-cell;border-collapse:collapse}.tsf-seo-bar-item{display:table;width:100%;color:#fff;text-align:center;height:100%;min-width:12px;vertical-align:top;line-height:1.625em;box-shadow:2px 0 0 -1px rgba(0,0,0,.1) inset,-2px 0 0 -1px rgba(0,0,0,.1) inset}body.no-js .tsf-seo-bar-item{cursor:default}.tsf-seo-bar.pill,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap{border-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-item{box-shadow:2px 6px 3px -2px rgba(255,255,255,.2) inset,-2px -6px 3px -2px rgba(41,41,41,.2) inset,0 0 1px rgba(41,41,41,.6)}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type a{border-top-left-radius:30px;border-bottom-left-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap span.tsf-seo-bar-section-wrap:first-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap span.tsf-seo-bar-section-wrap:first-of-type a{border-top-right-radius:30px;border-bottom-right-radius:30px}.tsf-100{width:100%}.tsf-60{width:60%}.tsf-50{width:50%}.tsf-40{width:40%}.tsf-33{width:33.333%}.tsf-25{width:25%}.tsf-20{width:20%}.tsf-16{width:16.666%}.tsf-12-5{width:12.5%}.tsf-11{width:11.333%}.tsf-10{width:10%}.tsf-seo-bar-bad{background-color:#dd3811}.tsf-seo-bar-okay{background-color:#ffa700}.tsf-seo-bar-good{background-color:#0cc34b}.tsf-seo-bar-unknown{background-color:#007bd2}.tsf-tooltip-wrap{position:relative}.tsf-tooltip-item{cursor:help}a.tsf-tooltip-item{cursor:pointer}.tsf-tooltip{position:absolute;padding:0;margin:0;bottom:0;left:0;z-index:900142;text-align:right;pointer-events:none;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-tooltip-down{bottom:auto;top:0}.tsf-tooltip-text-wrap{padding:10px 12px;font-size:1em;font-weight:500;line-height:1.625em;border-radius:3px;background:#007bd2;color:#fdfdfd;box-shadow:0 0 2px rgba(0,0,0,.6);text-shadow:none;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:pre-line;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 0 150px;flex:1 0 150px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-is-primary-term,.tsf-nav-tab{font-weight:600}.tsf-tooltip-text span{text-decoration:underline}.tsf-tooltip-text br{display:block;width:100%;content:"\A"}.tsf-ajax:before,.tsf-tooltip-arrow:after,.tsf-tooltip-arrow:before{content:""}.tsf-tooltip-arrow{position:absolute;bottom:-8px;z-index:9999999;left:0;width:0;height:0}.tsf-tooltip-down .tsf-tooltip-arrow{bottom:auto;top:-8px}.tsf-tooltip-arrow:before{border-left:9px solid transparent;border-right:9px solid transparent;border-top:9px solid rgba(0,0,0,.25);position:absolute;bottom:-1px;left:-1px}.tsf-tooltip-arrow:after{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #007bd2;position:absolute;bottom:0;left:0}.tsf-tooltip-down .tsf-tooltip-arrow:before{bottom:auto;top:0;border-top:0;border-bottom:9px solid rgba(0,0,0,.25)}.tsf-tooltip-down .tsf-tooltip-arrow:after{bottom:auto;top:1px;border-top:0;border-bottom:8px solid #007bd2}.tsf-seo-bar-wrap.column-tsf-seo-bar-temp{overflow:initial!important;min-width:160px}#col-container,#col-right{overflow:initial}.tsf-metaboxes{box-sizing:border-box;max-width:690px;padding-bottom:20px}.tsf-top-wrap{width:100%;display:inline-block;vertical-align:top}.tsf-metaboxes .metabox-holder{clear:both}.tsf-bottom-buttons{text-align:left}.tsf-metaboxes .tsf-bottom-buttons input,.tsf-metaboxes .tsf-top-buttons input{margin-left:10px}#tsf-description-separator,#tsf-title-separator{display:table;width:100%;border-collapse:collapse;border-spacing:0}#tsf-description-separator input,#tsf-title-separator input{display:none;float:left;width:0;min-width:0;opacity:0}#tsf-description-separator label,#tsf-title-separator label{display:inline-block;width:auto;min-width:28px;min-height:28px;margin:3px;-moz-margin-end:1.5px;-moz-margin-start:1.5px;padding:0 4px;border:1px solid #ccc;line-height:28px;text-align:center;cursor:pointer;box-shadow:-1px -1px 1px #aaa inset;font-size:16px}#tsf-description-separator label.tsf-recommended,#tsf-title-separator label.tsf-recommended{border:1px solid #0cc34b;box-shadow:-1px -1px 1px #0cc34b inset}#tsf-description-separator input:hover+label,#tsf-description-separator label:hover,#tsf-title-separator input:hover+label,#tsf-title-separator label:hover{box-shadow:1px 1px 1px #aaa inset;background-color:#fff}#tsf-description-separator input:checked+label,#tsf-title-separator input:checked+label{box-shadow:1px 1px 1px #333 inset;background-color:#fff}#tsf-home-title-location,#tsf-title-location{display:block}#tsf-home-title-location label span,#tsf-title-location label span,#tsf-twitter-cards label span{display:inline-block;min-width:60px;vertical-align:baseline}#tsf-twitter-cards label span{min-width:150px}#tsf-home-title-location label .tsf-sep-js,#tsf-home-title-location label span.tsf-custom-blogname-js,#tsf-home-title-location label span.tsf-custom-tagline-js,#tsf-home-title-location label span.tsf-custom-title-js,#tsf-title-location label .tsf-sep-js{display:inline;min-width:0;white-space:pre}.tsf-nav-tab-wrapper,.tsf-tab-no-js{position:relative;clear:both;width:100%;display:inline-block;border-bottom:1px solid #ccc;line-height:inherit;padding:8px 12px 0;margin:-4px -12px}.tsf-nav-tab{float:right;border:1px solid #ccc;margin-right:.5em;margin-bottom:-1px;padding:5px 14px;font-size:12px;line-height:16px;background:#f1f1f1;color:#555}.tsf-dashicons-tabs{font-size:initial;display:inline;vertical-align:text-bottom}input.tsf-tabs-radio{display:none;width:0;height:0;position:absolute;left:-9001px}.tsf-active-tab,.tsf-tabs-radio:checked+label{background-color:inherit;border-bottom-color:#fff;color:#000}.tsf-tabs-content{margin:1.33em auto 0}.tsf-content-no-js{margin:1.33em auto}body.js .tsf-tabs-content{display:none}body.js .tsf-tabs-content.tsf-active-tab-content{display:block}#tsf-inpost-box .inside,.tsf-flex{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:flex-start;justify-content:flex-start}#tsf-inpost-box.closed .inside,body.js .tsf-flex-tab-content{display:none}#tsf-inpost-box .inside{margin:0;padding:0;-webkit-flex:1 0 100%;flex:1 0 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tsf-flex-inside-wrap{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto}.tsf-flex-setting{width:100%;-webkit-flex-direction:row;flex-direction:row}.tsf-flex-setting-input,.tsf-flex-setting-label{background-color:#fff;padding:15px 12px;-webkit-flex:10 1 350px;flex:10 1 350px;box-shadow:0 0 0 1px #e9e9e9}.tsf-flex-setting-label{background-color:#f9f9f9;-webkit-flex:1 1 200px;flex:1 1 200px}.tsf-flex-setting-input{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-grow:0;flex-grow:0}.tsf-flex-setting-label-inner-wrap{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item>*{margin-right:4px}.tsf-flex-setting-label-item>:last-child{margin-right:0}.tsf-social-image-buttons{margin-top:15px;margin-left:1px}.tsf-flex-setting-input textarea{max-height:250px}input[type=radio].tsf-flex-nav-tab-radio{display:none;width:0;height:0;margin:0;padding:0;position:absolute;left:-9001px}.tsf-flex-nav-tab-wrapper{background-color:#fcfcfc;border-bottom:2px solid #dadada;-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 100%;flex:1 1 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%}.tsf-flex-nav-tab-inner{-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex:1 0 auto;flex:1 0 auto}.tsf-flex-nav-tab{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto;max-width:125px}.tsf-flex-nav-tab-label{padding:12px;text-align:center;-webkit-flex-direction:row;flex-direction:row;box-shadow:0 0 0 0 transparent inset;-webkit-transition:box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out;transition:box-shadow .15s ease-out;-webkit-align-items:center;align-items:center;-webkit-align-content:space-around;align-content:space-around}.tsf-flex-nav-dashicon,.tsf-flex-nav-name{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.tsf-flex-nav-tab .tsf-flex-nav-tab-radio:checked+.tsf-flex-nav-tab-label{box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-transition:box-shadow .25s ease-in;-o-transition:box-shadow .25s ease-in;transition:box-shadow .25s ease-in}.tsf-flex-tab-content{-webkit-flex:1 0 100%;flex:1 0 100%;max-width:100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}body.js .tsf-flex-tab-content.tsf-flex-tab-content-active{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tsf-flex-tabs-content-no-js{background-color:#f3f3f3;border-bottom:1px solid #dadada;box-shadow:0 2px 0 0 #dadada inset}.tsf-flex-tab-no-js{-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;flex:1 1 100%}.tsf-flex-tab-no-js .tsf-flex-nav-tab{padding:12px;min-width:125px;box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:0 1 auto;flex:0 1 auto}#tsf-inpost-box .hndle .tsf-tooltip-wrap a{font-size:14px;line-height:1em}.tsf-primary-term-selector{margin:0;padding:0;float:left;line-height:inherit;display:inline-block}.tsf-primary-term-selector input{vertical-align:middle;height:14px;width:14px;min-width:14px;line-height:inherit;margin:0;padding:0;pointer-events:none}.tsf-primary-term-selector input:checked:before{width:6px;height:6px;margin:3px;line-height:inherit}.tsf-primary-term-selector-help-wrap{position:absolute;top:0;left:25px}input.tsf-default-selected{border-color:#1c9d38}input.tsf-default-selected:checked:before{color:#1c9d38}input.tsf-warning-selected{border-color:#dd3811}input.tsf-warning-selected:checked:before{color:#dd3811}label.tsf-disabled{color:#999}input.tsf-disabled,label.tsf-disabled{cursor:default}.tsf-fields{font-size:13px;line-height:1.5;margin:1em 0}.tsf-fields .tsf-toblock{display:block;width:100%;margin-bottom:4px}.tsf-fields p.description{margin:7px 0 5px;color:#666}.tsf-option-spacer{margin:1em 0}.tsf-checkbox-wrapper{margin-top:15px}.tsf-checkbox-wrapper:first-child{margin-top:0}.tsf-metaboxes legend h4{margin:2px 0}.tsf-metaboxes legend p:last-of-type{margin-bottom:0}.tsf-counter .tsf-ajax{margin-right:3px}.tsf-ajax:before{display:inline-block;line-height:1;font-family:dashicons;font-style:normal;font-weight:400;font-size:1.225em;vertical-align:middle}.tsf-ajax.tsf-loading:before{content:"\f463";color:#007bd2;-webkit-animation:tsf-spin 1.5s linear infinite;-moz-animation:tsf-spin 1.5s linear infinite;-o-animation:tsf-spin 1.5s linear infinite;animation:tsf-spin 1.5s linear infinite}.tsf-ajax.tsf-error:before{content:"\f158";color:#dd3811}.tsf-ajax.tsf-success:before{content:"\f147";color:#0cc34b}a.tsf-set-social-image.button{margin-left:7px}#tsf-inpost-box input[type=text]::-webkit-input-placeholder,#tsf-inpost-box textarea::-webkit-input-placeholder,.tsf-metaboxes input[type=text]::-webkit-input-placeholder,.tsf-metaboxes textarea::-webkit-input-placeholder{-webkit-transition:color .33s ease-in,text-shadow .33s ease-in;-o-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]::-moz-placeholder,#tsf-inpost-box textarea::-moz-placeholder,.tsf-metaboxes input[type=text]::-moz-placeholder,.tsf-metaboxes textarea::-moz-placeholder{-moz-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:-ms-input-placeholder,#tsf-inpost-box textarea:-ms-input-placeholder,.tsf-metaboxes input[type=text]:-ms-input-placeholder,.tsf-metaboxes textarea:-ms-input-placeholder{transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:focus::-webkit-input-placeholder,#tsf-inpost-box textarea:focus::-webkit-input-placeholder,.tsf-metaboxes input[type=text]:focus::-webkit-input-placeholder,.tsf-metaboxes textarea:focus::-webkit-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus::-moz-placeholder,#tsf-inpost-box textarea:focus::-moz-placeholder,.tsf-metaboxe textarea:focus::-moz-placeholder,.tsf-metaboxes input[type=text]:focus::-moz-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus:-ms-input-placeholder,#tsf-inpost-box textarea:focus:-ms-input-placeholder,.tsf-metaboxes input[type=text]:focus:-ms-input-placeholder,.tsf-metaboxes textarea:focus:-ms-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}@-webkit-keyframes tsf-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes tsf-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media screen and (max-width:782px){.tsf-inpost-box p.tsf-fields,.tsf-metaboxes p.tsf-fields{line-height:2.8}#tsf-home-title-location label span,#tsf-title-location label span{min-width:40px}.wp-list-table .is-expanded td.tsf-seo-bar-wrap:not(.hidden){overflow:initial!important}.tsf-primary-term-selector input{height:18px;width:18px;min-width:18px}.tsf-primary-term-selector input:checked:before{width:8px;height:8px;margin:4px}}@media screen and (max-width:642px){.tsf-nav-desktop{display:none}}@media screen and (max-width:510px){.tsf-seo-bar.tsf-100{width:inherit}}@-moz-document url-prefix(){#tsf-description-separator label,#tsf-title-separator label{margin:3px 1px}@media only screen and (min-width:768px){.widefat tr td.column-title:nth-child(2):nth-last-child(n+6),.widefat tr td.title:nth-child(2):nth-last-child(n+6),.widefat tr th.column-title:nth-child(2):nth-last-child(n+6),.widefat tr th.title:nth-child(2):nth-last-child(n+6){min-width:1em;width:25%;max-width:100%;white-space:unset}}.tsf-default-selected{box-shadow:0 0 2px 0 #1c9d38}.tsf-warning-selected{box-shadow:0 0 2px 0 #dd3811}}.tsf-flex-hide-if-no-js,body.js .tsf-flex-hide-if-js{display:none}body.js .tsf-flex-hide-if-no-js{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex} diff --git a/lib/css/tsf.css b/lib/css/tsf.css index 9c268938..964cf037 100644 --- a/lib/css/tsf.css +++ b/lib/css/tsf.css @@ -412,7 +412,7 @@ body.no-js .tsf-seo-bar-item { } a.tsf-tooltip-item { - cursor: auto; + cursor: pointer; } .tsf-tooltip { diff --git a/lib/css/tsf.min.css b/lib/css/tsf.min.css index c9f2962f..20abdb6b 100644 --- a/lib/css/tsf.min.css +++ b/lib/css/tsf.min.css @@ -1 +1 @@ -.tsf-notice{position:relative;clear:both}.tsf-notice.tsf-show-icon p:before{content:'';margin-right:12px;background:0 0;display:inline-block;font:400 14px/16px dashicons;speak:none;height:16px;text-align:center;vertical-align:middle;width:16px;line-height:14px;-webkit-font-smoothing:antialiased}.error.tsf-notice.tsf-show-icon p:before{color:#dd3811;content:"\f534"}.notice-warning.tsf-notice.tsf-show-icon p:before{color:#ffa01b;content:"\f227"}.updated.tsf-notice.tsf-show-icon p:before{color:#0cc34b;font-size:16px;content:"\f147"}a.tsf-dismiss{position:absolute;top:0;right:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer;text-decoration:none}a.tsf-dismiss:before{background:0 0;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.tsf-dismiss:hover{color:#c00}table.wp-list-table .column-name{width:15%}table.wp-list-table .column-icl_translations,table.wp-list-table .column-is_in_stock,table.wp-list-table .column-price,table.wp-list-table .column-sku,th.column-tsf-seo-bar-wrap~th{width:8%}.tsf-seo-bar-item{text-decoration:none;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tsf-title-wrap{position:relative;display:block;padding:0;height:auto;width:auto;overflow:hidden}#tsf-title-offset{visibility:hidden;height:0;display:inline-block;position:absolute;left:0;color:transparent;white-space:pre}#tsf-title-placeholder,#tsf-title-placeholder-prefix{position:absolute;color:#777;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;top:0;left:0;overflow:hidden;white-space:pre;text-overflow:ellipsis;will-change:left,right}.tsf-counter-wrap{margin-top:15px}.tsf-counter{font-weight:400;color:#666;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:contents}.tsf-count-bad{color:#dd3811}.tsf-count-okay{color:#ffa700}.tsf-count-good{color:#0cc34b}.tsf-counter-one{color:#fff;border-radius:4em;padding:0 .5em;min-width:2em;display:inline-block;text-align:center;vertical-align:baseline}.tsf-counter-one.tsf-count-bad{background-color:#dd3811}.tsf-counter-one.tsf-count-okay{background-color:#ffa700}.tsf-counter-one.tsf-count-good{background-color:#0cc34b}.tsf-tabs-content .tsf-pixel-counter-wrap{margin-left:1px;max-width:99%}.tsf-pixel-shadow-wrap{position:relative;overflow:hidden;width:0;height:0}.tsf-pixel-counter-wrap{border-bottom:1px solid #ccc;margin-top:12px;margin-bottom:3px}.tsf-pixel-counter-bar{padding-top:7px;display:block;height:3px;width:100%}.tsf-pixel-counter-fluid{display:block;pointer-events:none;height:3px;width:0;max-width:100%;background:#007bd2;box-shadow:0 1px 3px 0 #ccc;-webkit-transition:width .15s cubic-bezier(.4,0,.75,1);-o-transition:width .15s cubic-bezier(.4,0,.75,1);transition:width .15s cubic-bezier(.4,0,.75,1)}.tsf-pixel-counter-overflown .tsf-pixel-counter-fluid{background-color:#dd3811}.tsf-pixel-counter-fit .tsf-pixel-counter-fluid{background-color:#0cc34b}.tsf-description-pixel-counter-shadow,.tsf-title-pixel-counter-shadow{position:absolute;left:0;top:0;z-index:-100;overflow:visible;visibility:hidden;padding:0;margin:0;border:0;display:inline;text-decoration:none;white-space:nowrap;word-wrap:normal;zoom:1;text-overflow:clip;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none;transition:none;font-family:arial,helvetica,sans-serif;font-size:18px;font-weight:400}.tsf-description-pixel-counter-shadow{font-size:13px}#tsf-seo-bar-wrap{width:18%}th:last-of-type#tsf-seo-bar-wrap{width:160px}.tsf-seo-bar{display:block;width:95%;max-width:220px;border-radius:0;padding:3px;text-shadow:0 0 3px rgba(0,0,0,.3)}.tsf-seo-bar.tsf-100{width:100%}.tsf-seo-bar-inner-wrap{display:table;width:100%;border-radius:0;margin:0 auto;border-collapse:separate;border-spacing:0;vertical-align:middle}.tsf-seo-bar-section-wrap{display:table-cell;border-collapse:collapse}.tsf-seo-bar-item{display:table;width:100%;color:#fff;text-align:center;height:100%;min-width:12px;vertical-align:top;line-height:1.625em;box-shadow:2px 0 0 -1px rgba(0,0,0,.1) inset,-2px 0 0 -1px rgba(0,0,0,.1) inset}body.no-js .tsf-seo-bar-item{cursor:default}.tsf-seo-bar.pill,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap{border-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-item{box-shadow:2px 6px 3px -2px rgba(255,255,255,.2) inset,-2px -6px 3px -2px rgba(41,41,41,.2) inset,0 0 1px rgba(41,41,41,.6)}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:first-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:first-of-type .tsf-seo-bar-item{border-top-left-radius:30px;border-bottom-left-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type .tsf-seo-bar-item{border-top-right-radius:30px;border-bottom-right-radius:30px}.tsf-100{width:100%}.tsf-60{width:60%}.tsf-50{width:50%}.tsf-40{width:40%}.tsf-33{width:33.333%}.tsf-25{width:25%}.tsf-20{width:20%}.tsf-16{width:16.666%}.tsf-12-5{width:12.5%}.tsf-11{width:11.333%}.tsf-10{width:10%}.tsf-seo-bar-bad{background-color:#dd3811}.tsf-seo-bar-okay{background-color:#ffa700}.tsf-seo-bar-good{background-color:#0cc34b}.tsf-seo-bar-unknown{background-color:#007bd2}.tsf-tooltip-wrap{position:relative}.tsf-tooltip-item{cursor:help}a.tsf-tooltip-item{cursor:auto}.tsf-tooltip{position:absolute;padding:0;margin:0;bottom:0;left:0;z-index:900142;text-align:left;pointer-events:none;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-tooltip-down{bottom:auto;top:0}.tsf-tooltip-text-wrap{padding:10px 12px;font-size:1em;font-weight:500;line-height:1.625em;border-radius:3px;background:#007bd2;color:#fdfdfd;box-shadow:0 0 2px rgba(0,0,0,.6);text-shadow:none;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:pre-line;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 0 150px;flex:1 0 150px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-is-primary-term,.tsf-nav-tab{font-weight:600}.tsf-tooltip-text span{text-decoration:underline}.tsf-tooltip-text br{display:block;width:100%;content:"\A"}.tsf-ajax:before,.tsf-tooltip-arrow:after,.tsf-tooltip-arrow:before{content:""}.tsf-tooltip-arrow{position:absolute;bottom:-8px;z-index:9999999;left:0;width:0;height:0}.tsf-tooltip-down .tsf-tooltip-arrow{bottom:auto;top:-8px}.tsf-tooltip-arrow:before{border-left:9px solid transparent;border-right:9px solid transparent;border-top:9px solid rgba(0,0,0,.25);position:absolute;bottom:-1px;left:-1px}.tsf-tooltip-arrow:after{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #007bd2;position:absolute;bottom:0;left:0}.tsf-tooltip-down .tsf-tooltip-arrow:before{bottom:auto;top:0;border-top:0;border-bottom:9px solid rgba(0,0,0,.25)}.tsf-tooltip-down .tsf-tooltip-arrow:after{bottom:auto;top:1px;border-top:0;border-bottom:8px solid #007bd2}.tsf-seo-bar-wrap.column-tsf-seo-bar-temp{overflow:initial!important;min-width:160px}#col-container,#col-right{overflow:initial}.tsf-metaboxes{box-sizing:border-box;max-width:690px;padding-bottom:20px}.tsf-top-wrap{width:100%;display:inline-block;vertical-align:top}.tsf-top-wrap>h1,.tsf-top-wrap>h2{float:left}.tsf-metaboxes .metabox-holder{clear:both}.tsf-top-buttons{float:right}.tsf-bottom-buttons{text-align:right}.tsf-metaboxes .tsf-bottom-buttons input,.tsf-metaboxes .tsf-top-buttons input{margin-left:10px}#tsf-description-separator,#tsf-title-separator{display:table;width:100%;border-collapse:collapse;border-spacing:0}#tsf-description-separator input,#tsf-title-separator input{display:none;float:left;width:0;min-width:0;opacity:0}#tsf-description-separator label,#tsf-title-separator label{display:inline-block;width:auto;min-width:28px;min-height:28px;margin:3px;-moz-margin-end:1.5px;-moz-margin-start:1.5px;padding:0 4px;border:1px solid #ccc;line-height:28px;text-align:center;cursor:pointer;box-shadow:-1px -1px 1px #aaa inset;font-size:16px}#tsf-description-separator label.tsf-recommended,#tsf-title-separator label.tsf-recommended{border:1px solid #0cc34b;box-shadow:-1px -1px 1px #0cc34b inset}#tsf-description-separator input:hover+label,#tsf-description-separator label:hover,#tsf-title-separator input:hover+label,#tsf-title-separator label:hover{box-shadow:1px 1px 1px #aaa inset;background-color:#fff}#tsf-description-separator input:checked+label,#tsf-title-separator input:checked+label{box-shadow:1px 1px 1px #333 inset;background-color:#fff}#tsf-home-title-location,#tsf-title-location{display:block}#tsf-home-title-location label span,#tsf-title-location label span,#tsf-twitter-cards label span{display:inline-block;min-width:60px;vertical-align:baseline}#tsf-twitter-cards label span{min-width:150px}#tsf-home-title-location label .tsf-sep-js,#tsf-home-title-location label span.tsf-custom-blogname-js,#tsf-home-title-location label span.tsf-custom-tagline-js,#tsf-home-title-location label span.tsf-custom-title-js,#tsf-title-location label .tsf-sep-js{display:inline;min-width:0;white-space:pre}.tsf-nav-tab-wrapper,.tsf-tab-no-js{position:relative;clear:both;width:100%;display:inline-block;border-bottom:1px solid #ccc;line-height:inherit;padding:8px 12px 0;margin:-4px -12px}.tsf-nav-tab{float:left;border:1px solid #ccc;margin-left:.5em;margin-bottom:-1px;padding:5px 14px;font-size:12px;line-height:16px;background:#f1f1f1;color:#555}.tsf-dashicons-tabs{font-size:initial;display:inline;vertical-align:text-bottom}input.tsf-tabs-radio{display:none;width:0;height:0;position:absolute;left:-9001px}.tsf-active-tab,.tsf-tabs-radio:checked+label{background-color:inherit;border-bottom-color:#fff;color:#000}.tsf-tabs-content{margin:1.33em auto 0}.tsf-content-no-js{margin:1.33em auto}body.js .tsf-tabs-content{display:none}body.js .tsf-tabs-content.tsf-active-tab-content{display:block}#tsf-inpost-box .inside,.tsf-flex{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:flex-start;justify-content:flex-start}#tsf-inpost-box.closed .inside,body.js .tsf-flex-tab-content{display:none}#tsf-inpost-box .inside{margin:0;padding:0;-webkit-flex:1 0 100%;flex:1 0 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tsf-flex-inside-wrap{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto}.tsf-flex-setting{width:100%;-webkit-flex-direction:row;flex-direction:row}.tsf-flex-setting-input,.tsf-flex-setting-label{background-color:#fff;padding:15px 12px;-webkit-flex:10 1 350px;flex:10 1 350px;box-shadow:0 0 0 1px #e9e9e9}.tsf-flex-setting-label{background-color:#f9f9f9;-webkit-flex:1 1 200px;flex:1 1 200px}.tsf-flex-setting-input{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-grow:0;flex-grow:0}.tsf-flex-setting-label-inner-wrap{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item>*{margin-right:4px}.tsf-flex-setting-label-item>:last-child{margin-right:0}.tsf-social-image-buttons{margin-top:15px;margin-left:1px}.tsf-flex-setting-input textarea{max-height:250px}input[type=radio].tsf-flex-nav-tab-radio{display:none;width:0;height:0;margin:0;padding:0;position:absolute;left:-9001px}.tsf-flex-nav-tab-wrapper{background-color:#fcfcfc;border-bottom:2px solid #dadada;-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 100%;flex:1 1 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%}.tsf-flex-nav-tab-inner{-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex:1 0 auto;flex:1 0 auto}.tsf-flex-nav-tab{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto;max-width:125px}.tsf-flex-nav-tab-label{padding:12px;text-align:center;-webkit-flex-direction:row;flex-direction:row;box-shadow:0 0 0 0 transparent inset;-webkit-transition:box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out;transition:box-shadow .15s ease-out;-webkit-align-items:center;align-items:center;-webkit-align-content:space-around;align-content:space-around}.tsf-flex-nav-dashicon,.tsf-flex-nav-name{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.tsf-flex-nav-tab .tsf-flex-nav-tab-radio:checked+.tsf-flex-nav-tab-label{box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-transition:box-shadow .25s ease-in;-o-transition:box-shadow .25s ease-in;transition:box-shadow .25s ease-in}.tsf-flex-tab-content{-webkit-flex:1 0 100%;flex:1 0 100%;max-width:100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}body.js .tsf-flex-tab-content.tsf-flex-tab-content-active{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tsf-flex-tabs-content-no-js{background-color:#f3f3f3;border-bottom:1px solid #dadada;box-shadow:0 2px 0 0 #dadada inset}.tsf-flex-tab-no-js{-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;flex:1 1 100%}.tsf-flex-tab-no-js .tsf-flex-nav-tab{padding:12px;min-width:125px;box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:0 1 auto;flex:0 1 auto}#tsf-inpost-box .hndle .tsf-tooltip-wrap a{font-size:14px;line-height:1em}.tsf-primary-term-selector{margin:0;padding:0;float:right;line-height:inherit;display:inline-block}.tsf-primary-term-selector input{vertical-align:middle;height:14px;width:14px;min-width:14px;line-height:inherit;margin:0;padding:0;pointer-events:none}.tsf-primary-term-selector input:checked:before{width:6px;height:6px;margin:3px;line-height:inherit}.tsf-primary-term-selector-help-wrap{position:absolute;top:0;right:25px}input.tsf-default-selected{border-color:#1c9d38}input.tsf-default-selected:checked:before{color:#1c9d38}input.tsf-warning-selected{border-color:#dd3811}input.tsf-warning-selected:checked:before{color:#dd3811}label.tsf-disabled{color:#999}input.tsf-disabled,label.tsf-disabled{cursor:default}.tsf-fields{font-size:13px;line-height:1.5;margin:1em 0}.tsf-fields .tsf-toblock{display:block;width:100%;margin-bottom:4px}.tsf-fields p.description{margin:7px 0 5px;color:#666}.tsf-option-spacer{margin:1em 0}.tsf-checkbox-wrapper{margin-top:15px}.tsf-checkbox-wrapper:first-child{margin-top:0}.tsf-metaboxes legend h4{margin:2px 0}.tsf-metaboxes legend p:last-of-type{margin-bottom:0}.tsf-counter .tsf-ajax{margin-left:3px}.tsf-ajax:before{display:inline-block;line-height:1;font-family:dashicons;font-style:normal;font-weight:400;font-size:1.225em;vertical-align:middle}.tsf-ajax.tsf-loading:before{content:"\f463";color:#007bd2;-webkit-animation:tsf-spin 1.5s linear infinite;-moz-animation:tsf-spin 1.5s linear infinite;-o-animation:tsf-spin 1.5s linear infinite;animation:tsf-spin 1.5s linear infinite}.tsf-ajax.tsf-error:before{content:"\f158";color:#dd3811}.tsf-ajax.tsf-success:before{content:"\f147";color:#0cc34b}a.tsf-set-social-image.button{margin-right:7px}#tsf-inpost-box input[type=text]::-webkit-input-placeholder,#tsf-inpost-box textarea::-webkit-input-placeholder,.tsf-metaboxes input[type=text]::-webkit-input-placeholder,.tsf-metaboxes textarea::-webkit-input-placeholder{-webkit-transition:color .33s ease-in,text-shadow .33s ease-in;-o-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]::-moz-placeholder,#tsf-inpost-box textarea::-moz-placeholder,.tsf-metaboxes input[type=text]::-moz-placeholder,.tsf-metaboxes textarea::-moz-placeholder{-moz-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:-ms-input-placeholder,#tsf-inpost-box textarea:-ms-input-placeholder,.tsf-metaboxes input[type=text]:-ms-input-placeholder,.tsf-metaboxes textarea:-ms-input-placeholder{transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:focus::-webkit-input-placeholder,#tsf-inpost-box textarea:focus::-webkit-input-placeholder,.tsf-metaboxes input[type=text]:focus::-webkit-input-placeholder,.tsf-metaboxes textarea:focus::-webkit-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus::-moz-placeholder,#tsf-inpost-box textarea:focus::-moz-placeholder,.tsf-metaboxe textarea:focus::-moz-placeholder,.tsf-metaboxes input[type=text]:focus::-moz-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus:-ms-input-placeholder,#tsf-inpost-box textarea:focus:-ms-input-placeholder,.tsf-metaboxes input[type=text]:focus:-ms-input-placeholder,.tsf-metaboxes textarea:focus:-ms-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}@-webkit-keyframes tsf-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes tsf-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media screen and (max-width:782px){.tsf-inpost-box p.tsf-fields,.tsf-metaboxes p.tsf-fields{line-height:2.8}#tsf-home-title-location label span,#tsf-title-location label span{min-width:40px}.wp-list-table .is-expanded td.tsf-seo-bar-wrap:not(.hidden){overflow:initial!important}.tsf-primary-term-selector input{height:18px;width:18px;min-width:18px}.tsf-primary-term-selector input:checked:before{width:8px;height:8px;margin:4px}}@media screen and (max-width:642px){.tsf-nav-desktop{display:none}}@media screen and (max-width:510px){.tsf-seo-bar.tsf-100{width:inherit}}@-moz-document url-prefix(){#tsf-description-separator label,#tsf-title-separator label{margin:3px 1px}@media only screen and (min-width:768px){.widefat tr td.column-title:nth-child(2):nth-last-child(n+6),.widefat tr td.title:nth-child(2):nth-last-child(n+6),.widefat tr th.column-title:nth-child(2):nth-last-child(n+6),.widefat tr th.title:nth-child(2):nth-last-child(n+6){min-width:1em;width:25%;max-width:100%;white-space:unset}}.tsf-default-selected{box-shadow:0 0 2px 0 #1c9d38}.tsf-warning-selected{box-shadow:0 0 2px 0 #dd3811}}.tsf-flex-hide-if-no-js,body.js .tsf-flex-hide-if-js{display:none}body.js .tsf-flex-hide-if-no-js{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex} +.tsf-notice{position:relative;clear:both}.tsf-notice.tsf-show-icon p:before{content:'';margin-right:12px;background:0 0;display:inline-block;font:400 14px/16px dashicons;speak:none;height:16px;text-align:center;vertical-align:middle;width:16px;line-height:14px;-webkit-font-smoothing:antialiased}.error.tsf-notice.tsf-show-icon p:before{color:#dd3811;content:"\f534"}.notice-warning.tsf-notice.tsf-show-icon p:before{color:#ffa01b;content:"\f227"}.updated.tsf-notice.tsf-show-icon p:before{color:#0cc34b;font-size:16px;content:"\f147"}a.tsf-dismiss{position:absolute;top:0;right:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer;text-decoration:none}a.tsf-dismiss:before{background:0 0;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.tsf-dismiss:hover{color:#c00}table.wp-list-table .column-name{width:15%}table.wp-list-table .column-icl_translations,table.wp-list-table .column-is_in_stock,table.wp-list-table .column-price,table.wp-list-table .column-sku,th.column-tsf-seo-bar-wrap~th{width:8%}.tsf-seo-bar-item{text-decoration:none;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tsf-title-wrap{position:relative;display:block;padding:0;height:auto;width:auto;overflow:hidden}#tsf-title-offset{visibility:hidden;height:0;display:inline-block;position:absolute;left:0;color:transparent;white-space:pre}#tsf-title-placeholder,#tsf-title-placeholder-prefix{position:absolute;color:#777;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;top:0;left:0;overflow:hidden;white-space:pre;text-overflow:ellipsis;will-change:left,right}.tsf-counter-wrap{margin-top:15px}.tsf-counter{font-weight:400;color:#666;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:contents}.tsf-count-bad{color:#dd3811}.tsf-count-okay{color:#ffa700}.tsf-count-good{color:#0cc34b}.tsf-counter-one{color:#fff;border-radius:4em;padding:0 .5em;min-width:2em;display:inline-block;text-align:center;vertical-align:baseline}.tsf-counter-one.tsf-count-bad{background-color:#dd3811}.tsf-counter-one.tsf-count-okay{background-color:#ffa700}.tsf-counter-one.tsf-count-good{background-color:#0cc34b}.tsf-tabs-content .tsf-pixel-counter-wrap{margin-left:1px;max-width:99%}.tsf-pixel-shadow-wrap{position:relative;overflow:hidden;width:0;height:0}.tsf-pixel-counter-wrap{border-bottom:1px solid #ccc;margin-top:12px;margin-bottom:3px}.tsf-pixel-counter-bar{padding-top:7px;display:block;height:3px;width:100%}.tsf-pixel-counter-fluid{display:block;pointer-events:none;height:3px;width:0;max-width:100%;background:#007bd2;box-shadow:0 1px 3px 0 #ccc;-webkit-transition:width .15s cubic-bezier(.4,0,.75,1);-o-transition:width .15s cubic-bezier(.4,0,.75,1);transition:width .15s cubic-bezier(.4,0,.75,1)}.tsf-pixel-counter-overflown .tsf-pixel-counter-fluid{background-color:#dd3811}.tsf-pixel-counter-fit .tsf-pixel-counter-fluid{background-color:#0cc34b}.tsf-description-pixel-counter-shadow,.tsf-title-pixel-counter-shadow{position:absolute;left:0;top:0;z-index:-100;overflow:visible;visibility:hidden;padding:0;margin:0;border:0;display:inline;text-decoration:none;white-space:nowrap;word-wrap:normal;zoom:1;text-overflow:clip;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none;transition:none;font-family:arial,helvetica,sans-serif;font-size:18px;font-weight:400}.tsf-description-pixel-counter-shadow{font-size:13px}#tsf-seo-bar-wrap{width:18%}th:last-of-type#tsf-seo-bar-wrap{width:160px}.tsf-seo-bar{display:block;width:95%;max-width:220px;border-radius:0;padding:3px;text-shadow:0 0 3px rgba(0,0,0,.3)}.tsf-seo-bar.tsf-100{width:100%}.tsf-seo-bar-inner-wrap{display:table;width:100%;border-radius:0;margin:0 auto;border-collapse:separate;border-spacing:0;vertical-align:middle}.tsf-seo-bar-section-wrap{display:table-cell;border-collapse:collapse}.tsf-seo-bar-item{display:table;width:100%;color:#fff;text-align:center;height:100%;min-width:12px;vertical-align:top;line-height:1.625em;box-shadow:2px 0 0 -1px rgba(0,0,0,.1) inset,-2px 0 0 -1px rgba(0,0,0,.1) inset}body.no-js .tsf-seo-bar-item{cursor:default}.tsf-seo-bar.pill,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap{border-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-item{box-shadow:2px 6px 3px -2px rgba(255,255,255,.2) inset,-2px -6px 3px -2px rgba(41,41,41,.2) inset,0 0 1px rgba(41,41,41,.6)}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:first-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:first-of-type .tsf-seo-bar-item{border-top-left-radius:30px;border-bottom-left-radius:30px}.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type,.tsf-seo-bar.pill .tsf-seo-bar-inner-wrap .tsf-seo-bar-section-wrap:last-of-type .tsf-seo-bar-item{border-top-right-radius:30px;border-bottom-right-radius:30px}.tsf-100{width:100%}.tsf-60{width:60%}.tsf-50{width:50%}.tsf-40{width:40%}.tsf-33{width:33.333%}.tsf-25{width:25%}.tsf-20{width:20%}.tsf-16{width:16.666%}.tsf-12-5{width:12.5%}.tsf-11{width:11.333%}.tsf-10{width:10%}.tsf-seo-bar-bad{background-color:#dd3811}.tsf-seo-bar-okay{background-color:#ffa700}.tsf-seo-bar-good{background-color:#0cc34b}.tsf-seo-bar-unknown{background-color:#007bd2}.tsf-tooltip-wrap{position:relative}.tsf-tooltip-item{cursor:help}a.tsf-tooltip-item{cursor:pointer}.tsf-tooltip{position:absolute;padding:0;margin:0;bottom:0;left:0;z-index:900142;text-align:left;pointer-events:none;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-tooltip-down{bottom:auto;top:0}.tsf-tooltip-text-wrap{padding:10px 12px;font-size:1em;font-weight:500;line-height:1.625em;border-radius:3px;background:#007bd2;color:#fdfdfd;box-shadow:0 0 2px rgba(0,0,0,.6);text-shadow:none;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:pre-line;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 0 150px;flex:1 0 150px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start}.tsf-is-primary-term,.tsf-nav-tab{font-weight:600}.tsf-tooltip-text span{text-decoration:underline}.tsf-tooltip-text br{display:block;width:100%;content:"\A"}.tsf-ajax:before,.tsf-tooltip-arrow:after,.tsf-tooltip-arrow:before{content:""}.tsf-tooltip-arrow{position:absolute;bottom:-8px;z-index:9999999;left:0;width:0;height:0}.tsf-tooltip-down .tsf-tooltip-arrow{bottom:auto;top:-8px}.tsf-tooltip-arrow:before{border-left:9px solid transparent;border-right:9px solid transparent;border-top:9px solid rgba(0,0,0,.25);position:absolute;bottom:-1px;left:-1px}.tsf-tooltip-arrow:after{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #007bd2;position:absolute;bottom:0;left:0}.tsf-tooltip-down .tsf-tooltip-arrow:before{bottom:auto;top:0;border-top:0;border-bottom:9px solid rgba(0,0,0,.25)}.tsf-tooltip-down .tsf-tooltip-arrow:after{bottom:auto;top:1px;border-top:0;border-bottom:8px solid #007bd2}.tsf-seo-bar-wrap.column-tsf-seo-bar-temp{overflow:initial!important;min-width:160px}#col-container,#col-right{overflow:initial}.tsf-metaboxes{box-sizing:border-box;max-width:690px;padding-bottom:20px}.tsf-top-wrap{width:100%;display:inline-block;vertical-align:top}.tsf-top-wrap>h1,.tsf-top-wrap>h2{float:left}.tsf-metaboxes .metabox-holder{clear:both}.tsf-top-buttons{float:right}.tsf-bottom-buttons{text-align:right}.tsf-metaboxes .tsf-bottom-buttons input,.tsf-metaboxes .tsf-top-buttons input{margin-left:10px}#tsf-description-separator,#tsf-title-separator{display:table;width:100%;border-collapse:collapse;border-spacing:0}#tsf-description-separator input,#tsf-title-separator input{display:none;float:left;width:0;min-width:0;opacity:0}#tsf-description-separator label,#tsf-title-separator label{display:inline-block;width:auto;min-width:28px;min-height:28px;margin:3px;-moz-margin-end:1.5px;-moz-margin-start:1.5px;padding:0 4px;border:1px solid #ccc;line-height:28px;text-align:center;cursor:pointer;box-shadow:-1px -1px 1px #aaa inset;font-size:16px}#tsf-description-separator label.tsf-recommended,#tsf-title-separator label.tsf-recommended{border:1px solid #0cc34b;box-shadow:-1px -1px 1px #0cc34b inset}#tsf-description-separator input:hover+label,#tsf-description-separator label:hover,#tsf-title-separator input:hover+label,#tsf-title-separator label:hover{box-shadow:1px 1px 1px #aaa inset;background-color:#fff}#tsf-description-separator input:checked+label,#tsf-title-separator input:checked+label{box-shadow:1px 1px 1px #333 inset;background-color:#fff}#tsf-home-title-location,#tsf-title-location{display:block}#tsf-home-title-location label span,#tsf-title-location label span,#tsf-twitter-cards label span{display:inline-block;min-width:60px;vertical-align:baseline}#tsf-twitter-cards label span{min-width:150px}#tsf-home-title-location label .tsf-sep-js,#tsf-home-title-location label span.tsf-custom-blogname-js,#tsf-home-title-location label span.tsf-custom-tagline-js,#tsf-home-title-location label span.tsf-custom-title-js,#tsf-title-location label .tsf-sep-js{display:inline;min-width:0;white-space:pre}.tsf-nav-tab-wrapper,.tsf-tab-no-js{position:relative;clear:both;width:100%;display:inline-block;border-bottom:1px solid #ccc;line-height:inherit;padding:8px 12px 0;margin:-4px -12px}.tsf-nav-tab{float:left;border:1px solid #ccc;margin-left:.5em;margin-bottom:-1px;padding:5px 14px;font-size:12px;line-height:16px;background:#f1f1f1;color:#555}.tsf-dashicons-tabs{font-size:initial;display:inline;vertical-align:text-bottom}input.tsf-tabs-radio{display:none;width:0;height:0;position:absolute;left:-9001px}.tsf-active-tab,.tsf-tabs-radio:checked+label{background-color:inherit;border-bottom-color:#fff;color:#000}.tsf-tabs-content{margin:1.33em auto 0}.tsf-content-no-js{margin:1.33em auto}body.js .tsf-tabs-content{display:none}body.js .tsf-tabs-content.tsf-active-tab-content{display:block}#tsf-inpost-box .inside,.tsf-flex{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 auto;flex:1 1 auto;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:flex-start;justify-content:flex-start}#tsf-inpost-box.closed .inside,body.js .tsf-flex-tab-content{display:none}#tsf-inpost-box .inside{margin:0;padding:0;-webkit-flex:1 0 100%;flex:1 0 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tsf-flex-inside-wrap{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto}.tsf-flex-setting{width:100%;-webkit-flex-direction:row;flex-direction:row}.tsf-flex-setting-input,.tsf-flex-setting-label{background-color:#fff;padding:15px 12px;-webkit-flex:10 1 350px;flex:10 1 350px;box-shadow:0 0 0 1px #e9e9e9}.tsf-flex-setting-label{background-color:#f9f9f9;-webkit-flex:1 1 200px;flex:1 1 200px}.tsf-flex-setting-input{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-grow:0;flex-grow:0}.tsf-flex-setting-label-inner-wrap{-webkit-justify-content:center;justify-content:center}.tsf-flex-setting-label-item>*{margin-right:4px}.tsf-flex-setting-label-item>:last-child{margin-right:0}.tsf-social-image-buttons{margin-top:15px;margin-left:1px}.tsf-flex-setting-input textarea{max-height:250px}input[type=radio].tsf-flex-nav-tab-radio{display:none;width:0;height:0;margin:0;padding:0;position:absolute;left:-9001px}.tsf-flex-nav-tab-wrapper{background-color:#fcfcfc;border-bottom:2px solid #dadada;-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 100%;flex:1 1 100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%}.tsf-flex-nav-tab-inner{-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex:1 0 auto;flex:1 0 auto}.tsf-flex-nav-tab{-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1 1 auto;flex:1 1 auto;max-width:125px}.tsf-flex-nav-tab-label{padding:12px;text-align:center;-webkit-flex-direction:row;flex-direction:row;box-shadow:0 0 0 0 transparent inset;-webkit-transition:box-shadow .15s ease-out;-o-transition:box-shadow .15s ease-out;transition:box-shadow .15s ease-out;-webkit-align-items:center;align-items:center;-webkit-align-content:space-around;align-content:space-around}.tsf-flex-nav-dashicon,.tsf-flex-nav-name{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.tsf-flex-nav-tab .tsf-flex-nav-tab-radio:checked+.tsf-flex-nav-tab-label{box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-transition:box-shadow .25s ease-in;-o-transition:box-shadow .25s ease-in;transition:box-shadow .25s ease-in}.tsf-flex-tab-content{-webkit-flex:1 0 100%;flex:1 0 100%;max-width:100%;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}body.js .tsf-flex-tab-content.tsf-flex-tab-content-active{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tsf-flex-tabs-content-no-js{background-color:#f3f3f3;border-bottom:1px solid #dadada;box-shadow:0 2px 0 0 #dadada inset}.tsf-flex-tab-no-js{-webkit-align-items:baseline;align-items:baseline;-webkit-flex-direction:row;flex-direction:row;flex:1 1 100%}.tsf-flex-tab-no-js .tsf-flex-nav-tab{padding:12px;min-width:125px;box-shadow:0 -2px 0 0 #007bd2 inset;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:0 1 auto;flex:0 1 auto}#tsf-inpost-box .hndle .tsf-tooltip-wrap a{font-size:14px;line-height:1em}.tsf-primary-term-selector{margin:0;padding:0;float:right;line-height:inherit;display:inline-block}.tsf-primary-term-selector input{vertical-align:middle;height:14px;width:14px;min-width:14px;line-height:inherit;margin:0;padding:0;pointer-events:none}.tsf-primary-term-selector input:checked:before{width:6px;height:6px;margin:3px;line-height:inherit}.tsf-primary-term-selector-help-wrap{position:absolute;top:0;right:25px}input.tsf-default-selected{border-color:#1c9d38}input.tsf-default-selected:checked:before{color:#1c9d38}input.tsf-warning-selected{border-color:#dd3811}input.tsf-warning-selected:checked:before{color:#dd3811}label.tsf-disabled{color:#999}input.tsf-disabled,label.tsf-disabled{cursor:default}.tsf-fields{font-size:13px;line-height:1.5;margin:1em 0}.tsf-fields .tsf-toblock{display:block;width:100%;margin-bottom:4px}.tsf-fields p.description{margin:7px 0 5px;color:#666}.tsf-option-spacer{margin:1em 0}.tsf-checkbox-wrapper{margin-top:15px}.tsf-checkbox-wrapper:first-child{margin-top:0}.tsf-metaboxes legend h4{margin:2px 0}.tsf-metaboxes legend p:last-of-type{margin-bottom:0}.tsf-counter .tsf-ajax{margin-left:3px}.tsf-ajax:before{display:inline-block;line-height:1;font-family:dashicons;font-style:normal;font-weight:400;font-size:1.225em;vertical-align:middle}.tsf-ajax.tsf-loading:before{content:"\f463";color:#007bd2;-webkit-animation:tsf-spin 1.5s linear infinite;-moz-animation:tsf-spin 1.5s linear infinite;-o-animation:tsf-spin 1.5s linear infinite;animation:tsf-spin 1.5s linear infinite}.tsf-ajax.tsf-error:before{content:"\f158";color:#dd3811}.tsf-ajax.tsf-success:before{content:"\f147";color:#0cc34b}a.tsf-set-social-image.button{margin-right:7px}#tsf-inpost-box input[type=text]::-webkit-input-placeholder,#tsf-inpost-box textarea::-webkit-input-placeholder,.tsf-metaboxes input[type=text]::-webkit-input-placeholder,.tsf-metaboxes textarea::-webkit-input-placeholder{-webkit-transition:color .33s ease-in,text-shadow .33s ease-in;-o-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]::-moz-placeholder,#tsf-inpost-box textarea::-moz-placeholder,.tsf-metaboxes input[type=text]::-moz-placeholder,.tsf-metaboxes textarea::-moz-placeholder{-moz-transition:color .33s ease-in,text-shadow .33s ease-in;transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:-ms-input-placeholder,#tsf-inpost-box textarea:-ms-input-placeholder,.tsf-metaboxes input[type=text]:-ms-input-placeholder,.tsf-metaboxes textarea:-ms-input-placeholder{transition:color .33s ease-in,text-shadow .33s ease-in}#tsf-inpost-box input[type=text]:focus::-webkit-input-placeholder,#tsf-inpost-box textarea:focus::-webkit-input-placeholder,.tsf-metaboxes input[type=text]:focus::-webkit-input-placeholder,.tsf-metaboxes textarea:focus::-webkit-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus::-moz-placeholder,#tsf-inpost-box textarea:focus::-moz-placeholder,.tsf-metaboxe textarea:focus::-moz-placeholder,.tsf-metaboxes input[type=text]:focus::-moz-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}#tsf-inpost-box input[type=text]:focus:-ms-input-placeholder,#tsf-inpost-box textarea:focus:-ms-input-placeholder,.tsf-metaboxes input[type=text]:focus:-ms-input-placeholder,.tsf-metaboxes textarea:focus:-ms-input-placeholder{color:transparent;text-shadow:0 0 1px rgba(114,119,124,.75)}@-webkit-keyframes tsf-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes tsf-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media screen and (max-width:782px){.tsf-inpost-box p.tsf-fields,.tsf-metaboxes p.tsf-fields{line-height:2.8}#tsf-home-title-location label span,#tsf-title-location label span{min-width:40px}.wp-list-table .is-expanded td.tsf-seo-bar-wrap:not(.hidden){overflow:initial!important}.tsf-primary-term-selector input{height:18px;width:18px;min-width:18px}.tsf-primary-term-selector input:checked:before{width:8px;height:8px;margin:4px}}@media screen and (max-width:642px){.tsf-nav-desktop{display:none}}@media screen and (max-width:510px){.tsf-seo-bar.tsf-100{width:inherit}}@-moz-document url-prefix(){#tsf-description-separator label,#tsf-title-separator label{margin:3px 1px}@media only screen and (min-width:768px){.widefat tr td.column-title:nth-child(2):nth-last-child(n+6),.widefat tr td.title:nth-child(2):nth-last-child(n+6),.widefat tr th.column-title:nth-child(2):nth-last-child(n+6),.widefat tr th.title:nth-child(2):nth-last-child(n+6){min-width:1em;width:25%;max-width:100%;white-space:unset}}.tsf-default-selected{box-shadow:0 0 2px 0 #1c9d38}.tsf-warning-selected{box-shadow:0 0 2px 0 #dd3811}}.tsf-flex-hide-if-no-js,body.js .tsf-flex-hide-if-js{display:none}body.js .tsf-flex-hide-if-no-js{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex} diff --git a/lib/js/tsf.js b/lib/js/tsf.js index 30434ff1..2ff3494d 100644 --- a/lib/js/tsf.js +++ b/lib/js/tsf.js @@ -165,7 +165,7 @@ window.tsf = { if ( ! str.length ) return ''; - var map = { + let map = { '&': '&', '<': '<', '>': '>', @@ -173,11 +173,46 @@ window.tsf = { "'": ''' }; - return str.replace( /[&<>"']/g, function( m ) { + return str.replace( /[&<>"']/g, m => { return map[ m ]; } ); }, + /** + * Undoes what tsf.escapeString has done. + * + * @since 3.0.4 + * + * @function + * @param {string} str The escaped str via tsf.escapeString + * @return {string} + */ + unescapeString: function( str ) { + + if ( ! str.length ) + return ''; + + let map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + let regex = new RegExp( + Object.values( map ).map( v => { + return v.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' ); + } ).join('|'), + 'g' + ); + + return str.replace( regex, m => { + return Object.keys( map ).find( k => { + return map[ k ] === m; + } ); + } ); + }, + /** * Gets string length. * We do not trim whitespace in JavaScript; that should be self-taught by the user. @@ -607,27 +642,59 @@ window.tsf = { ie11killswitch = false; }, 0 ); } + const setReferenceTitle = function( event ) { + let reference = document.getElementById( 'tsf-title-reference' ), + text = ''; + + if ( ! reference ) return; + + if ( event.target.value.length < 1 ) { + text = event.target.placeholder; + } else { + //= We must determine the position as trailing whitespace is rendered 0. + text = event.target.value; + + if ( hoverPrefixValue.length ) { + switch ( hoverPrefixPlacement ) { + case 'before' : + text = hoverPrefixValue + text; + break; + + case 'after' : + text = text + hoverPrefixValue; + break; + } + } + if ( hoverAdditionsValue.length ) { + switch ( hoverAdditionsPlacement ) { + case 'before' : + text = hoverAdditionsValue + text; + break; + + case 'after' : + text = text + hoverAdditionsValue; + break; + } + } + } + + reference.innerHTML = tsf.escapeString( text ); + // Fires change event. Defered. + setTimeout( () => { jQuery( reference ).change() }, 0 ); + } const updateCounter = function( event ) { - let counter = document.getElementById( event.target.id + '_chars' ); + let counter = document.getElementById( event.target.id + '_chars' ), + reference = document.getElementById( 'tsf-title-reference' ); - if ( ! counter ) - return; + if ( ! counter || ! reference ) return; - let titLen = 0, + let titLen = tsf.getStringLength( tsf.unescapeString( reference.innerHTML ) ), target = event.target, counterClass = '', counterType = tsf.counterType, counterName = '', output = ''; - if ( target.value.length < 1 ) { - titLen = tsf.getStringLength( target.placeholder ); - } else { - titLen = ( hoverPrefixValue ? tsf.getStringLength( hoverPrefixValue ) : 0 ) - + tsf.getStringLength( target.value ) - + ( hoverAdditionsValue ? tsf.getStringLength( hoverAdditionsValue ) : 0 ); - } - if ( titLen < 25 || titLen >= 75 ) { counterClass += 'tsf-count-bad'; counterName = tsf.i18n.bad; @@ -656,46 +723,15 @@ window.tsf = { counter.className = counterClass; } const updatePixels = function( event ) { - let pixels = document.getElementById( event.target.id + '_pixels' ); + let pixels = document.getElementById( event.target.id + '_pixels' ), + reference = document.getElementById( 'tsf-title-reference' ); - if ( ! pixels ) + if ( ! pixels || ! reference ) return; - let text = ''; - - if ( event.target.value.length < 1 ) { - text = event.target.placeholder; - } else { - //= We must determine the position as trailing whitespace is rendered 0. - text = event.target.value; - - if ( hoverPrefixValue.length ) { - switch ( hoverPrefixPlacement ) { - case 'before' : - text = hoverPrefixValue + text; - break; - - case 'after' : - text = text + hoverPrefixValue; - break; - } - } - if ( hoverAdditionsValue.length ) { - switch ( hoverAdditionsPlacement ) { - case 'before' : - text = hoverAdditionsValue + text; - break; - - case 'after' : - text = text + hoverAdditionsValue; - break; - } - } - } - let test = { 'e': pixels, - 'text' : text, + 'text' : tsf.unescapeString( reference.innerHTML ), 'guideline' : tsf.params.titlePixelGuideline, }; @@ -713,6 +749,7 @@ window.tsf = { if ( ie11killswitch ) return false; updateHoverPlacement( event ); updatePlaceholder(); + setReferenceTitle( event ); updateCounter( event ); updatePixels( event ); } @@ -726,6 +763,7 @@ window.tsf = { * @return {undefined} */ const updateCounterTrigger = function( event ) { + setReferenceTitle( event ); updateCounter( event ); updatePixels( event ); } @@ -893,9 +931,7 @@ window.tsf = { */ const enqueueUnregisteredInputTrigger = function() { clearTimeout( unregisteredTriggerBuffer ); - unregisteredTriggerBuffer = setTimeout( function() { - triggerUnregisteredInput(); - }, 50 ); + unregisteredTriggerBuffer = setTimeout( triggerUnregisteredInput, 50 ); } //= Defer to prevent early trigger. jQuery( window ).one( 'tsf-ready', function() { @@ -1190,6 +1226,9 @@ window.tsf = { /** * Updates used separator and all examples thereof. * + * @since 3.0.4 : 1. Threshold "too long" has been increased from 155 to 300. + * 2. Threshold "far too long" has been increased to 330 from 175. + * * @function * @param {!jQuery.Event} event * @return {undefined} @@ -1214,10 +1253,10 @@ window.tsf = { descLen = tsf.getStringLength( target.value ); } - if ( descLen < 100 || descLen >= 175 ) { + if ( descLen < 100 || descLen >= 330 ) { counterClass += 'tsf-count-bad'; counterName = tsf.i18n.bad; - } else if ( descLen < 137 || descLen > 155 ) { + } else if ( descLen < 137 || descLen > 300 ) { counterClass += 'tsf-count-okay'; counterName = tsf.i18n.okay; } else { @@ -1241,13 +1280,11 @@ window.tsf = { if ( counter.className !== counterClass ) counter.className = counterClass; } - const updatePixels = function( event ) { - let element = document.getElementById( event.target.id + '_pixels' ); - - if ( ! element ) - return; + const setReferenceDescription = function( event ) { + let reference = document.getElementById( 'tsf-description-reference' ), + text = ''; - let text = ''; + if ( ! reference ) return; if ( event.target.value.length < 1 ) { text = event.target.placeholder; @@ -1255,9 +1292,20 @@ window.tsf = { text = event.target.value; } + reference.innerHTML = tsf.escapeString( text ); + // Fires change event. Defered. + setTimeout( () => { jQuery( reference ).change() }, 0 ); + } + const updatePixels = function( event ) { + let pixels = document.getElementById( event.target.id + '_pixels' ), + reference = document.getElementById( 'tsf-description-reference' ); + + if ( ! pixels || ! reference ) + return; + let test = { - 'e': element, - 'text' : text, + 'e': pixels, + 'text' : tsf.unescapeString( reference.innerHTML ), 'guideline' : tsf.params.descPixelGuideline } @@ -1272,6 +1320,7 @@ window.tsf = { * @return {undefined} */ const updateDescriptionsTrigger = function( event ) { + setReferenceDescription( event ); updateCounter( event ); updatePixels( event ); } @@ -1334,6 +1383,194 @@ window.tsf = { jQuery( document ).on( 'postbox-toggled', triggerPostboxSynchronousUnregisteredInput ); }, + /** + * Initializes social titles. + * + * @since 3.0.4 + * + * @function + * @return {undefined} + */ + _initSocialTitleInputs: function() { + + if ( ! tsf.hasInput ) + return; + + let $ogTitle = jQuery( "#autodescription_og_title" ), + $twTitle = jQuery( "#autodescription_twitter_title" ), + $reference = jQuery( "#tsf-title-reference" ); + + if ( ! $ogTitle.length || ! $twTitle.length || ! $reference.length ) + return; + + let ogTitleValue = tsf.escapeString( $ogTitle.val() ), + twTitleValue = tsf.escapeString( $twTitle.val() ), + referenceValue = $reference.text(); // already escaped. + + const getActiveValue = ( what ) => { + let val = ''; + switch ( what ) { + case 'twitter' : + val = twTitleValue; + // get next if not set. + case 'og' : + val = val.length ? val : ogTitleValue; + // get next if not set. + case 'reference' : + val = val.length ? val : referenceValue; + } + return val; + }; + const setPlaceholders = () => { + $ogTitle.attr( 'placeholder', getActiveValue( 'reference' ) ); + $twTitle.attr( 'placeholder', getActiveValue( 'og' ) ); + }; + const updateCounter = ( target, value, threshold ) => { + if ( ! target || ! value || ! threshold ) { + $ogTitle.each( ( i, el ) => updateCounter( el, getActiveValue( 'og' ), 88 ) ); + $twTitle.each( ( i, el ) => updateCounter( el, getActiveValue( 'twitter' ), 70 ) ); + } else { + tsf.updateSocialCounter( target, value, threshold ); + } + }; + $reference.on( 'change', () => { + referenceValue = $reference.text(); + setPlaceholders(); + updateCounter(); + } ); + + const updateOgTitle = ( event ) => { + ogTitleValue = event.target.value.length ? tsf.escapeString( event.target.value ) : ''; + setPlaceholders(); + updateCounter(); + }; + const updateTwTitle = ( event ) => { + twTitleValue = event.target.value.length ? tsf.escapeString( event.target.value ) : ''; + setPlaceholders(); + updateCounter(); + }; + $ogTitle.on( 'input.tsfUpdateOgTitle', updateOgTitle ); + $twTitle.on( 'input.tsfUpdateOgTitle', updateTwTitle ); + }, + + /** + * Initializes social descriptions. + * + * @since 3.0.0 + * + * @function + * @return {undefined} + */ + _initSocialDescInputs: function() { + + if ( ! tsf.hasInput ) + return; + + let $ogDesc = jQuery( "#autodescription_og_description" ), + $twDesc = jQuery( "#autodescription_twitter_description" ), + $reference = jQuery( "#tsf-description-reference" ); + + if ( ! $ogDesc.length || ! $twDesc.length || ! $reference.length ) + return; + + let ogDescValue = tsf.escapeString( $ogDesc.val() ), + twDescValue = tsf.escapeString( $twDesc.val() ), + referenceValue = $reference.text(); // already escaped. + + const getActiveValue = ( what ) => { + let val = ''; + switch ( what ) { + case 'twitter' : + val = twDescValue; + // get next if not set. + case 'og' : + val = val.length ? val : ogDescValue; + // get next if not set. + case 'reference' : + val = val.length ? val : referenceValue; + } + return val; + }; + const setPlaceholders = () => { + $ogDesc.attr( 'placeholder', getActiveValue( 'reference' ) ); + $twDesc.attr( 'placeholder', getActiveValue( 'og' ) ); + }; + const updateCounter = ( target, value, threshold ) => { + if ( ! target || ! value || ! threshold ) { + $ogDesc.each( ( i, el ) => updateCounter( el, getActiveValue( 'og' ), 300 ) ); + $twDesc.each( ( i, el ) => updateCounter( el, getActiveValue( 'twitter' ), 200 ) ); + } else { + tsf.updateSocialCounter( target, value, threshold ); + } + }; + $reference.on( 'change', () => { + referenceValue = $reference.text(); + setPlaceholders(); + updateCounter(); + } ); + + const updateOgDesc = ( event ) => { + ogDescValue = event.target.value.length ? tsf.escapeString( event.target.value ) : ''; + setPlaceholders(); + updateCounter(); + }; + const updateTwDesc = ( event ) => { + twDescValue = event.target.value.length ? tsf.escapeString( event.target.value ) : ''; + setPlaceholders(); + updateCounter(); + }; + $ogDesc.on( 'input.tsfUpdateOgDesc', updateOgDesc ); + $twDesc.on( 'input.tsfUpdateOgDesc', updateTwDesc ); + }, + + /** + * Updates normalized counters for social input. + * + * @since 3.0.4 + * + * @function + * @param {!Element} target The HMTL eleent. + * @param {string} value Must be escaped. + * @param {integer} threshold The "bad" threshold. + */ + updateSocialCounter: function( target, value, threshold ) { + + let counter = document.getElementById( target.id + '_chars' ); + + if ( ! counter ) + return; + + let strLen = tsf.getStringLength( tsf.unescapeString( value ) ), + counterClass = '', + counterType = tsf.counterType, + counterName = '', + output = ''; + + if ( strLen > threshold ) { + counterClass += 'tsf-count-bad'; + counterName = tsf.i18n.bad; + } else { + counterClass += 'tsf-count-good'; + counterName = tsf.i18n.good; + } + + if ( ! counterType || 1 == counterType ) { + output = strLen.toString(); + } else if ( 2 == counterType ) { + output = counterName; + } else if ( 3 == counterType ) { + output = strLen.toString() + ' - ' + counterName; + } + + counter.innerHTML = output; + + if ( tsf.additionsClass ) + counterClass += ' ' + tsf.additionsClass; + + if ( counter.className !== counterClass ) + counter.className = counterClass; + }, + /** * Initializes counters. * @@ -3174,9 +3411,11 @@ window.tsf = { // Add title prop listeners. Must load before setTabsOnload to work. tsf._initTitleInputs(); tsf._initUnboundTitleSettings(); + tsf._initSocialTitleInputs(); // Add description prop listeners. Must load before setTabsOnload to work. tsf._initDescInputs(); + tsf._initSocialDescInputs(); // Set primary term listeners. tsf._initPrimaryTerm(); diff --git a/lib/js/tsf.min.js b/lib/js/tsf.min.js index 57c6edc5..217fa95b 100644 --- a/lib/js/tsf.min.js +++ b/lib/js/tsf.min.js @@ -1 +1 @@ -'use strict';window.tsf={nonces:tsfL10n.nonces,i18n:tsfL10n.i18n,states:tsfL10n.states,params:tsfL10n.params,other:tsfL10n.other,settingsChanged:!1,counterType:0,hasInput:!1,additionsClass:'',cropper:{},confirm:function(t){function s(){return t.apply(this,arguments)}return s.toString=function(){return t.toString()},s}(function(t){return confirm(t)}),escapeString:function escapeString(t){if(!t.length)return'';var s={'&':'&','<':'<','>':'>','"':'"','\'':'''};return t.replace(/[&<>"']/g,function(a){return s[a]})},getStringLength:function getStringLength(t){var s,a=0;return t.length&&(s=document.createElement('span'),s.innerHTML=tsf.escapeString(t),a=s.childNodes[0].nodeValue.length),+a},updatePixelCounter:function updatePixelCounter(t){var s=t.e,a=t.text,o=t.guideline,n=s.parentElement;if(n){var r=n.querySelector('.tsf-pixel-counter-bar'),l=n.querySelector('.tsf-pixel-counter-shadow');if(r&&l){l.innerHTML=tsf.escapeString(a);var d=l.offsetWidth,c='',g='',f='tsf-pixel-counter-fit',u='tsf-pixel-counter-overflown';d>o?(g=100*(o/(d+2*(d-o)/3))+'%',c=u):(g=100*(d/o)+'%',c=f);var x,y=r.querySelector('.tsf-pixel-counter-fluid');x=tsf.i18n.pixelsUsed.replace(/%1\$d/g,d),x=x.replace(/%2\$d/g,o),r.classList.remove(f,u),r.classList.add(c),r.dataset.desc=x,r.setAttribute('aria-label',x),y.style.width=g,tsf._triggerTooltipUpdate(r)}}},_initTitleInputs:function _initTitleInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');if(t.length){var o,n,r,d,s=!1,a=!!navigator.userAgent.match(/Trident\/7\./),l='',c='',g=tsf.params.titleSeparator,f=tsf.params.objectTitle,u=tsf.states.useTagline,y=tsf.states.isRTL,x=tsf.states.isPrivate,v=tsf.states.isPasswordProtected;o=y?'after':'before';var b=function(){var G='before';tsf.states.isSettingsPage?y?'right'===jQuery('#tsf-home-title-location input:checked').val()&&(G='after'):'left'===jQuery('#tsf-home-title-location input:checked').val()&&(G='after'):tsf.states.isHome?y?'right'===tsf.params.titleLocation&&(G='after'):'left'===tsf.params.titleLocation&&(G='after'):y?'left'===tsf.params.titleLocation&&(G='after'):'right'===tsf.params.titleLocation&&(G='after'),n=G};b();var k=function(){var G='';if(!tsf.states.isSettingsPage)tsf.states.isHome?u&&(G=tsf.params.titleAdditions):u&&(G=tsf.params.titleAdditions);else if(u){var J=document.getElementById('autodescription-site-settings[homepage_title_tagline]'),K=J?J.value:'';G=K.length?K:tsf.params.blogDescription}G.length&&(G=tsf.escapeString(G),'before'===n?G=G+' '+g+' ':'after'===n?G=' '+g+' '+G:void 0),c=G.length?G:'',d=document.getElementById('tsf-title-placeholder'),c.length&&d&&(d.innerHTML=c)};k();var C=function(){var G='';x?G=tsf.i18n.privateTitle:v&&(G=tsf.i18n.protectedTitle),G.length&&(G=tsf.escapeString(G),'before'===o?G+=' ':'after'===o?G=' '+G:void 0),l=G.length?G:'',l.length&&r&&(r.innerHTML=l),r=document.getElementById('tsf-title-placeholder-prefix'),l.length&&r&&(r.innerHTML=l)};C();var T=function(G){if(d||r){var J=jQuery(G.target),K=J.val(),Y=!!c.length,Z=!!l.length;if(!Y&&d&&(d.style.display='none'),!Z&&r&&(r.style.display='none'),!Y&&!Z)return void J.css('text-indent','initial');if(!K.length)return J.css('text-indent','initial'),d&&(d.style.display='none'),void(r&&(r.style.display='none'));var Q=J.outerWidth(!0),tt=(J.outerHeight(!0)-J.height())/2,et=(Q-J.innerWidth())/2,it=y?'right':'left',st=(J.outerWidth(!0)-J.width())/2,at={display:J.css('display'),lineHeight:J.css('lineHeight'),fontFamily:J.css('fontFamily'),fontWeight:J.css('fontWeight'),fontSize:J.css('fontSize'),letterSpacing:J.css('letterSpacing'),paddingTop:tt+'px',paddingBottom:tt+'px'},ot=jQuery(r),nt=jQuery(d),rt=0,lt=0,pt=0,dt=0,ct=0,gt=0;if(Z&&(ot.css(at),ot.css({maxWidth:'initial'}),ct=ot[0].getBoundingClientRect().width,ctct?0:ct,dt+=ct;var ht;Z&&(ht={},ht[it]=pt+'px',ht.maxWidth=ct+'px',ot.css(ht)),Y&&(ht={},ht[it]=lt+'px',ht.maxWidth=rt+'px',nt.css(ht)),ht={},ht['text-indent']=dt+'px',J.css(ht)}},S=function(){var J='',K=!!c.length,Y=!!l.length,Z=c,Q=l;tsf.states.isTermEdit&&tsf.params.termName&&(Q=y?' :'+tsf.params.termName:tsf.params.termName+': ',Y=tsf.states.useTermPrefix),J=f,Y&&('before'===o?J=Q+J:'after'===o?J+=Q:void 0),K&&('before'===n?J=Z+J:'after'===n?J+=Z:void 0),a&&(s=!0);var tt=document.createElement('span');tt.innerHTML=J,t.prop('placeholder',tt.textContent),a&&setTimeout(function(){s=!1},0)},I=function(G){var J=document.getElementById(G.target.id+'_chars');if(J){var K=0,Y=G.target,Z='',Q=tsf.counterType,tt='',et='';K=1>Y.value.length?tsf.getStringLength(Y.placeholder):(l?tsf.getStringLength(l):0)+tsf.getStringLength(Y.value)+(c?tsf.getStringLength(c):0),25>K||75<=K?(Z+='tsf-count-bad',tt=tsf.i18n.bad):42>K||55G.target.value.length?K=G.target.placeholder:(K=G.target.value,l.length&&('before'===o?K=l+K:'after'===o?K+=l:void 0),c.length&&('before'===n?K=c+K:'after'===n?K+=c:void 0));var Y={e:J,text:K,guideline:tsf.params.titlePixelGuideline};tsf.updatePixelCounter(Y)}};t.on('input.tsfUpdateTitles',function W(G){return!s&&void(T(G),S(),I(G),L(G))});t.on('tsf-update-title-counter',function E(G){I(G),L(G)});var j=function(){t.trigger('tsf-update-title-counter')},R=function(){t.trigger('input.tsfUpdateTitles')};R();var P=function(){k(),R()};jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input',P),jQuery('#autodescription-site-settings\\[homepage_tagline\\]').on('change',P);var H=0,A=function(){clearTimeout(H),H=setTimeout(function(){R()},50)};jQuery(window).on('tsf-counter-updated',A);jQuery('#tsf-title-tagline-toggle :input').on('click',function D(G){var J=u;jQuery(G.target).is(':checked')?(jQuery('.tsf-custom-blogname-js').css('display','inline'),u=!0):(jQuery('.tsf-custom-blogname-js').css('display','none'),u=!1),J^u&&(k(),A())});jQuery('#visibility .save-post-visibility').on('click',function O(){var J=jQuery('#visibility').find('input:radio:checked').val();switch(x=!1,v=!1,J){case'password':var K=jQuery('#visibility').find('#post_password').val();v=!!K&&!!K.length;break;case'private':x=!0;break;default:case'public':}C(),A()});jQuery('#tsf-title-separator :input').on('click',function B(G){var J=jQuery(G.target).val(),K='';K='pipe'===J?'|':'dash'===J?'-':jQuery('
').html('&'+J+';').text(),g=K,jQuery('.tsf-sep-js').text(' '+g+' '),k(),A()});var z=function(){var G=tsf.settingsChanged;R(!0),tsf.settingsChanged=G};jQuery('#homepage-tab-general').on('tsf-tab-toggled',z),jQuery('#tsf-flex-inpost-tab-general').on('tsf-flex-tab-toggled',z);var U=0,q=function(){clearTimeout(U),U=setTimeout(function(){z()},50)};jQuery(window).one('tsf-ready',function(){jQuery(window).on('tsf-flex-resize',q)});var F=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function N(G,J){if(0<=F.indexOf(J.id)){var K=J.querySelector('.inside');0=J&&782<=K&&z():782<=J&&782>=K&&z(),J=K},50)})})()}}},_initUnboundTitleSettings:function _initUnboundTitleSettings(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');jQuery('#tsf-title-placeholder, #tsf-title-placeholder-prefix').on('click',function s(d){var c=jQuery(d.target).siblings(t)[0];if('function'==typeof c.setSelectionRange){c.focus();var g=2*c.value.length;c.setSelectionRange(g,g)}else{var f=c.value;c.value='',c.focus(),c.value=f}});jQuery('#autodescription-site-settings\\[title_rem_additions\\]').on('click',function a(d){jQuery(d.target).is(':checked')?jQuery('.tsf-title-additions-js').css('display','none'):jQuery('.tsf-title-additions-js').css('display','inline')});jQuery('#tsf-title-location input').on('click',function o(d){var c=jQuery('.tsf-title-additions-example-left'),g=jQuery('.tsf-title-additions-example-right');'right'===jQuery(d.target).val()?(c.css('display','none'),g.css('display','inline')):(c.css('display','inline'),g.css('display','none'))});jQuery('#autodescription-site-settings\\[homepage_title\\]').on('input',function n(d){var c=d.target.value||'',g=jQuery('.tsf-custom-title-js');0===c.length?g.text(tsf.params.objectTitle):g.text(c)});jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input.tsfInputTagline',function r(d){var c=d.target.value||'',g=jQuery('.tsf-custom-tagline-js');0===c.length?(g.text(tsf.params.blogDescription),0===tsf.params.blogDescription.length?jQuery('#tsf-home-title-location .tsf-sep-js').hide():jQuery('#tsf-home-title-location .tsf-sep-js').show()):(g.text(c),jQuery('#tsf-home-title-location .tsf-sep-js').show())}),jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').trigger('input.tsfInputTagline');jQuery('#title-prefixes-toggle :input').on('click',function l(d){var c=jQuery(d.target),g=jQuery('.tsf-title-prefix-example');c.is(':checked')?g.css('display','none'):g.css('display','inline')})}},_initDescInputs:function _initDescInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_description, #autodescription-meta\\[description\\], #autodescription-site-settings\\[homepage_description\\]');if(t.length){var s=tsf.params.descriptionSeparator;jQuery('#tsf-description-separator input').on('click',function a(y){var x=jQuery(y.target).val(),v='';v='pipe'===x?'|':'dash'===x?'-':jQuery('
').html('&'+x+';').text(),s=v,jQuery('#autodescription-descsep-js').text(' '+s+' '),c()});var o=function(y){var x=document.getElementById(y.target.id+'_chars');if(x){var v=0,b=y.target,k='',C=tsf.counterType,T='',S='';v=1>b.value.length?tsf.getStringLength(b.placeholder):tsf.getStringLength(b.value),100>v||175<=v?(k+='tsf-count-bad',T=tsf.i18n.bad):137>v||155y.target.value.length?y.target.placeholder:y.target.value;var b={e:x,text:v,guideline:tsf.params.descPixelGuideline};tsf.updatePixelCounter(b)}};t.on('input.tsfUpdateDescriptions',function r(y){o(y),n(y)});var l=function(){t.trigger('input.tsfUpdateDescriptions')};l();var d=0,c=function(){clearTimeout(d),d=setTimeout(function(){l()},50)};jQuery(window).on('tsf-counter-updated',c);var f=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function u(y,x){if(0<=f.indexOf(x.id)){var v=x.querySelector('.inside');0q.clientHeight?q.offsetWidth-q.clientWidth+25-2:25;tsf.states.isRTL?z.querySelector('.tsf-primary-term-selector-help-wrap').style.left=F+'px':z.querySelector('.tsf-primary-term-selector-help-wrap').style.right=F+'px'},y=function(B){u(B.data.taxonomy)},x=function(B){var z=o.cloneNode(!0);return z.setAttribute('title',t[B].i18n.makePrimary),z.setAttribute('aria-label',t[B].i18n.makePrimary),z},v=function(B,z){var U=document.getElementById('autodescription[_primary_term_'+B+']');U&&U instanceof Element&&(U.value=z)},b=function(B,z){return!z&&d[B]?d[B]:(d[B]=jQuery('#'+B+'checklist, #'+B+'checklist-pop'),d[B])},k=function(B,z){return n[B].filter('[value="'+z+'"]')},C=function(B,z){var U=k(B,z).closest('label');U.length?(U.addClass('tsf-is-primary-term'),U.find('.tsf-set-primary-term').each(function(q,F){F.setAttribute('title',t[B].i18n.primary),F.setAttribute('aria-label',t[B].i18n.primary),F.querySelector('input').checked=!0}),v(B,z),c[B]=z):S(B)},T=function(B){var z=b(B).find('label');z.removeClass('tsf-is-primary-term'),z.find('.tsf-set-primary-term').each(function(U,q){q.setAttribute('title',t[B].i18n.makePrimary),q.setAttribute('aria-label',t[B].i18n.makePrimary),q.querySelector('input').checked=!1}),v(B,'')},S=function(B){var U,z=l[B].first();z.length&&(U=z.val()||'',C(B,U),c[B]=U)},I=function(B){var z=B.data.taxonomy,U=jQuery(B.target).closest('label').find('input[type=checkbox]').val();return T(z),C(z,U),!1},L=function(B){var z=B.data.taxonomy;switch(B.target.checked?(j(z,B.target),W(z,B.target)):(R(z,B.target),E(z,B.target)),l[z].length){case 0:v(z,'');break;case 1:S(z);}},W=function(B,z){var U;k(B,z.value).each(function(q,F){U=jQuery(F).closest('label'),U.find('.tsf-primary-term-selector').length||U.append(x(B))})},E=function(B,z){var U,q;k(B,z.value).each(function(F,N){U=jQuery(N).closest('label'),q=U.hasClass('tsf-is-primary-term'),U.removeClass('tsf-is-primary-term'),U.find('.tsf-primary-term-selector').remove(),q&&S(B)})},j=function(B,z){r[B]=r[B].add('[value="'+z.value+'"]'),l[B]=l[B].add(z)},R=function(B,z){r[B]=r[B].not('[value="'+z.value+'"]'),l[B]=l[B].not('[value="'+z.value+'"]')},P=function(B){var z=b(B,1);n[B]=z.find('input[type=checkbox]'),r[B]=z.find('input[type=checkbox]:checked');var q,U={};l[B]=r[B],l[B].each(function(F,N){q=jQuery(N).val(),U[q]?l[B].splice(F,1):U[q]=!0})},H=function(B,z,U){U.hasOwnProperty('settings')&&U.settings.hasOwnProperty('what')&&(P(U.settings.what),A(U.settings.what),D(U.settings.what),u(U.settings.what))},A=function(B){var z='tsfShowPrimary'+B,U={taxonomy:B},q=b(B),F=jQuery('#'+B+'div'),N=jQuery('#'+B+'-tabs');q.off('click.'+z),q.on('click.'+z,'input[type="checkbox"]',U,L),q.on('click.'+z,'.tsf-primary-term-selector',U,I),F.off('wpListAddEnd.'+z),F.on('wpListAddEnd.'+z,'#'+B+'checklist',H),N.off('click.'+z),N.on('click.'+z,'a',U,y)},D=function(B){b(B).find('input[type="checkbox"]:checked').each(function(z,U){W(B,U)}),t[B].primary?C(B,t[B].primary):S(B)};(function O(){for(var B in t)b(B).length&&(g(B),f(B),P(B),A(B),D(B))})()}},_initToolTips:function _initToolTips(){var t=0,s=!1,a=function(){s=!0,clearTimeout(t),t=setTimeout(function(){s=!1},250)},o=function(y,x){x=x||!1;var v='pointerdown.tsfTT touchstart.tsfTT click.tsfTT',b=jQuery(y);x?(b.off('mousemove mouseleave mouseout tsf-tooltip-update'),jQuery(document.body).off(v)):(b.on({mousemove:d,mouseleave:c,mouseout:c}),jQuery(document.body).off(v).on(v,g)),b.on('tsf-tooltip-update',r)},n=function(y){o(y,!0)},r=function(y){if(y.target.classList.contains('tsf-tooltip-item')){var x=y.target.querySelector('.tsf-tooltip-text');x instanceof Element&&(x.innerHTML=y.target.dataset.desc)}},l=function(y){var x=jQuery(y.target),v=y.target.dataset.desc;if(v&&0===x.find('div').length){y.target.title='';var b=jQuery('
'+v+'
');x.append(b);var k=x.closest('.tsf-tooltip-boundary');k=k.length&&k||jQuery(document.body);var C=x.outerHeight()+9,T=b.offset().top-C,S=k.offset().top-(k.prop('scrolltop')||0);S>T?(b.addClass('tsf-tooltip-down'),b.css('top',C+'px')):b.css('bottom',C+'px');var I=x.closest('.tsf-tooltip-wrap'),L=b.find('.tsf-tooltip-text-wrap'),W=L.find('.tsf-tooltip-text'),E=I.width(),j=L.outerWidth(!0),R=W.outerWidth(!0),P=L.offset().left,H=P+R,A=k.offset().left-(k.prop('scrollLeft')||0),D=A+k.outerWidth(),O='left';if(PD){var U=D-H-E-12,q=parseInt(L.css('flex-basis'),10);U<-q&&(U=-q),b.css(O,U+'px'),b.data('overflow',U),b.data('overflowDir',O)}else if(42>E){var F=-15;b.css(O,F+'px'),b.data('overflow',F),b.data('overflowDir',O)}else if(E>j){var N=y.originalEvent&&y.originalEvent.pageX||y.pageX,M=I.offset().left,V=N-M-j/2,G=V+j;0>V?V=0:G>E&&(V=E-R),b.css(O,V+'px'),b.data('adjust',V),b.data('adjustDir',O)}}},d=function(y){var x=jQuery(y.target),v=x.find('.tsf-tooltip'),b=v.find('.tsf-tooltip-arrow'),k=v.data('overflow'),C=v.data('overflowDir');if(k=parseInt(k,10),k=isNaN(k)?0:-Math.round(k),k)b.css(C,k+'px');else{var T=y.originalEvent&&y.originalEvent.pageX||y.pageX,S=7,I=16,L=x.closest('.tsf-tooltip-wrap'),W=T-L.offset().left-I/2,j=v.find('.tsf-tooltip-text-wrap'),R=j.outerWidth(!0),P=v.data('adjust'),H=v.data('adjustDir'),A=R-I-S;if(P=parseInt(P,10),P=isNaN(P)?0:Math.round(P),P&&(P='left'===H?-P:P,W+=P,A-P>L.outerWidth(!0))){var D=j.find('.tsf-tooltip-text'),O=D.outerWidth(!0);A=O-I-S}W<=S?b.css('left',S+'px'):W>=A?b.css('left',A+'px'):b.css('left',W+'px')}},c=function(y){s||(jQuery(y.target).find('.tsf-tooltip').remove(),n(y.target))},g=function(y){a();var k,v='.tsf-tooltip',b=jQuery(y.target);if(b.hasClass('tsf-tooltip-item')&&(k=b.find(v)),!k){var C=b.children('.tsf-tooltip-item');C.length&&(k=C.find(v))}k&&k.length?jQuery(v).not(k).remove():jQuery(v).remove()},f=function(y){if(!s){var x=!1;switch(y.type){case'mouseenter':break;case'pointerdown':case'touchstart':x=!0;break;default:}if(y.target.classList.contains('tsf-tooltip-item'))x&&g(y),l(y),d(y),o(y.target);else{var v=y.target.querySelector('.tsf-tooltip-item:hover'),b=new jQuery.Event(y.type);b.pageX=y.originalEvent&&y.originalEvent.pageX||y.pageX,v?(tsfL10n.states.debug&&console.log('Tooltip event warning: delegation'),jQuery(v).trigger(b)):(tsfL10n.states.debug&&console.log('Tooltip event warning: bubbling'),jQuery(y.target).closest('.tsf-tooltip-wrap').find('.tsf-tooltip-item:hover').trigger(b))}y.stopPropagation()}},u=function(){var y=jQuery('.tsf-tooltip-wrap');y.off('mouseenter pointerdown touchstart'),y.on('mouseenter pointerdown touchstart','.tsf-tooltip-item',f)};u(),jQuery(window).on('tsf-reset-tooltips',u),function(){var y=jQuery('#wpcontent');tsf.addTooltipBoundary(y)}()},addTooltipBoundary:function addTooltipBoundary(t){jQuery(t).addClass('tsf-tooltip-boundary')},tabToggle:function tabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-active-tab-content',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-tab-toggled')},175)}}}},flexTabToggle:function flexTabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-flex-tab-content-active',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-flex-tab-toggled')},175)}}}},setTabsOnload:function setTabsOnload(){if(tsf.hasInput)if(tsf.states.isSettingsPage){var t=jQuery('.tsf-nav-tab-wrapper .tsf-tab:nth-of-type(n+2) input:checked');t.length&&t.each(function(){var a=jQuery(this),o=a.prop('id'),n=a.prop('name');if('undefined'!=typeof n){var r='tsf-active-tab-content',l=jQuery('#'+o+'-content');if('undefined'!=typeof l){var d=jQuery('.'+n+'-content');d.removeClass(r),l.addClass(r),setTimeout(function(){jQuery('#'+o).trigger('tsf-tab-toggled')},20)}}})}else;},taglineToggleDesc:function taglineToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-on-blogname-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},additionsToggleDesc:function additionsToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-description-additions-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},taglineToggleOnload:function taglineToggleOnload(){if(tsf.hasInput){var t=jQuery('#tsf-title-tagline-toggle :input'),s=jQuery('.tsf-custom-blogname-js'),a=jQuery('#tsf-description-additions-toggle :input'),o=jQuery('#tsf-description-additions-js'),n=jQuery('#tsf-description-onblogname-toggle :input'),r=jQuery('#tsf-on-blogname-js'),l=jQuery('#tsf-title-additions-toggle :input'),d=jQuery('.tsf-title-additions-js');t.is(':checked')?s.css('display','inline'):s.css('display','none'),a.is(':checked')?o.css('display','inline'):o.css('display','none'),n.is(':checked')?r.css('display','inline'):r.css('display','none'),l.is(':checked')?d.css('display','none'):d.css('display','inline')}},attachUnsavedChangesListener:function attachUnsavedChangesListener(){if(tsf.hasInput){var t=function(o){tsf.settingsChanged||tsf.registerChange(),jQuery(s).not(a).off(o.type,t)},s='.tsf-metaboxes :input, #tsf-inpost-box .inside :input',a='.tsf-tab :input, .tsf-flex-nav-tab :input';jQuery(s).not(a).on('change',t),s='.tsf-metaboxes input[type=text], .tsf-metaboxes textarea, #tsf-inpost-box .inside input[type=text], #tsf-inpost-box .inside textarea',a='.tsf-nav-tab-wrapper input, .tsf-flex-nav-tab-wrapper input',jQuery(s).not(a).on('input',t),window.onbeforeunload=function(){if(tsf.settingsChanged)return tsf.i18n.saveAlert},jQuery('.tsf-metaboxes input[type="submit"], #publishing-action input[type="submit"], #save-action input[type="submit"], a.submitdelete').click(function(){window.onbeforeunload=null})}},registerChange:function registerChange(){tsf.settingsChanged=!0},confirmedReset:function confirmedReset(){return confirm(tsf.i18n.confirmReset)},onLoadUnregisterChange:function onLoadUnregisterChange(){tsf.settingsChanged=!1},dismissNotice:function dismissNotice(t){jQuery(t.target).parents('.tsf-notice').slideUp(200,function(){this.remove()})},setAjaxLoader:function setAjaxLoader(t){jQuery(t).toggleClass('tsf-loading')},unsetAjaxLoader:function unsetAjaxLoader(t,s){var a='tsf-success',o=2500;s||(a='tsf-error',o=5e3),jQuery(t).removeClass('tsf-loading').addClass(a).fadeOut(o)},resetAjaxLoader:function resetAjaxLoader(t){jQuery(t).stop().empty().prop('class','tsf-ajax').css('opacity','1').removeProp('style')},openImageEditor:function openImageEditor(t){if(jQuery(t.target).prop('disabled')||'undefined'==typeof wp.media)return t.preventDefault(),void t.stopPropagation();var s=jQuery(t.target),a=s.data('inputid'),o;if(o)return void o.open();t.preventDefault(),t.stopPropagation(),tsf.extendCropper();var n={suggestedWidth:s.data('width')||1200,suggestedHeight:s.data('height')||630,isFlex:'undefined'==typeof s.data('flex')?1:s.data('flex')};tsf.cropper.control={params:{flex_width:n.isFlex?4096:0,flex_height:n.isFlex?4096:0,width:n.suggestedWidth,height:n.suggestedHeight,isFlex:n.isFlex}},o=wp.media({button:{text:tsf.other[a].frame_button,close:!1},states:[new wp.media.controller.Library({title:tsf.other[a].frame_title,library:wp.media.query({type:'image'}),multiple:!1,date:!1,priority:20,suggestedWidth:n.suggestedWidth,suggestedHeight:n.suggestedHeight}),new tsf.cropper({imgSelectOptions:tsf.calculateImageSelectOptions})]});var r=function(){o.setState('cropper')};o.off('select',r),o.on('select',r);var l=function(g){var f=g.url,u=g.id,y=g.width,x=g.height;jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('cropped',l),o.on('cropped',l);var d=function(g){var f=g.get('url'),u=g.get('id'),y=g.get('width'),x=g.get('height');jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('skippedcrop',d),o.on('skippedcrop',d);var c=function(){jQuery('#'+a+'-select').text(tsf.other[a].change),jQuery('#'+a+'-url').prop('readonly',!0).css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing'),tsf.appendRemoveButton(s,a,!0),tsf.registerChange()};o.off('skippedcrop cropped',c),o.on('skippedcrop cropped',c),o.open()},appendRemoveButton:function appendRemoveButton(t,s,a){t&&s&&!jQuery('#'+s+'-remove').length&&(t.after(''+tsf.other[s].remove+''),a&&jQuery('#'+s+'-remove').css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing')),tsf.resetImageEditorActions()},removeEditorImage:function removeEditorImage(t){var s=jQuery(t.target).data('inputid');if(!jQuery('#'+s+'-select').prop('disabled')){jQuery('#'+s+'-select').addClass('disabled').prop('disabled',!0),jQuery('#'+s+'-remove').addClass('disabled').prop('disabled',!0).fadeOut(500,function(){jQuery(this).remove(),jQuery('#'+s+'-select').text(tsf.other[s].select).removeClass('disabled').removeProp('disabled')});var a=jQuery('#'+s+'-url');a.val(''),a.data('readonly')||a.removeProp('readonly'),a.css('opacity',0).animate({opacity:1},{queue:!0,duration:500},'swing'),jQuery('#'+s+'-id').val(''),tsf.registerChange()}},extendCropper:function extendCropper(){if('undefined'==typeof tsf.cropper.control){var t,a,s=wp.media.controller,o=wp.media.view;return a=o.Cropper.extend({className:'crop-content tsf-image',ready:function ready(){o.Cropper.prototype.ready.apply(this,arguments)},onImageLoad:function onImageLoad(){var r,n=this.controller.get('imgSelectOptions');'function'==typeof n&&(n=n(this.options.attachment,this.controller)),'undefined'==typeof n.aspectRatio&&(n=_.extend(n,{parent:this.$el,onInit:function onInit(){this.parent.children().on('mousedown touchstart',function(l){l.shiftKey?r.setOptions({aspectRatio:'1:1'}):r.setOptions({aspectRatio:!1})})}})),this.trigger('image-loaded'),r=this.controller.imgSelect=this.$image.imgAreaSelect(n)}}),t=s.Cropper.extend({createCropContent:function createCropContent(){this.cropperView=new a({controller:this,attachment:this.get('selection').first()}),this.cropperView.on('image-loaded',this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function doCrop(n){var r=n.get('cropDetails'),l=tsf.cropper.control;if(l.params.flex_width&&l.params.flex_height)if(r.width===r.height)r.width>l.params.flex_width&&(r.dst_width=r.dst_height=l.params.flex_width);else if(r.width>l.params.flex_width||r.height>l.params.flex_height)if(r.width>r.height){var d=r.width/l.params.flex_width;r.dst_width=l.params.flex_width,r.dst_height=Math.round(r.height/d)}else{var c=r.height/l.params.flex_height;r.dst_height=l.params.flex_height,r.dst_width=Math.round(r.width/c)}return'undefined'==typeof r.dst_width&&(r.dst_width=0,r.dst_height=0),wp.ajax.post('tsf-crop-image',{nonce:tsf.nonces.upload_files,id:n.get('id'),context:'tsf-image',cropDetails:r})}}),t.prototype.control={},void(tsf.cropper=t)}},calculateImageSelectOptions:function calculateImageSelectOptions(t,s){var y,x,v,b,a=tsf.cropper.control,o=!!parseInt(a.params.flex_width,10),n=!!parseInt(a.params.flex_height,10),r=parseInt(a.params.width,10),l=parseInt(a.params.height,10),d=t.get('width'),c=t.get('height'),g=r/l,f=r,u=l;return b=a.params.isFlex?!tsf.mustBeCropped(a.params.flex_width,a.params.flex_height,d,c):g==d/c,s.set('control',a.params),s.set('canSkipCrop',b),d/c>g?(l=c,r=l*g):(r=d,l=r/g),y=(d-r)/2,x=(c-l)/2,v={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:d,imageHeight:c,minWidth:f>r?r:f,minHeight:u>l?l:u,x1:y,y1:x,x2:r+y,y2:l+x},a.params.isFlex?n||o?(n&&(v.minHeight=200,v.maxWidth=d),o&&(v.minWidth=200,v.maxHeight=c)):v.aspectRatio=r+':'+l:(v.handles='corners',v.aspectRatio=r+':'+l),v},mustBeCropped:function mustBeCropped(t,s,a,o){return a<=t&&o<=s?!1:!0},resetImageEditorActions:function resetImageEditorActions(){jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},setupImageEditorActions:function setupImageEditorActions(){jQuery('.tsf-set-social-image').off('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-set-social-image').on('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},checkImageEditorInput:function checkImageEditorInput(){var t=jQuery('.tsf-set-social-image');if(t.length){var s='',a='';jQuery.each(t,function(o,n){s=jQuery(n).data('inputid'),a=jQuery('#'+s+'-id'),a.length&&0d?(g.hide(),s.tabWrapper.shown=0):s.tabWrapper.outer':'>','"':'"','\'':'''};return t.replace(/[&<>"']/g,function(a){return s[a]})},unescapeString:function unescapeString(t){if(!t.length)return'';var s={'&':'&','<':'<','>':'>','"':'"','\'':'''},a=new RegExp(Object.values(s).map(function(o){return o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,'\\$&')}).join('|'),'g');return t.replace(a,function(o){return Object.keys(s).find(function(n){return s[n]===o})})},getStringLength:function getStringLength(t){var s,a=0;return t.length&&(s=document.createElement('span'),s.innerHTML=tsf.escapeString(t),a=s.childNodes[0].nodeValue.length),+a},updatePixelCounter:function updatePixelCounter(t){var s=t.e,a=t.text,o=t.guideline,n=s.parentElement;if(n){var r=n.querySelector('.tsf-pixel-counter-bar'),l=n.querySelector('.tsf-pixel-counter-shadow');if(r&&l){l.innerHTML=tsf.escapeString(a);var d=l.offsetWidth,c='',g='',f='tsf-pixel-counter-fit',u='tsf-pixel-counter-overflown';d>o?(g=100*(o/(d+2*(d-o)/3))+'%',c=u):(g=100*(d/o)+'%',c=f);var x,y=r.querySelector('.tsf-pixel-counter-fluid');x=tsf.i18n.pixelsUsed.replace(/%1\$d/g,d),x=x.replace(/%2\$d/g,o),r.classList.remove(f,u),r.classList.add(c),r.dataset.desc=x,r.setAttribute('aria-label',x),y.style.width=g,tsf._triggerTooltipUpdate(r)}}},_initTitleInputs:function _initTitleInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');if(t.length){var o,n,r,d,s=!1,a=!!navigator.userAgent.match(/Trident\/7\./),l='',c='',g=tsf.params.titleSeparator,f=tsf.params.objectTitle,u=tsf.states.useTagline,y=tsf.states.isRTL,x=tsf.states.isPrivate,b=tsf.states.isPasswordProtected;o=y?'after':'before';var T=function(){var Y='before';tsf.states.isSettingsPage?y?'right'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):'left'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):tsf.states.isHome?y?'right'===tsf.params.titleLocation&&(Y='after'):'left'===tsf.params.titleLocation&&(Y='after'):y?'left'===tsf.params.titleLocation&&(Y='after'):'right'===tsf.params.titleLocation&&(Y='after'),n=Y};T();var C=function(){var Y='';if(!tsf.states.isSettingsPage)tsf.states.isHome?u&&(Y=tsf.params.titleAdditions):u&&(Y=tsf.params.titleAdditions);else if(u){var Z=document.getElementById('autodescription-site-settings[homepage_title_tagline]'),Q=Z?Z.value:'';Y=Q.length?Q:tsf.params.blogDescription}Y.length&&(Y=tsf.escapeString(Y),'before'===n?Y=Y+' '+g+' ':'after'===n?Y=' '+g+' '+Y:void 0),c=Y.length?Y:'',d=document.getElementById('tsf-title-placeholder'),c.length&&d&&(d.innerHTML=c)};C();var S=function(){var Y='';x?Y=tsf.i18n.privateTitle:b&&(Y=tsf.i18n.protectedTitle),Y.length&&(Y=tsf.escapeString(Y),'before'===o?Y+=' ':'after'===o?Y=' '+Y:void 0),l=Y.length?Y:'',l.length&&r&&(r.innerHTML=l),r=document.getElementById('tsf-title-placeholder-prefix'),l.length&&r&&(r.innerHTML=l)};S();var I=function(Y){if(d||r){var Z=jQuery(Y.target),Q=Z.val(),tt=!!c.length,et=!!l.length;if(!tt&&d&&(d.style.display='none'),!et&&r&&(r.style.display='none'),!tt&&!et)return void Z.css('text-indent','initial');if(!Q.length)return Z.css('text-indent','initial'),d&&(d.style.display='none'),void(r&&(r.style.display='none'));var it=Z.outerWidth(!0),st=(Z.outerHeight(!0)-Z.height())/2,at=(it-Z.innerWidth())/2,ot=y?'right':'left',nt=(Z.outerWidth(!0)-Z.width())/2,rt={display:Z.css('display'),lineHeight:Z.css('lineHeight'),fontFamily:Z.css('fontFamily'),fontWeight:Z.css('fontWeight'),fontSize:Z.css('fontSize'),letterSpacing:Z.css('letterSpacing'),paddingTop:st+'px',paddingBottom:st+'px'},lt=jQuery(r),pt=jQuery(d),dt=0,ct=0,gt=0,ft=0,ut=0,ht=0;if(et&&(lt.css(rt),lt.css({maxWidth:'initial'}),ut=lt[0].getBoundingClientRect().width,utut?0:ut,ft+=ut;var xt;et&&(xt={},xt[ot]=gt+'px',xt.maxWidth=ut+'px',lt.css(xt)),tt&&(xt={},xt[ot]=ct+'px',xt.maxWidth=dt+'px',pt.css(xt)),xt={},xt['text-indent']=ft+'px',Z.css(xt)}},L=function(){var Z='',Q=!!c.length,tt=!!l.length,et=c,it=l;tsf.states.isTermEdit&&tsf.params.termName&&(it=y?' :'+tsf.params.termName:tsf.params.termName+': ',tt=tsf.states.useTermPrefix),Z=f,tt&&('before'===o?Z=it+Z:'after'===o?Z+=it:void 0),Q&&('before'===n?Z=et+Z:'after'===n?Z+=et:void 0),a&&(s=!0);var st=document.createElement('span');st.innerHTML=Z,t.prop('placeholder',st.textContent),a&&setTimeout(function(){s=!1},0)},E=function(Y){var Z=document.getElementById('tsf-title-reference'),Q='';Z&&(1>Y.target.value.length?Q=Y.target.placeholder:(Q=Y.target.value,l.length&&('before'===o?Q=l+Q:'after'===o?Q+=l:void 0),c.length&&('before'===n?Q=c+Q:'after'===n?Q+=c:void 0)),Z.innerHTML=tsf.escapeString(Q),setTimeout(function(){jQuery(Z).change()},0))},W=function(Y){var Z=document.getElementById(Y.target.id+'_chars'),Q=document.getElementById('tsf-title-reference');if(Z&&Q){var tt=tsf.getStringLength(tsf.unescapeString(Q.innerHTML)),et=Y.target,it='',st=tsf.counterType,at='',ot='';25>tt||75<=tt?(it+='tsf-count-bad',at=tsf.i18n.bad):42>tt||55').html('&'+Z+';').text(),g=Q,jQuery('.tsf-sep-js').text(' '+g+' '),C(),O()});var M=function(){var Y=tsf.settingsChanged;P(!0),tsf.settingsChanged=Y};jQuery('#homepage-tab-general').on('tsf-tab-toggled',M),jQuery('#tsf-flex-inpost-tab-general').on('tsf-flex-tab-toggled',M);var N=0,F=function(){clearTimeout(N),N=setTimeout(M,50)};jQuery(window).one('tsf-ready',function(){jQuery(window).on('tsf-flex-resize',F)});var X=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function V(Y,Z){if(0<=X.indexOf(Z.id)){var Q=Z.querySelector('.inside');0=Z&&782<=Q&&M():782<=Z&&782>=Q&&M(),Z=Q},50)})})()}}},_initUnboundTitleSettings:function _initUnboundTitleSettings(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');jQuery('#tsf-title-placeholder, #tsf-title-placeholder-prefix').on('click',function s(d){var c=jQuery(d.target).siblings(t)[0];if('function'==typeof c.setSelectionRange){c.focus();var g=2*c.value.length;c.setSelectionRange(g,g)}else{var f=c.value;c.value='',c.focus(),c.value=f}});jQuery('#autodescription-site-settings\\[title_rem_additions\\]').on('click',function a(d){jQuery(d.target).is(':checked')?jQuery('.tsf-title-additions-js').css('display','none'):jQuery('.tsf-title-additions-js').css('display','inline')});jQuery('#tsf-title-location input').on('click',function o(d){var c=jQuery('.tsf-title-additions-example-left'),g=jQuery('.tsf-title-additions-example-right');'right'===jQuery(d.target).val()?(c.css('display','none'),g.css('display','inline')):(c.css('display','inline'),g.css('display','none'))});jQuery('#autodescription-site-settings\\[homepage_title\\]').on('input',function n(d){var c=d.target.value||'',g=jQuery('.tsf-custom-title-js');0===c.length?g.text(tsf.params.objectTitle):g.text(c)});jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input.tsfInputTagline',function r(d){var c=d.target.value||'',g=jQuery('.tsf-custom-tagline-js');0===c.length?(g.text(tsf.params.blogDescription),0===tsf.params.blogDescription.length?jQuery('#tsf-home-title-location .tsf-sep-js').hide():jQuery('#tsf-home-title-location .tsf-sep-js').show()):(g.text(c),jQuery('#tsf-home-title-location .tsf-sep-js').show())}),jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').trigger('input.tsfInputTagline');jQuery('#title-prefixes-toggle :input').on('click',function l(d){var c=jQuery(d.target),g=jQuery('.tsf-title-prefix-example');c.is(':checked')?g.css('display','none'):g.css('display','inline')})}},_initDescInputs:function _initDescInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_description, #autodescription-meta\\[description\\], #autodescription-site-settings\\[homepage_description\\]');if(t.length){var s=tsf.params.descriptionSeparator;jQuery('#tsf-description-separator input').on('click',function a(x){var b=jQuery(x.target).val(),T='';T='pipe'===b?'|':'dash'===b?'-':jQuery('
').html('&'+b+';').text(),s=T,jQuery('#autodescription-descsep-js').text(' '+s+' '),g()});var o=function(x){var b=document.getElementById(x.target.id+'_chars');if(b){var T=0,C=x.target,S='',I=tsf.counterType,L='',E='';T=1>C.value.length?tsf.getStringLength(C.placeholder):tsf.getStringLength(C.value),100>T||330<=T?(S+='tsf-count-bad',L=tsf.i18n.bad):137>T||300x.target.value.length?x.target.placeholder:x.target.value,b.innerHTML=tsf.escapeString(T),setTimeout(function(){jQuery(b).change()},0))},r=function(x){var b=document.getElementById(x.target.id+'_pixels'),T=document.getElementById('tsf-description-reference');if(b&&T){var C={e:b,text:tsf.unescapeString(T.innerHTML),guideline:tsf.params.descPixelGuideline};tsf.updatePixelCounter(C)}};t.on('input.tsfUpdateDescriptions',function l(x){n(x),o(x),r(x)});var d=function(){t.trigger('input.tsfUpdateDescriptions')};d();var c=0,g=function(){clearTimeout(c),c=setTimeout(function(){d()},50)};jQuery(window).on('tsf-counter-updated',g);var u=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function y(x,b){if(0<=u.indexOf(b.id)){var T=b.querySelector('.inside');0a?(r+='tsf-count-bad',d=tsf.i18n.bad):(r+='tsf-count-good',d=tsf.i18n.good),l&&1!=l?2==l?c=d:3==l&&(c=n.toString()+' - '+d):c=n.toString(),o.innerHTML=c,tsf.additionsClass&&(r+=' '+tsf.additionsClass),o.className!==r&&(o.className=r)}},_initCounters:function _initCounters(){if(tsf.hasInput){jQuery('.tsf-counter').on('click',function t(){++tsf.counterType,3N.clientHeight?N.offsetWidth-N.clientWidth+25-2:25;tsf.states.isRTL?q.querySelector('.tsf-primary-term-selector-help-wrap').style.left=F+'px':q.querySelector('.tsf-primary-term-selector-help-wrap').style.right=F+'px'},y=function(z){u(z.data.taxonomy)},x=function(z){var q=o.cloneNode(!0);return q.setAttribute('title',t[z].i18n.makePrimary),q.setAttribute('aria-label',t[z].i18n.makePrimary),q},b=function(z,q){var M=document.getElementById('autodescription[_primary_term_'+z+']');M&&M instanceof Element&&(M.value=q)},T=function(z,q){return!q&&d[z]?d[z]:(d[z]=jQuery('#'+z+'checklist, #'+z+'checklist-pop'),d[z])},C=function(z,q){return n[z].filter('[value="'+q+'"]')},S=function(z,q){var M=C(z,q).closest('label');M.length?(M.addClass('tsf-is-primary-term'),M.find('.tsf-set-primary-term').each(function(N,F){F.setAttribute('title',t[z].i18n.primary),F.setAttribute('aria-label',t[z].i18n.primary),F.querySelector('input').checked=!0}),b(z,q),c[z]=q):L(z)},I=function(z){var q=T(z).find('label');q.removeClass('tsf-is-primary-term'),q.find('.tsf-set-primary-term').each(function(M,N){N.setAttribute('title',t[z].i18n.makePrimary),N.setAttribute('aria-label',t[z].i18n.makePrimary),N.querySelector('input').checked=!1}),b(z,'')},L=function(z){var M,q=l[z].first();q.length&&(M=q.val()||'',S(z,M),c[z]=M)},E=function(z){var q=z.data.taxonomy,M=jQuery(z.target).closest('label').find('input[type=checkbox]').val();return I(q),S(q,M),!1},W=function(z){var q=z.data.taxonomy;switch(z.target.checked?(R(q,z.target),j(q,z.target)):(D(q,z.target),H(q,z.target)),l[q].length){case 0:b(q,'');break;case 1:L(q);}},j=function(z,q){var M;C(z,q.value).each(function(N,F){M=jQuery(F).closest('label'),M.find('.tsf-primary-term-selector').length||M.append(x(z))})},H=function(z,q){var M,N;C(z,q.value).each(function(F,X){M=jQuery(X).closest('label'),N=M.hasClass('tsf-is-primary-term'),M.removeClass('tsf-is-primary-term'),M.find('.tsf-primary-term-selector').remove(),N&&L(z)})},R=function(z,q){r[z]=r[z].add('[value="'+q.value+'"]'),l[z]=l[z].add(q)},D=function(z,q){r[z]=r[z].not('[value="'+q.value+'"]'),l[z]=l[z].not('[value="'+q.value+'"]')},P=function(z){var q=T(z,1);n[z]=q.find('input[type=checkbox]'),r[z]=q.find('input[type=checkbox]:checked');var N,M={};l[z]=r[z],l[z].each(function(F,X){N=jQuery(X).val(),M[N]?l[z].splice(F,1):M[N]=!0})},A=function(z,q,M){M.hasOwnProperty('settings')&&M.settings.hasOwnProperty('what')&&(P(M.settings.what),B(M.settings.what),O(M.settings.what),u(M.settings.what))},B=function(z){var q='tsfShowPrimary'+z,M={taxonomy:z},N=T(z),F=jQuery('#'+z+'div'),X=jQuery('#'+z+'-tabs');N.off('click.'+q),N.on('click.'+q,'input[type="checkbox"]',M,W),N.on('click.'+q,'.tsf-primary-term-selector',M,E),F.off('wpListAddEnd.'+q),F.on('wpListAddEnd.'+q,'#'+z+'checklist',A),X.off('click.'+q),X.on('click.'+q,'a',M,y)},O=function(z){T(z).find('input[type="checkbox"]:checked').each(function(q,M){j(z,M)}),t[z].primary?S(z,t[z].primary):L(z)};(function U(){for(var z in t)T(z).length&&(g(z),f(z),P(z),B(z),O(z))})()}},_initToolTips:function _initToolTips(){var t=0,s=!1,a=function(){s=!0,clearTimeout(t),t=setTimeout(function(){s=!1},250)},o=function(y,x){x=x||!1;var b='pointerdown.tsfTT touchstart.tsfTT click.tsfTT',T=jQuery(y);x?(T.off('mousemove mouseleave mouseout tsf-tooltip-update'),jQuery(document.body).off(b)):(T.on({mousemove:d,mouseleave:c,mouseout:c}),jQuery(document.body).off(b).on(b,g)),T.on('tsf-tooltip-update',r)},n=function(y){o(y,!0)},r=function(y){if(y.target.classList.contains('tsf-tooltip-item')){var x=y.target.querySelector('.tsf-tooltip-text');x instanceof Element&&(x.innerHTML=y.target.dataset.desc)}},l=function(y){var x=jQuery(y.target),b=y.target.dataset.desc;if(b&&0===x.find('div').length){y.target.title='';var T=jQuery('
'+b+'
');x.append(T);var C=x.closest('.tsf-tooltip-boundary');C=C.length&&C||jQuery(document.body);var S=x.outerHeight()+9,I=T.offset().top-S,L=C.offset().top-(C.prop('scrolltop')||0);L>I?(T.addClass('tsf-tooltip-down'),T.css('top',S+'px')):T.css('bottom',S+'px');var E=x.closest('.tsf-tooltip-wrap'),W=T.find('.tsf-tooltip-text-wrap'),j=W.find('.tsf-tooltip-text'),H=E.width(),R=W.outerWidth(!0),D=j.outerWidth(!0),P=W.offset().left,A=P+D,B=C.offset().left-(C.prop('scrollLeft')||0),O=B+C.outerWidth(),U='left';if(PO){var M=O-A-H-12,N=parseInt(W.css('flex-basis'),10);M<-N&&(M=-N),T.css(U,M+'px'),T.data('overflow',M),T.data('overflowDir',U)}else if(42>H){var F=-15;T.css(U,F+'px'),T.data('overflow',F),T.data('overflowDir',U)}else if(H>R){var X=y.originalEvent&&y.originalEvent.pageX||y.pageX,V=E.offset().left,J=X-V-R/2,K=J+R;0>J?J=0:K>H&&(J=H-D),T.css(U,J+'px'),T.data('adjust',J),T.data('adjustDir',U)}}},d=function(y){var x=jQuery(y.target),b=x.find('.tsf-tooltip'),T=b.find('.tsf-tooltip-arrow'),C=b.data('overflow'),S=b.data('overflowDir');if(C=parseInt(C,10),C=isNaN(C)?0:-Math.round(C),C)T.css(S,C+'px');else{var I=y.originalEvent&&y.originalEvent.pageX||y.pageX,L=7,E=16,W=x.closest('.tsf-tooltip-wrap'),j=I-W.offset().left-E/2,R=b.find('.tsf-tooltip-text-wrap'),D=R.outerWidth(!0),P=b.data('adjust'),A=b.data('adjustDir'),B=D-E-L;if(P=parseInt(P,10),P=isNaN(P)?0:Math.round(P),P&&(P='left'===A?-P:P,j+=P,B-P>W.outerWidth(!0))){var O=R.find('.tsf-tooltip-text'),U=O.outerWidth(!0);B=U-E-L}j<=L?T.css('left',L+'px'):j>=B?T.css('left',B+'px'):T.css('left',j+'px')}},c=function(y){s||(jQuery(y.target).find('.tsf-tooltip').remove(),n(y.target))},g=function(y){a();var C,b='.tsf-tooltip',T=jQuery(y.target);if(T.hasClass('tsf-tooltip-item')&&(C=T.find(b)),!C){var S=T.children('.tsf-tooltip-item');S.length&&(C=S.find(b))}C&&C.length?jQuery(b).not(C).remove():jQuery(b).remove()},f=function(y){if(!s){var x=!1;switch(y.type){case'mouseenter':break;case'pointerdown':case'touchstart':x=!0;break;default:}if(y.target.classList.contains('tsf-tooltip-item'))x&&g(y),l(y),d(y),o(y.target);else{var b=y.target.querySelector('.tsf-tooltip-item:hover'),T=new jQuery.Event(y.type);T.pageX=y.originalEvent&&y.originalEvent.pageX||y.pageX,b?(tsfL10n.states.debug&&console.log('Tooltip event warning: delegation'),jQuery(b).trigger(T)):(tsfL10n.states.debug&&console.log('Tooltip event warning: bubbling'),jQuery(y.target).closest('.tsf-tooltip-wrap').find('.tsf-tooltip-item:hover').trigger(T))}y.stopPropagation()}},u=function(){var y=jQuery('.tsf-tooltip-wrap');y.off('mouseenter pointerdown touchstart'),y.on('mouseenter pointerdown touchstart','.tsf-tooltip-item',f)};u(),jQuery(window).on('tsf-reset-tooltips',u),function(){var y=jQuery('#wpcontent');tsf.addTooltipBoundary(y)}()},addTooltipBoundary:function addTooltipBoundary(t){jQuery(t).addClass('tsf-tooltip-boundary')},tabToggle:function tabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-active-tab-content',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-tab-toggled')},175)}}}},flexTabToggle:function flexTabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-flex-tab-content-active',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-flex-tab-toggled')},175)}}}},setTabsOnload:function setTabsOnload(){if(tsf.hasInput)if(tsf.states.isSettingsPage){var t=jQuery('.tsf-nav-tab-wrapper .tsf-tab:nth-of-type(n+2) input:checked');t.length&&t.each(function(){var a=jQuery(this),o=a.prop('id'),n=a.prop('name');if('undefined'!=typeof n){var r='tsf-active-tab-content',l=jQuery('#'+o+'-content');if('undefined'!=typeof l){var d=jQuery('.'+n+'-content');d.removeClass(r),l.addClass(r),setTimeout(function(){jQuery('#'+o).trigger('tsf-tab-toggled')},20)}}})}else;},taglineToggleDesc:function taglineToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-on-blogname-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},additionsToggleDesc:function additionsToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-description-additions-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},taglineToggleOnload:function taglineToggleOnload(){if(tsf.hasInput){var t=jQuery('#tsf-title-tagline-toggle :input'),s=jQuery('.tsf-custom-blogname-js'),a=jQuery('#tsf-description-additions-toggle :input'),o=jQuery('#tsf-description-additions-js'),n=jQuery('#tsf-description-onblogname-toggle :input'),r=jQuery('#tsf-on-blogname-js'),l=jQuery('#tsf-title-additions-toggle :input'),d=jQuery('.tsf-title-additions-js');t.is(':checked')?s.css('display','inline'):s.css('display','none'),a.is(':checked')?o.css('display','inline'):o.css('display','none'),n.is(':checked')?r.css('display','inline'):r.css('display','none'),l.is(':checked')?d.css('display','none'):d.css('display','inline')}},attachUnsavedChangesListener:function attachUnsavedChangesListener(){if(tsf.hasInput){var t=function(o){tsf.settingsChanged||tsf.registerChange(),jQuery(s).not(a).off(o.type,t)},s='.tsf-metaboxes :input, #tsf-inpost-box .inside :input',a='.tsf-tab :input, .tsf-flex-nav-tab :input';jQuery(s).not(a).on('change',t),s='.tsf-metaboxes input[type=text], .tsf-metaboxes textarea, #tsf-inpost-box .inside input[type=text], #tsf-inpost-box .inside textarea',a='.tsf-nav-tab-wrapper input, .tsf-flex-nav-tab-wrapper input',jQuery(s).not(a).on('input',t),window.onbeforeunload=function(){if(tsf.settingsChanged)return tsf.i18n.saveAlert},jQuery('.tsf-metaboxes input[type="submit"], #publishing-action input[type="submit"], #save-action input[type="submit"], a.submitdelete').click(function(){window.onbeforeunload=null})}},registerChange:function registerChange(){tsf.settingsChanged=!0},confirmedReset:function confirmedReset(){return confirm(tsf.i18n.confirmReset)},onLoadUnregisterChange:function onLoadUnregisterChange(){tsf.settingsChanged=!1},dismissNotice:function dismissNotice(t){jQuery(t.target).parents('.tsf-notice').slideUp(200,function(){this.remove()})},setAjaxLoader:function setAjaxLoader(t){jQuery(t).toggleClass('tsf-loading')},unsetAjaxLoader:function unsetAjaxLoader(t,s){var a='tsf-success',o=2500;s||(a='tsf-error',o=5e3),jQuery(t).removeClass('tsf-loading').addClass(a).fadeOut(o)},resetAjaxLoader:function resetAjaxLoader(t){jQuery(t).stop().empty().prop('class','tsf-ajax').css('opacity','1').removeProp('style')},openImageEditor:function openImageEditor(t){if(jQuery(t.target).prop('disabled')||'undefined'==typeof wp.media)return t.preventDefault(),void t.stopPropagation();var s=jQuery(t.target),a=s.data('inputid'),o;if(o)return void o.open();t.preventDefault(),t.stopPropagation(),tsf.extendCropper();var n={suggestedWidth:s.data('width')||1200,suggestedHeight:s.data('height')||630,isFlex:'undefined'==typeof s.data('flex')?1:s.data('flex')};tsf.cropper.control={params:{flex_width:n.isFlex?4096:0,flex_height:n.isFlex?4096:0,width:n.suggestedWidth,height:n.suggestedHeight,isFlex:n.isFlex}},o=wp.media({button:{text:tsf.other[a].frame_button,close:!1},states:[new wp.media.controller.Library({title:tsf.other[a].frame_title,library:wp.media.query({type:'image'}),multiple:!1,date:!1,priority:20,suggestedWidth:n.suggestedWidth,suggestedHeight:n.suggestedHeight}),new tsf.cropper({imgSelectOptions:tsf.calculateImageSelectOptions})]});var r=function(){o.setState('cropper')};o.off('select',r),o.on('select',r);var l=function(g){var f=g.url,u=g.id,y=g.width,x=g.height;jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('cropped',l),o.on('cropped',l);var d=function(g){var f=g.get('url'),u=g.get('id'),y=g.get('width'),x=g.get('height');jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('skippedcrop',d),o.on('skippedcrop',d);var c=function(){jQuery('#'+a+'-select').text(tsf.other[a].change),jQuery('#'+a+'-url').prop('readonly',!0).css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing'),tsf.appendRemoveButton(s,a,!0),tsf.registerChange()};o.off('skippedcrop cropped',c),o.on('skippedcrop cropped',c),o.open()},appendRemoveButton:function appendRemoveButton(t,s,a){t&&s&&!jQuery('#'+s+'-remove').length&&(t.after(''+tsf.other[s].remove+''),a&&jQuery('#'+s+'-remove').css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing')),tsf.resetImageEditorActions()},removeEditorImage:function removeEditorImage(t){var s=jQuery(t.target).data('inputid');if(!jQuery('#'+s+'-select').prop('disabled')){jQuery('#'+s+'-select').addClass('disabled').prop('disabled',!0),jQuery('#'+s+'-remove').addClass('disabled').prop('disabled',!0).fadeOut(500,function(){jQuery(this).remove(),jQuery('#'+s+'-select').text(tsf.other[s].select).removeClass('disabled').removeProp('disabled')});var a=jQuery('#'+s+'-url');a.val(''),a.data('readonly')||a.removeProp('readonly'),a.css('opacity',0).animate({opacity:1},{queue:!0,duration:500},'swing'),jQuery('#'+s+'-id').val(''),tsf.registerChange()}},extendCropper:function extendCropper(){if('undefined'==typeof tsf.cropper.control){var t,a,s=wp.media.controller,o=wp.media.view;return a=o.Cropper.extend({className:'crop-content tsf-image',ready:function ready(){o.Cropper.prototype.ready.apply(this,arguments)},onImageLoad:function onImageLoad(){var r,n=this.controller.get('imgSelectOptions');'function'==typeof n&&(n=n(this.options.attachment,this.controller)),'undefined'==typeof n.aspectRatio&&(n=_.extend(n,{parent:this.$el,onInit:function onInit(){this.parent.children().on('mousedown touchstart',function(l){l.shiftKey?r.setOptions({aspectRatio:'1:1'}):r.setOptions({aspectRatio:!1})})}})),this.trigger('image-loaded'),r=this.controller.imgSelect=this.$image.imgAreaSelect(n)}}),t=s.Cropper.extend({createCropContent:function createCropContent(){this.cropperView=new a({controller:this,attachment:this.get('selection').first()}),this.cropperView.on('image-loaded',this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function doCrop(n){var r=n.get('cropDetails'),l=tsf.cropper.control;if(l.params.flex_width&&l.params.flex_height)if(r.width===r.height)r.width>l.params.flex_width&&(r.dst_width=r.dst_height=l.params.flex_width);else if(r.width>l.params.flex_width||r.height>l.params.flex_height)if(r.width>r.height){var d=r.width/l.params.flex_width;r.dst_width=l.params.flex_width,r.dst_height=Math.round(r.height/d)}else{var c=r.height/l.params.flex_height;r.dst_height=l.params.flex_height,r.dst_width=Math.round(r.width/c)}return'undefined'==typeof r.dst_width&&(r.dst_width=0,r.dst_height=0),wp.ajax.post('tsf-crop-image',{nonce:tsf.nonces.upload_files,id:n.get('id'),context:'tsf-image',cropDetails:r})}}),t.prototype.control={},void(tsf.cropper=t)}},calculateImageSelectOptions:function calculateImageSelectOptions(t,s){var y,x,b,T,a=tsf.cropper.control,o=!!parseInt(a.params.flex_width,10),n=!!parseInt(a.params.flex_height,10),r=parseInt(a.params.width,10),l=parseInt(a.params.height,10),d=t.get('width'),c=t.get('height'),g=r/l,f=r,u=l;return T=a.params.isFlex?!tsf.mustBeCropped(a.params.flex_width,a.params.flex_height,d,c):g==d/c,s.set('control',a.params),s.set('canSkipCrop',T),d/c>g?(l=c,r=l*g):(r=d,l=r/g),y=(d-r)/2,x=(c-l)/2,b={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:d,imageHeight:c,minWidth:f>r?r:f,minHeight:u>l?l:u,x1:y,y1:x,x2:r+y,y2:l+x},a.params.isFlex?n||o?(n&&(b.minHeight=200,b.maxWidth=d),o&&(b.minWidth=200,b.maxHeight=c)):b.aspectRatio=r+':'+l:(b.handles='corners',b.aspectRatio=r+':'+l),b},mustBeCropped:function mustBeCropped(t,s,a,o){return a<=t&&o<=s?!1:!0},resetImageEditorActions:function resetImageEditorActions(){jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},setupImageEditorActions:function setupImageEditorActions(){jQuery('.tsf-set-social-image').off('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-set-social-image').on('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},checkImageEditorInput:function checkImageEditorInput(){var t=jQuery('.tsf-set-social-image');if(t.length){var s='',a='';jQuery.each(t,function(o,n){s=jQuery(n).data('inputid'),a=jQuery('#'+s+'-id'),a.length&&0d?(g.hide(),s.tabWrapper.shown=0):s.tabWrapper.outer