From 3a24751cf49519b4665ab543bdb9cce2d45c3343 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 20 Mar 2018 01:09:14 +0530 Subject: [PATCH 01/11] Possible duplicate function with moved PHPDoc block (#1593) * Possible duplicate function with moved PHPDoc block #909 * codeclimate * remove unneeded file and unused function 'xml_string_to_array' * make html consistent #909 --- admin/aioseop_module_class.php | 25 +-- inc/deprecated.php | 286 --------------------------------- 2 files changed, 3 insertions(+), 308 deletions(-) delete mode 100644 inc/deprecated.php diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php index 2dc4b6d58..49f255fcd 100644 --- a/admin/aioseop_module_class.php +++ b/admin/aioseop_module_class.php @@ -326,37 +326,18 @@ function strrpos( $haystack, $needle, $offset = 0 ) { } /** - * convert xml string to php array - useful to get a serializable value + * Convert html string to php array - useful to get a serializable value. * * @param string $xmlstr * * @return array - * - * @author Adrien aka Gaarf & contributors - * @see http://gaarf.info/2009/08/13/xml-string-to-php-array/ - */ - function html_string_to_array( $xmlstr ) { - if ( ! class_exists( 'DOMDocument' ) ) { - return array(); - } else { - $doc = new DOMDocument(); - $doc->loadHTML( $xmlstr ); - - return $this->domnode_to_array( $doc->documentElement ); - } - } - - /** - * @param $xmlstr - * - * @return array|string */ - function xml_string_to_array( $xmlstr ) { + function html_string_to_array( $htmlstr ) { if ( ! class_exists( 'DOMDocument' ) ) { return array(); } else { $doc = new DOMDocument(); - $doc->loadXML( $xmlstr ); + $doc->loadXML( $htmlstr ); return $this->domnode_to_array( $doc->documentElement ); } diff --git a/inc/deprecated.php b/inc/deprecated.php deleted file mode 100644 index 066aa0abf..000000000 --- a/inc/deprecated.php +++ /dev/null @@ -1,286 +0,0 @@ -token = 'anonymous'; - $this->secret = 'anonymous'; - $preload = $this->get_class_option(); - $manual_ua = ''; - if ( ! empty( $_POST ) ) { - if ( ! empty( $_POST[ "{$this->prefix}google_connect" ] ) ) { - $manual_ua = 1; - } - } elseif ( ! empty( $preload[ "{$this->prefix}google_connect" ] ) ) { - $manual_ua = 1; - } - if ( ! empty( $manual_ua ) ) { - foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) { - if ( ! empty( $preload[ "{$this->prefix}{$v}" ] ) ) { - unset( $preload[ "{$this->prefix}{$v}" ] ); - unset( $this->$v ); - } - } - $this->update_class_option( $preload ); - $this->update_options(); - // return; - } - foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) { - if ( ! empty( $preload[ "{$this->prefix}{$v}" ] ) ) { - $this->$v = $preload[ "{$this->prefix}{$v}" ]; - } - } - $callback_url = null; - if ( ! empty( $_REQUEST['oauth_verifier'] ) ) { - $this->verifier = $_REQUEST['oauth_verifier']; - if ( ! empty( $_REQUEST['oauth_token'] ) ) { - if ( isset( $this->token ) && $this->token === $_REQUEST['oauth_token'] ) { - $this->access_token = $this->oauth_get_token( $this->verifier ); - if ( is_array( $this->access_token ) && ! empty( $this->access_token['oauth_token'] ) ) { - unset( $this->token ); - unset( $this->secret ); - $this->ga_token = $this->access_token['oauth_token']; - foreach ( array( 'token', 'secret', 'access_token', 'ga_token' ) as $v ) { - if ( ! empty( $this->$v ) ) { - $preload[ "{$this->prefix}{$v}" ] = $this->$v; - } - } - $this->update_class_option( $preload ); - } - } - wp_redirect( menu_page_url( plugin_basename( $this->file ), false ) ); - exit; - } - } - if ( ! empty( $this->ga_token ) ) { - if ( ! empty( $this->account_cache ) ) { - $ua = $this->account_cache['ua']; - $profiles = $this->account_cache['profiles']; - } else { - $this->token = $this->access_token['oauth_token']; - $this->secret = $this->access_token['oauth_token_secret']; - - $data = $this->oauth_get_data( 'https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles' ); - - $http_code = wp_remote_retrieve_response_code( $data ); - - if ( 200 === $http_code ) { - $response = wp_remote_retrieve_body( $data ); - $xml = $this->xml_string_to_array( $response ); - $ua = array(); - $profiles = array(); - if ( ! empty( $xml['entry'] ) ) { - $rec = array(); - $results = array(); - if ( ! empty( $xml['entry'][0] ) ) { - $results = $xml['entry']; - } else { - $results[] = $xml['entry']; - } - foreach ( $results as $r ) { - foreach ( $r as $k => $v ) { - switch ( $k ) { - case 'id': - $rec['id'] = $v; - break; - case 'title': - $rec['title'] = $v['@content']; - break; - case 'dxp:property': - $attr = array(); - foreach ( $v as $a => $f ) { - if ( is_array( $f ) && ! empty( $f['@attributes'] ) ) { - $rec[ $f['@attributes']['name'] ] = $f['@attributes']['value']; - } - } - break; - } - } - $ua[ $rec['title'] ] = array( $rec['ga:webPropertyId'] => $rec['ga:webPropertyId'] ); - $profiles[ $rec['ga:webPropertyId'] ] = $rec['ga:profileId']; - } - } - $this->account_cache = array(); - $this->account_cache['ua'] = $ua; - $this->account_cache['profiles'] = $profiles; - $preload[ "{$this->prefix}account_cache" ] = $this->account_cache; - } else { - unset( $this->token ); - unset( $this->secret ); - unset( $this->ga_token ); - unset( $preload[ "{$this->prefix}ga_token" ] ); // error condition here -- pdb - $response = wp_remote_retrieve_body( $data ); - $xml = $this->xml_string_to_array( $response ); - if ( ! empty( $xml ) && ! empty( $xml['error'] ) ) { - $error = 'Error: '; - if ( ! empty( $xml['error']['internalReason'] ) ) { - $error .= $xml['error']['internalReason']; - } else { - foreach ( $xml['error'] as $k => $v ) { - $error .= "$k: $v\n"; - } - } - $this->output_error( $error ); - } - } - } - } - if ( ! empty( $this->ga_token ) ) { - $this->default_options['google_analytics_id']['type'] = 'select'; - $this->default_options['google_analytics_id']['initial_options'] = $ua; - $this->default_options['google_connect']['type'] = 'html'; - $this->default_options['google_connect']['nolabel'] = 1; - $this->default_options['google_connect']['save'] = true; - $this->default_options['google_connect']['name'] = __( 'Disconnect From Google Analytics', 'all-in-one-seo-pack' ); - $this->default_options['google_connect']['default'] = ""; - add_filter( $this->prefix . 'override_options', array( $this, 'override_options' ), 10, 3 ); - } else { - $this->default_options['google_connect']['type'] = 'html'; - $this->default_options['google_connect']['nolabel'] = 1; - $this->default_options['google_connect']['save'] = false; - $url = $this->oauth_connect(); - $this->default_options['google_connect']['default'] = "" . __( 'Connect With Google Analytics', 'all-in-one-seo-pack' ) . ''; - foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) { - if ( ! empty( $this->$v ) ) { - $preload[ "{$this->prefix}{$v}" ] = $this->$v; - } - } - } - $this->update_class_option( $preload ); - $this->update_options(); - // $url = $this->report_query(); - if ( ! empty( $this->account_cache ) && ! empty( $this->options[ "{$this->prefix}google_analytics_id" ] ) && ! empty( $this->account_cache['profiles'][ $this->options[ "{$this->prefix}google_analytics_id" ] ] ) ) { - $this->profile_id = $this->account_cache['profiles'][ $this->options[ "{$this->prefix}google_analytics_id" ] ]; - } -} - -/** - * @param $oauth_url - * @param null $args - * - * @return array|WP_Error - */ -function oauth_get_data( $oauth_url, $args = null ) { - if ( ! class_exists( 'OAuthConsumer' ) ) { - require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' ); - } - if ( $args === null ) { - $args = array( - 'scope' => 'https://www.googleapis.com/auth/analytics.readonly', - 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ), - ); - } - $req_token = new OAuthConsumer( $this->token, $this->secret ); - $req = $this->oauth_get_creds( $oauth_url, $req_token, $args ); - - return wp_remote_get( $req->to_url() ); -} - -/** - * @param $oauth_url - * @param null $req_token - * @param array $args - * @param null $callback - * - * @return OAuthRequest - */ -function oauth_get_creds( $oauth_url, $req_token = null, $args = array(), $callback = null ) { - if ( ! class_exists( 'OAuthConsumer' ) ) { - require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' ); - } - if ( ! empty( $callback ) ) { - $args['oauth_callback'] = $callback; - } - if ( empty( $this->sig_method ) ) { - $this->sig_method = new OAuthSignatureMethod_HMAC_SHA1(); - } - if ( empty( $this->consumer ) ) { - $this->consumer = new OAuthCOnsumer( 'anonymous', 'anonymous' ); - } - $req_req = OAuthRequest::from_consumer_and_token( $this->consumer, $req_token, 'GET', $oauth_url, $args ); - $req_req->sign_request( $this->sig_method, $this->consumer, $req_token ); - - return $req_req; -} - -/** - * @param $oauth_verifier - * - * @return array - */ -function oauth_get_token( $oauth_verifier ) { - if ( ! class_exists( 'OAuthConsumer' ) ) { - require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' ); - } - $args = array( - 'scope' => 'https://www.google.com/analytics/feeds/', - 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ), - ); - $args['oauth_verifier'] = $oauth_verifier; - $oauth_access_token = 'https://www.google.com/accounts/OAuthGetAccessToken'; - $reqData = $this->oauth_get_data( $oauth_access_token, $args ); - $reqOAuthData = OAuthUtil::parse_parameters( wp_remote_retrieve_body( $reqData ) ); - - return $reqOAuthData; -} - -/** - * @param int $count - * - * @return string - */ -function oauth_connect( $count = 0 ) { - global $aiosp_activation; - if ( ! class_exists( 'OAuthConsumer' ) ) { - require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' ); - } - $url = ''; - $callback_url = null; - $consumer_key = 'anonymous'; - $consumer_secret = 'anonymous'; - $oauth_request_token = 'https://www.google.com/accounts/OAuthGetRequestToken'; - $oauth_authorize = 'https://www.google.com/accounts/OAuthAuthorizeToken'; - $oauth_access_token = 'https://www.google.com/accounts/OAuthGetAccessToken'; - if ( $aiosp_activation ) { - $oauth_current = false; - } else { - $oauth_current = get_transient( 'aioseop_oauth_current' ); - } - if ( ! empty( $this->token ) && ( $this->token != 'anonymous' ) && $oauth_current ) { - return $oauth_authorize . '?oauth_token=' . $this->token; - } else { - set_transient( 'aioseop_oauth_current', 1, 3600 ); - unset( $this->token ); - unset( $this->secret ); - } - $args = array( - 'scope' => 'https://www.google.com/analytics/feeds/', - 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ), - ); - if ( AIOSEOPPRO ) { - $req_req = $this->oauth_get_creds( $oauth_request_token, null, $args, admin_url( 'admin.php?page=all-in-one-seo-pack-pro/aioseop_class.php' ) ); - } else { - $req_req = $this->oauth_get_creds( $oauth_request_token, null, $args, admin_url( 'admin.php?page=all-in-one-seo-pack/aioseop_class.php' ) ); - } - $reqData = wp_remote_get( $req_req->to_url() ); - $reqOAuthData = OAuthUtil::parse_parameters( wp_remote_retrieve_body( $reqData ) ); - if ( ! empty( $reqOAuthData['oauth_token'] ) ) { - $this->token = $reqOAuthData['oauth_token']; - } - if ( ! empty( $reqOAuthData['oauth_token_secret'] ) ) { - $this->secret = $reqOAuthData['oauth_token_secret']; - } - if ( ! empty( $this->token ) && ( $this->token != 'anonymous' ) && $oauth_current ) { - $url = $oauth_authorize . "?oauth_token={$this->token}"; - } else { - if ( ! $count ) { - return $this->oauth_connect( 1 ); - } - } - - return $url; -} From ebea62dd61918854c459288398ef40a1475ec20f Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 20 Mar 2018 01:28:34 +0530 Subject: [PATCH 02/11] ACF macro is being output in titles and meta descriptions (#1488) * ACF macro is being output in titles and meta descriptions #959 * test case --- admin/aioseop_module_class.php | 3 -- aioseop_class.php | 5 +- tests/base/class-aioseop-test-base.php | 66 +++++++++++++++++++++++++ tests/modules/general/test-meta.php | 68 ++++++++++++++++++++++++++ 4 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 tests/modules/general/test-meta.php diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php index 49f255fcd..4738f9b96 100644 --- a/admin/aioseop_module_class.php +++ b/admin/aioseop_module_class.php @@ -425,9 +425,6 @@ function cf_field_replace( $matches ) { $result = get_post_meta( $post->ID, $matches[1], true ); } } - if ( empty( $result ) ) { - $result = $matches[0]; - } } else { $result = $matches[0]; } diff --git a/aioseop_class.php b/aioseop_class.php index db53ac918..b66e08b97 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -3793,8 +3793,9 @@ function wp_head() { global $aioseop_update_checker, $wp_query, $aioseop_options, $posts; static $aioseop_dup_counter = 0; $aioseop_dup_counter ++; - if ( $aioseop_dup_counter > 1 ) { - echo "\n\n"; + + if ( ! defined('AIOSEOP_UNIT_TESTING') && $aioseop_dup_counter > 1 ) { + echo "\n\n"; if ( ! empty( $old_wp_query ) ) { // Change the query back after we've finished. $GLOBALS['wp_query'] = $old_wp_query; diff --git a/tests/base/class-aioseop-test-base.php b/tests/base/class-aioseop-test-base.php index b314640a1..41b125d35 100644 --- a/tests/base/class-aioseop-test-base.php +++ b/tests/base/class-aioseop-test-base.php @@ -167,6 +167,72 @@ protected final function setup_posts( $without_images = 0, $with_images = 0, $ty ); } + /* + * Generates the HTML source of the given link. + */ + protected final function get_page_source( $link ) { + $html = ''; + $this->go_to( $link ); + ob_start(); + do_action( 'wp_head' ); + $html .= '' . ob_get_clean() . ''; + + ob_start(); + do_action( 'wp_footer' ); + $footer = ob_get_clean(); + $html .= '' . /* somehow get the body too */ $footer . ''; + return $html . ''; + } + + /* + * Parses the HTML of the given link and returns the nodes requested. + */ + protected final function parse_html( $link, $tags = array(), $debug = false ){ + $html = $this->get_page_source( $link ); + if ( $debug ) { + error_log( $html ); + } + + libxml_use_internal_errors(true); + $dom = new DOMDocument(); + $dom->loadHTML( $html ); + + $array = array(); + foreach ( $tags as $tag ) { + foreach ( $dom->getElementsByTagName( $tag ) as $node ) { + $array[] = $this->get_node_as_array($node); + } + } + return $array; + } + + /* + * Extracts the node from the HTML source. + */ + private function get_node_as_array($node) { + $array = false; + + if ($node->hasAttributes()) { + foreach ($node->attributes as $attr) { + $array[$attr->nodeName] = $attr->nodeValue; + } + } + + if ($node->hasChildNodes()) { + if ($node->childNodes->length == 1) { + $array[$node->firstChild->nodeName] = $node->firstChild->nodeValue; + } else { + foreach ($node->childNodes as $childNode) { + if ($childNode->nodeType != XML_TEXT_NODE) { + $array[$childNode->nodeName][] = $this->get_node_as_array($childNode); + } + } + } + } + + return $array; + } + /* * An empty test is required otherwise tests won't run. */ diff --git a/tests/modules/general/test-meta.php b/tests/modules/general/test-meta.php new file mode 100644 index 000000000..d303a3f09 --- /dev/null +++ b/tests/modules/general/test-meta.php @@ -0,0 +1,68 @@ +factory->post->create( array( 'post_type' => 'post', 'post_title' => 'hey', 'post_content' => $meta_desc ) ); + // update the AIOSEOP description to be the same as the post description. + update_post_meta( $id, '_aioseop_description', $meta_desc ); + + // if custom field is provided, create it and change the format. + if ( $custom_field ) { + $meta_desc = 'holahola'; + update_post_meta( $id, $format, $meta_desc ); + $format = "cf_{$format}"; + } + + // update the format. + $aioseop_options['aiosp_description_format'] = "%$format%"; + update_option( 'aioseop_options', $aioseop_options ); + + $link = get_permalink( $id ); + $meta = $this->parse_html( $link, array( 'meta' ) ); + + // should have atleast one meta tag. + $this->assertGreaterThan( 1, count( $meta ) ); + + $description = null; + foreach ( $meta as $m ) { + if ( 'description' === $m['name'] ) { + $description = $m['content']; + break; + } + } + $this->assertEquals( $meta_desc, $description ); + } + + /** + * Provides data to test meta with and without custom fields. + */ + public function acfDataProvider() { + return array( + array( 'description', false ), + array( 'custom_description', true ), + ); + } +} \ No newline at end of file From d6af2df3361352aa3edb324e1f4e10544fcae825 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 20 Mar 2018 03:52:16 +0530 Subject: [PATCH 03/11] Correct tags order according to Sitemap protocol (#1378) * Correct tags order according to Sitemap protocol #1371 * test case * sync with master * added phpdoc comment * sync with master * support for all phphunit versions * support for images only on PHPUnit 5.7 * correct tags for taxonomies * sync * < WP 4.4.0 * syntax error * < WP 4.4.0 * added composer to specify phpunit version * run composer on install * call vendor phpunit * phpunit global/local * composer global/local * composer install only when phpunit is local * local/global * do not delete file --- modules/aioseop_sitemap.php | 80 +++++++++-------- tests/base/class-sitemap-test-base.php | 50 +++++++++++ tests/modules/sitemap/test-sitemap.php | 60 +++++++++++++ tests/resources/xsd/combined.xsd | 5 ++ tests/resources/xsd/index.xsd | 75 ++++++++++++++++ tests/resources/xsd/sitemap-image.xsd | 71 +++++++++++++++ tests/resources/xsd/sitemap.xsd | 116 +++++++++++++++++++++++++ 7 files changed, 419 insertions(+), 38 deletions(-) create mode 100644 tests/resources/xsd/combined.xsd create mode 100644 tests/resources/xsd/index.xsd create mode 100644 tests/resources/xsd/sitemap-image.xsd create mode 100644 tests/resources/xsd/sitemap.xsd diff --git a/modules/aioseop_sitemap.php b/modules/aioseop_sitemap.php index 93bc59354..4d5ee1b7e 100644 --- a/modules/aioseop_sitemap.php +++ b/modules/aioseop_sitemap.php @@ -1657,39 +1657,39 @@ function get_sitemap_index_filenames() { $count = 1; for ( $post_count = 0; $post_count < $post_counts[ $sm ]; $post_count += $this->max_posts ) { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ), - 'priority' => $prio, + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ), 'changefreq' => $freq, + 'priority' => $prio, ); } } else { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ), - 'priority' => $prio, + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ), 'changefreq' => $freq, + 'priority' => $prio, ); } } else { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ), - 'priority' => $prio, + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ), 'changefreq' => $freq, + 'priority' => $prio, ); } } } if ( $this->option_isset( 'archive' ) ) { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_archive' . $suffix ), - 'priority' => $this->get_default_priority( 'archive' ), + 'loc' => aioseop_home_url ( '/' . $prefix . '_archive' . $suffix ), 'changefreq' => $this->get_default_frequency( 'archive' ), + 'priority' => $this->get_default_priority( 'archive' ), ); } if ( $this->option_isset( 'author' ) ) { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_author' . $suffix ), - 'priority' => $this->get_default_priority( 'author' ), + 'loc' => aioseop_home_url ( '/' . $prefix . '_author' . $suffix ), 'changefreq' => $this->get_default_frequency( 'author' ), + 'priority' => $this->get_default_priority( 'author' ), ); } @@ -1702,23 +1702,23 @@ function get_sitemap_index_filenames() { $count = 1; for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ), - 'priority' => $this->get_default_priority( 'taxonomies' ), + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ), 'changefreq' => $this->get_default_frequency( 'taxonomies' ), + 'priority' => $this->get_default_priority( 'taxonomies' ), ); } } else { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ), - 'priority' => $this->get_default_priority( 'taxonomies' ), + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ), 'changefreq' => $this->get_default_frequency( 'taxonomies' ), + 'priority' => $this->get_default_priority( 'taxonomies' ), ); } } else { $files[] = array( - 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ), - 'priority' => $this->get_default_priority( 'taxonomies' ), + 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ), 'changefreq' => $this->get_default_frequency( 'taxonomies' ), + 'priority' => $this->get_default_priority( 'taxonomies' ), ); } } @@ -1727,8 +1727,8 @@ function get_sitemap_index_filenames() { foreach ( $this->get_child_sitemap_urls() as $csm ) { $files[] = array( 'loc' => $csm, - 'priority' => $this->get_default_priority( 'sitemap' ), 'changefreq' => $this->get_default_frequency( 'sitemap' ), + 'priority' => $this->get_default_priority( 'sitemap' ), ); } @@ -1907,8 +1907,8 @@ function get_simple_sitemap() { $home = array( 'loc' => aioseop_home_url(), - 'priority' => $this->get_default_priority( 'homepage' ), 'changefreq' => $this->get_default_frequency( 'homepage' ), + 'priority' => $this->get_default_priority( 'homepage' ), 'image:image' => $this->get_images_from_post( (int) get_option( 'page_on_front' ) ), ); @@ -1919,8 +1919,8 @@ function get_simple_sitemap() { } else { $posts = array( 'loc' => $posts, - 'priority' => $this->get_default_priority( 'blog' ), 'changefreq' => $this->get_default_frequency( 'blog' ), + 'priority' => $this->get_default_priority( 'blog' ), ); } } @@ -1941,8 +1941,8 @@ function get_simple_sitemap() { if ( ( null != $posts ) && isset( $posts['loc'] ) ) { foreach ( $prio as $k => $p ) { if ( $p['loc'] === $posts['loc'] ) { - $prio[ $k ]['priority'] = $this->get_default_priority( 'blog' ); $prio[ $k ]['changefreq'] = $this->get_default_frequency( 'blog' ); + $prio[ $k ]['priority'] = $this->get_default_priority( 'blog' ); $posts = null; break; } @@ -2185,16 +2185,16 @@ function get_term_priority_data( $terms ) { foreach ( $terms as $term ) { $pr_info = array(); $pr_info['loc'] = $this->get_term_link( $term, $term->taxonomy ); - if ( ( 'sel' === $this->options[ $this->prefix . 'prio_taxonomies' ] ) && isset( $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ] ) && ( 'no' != $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ] ) ) { - $pr_info['priority'] = $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ]; - } else { - $pr_info['priority'] = $def_prio; - } if ( ( 'sel' === $this->options[ $this->prefix . 'freq_taxonomies' ] ) && isset( $this->options[ $this->prefix . 'freq_taxonomies_' . $term->taxonomy ] ) && ( 'no' != $this->options[ $this->prefix . 'freq_taxonomies_' . $term->taxonomy ] ) ) { $pr_info['changefreq'] = $this->options[ $this->prefix . 'freq_taxonomies_' . $term->taxonomy ]; } else { $pr_info['changefreq'] = $def_freq; } + if ( ( 'sel' === $this->options[ $this->prefix . 'prio_taxonomies' ] ) && isset( $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ] ) && ( 'no' != $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ] ) ) { + $pr_info['priority'] = $this->options[ $this->prefix . 'prio_taxonomies_' . $term->taxonomy ]; + } else { + $pr_info['priority'] = $def_prio; + } $pr_info['image:image'] = $this->get_images_from_term( $term ); $prio[] = $pr_info; @@ -2386,8 +2386,8 @@ function get_addl_pages() { $home = array(); $home = array( 'loc' => aioseop_home_url(), - 'priority' => $this->get_default_priority( 'homepage' ), 'changefreq' => $this->get_default_frequency( 'homepage' ), + 'priority' => $this->get_default_priority( 'homepage' ), 'image:image' => $this->get_images_from_post( (int) get_option( 'page_on_front' ) ), ); @@ -2399,8 +2399,8 @@ function get_addl_pages() { } else { $posts = array( 'loc' => $posts, - 'priority' => $this->get_default_priority( 'blog' ), 'changefreq' => $this->get_default_frequency( 'blog' ), + 'priority' => $this->get_default_priority( 'blog' ), ); } } else { @@ -2681,12 +2681,12 @@ function get_prio_from_posts( $posts, $prio_override = false, $freq_override = f } $pr_info = $this->get_prio_calc( $date, $stat ); } - if ( $prio_override ) { - $pr_info['priority'] = $prio_override; - } if ( $freq_override ) { $pr_info['changefreq'] = $freq_override; } + if ( $prio_override ) { + $pr_info['priority'] = $prio_override; + } if ( ( 'sel' === $this->options[ $this->prefix . 'prio_post' ] ) && isset( $this->options[ $this->prefix . 'prio_post_' . $post->post_type ] ) ) { if ( ( 'no' != $this->options[ $this->prefix . 'prio_post_' . $post->post_type ] ) && ( 'sel' !== $this->options[ $this->prefix . 'prio_post_' . $post->post_type ] ) ) { $pr_info['priority'] = $this->options[ $this->prefix . 'prio_post_' . $post->post_type ]; @@ -2699,11 +2699,11 @@ function get_prio_from_posts( $posts, $prio_override = false, $freq_override = f } $pr_info = array( 'loc' => $url, - 'image:image' => $is_single ? $this->get_images_from_post( $post ) : null, ) + $pr_info; // Prepend loc to the array. if ( is_float( $pr_info['priority'] ) ) { $pr_info['priority'] = sprintf( '%0.1F', $pr_info['priority'] ); } + $pr_info['image:image'] = $is_single ? $this->get_images_from_post( $post ) : null; $pr_info = apply_filters( $this->prefix . 'prio_item_filter', $pr_info, $post, $args ); if ( ! empty( $pr_info ) ) { $prio[] = $pr_info; @@ -2724,19 +2724,23 @@ function get_prio_from_posts( $posts, $prio_override = false, $freq_override = f * @return array */ private function get_images_from_term( $term ) { + global $wp_version; if ( ! aiosp_include_images() ) { return array(); } $images = array(); - $thumbnail_id = get_term_meta( $term->term_id, 'thumbnail_id', true ); - if ( $thumbnail_id ) { - $image = wp_get_attachment_url( $thumbnail_id ); - if ( $image ) { - $images['image:image'] = array( - 'image:loc' => $image, - ); + // the table term meta table is not defined for lower versions. + if ( version_compare( $wp_version, '4.4.0', '>=' ) ) { + $thumbnail_id = get_term_meta( $term->term_id, 'thumbnail_id', true ); + if ( $thumbnail_id ) { + $image = wp_get_attachment_url( $thumbnail_id ); + if ( $image ) { + $images['image:image'] = array( + 'image:loc' => $image, + ); + } } } diff --git a/tests/base/class-sitemap-test-base.php b/tests/base/class-sitemap-test-base.php index 2cfb330e0..74a23fc29 100644 --- a/tests/base/class-sitemap-test-base.php +++ b/tests/base/class-sitemap-test-base.php @@ -50,6 +50,10 @@ protected final function validate_sitemap( $elements, $debug = false ) { if ( $debug ) { echo file_get_contents( $file ); } + + // validate file according to schema. + $this->validate_sitemap_schema( $file, 'combined' ); + $xml = simplexml_load_file( $file ); $ns = $xml->getNamespaces( true ); @@ -104,9 +108,55 @@ protected final function validate_sitemap( $elements, $debug = false ) { } } + $contents = file_get_contents( $file ); // @codingStandardsIgnoreStart @unlink( $file ); // @codingStandardsIgnoreEnd + return $contents; + } + + /** + * Check whether the sitemap index is valid. + * + * @param array $types All the types of sitemaps that should exist besides the regular one. + */ + protected final function validate_sitemap_index( $types = array(), $debug = false ) { + add_filter( 'aioseo_sitemap_ping', '__return_false' ); + update_option( 'blog_public', 0 ); + + // sitemap will be created in the root of the folder. + do_action( 'aiosp_sitemap_settings_update' ); + + $types[] = ''; + foreach ( $types as $type ) { + $schema = 'index'; + if ( ! empty( $type ) ) { + $type = "_{$type}"; + $schema = 'combined'; + } + $file = ABSPATH . "/sitemap{$type}.xml"; + + $this->assertFileExists( $file ); + if ( $debug ) { + echo file_get_contents($file); + } + $this->validate_sitemap_schema( $file, $schema ); + } + } + + /** + * Check whether the sitemap is valid according to its schema. + * + * @param string $file The path of the file. + * @param string $schema The schema type. + */ + protected final function validate_sitemap_schema( $file, $schema ) { + // validate file according to schema. + libxml_use_internal_errors(true); + $dom = new DOMDocument(); + $dom->load( $file ); + + $this->assertTrue( $dom->schemaValidate( AIOSEOP_UNIT_TESTING_DIR . "/resources/xsd/{$schema}.xsd" ) ); } /** diff --git a/tests/modules/sitemap/test-sitemap.php b/tests/modules/sitemap/test-sitemap.php index c0dc1aee0..354089075 100644 --- a/tests/modules/sitemap/test-sitemap.php +++ b/tests/modules/sitemap/test-sitemap.php @@ -125,6 +125,46 @@ public function test_exclude_images() { ); } + /** + * Adds posts to taxonomies, enables only taxonomies in the sitemap. + */ + public function test_only_taxonomies() { + // create 3 categories. + $test1 = wp_create_category( 'test1' ); + $test2 = wp_create_category( 'test2' ); + $test3 = wp_create_category( 'test3' ); + + $ids = $this->factory->post->create_many( 10 ); + + // first 3 to test1, next 3 to test2 and let others remain uncategorized. + for ( $x = 0; $x < 3; $x++ ) { + wp_set_post_categories( $ids[ $x ], $test1 ); + } + + for ( $x = 3; $x < 6; $x++ ) { + wp_set_post_categories( $ids[ $x ], $test2 ); + } + + $custom_options = array(); + $custom_options['aiosp_sitemap_indexes'] = ''; + $custom_options['aiosp_sitemap_images'] = ''; + $custom_options['aiosp_sitemap_gzipped'] = ''; + $custom_options['aiosp_sitemap_taxonomies'] = array( 'category' ); + $custom_options['aiosp_sitemap_posttypes'] = array(); + + $this->_setup_options( 'sitemap', $custom_options ); + + // in the sitemap, test3 should not appear as no posts have been assigned to it. + $this->validate_sitemap( + array( + get_category_link( $test1 ) => true, + get_category_link( $test2 ) => true, + get_category_link( $test3 ) => false, + get_category_link( 1 ) => true, + ) + ); + } + /** * @requires PHPUnit 5.7 * Creates different types of posts, enables indexes and pagination and checks if the posts are being paginated correctly without additional/blank sitemaps. @@ -201,6 +241,26 @@ public function test_add_external_urls( $url1, $url2 ) { ); } + /** + * @requires PHPUnit 5.7 + * Enables indexes and tests that the index and individual sitemaps are all valid according to the schema. + * + * @ticket 1371 Correct tags order according to Sitemap protocol + */ + public function test_index() { + $posts = $this->setup_posts( 2, 2 ); + + $custom_options = array(); + $custom_options['aiosp_sitemap_indexes'] = 'on'; + $custom_options['aiosp_sitemap_images'] = ''; + $custom_options['aiosp_sitemap_gzipped'] = ''; + $custom_options['aiosp_sitemap_posttypes'] = array( 'post' ); + + $this->_setup_options( 'sitemap', $custom_options ); + + $this->validate_sitemap_index( array( 'post' ) ); + } + /** * Returns the urls to be added to the sitemap. */ diff --git a/tests/resources/xsd/combined.xsd b/tests/resources/xsd/combined.xsd new file mode 100644 index 000000000..590eef6bf --- /dev/null +++ b/tests/resources/xsd/combined.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/resources/xsd/index.xsd b/tests/resources/xsd/index.xsd new file mode 100644 index 000000000..5b4b9e2d5 --- /dev/null +++ b/tests/resources/xsd/index.xsd @@ -0,0 +1,75 @@ + + + + + XML Schema for Sitemap index files. + Last Modifed 2009-04-08 + + + + + + + Container for a set of up to 50,000 sitemap URLs. + This is the root element of the XML file. + + + + + + + + + + + + + + Container for the data needed to describe a sitemap. + + + + + + + + + + + + + REQUIRED: The location URI of a sitemap. + The URI must conform to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt). + + + + + + + + + + + + OPTIONAL: The date the document was last modified. The date must conform + to the W3C DATETIME format (http://www.w3.org/TR/NOTE-datetime). + Example: 2005-05-10 + Lastmod may also contain a timestamp. + Example: 2005-05-10T17:33:30+08:00 + + + + + + + + + + + + + + diff --git a/tests/resources/xsd/sitemap-image.xsd b/tests/resources/xsd/sitemap-image.xsd new file mode 100644 index 000000000..440d2772a --- /dev/null +++ b/tests/resources/xsd/sitemap-image.xsd @@ -0,0 +1,71 @@ + + + + + + XML Schema for the Image Sitemap extension. This schema defines the + Image-specific elements only; the core Sitemap elements are defined + separately. + + Help Center documentation for the Image Sitemap extension: + + http://www.google.com/support/webmasters/bin/answer.py?answer=178636 + + Copyright 2010 Google Inc. All Rights Reserved. + + + + + + + Encloses all information about a single image. Each URL (<loc> tag) + can include up to 1,000 <image:image> tags. + + + + + + + + The URL of the image. + + + + + + + The caption of the image. + + + + + + + The geographic location of the image. For example, + "Limerick, Ireland". + + + + + + + The title of the image. + + + + + + + A URL to the license of the image. + + + + + + + + diff --git a/tests/resources/xsd/sitemap.xsd b/tests/resources/xsd/sitemap.xsd new file mode 100644 index 000000000..e1241849d --- /dev/null +++ b/tests/resources/xsd/sitemap.xsd @@ -0,0 +1,116 @@ + + + + + XML Schema for Sitemap files. + Last Modifed 2008-03-26 + + + + + + + Container for a set of up to 50,000 document elements. + This is the root element of the XML file. + + + + + + + + + + + + + + Container for the data needed to describe a document to crawl. + + + + + + + + + + + + + + + REQUIRED: The location URI of a document. + The URI must conform to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt). + + + + + + + + + + + + OPTIONAL: The date the document was last modified. The date must conform + to the W3C DATETIME format (http://www.w3.org/TR/NOTE-datetime). + Example: 2005-05-10 + Lastmod may also contain a timestamp. + Example: 2005-05-10T17:33:30+08:00 + + + + + + + + + + + + + + + + OPTIONAL: Indicates how frequently the content at a particular URL is + likely to change. The value "always" should be used to describe + documents that change each time they are accessed. The value "never" + should be used to describe archived URLs. Please note that web + crawlers may not necessarily crawl pages marked "always" more often. + Consider this element as a friendly suggestion and not a command. + + + + + + + + + + + + + + + + + OPTIONAL: The priority of a particular URL relative to other pages + on the same site. The value for this element is a number between + 0.0 and 1.0 where 0.0 identifies the lowest priority page(s). + The default priority of a page is 0.5. Priority is used to select + between pages on your site. Setting a priority of 1.0 for all URLs + will not help you, as the relative priority of pages on your site + is what will be considered. + + + + + + + + + From 7436f69df5490a7479b872290c811e0780dcb485 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 21 Mar 2018 02:59:31 +0530 Subject: [PATCH 04/11] handle scheme-less urls (#1286) * handle scheme-less urls * code climate * test case * support for all WP versions * use parse_url over wp_parse_url * support for WP 4.3 and below * @requires PHPUnit 5.7 * remove extraneous code --- inc/aiosp_common.php | 11 ++++++-- modules/aioseop_sitemap.php | 20 +++++++++----- tests/modules/sitemap/test-sitemap.php | 38 ++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/inc/aiosp_common.php b/inc/aiosp_common.php index 5b22b3d89..31166706e 100644 --- a/inc/aiosp_common.php +++ b/inc/aiosp_common.php @@ -116,8 +116,15 @@ static function get_upgrade_url() { * @return string */ static function absolutize_url( $url ) { - if ( strpos( $url, 'http' ) !== 0 && strpos( $url, '//' ) !== 0 && $url != '/' ) { - $url = home_url( $url ); + if ( 0 !== strpos( $url, 'http' ) && '/' !== $url ) { + if ( 0 === strpos( $url, '//' ) ) { + // for ///resource type urls. + $scheme = parse_url( home_url(), PHP_URL_SCHEME ); + $url = $scheme . ':' . $url; + } else { + // for /resource type urls. + $url = home_url( $url ); + } } return $url; } diff --git a/modules/aioseop_sitemap.php b/modules/aioseop_sitemap.php index 4d5ee1b7e..062613672 100644 --- a/modules/aioseop_sitemap.php +++ b/modules/aioseop_sitemap.php @@ -2856,6 +2856,8 @@ function clean_url( $url ) { /** * Validate the image. + * NOTE: We will use parse_url here instead of wp_parse_url as we will correct the URLs beforehand and + * this saves us the need to check PHP version support. * * @param string $image The image src. * @@ -2865,13 +2867,18 @@ function clean_url( $url ) { * @return bool */ function is_image_valid( $image ) { + global $wp_version; + // Bail if empty image. if ( empty( $image ) ) { return false; } global $wp_version; - if ( version_compare( $wp_version, '4.7', '<' ) ) { + if ( version_compare( $wp_version, '4.4', '<' ) ) { + $p_url = parse_url( $image ); + $url = $p_url['scheme'] . $p_url['host'] . $p_url['path']; + } elseif ( version_compare( $wp_version, '4.7', '<' ) ) { // Compatability for older WP version that don't have 4.7 changes. // @link https://core.trac.wordpress.org/changeset/38726 $p_url = wp_parse_url( $image ); @@ -2884,20 +2891,19 @@ function is_image_valid( $image ) { // make the url absolute, if its relative. $image = aiosp_common::absolutize_url( $image ); - $extn = pathinfo( $url, PATHINFO_EXTENSION ); + $extn = pathinfo( parse_url( $image, PHP_URL_PATH ), PATHINFO_EXTENSION ); $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions ); // Bail if image does not refer to an image file otherwise google webmaster tools might reject the sitemap. if ( ! in_array( $extn, $allowed, true ) ) { return false; } - // Bail if image refers to an external URL. - $image_host = wp_parse_url( $image, PHP_URL_HOST ); - $wp_host = wp_parse_url( home_url(), PHP_URL_HOST ); - if ( $image_host !== $wp_host ) { + $image_host = parse_url( $image, PHP_URL_HOST ); + $host = parse_url( home_url(), PHP_URL_HOST ); + + if ( $image_host !== $host ) { return false; } - return true; } diff --git a/tests/modules/sitemap/test-sitemap.php b/tests/modules/sitemap/test-sitemap.php index 354089075..00a0b3777 100644 --- a/tests/modules/sitemap/test-sitemap.php +++ b/tests/modules/sitemap/test-sitemap.php @@ -167,8 +167,40 @@ public function test_only_taxonomies() { /** * @requires PHPUnit 5.7 + * Creates posts with schemeless images in the content and checks if they are being correctly included in the sitemap. + */ + public function test_schemeless_images() { + $id1 = $this->factory->post->create( array( 'post_type' => 'post', 'post_content' => 'content ', 'post_title' => 'title with image' ) ); + $id2 = $this->factory->post->create( array( 'post_type' => 'post', 'post_content' => 'content ', 'post_title' => 'title with image' ) ); + $id3 = $this->factory->post->create( array( 'post_type' => 'post', 'post_content' => 'content ', 'post_title' => 'title with image' ) ); + $urls = array( get_permalink( $id1 ), get_permalink( $id2 ), get_permalink( $id3 ) ); + + $custom_options = array(); + $custom_options['aiosp_sitemap_indexes'] = ''; + $custom_options['aiosp_sitemap_images'] = ''; + $custom_options['aiosp_sitemap_gzipped'] = ''; + $custom_options['aiosp_sitemap_posttypes'] = array( 'post' ); + + $this->_setup_options( 'sitemap', $custom_options ); + + $this->validate_sitemap( + array( + $urls[0] => array( + 'image' => true, + ), + $urls[1] => array( + 'image' => true, + ), + $urls[2] => array( + 'image' => true, + ), + ) + ); + } + + /** * Creates different types of posts, enables indexes and pagination and checks if the posts are being paginated correctly without additional/blank sitemaps. - * + * @requires PHPUnit 5.7 * @dataProvider enabledPostTypes */ public function test_sitemap_index_pagination( $enabled_post_type, $enabled_post_types_count, $cpt ) { @@ -220,7 +252,7 @@ public function test_add_external_urls( $url1, $url2 ) { $posts = $this->setup_posts( 2 ); - add_filter( 'aiosp_sitemap_addl_pages_only', array( $this, 'add_external_urls' ) ); + add_filter( 'aiosp_sitemap_addl_pages_only', array( $this, 'filter_aiosp_sitemap_addl_pages_only' ) ); $custom_options = array(); $custom_options['aiosp_sitemap_indexes'] = ''; @@ -264,7 +296,7 @@ public function test_index() { /** * Returns the urls to be added to the sitemap. */ - public function add_external_urls() { + public function filter_aiosp_sitemap_addl_pages_only() { return $this->_urls; } From aaf134ec1be96bf7347e8472c79b7d4e5a4d97ef Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 21 Mar 2018 03:23:51 +0530 Subject: [PATCH 05/11] support external images (#1281) * support external images #1264 * test case * codeclimate * codeclimate * support for php5.2 and below * support for WP 4.0 * support for WP 4.3 and below * remove more extraneous code --- modules/aioseop_sitemap.php | 15 +++++++- tests/modules/sitemap/test-sitemap.php | 51 +++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/modules/aioseop_sitemap.php b/modules/aioseop_sitemap.php index 062613672..1ba77ed57 100644 --- a/modules/aioseop_sitemap.php +++ b/modules/aioseop_sitemap.php @@ -2902,7 +2902,20 @@ function is_image_valid( $image ) { $host = parse_url( home_url(), PHP_URL_HOST ); if ( $image_host !== $host ) { - return false; + // Allowed hosts will be provided in a wildcard format i.e. img.yahoo.* or *.akamai.*. + // And we will convert that into a regular expression for matching. + $whitelist = apply_filters( 'aioseop_images_allowed_from_hosts', array() ); + $allowed = false; + if ( $whitelist ) { + foreach ( $whitelist as $pattern ) { + if ( preg_match( '/' . str_replace( '*', '.*', $pattern ) . '/', $image_host ) === 1 ) { + $allowed = true; + break; + } + } + } + return $allowed; + } return true; } diff --git a/tests/modules/sitemap/test-sitemap.php b/tests/modules/sitemap/test-sitemap.php index 00a0b3777..df10a2cd0 100644 --- a/tests/modules/sitemap/test-sitemap.php +++ b/tests/modules/sitemap/test-sitemap.php @@ -321,6 +321,55 @@ public function externalPagesProvider() { ), ); } + + /** + * Creates posts with external images and uses the filter 'aioseop_images_allowed_from_hosts' to allow only a particular host's images to be included in the sitemap. + */ + public function test_external_images() { + $posts = $this->setup_posts( 2 ); + + $id1 = $this->factory->post->create( array( 'post_type' => 'post', 'post_content' => 'content ', 'post_title' => 'title with image' ) ); + $id2 = $this->factory->post->create( array( 'post_type' => 'post', 'post_content' => 'content ', 'post_title' => 'title with image' ) ); + $posts['with'] = array( get_permalink( $id1 ), get_permalink( $id2 ) ); + + // allow only www.x.com. + add_filter( 'aioseop_images_allowed_from_hosts', array( $this, 'filter_aioseop_images_allowed_from_hosts' ) ); + + $custom_options = array(); + $custom_options['aiosp_sitemap_indexes'] = ''; + $custom_options['aiosp_sitemap_images'] = ''; + $custom_options['aiosp_sitemap_gzipped'] = ''; + $custom_options['aiosp_sitemap_posttypes'] = array( 'post' ); + + $this->_setup_options( 'sitemap', $custom_options ); + + $with = $posts['with']; + $without = $posts['without']; + $this->validate_sitemap( + array( + $with[0] => array( + 'image' => true, + ), + $with[1] => array( + 'image' => false, + ), + $without[0] => array( + 'image' => false, + ), + $without[1] => array( + 'image' => false, + ), + ) + ); + } + + /** + * Implements the filter 'aioseop_images_allowed_from_hosts' to allow speficic hosts. + */ + public function filter_aioseop_images_allowed_from_hosts( $hosts ) { + $hosts[] = 'www.x.com'; + return $hosts; + } /** * Provides posts types to test test_sitemap_index_pagination against. @@ -335,4 +384,4 @@ public function enabledPostTypes() { array( array( 'all', 'post', 'page', 'attachment', 'product' ), 4, 'product' ), ); } -} +} \ No newline at end of file From 63e9cec9049d10be3cb238e7a92a434e12430098 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 21 Mar 2018 03:32:27 +0530 Subject: [PATCH 06/11] Error with Gutenburg (#1412) * Error with Gutenburg #1410 * codeclimate --- admin/aioseop_module_class.php | 5 +- css/modules/aioseop_module.css | 2824 ++++++++++++++++---------------- js/modules/aioseop_module.js | 1645 ++++++++++--------- 3 files changed, 2250 insertions(+), 2224 deletions(-) diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php index 2dc4b6d58..f84b8a239 100644 --- a/admin/aioseop_module_class.php +++ b/admin/aioseop_module_class.php @@ -2256,8 +2256,9 @@ function get_option_html( $args ) { $onload = ''; if ( ! empty( $options['count'] ) ) { $n ++; - $attr .= " onKeyDown='if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n)' onKeyUp='if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n)'"; - $onload = "if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n);"; + $classes = isset( $options['class'] ) ? $options['class'] : ''; + $classes .= ' aioseop_count_chars'; + $attr .= " class='{$classes}' data-length-field='{$prefix}length$n'"; } if ( isset( $opts['id'] ) ) { $attr .= " id=\"{$opts['id']}\" "; diff --git a/css/modules/aioseop_module.css b/css/modules/aioseop_module.css index 61d4b0e14..0f408ffa2 100644 --- a/css/modules/aioseop_module.css +++ b/css/modules/aioseop_module.css @@ -1,1405 +1,1419 @@ -/** - * Controls all the styling of the plugin. - * - * @author Michael Torbert. - * @author Semper Fi Web Design. - * @copyright http://semperplugins.com - * @package All-in-One-SEO-Pack. - */ - -.form-table.aioseop { - clear: none; -} - -.form-table.aioseop td { - vertical-align: top; - padding: 16px 0 10px 0; - line-height: 20px; - font-size: 12px; -} - -.form-table.aioseop th { - width: 200px; - padding: 10px 0 12px 9px; -} - -.aioseop_help_text_link, -.aioseop_help_text_link:active { - text-align: left; - float: left; - max-width: 300px; - min-width: 1px; - padding-top: 2px; - outline: none; - color: #888; - font-family: sans-serif; -} - -.aioseop_help_text_link span { - font-size: 14px; -} - -.aioseop_help_text_link:before { - content: "\f223"; - font-size: 27px; - font-family: dashicons; - vertical-align: middle; -} - -#aioseop-support .aioseop_metabox_text, -#aioseop-support a { - font-size: 14px; - color: #000; - text-decoration: none; -} - -.aioseop_icon { - display: inline-block; - width: 40px; - height: 40px; - background-repeat: no-repeat; - background-size: 100%; - vertical-align: middle; - margin: 10px; -} - -.aioseop_book_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==); -} - -.aioseop_cog_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=); -} - -.aioseop_file_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==); -} - -.aioseop_help_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC); -} - -.aioseop_support_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC); -} - -.aioseop_youtube_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==); -} - -.aioseop_meta_box_help > label { - position: absolute; - margin-left: 8px; -} - -div.aioseop_tip_icon { - font-size: 14px; - border: 1px solid #888; - width: 1em; - text-align: center; - padding: 0 4px; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - -webkit-box-shadow: 1px 1px 1px #888; - -moz-box-shadow: 1px 1px 1px #888; - box-shadow: 1px 1px 1px #888; - border-radius: 12px; -} - -div.aioseop_tip_icon:before { - content: '?'; -} - -.aioseop_help_text_link img { - width: 40px; - float: left; -} - -.aioseop_meta_box_help, -.aioseop_meta_box_help:active { - float: right; - padding-left: 0; - width: 16px; - margin-right: 32px; - text-decoration: none; - height: 15px; - padding-top: 1px; - position: relative; -} - -.aioseop_tabs .aioseop_meta_box_help, -.aioseop_tabs .aioseop_meta_box_help:active { - margin-top: 4px; - margin-right: 45px; -} - -.aioseop_label { - color: #5F5F5F; - font-weight: bold; - line-height: 19px; - display: inline-block; - text-align: left; - position: absolute; - font-family: 'Open Sans', sans-serif; - width: 26%; - min-width: 120px; - max-width: 230px; -} - -.aioseop_option_div { - max-height: 360px; - min-height: 37px; - width: 95%; - overflow-y: auto; -} - -.aioseop_overflowed { - border: 1px solid #e1e1e1; -} - -.aioseop input[type="text"] { - color: #515151; - height: 35px; - padding: 10px 0 10px 10px; - font-size: 14px; - width: 95%; - max-width: 600px; -} - -.aioseop textarea { - color: #515151; - padding: 10px 0 0 10px; - margin: 0; - font-size: 14px; - line-height: 25px; - width: 95%; - max-width: 600px; -} - -.aioseop_help_text_div { - text-align: left; - width: 100%; - margin: 0; -} - -.aioseop_help_text { - font-size: 12px; - float: left; - clear: left; - color: #797979; - line-height: 15px; - font-style: italic; -} - -.aioseop_head_tagline { - color: #5F5F5F; - font-size: 13px; -} - -.aioseop_head_nav { - float: left; - font-size: 18px; - margin: 0 0 16px 0; - font-family: "HelveticaNeue-Light", - "Helvetica Neue Light", - "Helvetica Neue", - sans-serif; - border-bottom: 1px solid #CCC; - width: 100%; -} - -.aioseop_head_nav_tab { - padding: 10px 15px 10px 15px; - margin: 0 0 0 15px; - border-radius: 4px 4px 0 0; - border: 1px solid #CCC; - border-bottom: 0 white; - float: left; - opacity: 0.5; - color: black; - text-shadow: white 0 1px 0; - text-decoration: none; -} - -.aioseop_head_nav_tab.aioseop_head_nav_active { - opacity: 1; - margin-bottom: -1px; - border-width: 1px; -} - -.aioseop_head_nav_tab:first-child { - margin-left: 0; -} - -.aioseop_head_nav_tab:hover { - opacity: 1; -} - -.aioseop_header { - float: left; - clear: left; -} - -.aioseop_advert { - padding: 10px; - margin-bottom: 30px; - border: 1px solid #DDD; - height: 200px; - width: 423px; -} - -.aioseop_nopad { - padding-left: 0; - padding-top: 0; -} - -.aioseop_nopad_all { - padding: 0; - height: 220px; - width: 445px; - margin-bottom: 20px; - border: none; -} - -.aioseop_adverts { - float: right; -} - -.wincherad { - width: 100%; - height: 100%; - background-size: 100%; - background-repeat: no-repeat; - margin-bottom: 0; - border: none; -} - -#wincher21 { - background-image: url(../../modules/images/banner21.jpg); -} - -#wincher22 { - background-image: url(../../modules/images/banner22.jpg); -} - -.aioseop_content { - min-width: 760px; - clear: left; -} - -.aioseop_options_wrapper .hndle { - font-size: 15px; - font-family: Georgia, - "Times New Roman", - "Bitstream Charter", - Times, - serif; - font-weight: normal; - padding: 7px 10px; - margin: 0; - line-height: 1; -} - -.aioseop_options_wrapper .submit input.button-primary { - margin-bottom: 5px; -} - -#aiosp_feature_manager_metabox.postbox { - margin-top: 20px; - float: left; -} - -.aioseop_advert p { - margin: 25px 0 25px 0; -} - -.aioseop_options_wrapper .postarea { - border-color: #DFDFDF; - -moz-box-shadow: inset 0 1px 0 #fff; - -webkit-box-shadow: inset 0 1px 0 #fff; - box-shadow: inset 0 1px 0 #fff; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.aioseop_advert h3 { - padding: 0; - margin-top: 6px; -} - -.aioseop_metabox_text p { - margin: 0 0 0 0; - width: 101%; -} - -.aioseop_sidebar { - width: 457px; - margin-left: 10px; -} - -.aioseop_metabox_text { - margin-bottom: 0; -} - -.aioseop_metabox_wrapper { - padding: 0; -} - -.aioseop_metabox_text *:last-child { - margin: 0; -} - -.aioseop_metabox_feature { - margin-top: 20px; -} - -.aioseop_translations { - margin-top: 15px; -} - -.aioseop_option_label { - float: left; - margin: 0; - min-width: 150px; - width: 37%; - max-width: 270px; - padding-top: 3px; - padding-bottom: 3px; - height: 67px !important; /*added for certain language support*/ -} - -.aioseop_metabox_text h2 { - font-size: 14px; - padding: 0; - font-weight: bold; - line-height: 29px; -} - -#aioseop-about { - width: 443px; - margin-bottom: 20px; -} - -#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 { - font-size: 13px; -} - -.aioseop_sidebar #mc-embedded-subscribe-form { - margin: 0 0 10px 0; - background: white; - padding: 10px 10px; - border: 1px solid #DDD; -} - -#aioseop-about .aioseop_metabox_text ul { - list-style-type: disc; - padding-left: 15px; -} - -.aioseop input[readonly] { - background-color: #EEE; - margin: 5px 0 5px 0 !important; -} - -.aioseop_settings_left { - float: left; - padding: 0; - margin: 0; - width: 100%; -} - -body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left { - margin-top: 20px; -} - -body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left { - margin-top: 20px; -} - -#aioseop_top_button { - margin-top: 5px; - height: 30px; -} - -#aioseop-list #mce-EMAIL { - margin-top: 5px; - width: 250px; -} - -.aioseop_top { - margin: 10px 10px 0 0; - /* margin: 10px 477px 0px 0px; */ -} - -.aioseop_top #aioseop-list { - margin-bottom: 0; -} - -.aioseop_top #aioseop-list.postbox.closed { - overflow: hidden; -} - -.aioseop_right_sidebar { - float: right; - margin-top: 35px; -} - -#aiosp_settings_form .button-primary.hidden { - display: none; -} - -form#edittag div#aiosp_titleatr_wrapper, -form#edittag div#aiosp_menulabel_wrapper, -form#edittag div#aiosp_sitemap_exclude_wrapper { - display: none; -} - -.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button { - height: 5px; - position: absolute; - top: 0; - width: 97%; -} - -.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left { - margin-top: 10px; -} - -.All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper { - margin-top: 10px; -} - -div#aiosp_feature_manager_metabox .inside { - padding: 8px; -} - -div.aioseop_feature { - position: relative; - display: inline-block; - float: left; - vertical-align: top; - width: 240px; - height: 288px; - margin: 8px; - border: 1px solid #DEDEDE; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: white; - padding: 10px 0 0; - -webkit-box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - -webkit-transition-duration: .4s; - -moz-transition-duration: .4s; -} - -.aioseop_feature .flag { - float: right; - margin-right: -7px; - background: none repeat scroll 0 0 #D23D46; - color: #FFFFFF; - padding: 5px 12px 6px 5px; - position: relative; -} - -.aioseop_feature .flag:before { - border-color: #D23D46 #D23D46 #D23D46 transparent; - border-style: solid; - border-width: 14px 4px 15px 10px; - content: ""; - left: -14px; - position: absolute; - top: 0; -} - -.aioseop_feature .flag:after { - border-color: #892026 transparent transparent; - border-style: solid; - border-width: 6px 6px 6px 0; - bottom: -12px; - content: ""; - position: absolute; - right: 0; -} - -.aioseop_feature .flag.pro { - display: none; -} - -#aioseop_coming_soon .free.flag, -.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag { - display: none; -} - -#aioseop_coming_soon .flag.pro { - display: block; - margin-top: -30px; -} - -.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro { - display: none; -} - -.aioseop_feature h3 { - font-size: 17px; - margin: 0; - padding: 0 10px 5px 10px; - font-weight: normal; - font-style: normal; - font-family: "Helvetica Neue", - Helvetica, - Arial, - "Lucida Grande", - Verdana, - "Bitstream Vera Sans", - sans-serif; -} - -.aioseop_feature p { - line-height: 150%; - font-size: 12px; - font-family: Georgia, - "Times New Roman", - "Bitstream Charter", - Times, serif; - margin-bottom: 20px; - color: #666; - padding: 0 10px; -} - -.aioseop_feature p.aioseop_desc { - min-height: 80px; -} - -.aioseop_feature .feature_button { - float: right; - margin-bottom: 10px; - margin-right: 10px; - min-width: 80px; - text-align: center; -} - -.aioseop_feature .feature_button:before { - content: "Activate"; -} - -.aioseop_feature .active.feature_button:before { - content: "Deactivate"; -} - -div.aioseop_feature .aioseop_featured_image { - min-height: 100px; - background-repeat: no-repeat; - display: block; - margin: 0 auto; - width: 133px; -} - -div.aioseop_feature .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Standard.png); -} - -div.aioseop_feature .aioseop_featured_image.active { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png); -} - -div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png); -} - -div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/VideoSitemap-BW-Standard.png); -} - -div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/VideoSitemap-Color-Standard.png); -} - -div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { - background-image: url(../../modules/images/SocialMeta-BW-Standard.png); -} - -div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { - background-image: url(../../modules/images/SocialMeta-Color-Standard.png); -} - -div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { - background-image: url(../../modules/images/Robots-BW-Standard.png); -} - -div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { - background-image: url(../../modules/images/Robots-Color-Standard.png); -} - -div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { - background-image: url(../../modules/images/FileEditor-BW-Standard.png); -} - -div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { - background-image: url(../../modules/images/FileEditor-Color-Standard.png); -} - -div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { - background-image: url(../../modules/images/ImporterExporter-BW-Standard.png); -} - -div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { - background-image: url(../../modules/images/ImporterExporter-Color-Standard.png); -} - -div.aioseop_feature#aioseop_performance .aioseop_featured_image { - background-image: url(../../modules/images/Performance-BW-Standard.png); -} - -div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { - background-image: url(../../modules/images/Performance-Color-Standard.png); -} - -div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -.All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table, -.All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table { - max-width: 500px; - clear: none; -} - -.aioseop_follow_button { - min-height: 50px; - background-repeat: no-repeat; - display: inline-block; - width: 100px; - background-size: auto 50px !important; - margin-right: 0; -} - -.aioseop_facebook_follow { - background-image: url(../../modules/images/facebook-follow-standard.png); -} - -.aioseop_twitter_follow { - background-image: url(../../modules/images/twitter-follow-standard.png); -} - -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) { - div.aioseop_feature .aioseop_featured_image { - background-size: auto 100px !important; - } - - div.aioseop_feature .aioseop_featured_image.active { - background-image: url(../../modules/images/Default-Color-Retina.png); - } - - div.aioseop_feature .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png); - } - - div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png); - } - - div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/VideoSitemap-BW-Retina.png); - } - - div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/VideoSitemap-Color-Retina.png); - } - - div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { - background-image: url(../../modules/images/SocialMeta-BW-Retina.png); - } - - div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { - background-image: url(../../modules/images/SocialMeta-Color-Retina.png); - } - - div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { - background-image: url(../../modules/images/Robots-BW-Retina.png); - } - - div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { - background-image: url(../../modules/images/Robots-Color-Retina.png); - } - - div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { - background-image: url(../../modules/images/FileEditor-BW-Retina.png); - } - - div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { - background-image: url(../../modules/images/FileEditor-Color-Retina.png); - } - - div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { - background-image: url(../../modules/images/ImporterExporter-BW-Retina.png); - } - - div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { - background-image: url(../../modules/images/ImporterExporter-Color-Retina.png); - } - - div.aioseop_feature#aioseop_performance .aioseop_featured_image { - background-image: url(../../modules/images/Performance-BW-Retina.png); - } - - div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { - background-image: url(../../modules/images/Performance-Color-Retina.png); - } - - div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - .aioseop_facebook_follow { - background-image: url(../../modules/images/facebook-follow-retina.png); - } - - .aioseop_twitter_follow { - background-image: url(../../modules/images/twitter-follow-retina.png); - } -} - -.aioseop_options { - width: 100%; - margin: 18px 0 10px 0; -} - -.aioseop_wrapper { - width: 100%; - padding-left: 5px; -} - -.aioseop_input { - clear: left; - width: 100%; - padding: 5px; - display: inline; -} - -.aioseop_option_input { - float: left; - width: 61%; - margin: 0; - padding-left: 1px; - min-width: 160px; - /* max-width: 900px; */ -} - -#aiosp_sitemap_addl_pages, -#aiosp_video_sitemap_addl_pages { - clear: left; - margin-left: 20px; - max-width: 1072px; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper { - width: 23%; - min-width: 165px; - display: inline-block; - max-width: 265px; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div { - position: absolute; - margin: 5px 0 10px 0; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_option_input, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input { - width: 94%; - min-width: 94%; -} - -#aiosp_sitemap_addl_pages_metabox table.aioseop_table, -#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table { - width: 96%; - border: 1px solid #CCC; - margin: 5px 0 10px 0; -} - -table.aioseop_table tr:nth-child(odd) { - background-color: #EEE; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) { - background-color: rgba(238, 238, 238, 0.5); -} - -table.aioseop_table td { - width: 23%; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table { - width: 80%; - max-width: 800px; - display: block; - border-top: 1px solid #dfdfdf; - border-left: 1px solid #dfdfdf; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table th { - width: 18%; - border-right: 1px solid #dfdfdf; - border-bottom: 1px solid #dfdfdf; -} - -.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info { - margin-top: 10px; - border: 1px solid #dfdfdf; - width: 80%; - max-width: 800px; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th { - background: #f1f1f1; - background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); - background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: linear-gradient(to top, #ececec, #f9f9f9); - padding: 5px; - border-bottom-color: #dfdfdf; - text-shadow: #fff 0 1px 0; - -webkit-box-shadow: 0 1px 0 #fff; - -moz-box-shadow: 0 1px 0 #fff; - box-shadow: 0 1px 0 #fff; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table td { - border-right: 1px solid #dfdfdf; - border-bottom: 1px solid #dfdfdf; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item { - display: inline-block; - width: 30%; - vertical-align: top; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) { - font-weight: bold; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) { - width: 70%; -} - -#aiosp_sitemap_addl_pages_metabox table.aioseop_table td, -#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td { - width: 25%; - padding-left: 5%; -} - -table.aioseop_table td, table.aioseop_table th { - padding: 3px; -} - -.aioseop_top_label .aioseop_option_input, -.aioseop_no_label .aioseop_option_input { - width: 100%; -} - -#aiosp_settings_form .postbox { - margin: 0 0 20px 0; -} - -.aioseop_settings_left .postbox { - float: left; - width: 100%; -} - -.aioseop_option_setting_label { - min-height: 35px; - display: inline-block; - white-space: nowrap; - overflow: hidden; - padding-left: 1px; - max-width: 229px; - min-width: 160px; - width: 33%; -} - -.aioseop_settings_left .postbox .inside { - padding: 0; - margin: 0; - clear: right; -} - -#aiosp_settings_form .aioseop_no_label, .aioseop_no_label { - float: left; - width: 92%; - max-width: 100%; - margin: 0 23px 0 13px; -} - -#aiosp_sitemap_status_metabox .handlediv.button-link { - display: none; -} - -#aiosp_sitemap_status_metabox.closed .inside { - display: block; -} - -.aioseop_top_label { - width: 96%; - margin: 0 10px; -} - -.aioseop_hidden_type { - margin: 0; - padding: 0; - height: 0; -} - -#aiosp_title_metabox #aiosp_force_rewrites_wrapper { - display: none; - height: 0; -} - -.aioseop_module.error.below-h2 { - padding: 5px 0; - margin: 0 477px 15px 0 !important; -} - -#aioseop_opengraph_settings .inside { - margin: 0; -} - -#aioseop_opengraph_settings_image_wrapper img { - width: auto; - height: 75px; -} - -#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label { - max-width: 160px; - min-width: 100px; - width: 30%; -} - -.aioseop_input input[type="checkbox"], -.aioseop_input input[type="radio"] { - vertical-align: text-bottom; - margin-top: 8px; -} - -#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div { - max-height: initial; -} - -#aiosp { - width: auto; -} - -.aioseop_input.aioseop_top_label .aioseop_option_input { - margin: 0 0 10px 0; -} - -.aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div { - max-height: none; -} - -/* Robots.txt styling */ -#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div, -#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div { - max-height: none; -} - -.aioseop_option_input .widefat td { - vertical-align: middle; -} - -.entry-row.robots.quirks { - font-weight: bold; - opacity: 1; -} - -.entry-row.robots { - opacity: 0.8; -} - -.entry-row.robots.invalid { - opacity: 1; - font-weight: bold; -} - -.invalid .entry_label { - font-weight: bold; -} - -.aioseop .aioseop_option_input tbody { - background: #FCFCFC; -} - -.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody { - background: transparent; -} - -.entry-row.robots div { - height: 20px; - vertical-align: middle; - width: 90%; - margin: 0 0 4px 0; -} - -.robots img { - margin: 0 0 0 2px; - opacity: 0.6; -} - -.aioseop_option_docs { - width: 98%; - display: none; - border: 1px solid #D3D3D3; - margin-top: 20px; - padding: 1%; - background-color: #EEE; -} - -.aioseop_option_docs h3 { - background: none; -} - -div.aioseop_notice { - position: relative; -} - -div.aioseop_notice a.aioseop_dismiss_link { - position: absolute; - top: 10px; - right: 10px; -} - -.aioseop_error_notice { - color: #f00; - font-weight: bold; -} - -.aioseop_input select { - margin: 7px 0; -} - -.aioseop_help_text ul { - margin: 15px 0 0 20px; -} - -.aioseop_help_text ul li { - line-height: 20px; - margin: 0; -} - -.aioseop_sidebar #side-sortables { - width: 98%; -} - -#aioseop_opengraph_settings .aioseop_option_label { - width: 30%; -} - -.aioseop_tabs { - padding-top: 6px; -} - -.aioseop_tabs.hide, -.aioseop_header_tabs.hide { - display: block !important; -} - -.aioseop_header_tabs li { - display: inline; - padding: 0; - margin: 0; -} - -.aioseop_header_tabs { - margin: 0; -} - -.aioseop_header_nav { - margin: 0; -} - -.aioseop_header_tabs li a.aioseop_header_tab.active { - background-color: rgb(255, 255, 255); - border-bottom-color: rgba(255, 255, 255, 0.5); - font-weight: bold; -} - -.aioseop_header_tabs li a.aioseop_header_tab { - font-size: 14px; - line-height: 37px; - text-decoration: none; - margin: 5px 5px 0 0; - padding: 10px; - cursor: pointer; - -webkit-border-top-right-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-right-radius: 3px; - border-top-left-radius: 3px; - background-color: #e5e5e5; - border: 1px solid #ccc; - color: #5F5F5F; -} - -.aioseop_header_tabs li:first-child a.aioseop_header_tab { - border-left: solid 1px #CCC; - margin-left: 5px; -} - -.aioseop_tab { - border: solid 1px #CCC; - background-color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0.5); - padding: 10px; -} - -.aioseop_loading { - background-image: url('../../images/activity.gif'); - display: inline-block; - width: 24px; - height: 24px; - margin: 0; - padding: 0; - vertical-align: bottom; -} - -.aiosp_delete_url { - background-image: url('../../images/delete.png'); - display: inline-block; - width: 16px; - height: 16px; - margin: 0; - padding: 0; - vertical-align: bottom; -} - -form#aiosp_settings_form, -.aioseop_tabs_div { - padding-right: 477px; -} - -.aioseop_tabs_div { - margin-top: 10px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li strong { - display: block; - float: left; - text-align: right; - background-color: #DDD; - margin-right: 8px; - padding: 1px 8px 1px 1px; - overflow: auto; - width: 200px; - min-height: 16px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong { - background-color: #CCC; -} - -#aiosp_settings_form ul.sfwd_debug_settings li { - clear: left; - margin: 0; - padding: 0; - background-color: #EEE; - overflow: auto; - max-width: 75%; - min-width: 800px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) { - background-color: #DDD; -} - -div.sfwd_debug_mail_sent { - background-color: #080; - border: 1px solid #0A0; - margin: 10px 0 10px 0; - width: 598px; - color: #FFF; - text-align: center; -} - -div.sfwd_debug_error { - background-color: #F00; - color: #FFF; - border: 1px solid #A00; - margin: 10px 0 10px 0; - width: 598px; - text-align: center; - font-weight: bolder; -} - -#aiosp_performance_status_wrapper .aioseop_option_div { - max-height: 420px; -} - -#aioseop_coming_soon, #aioseop_coming_soon2 { - padding-top: 40px; - text-align: center; - height: 258px; - font-size: 16px; -} - -.MRL { - margin-left: 20px !important; - margin-bottom: 10px !important; -} - -/** -* Edit Post screen specific styling -* -*/ -.postbox-container .aioseop_option_div { - width: 100%; -} - -.postbox-container .aioseop_option_div input[type="text"], -.postbox-container .aioseop_option_div textarea { - width: 99%; - max-width: 900px; -} - -.postbox-container .aioseop_option_label { - max-width: none; - height: auto !important; -} - -.postbox-container .aioseop_wrapper { - padding: 0; -} - -.postbox-container .aioseop_input { - display: block; - margin-bottom: 10px; - padding: 0; -} - -.postbox-container .aioseop_option_input { - width: 63%; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper { - float: none; - width: auto; - margin: 0; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input { - display: block; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input { - float: none; - width: auto; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div { - width: auto; - min-height: 0; - padding: 10px 0; -} - -.aioseop_tabs .aioseop_options { - margin: 0; -} - -#aioseop_opengraph_settings .aioseop_options { - clear: both; - margin-top: 35px; -} - -#aioseop_opengraph_settings .aioseop_option_input { - width: 70%; -} - -/** -* Preview Snippet styling -* -*/ -div#aiosp_snippet_wrapper { - border: 1px solid #888; - clear: both; - padding: 10px 10px 0; - max-width: 97%; - margin-bottom: 15px; -} - -div#aiosp_snippet_wrapper .aioseop_option_label { - height: auto !important; -} - -div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input { - margin: 0; -} - -div#aioseop_snippet { - font-family: arial, sans-serif; - font-size: 13px; -} - -div#aioseop_snippet > h3 { - margin: 10px 0 5px; - font-size: 18px; - border: 0; - background: inherit; - font-weight: normal; -} - -div#aioseop_snippet > h3 > a { - color: #12c; - text-decoration: none; - cursor: pointer; -} - -div#aioseop_snippet > div { - color: #545454; - max-width: 48em; -} - -div#aioseop_snippet > div > div { - display: block; - margin-bottom: 1px; -} - -div#aioseop_snippet > div > div > cite { - color: #093; - font-style: normal; -} - -div#aioseop_snippet > div > span { - margin: 0; - padding: 0; - border: 0; -} +/** + * Controls all the styling of the plugin. + * + * @author Michael Torbert. + * @author Semper Fi Web Design. + * @copyright http://semperplugins.com + * @package All-in-One-SEO-Pack. + */ + +.form-table.aioseop { + clear: none; +} + +.form-table.aioseop td { + vertical-align: top; + padding: 16px 0 10px 0; + line-height: 20px; + font-size: 12px; +} + +.form-table.aioseop th { + width: 200px; + padding: 10px 0 12px 9px; +} + +.aioseop_help_text_link, +.aioseop_help_text_link:active { + text-align: left; + float: left; + max-width: 300px; + min-width: 1px; + padding-top: 2px; + outline: none; + color: #888; + font-family: sans-serif; +} + +.aioseop_help_text_link span { + font-size: 14px; +} + +.aioseop_help_text_link:before { + content: "\f223"; + font-size: 27px; + font-family: dashicons; + vertical-align: middle; +} + +#aioseop-support .aioseop_metabox_text, +#aioseop-support a { + font-size: 14px; + color: #000; + text-decoration: none; +} + +.aioseop_icon { + display: inline-block; + width: 40px; + height: 40px; + background-repeat: no-repeat; + background-size: 100%; + vertical-align: middle; + margin: 10px; +} + +.aioseop_book_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==); +} + +.aioseop_cog_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=); +} + +.aioseop_file_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==); +} + +.aioseop_help_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC); +} + +.aioseop_support_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC); +} + +.aioseop_youtube_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==); +} + +.aioseop_meta_box_help > label { + position: absolute; + margin-left: 8px; +} + +div.aioseop_tip_icon { + font-size: 14px; + border: 1px solid #888; + width: 1em; + text-align: center; + padding: 0 4px; + -webkit-border-radius: 12px; + -moz-border-radius: 12px; + -webkit-box-shadow: 1px 1px 1px #888; + -moz-box-shadow: 1px 1px 1px #888; + box-shadow: 1px 1px 1px #888; + border-radius: 12px; +} + +div.aioseop_tip_icon:before { + content: '?'; +} + +.aioseop_help_text_link img { + width: 40px; + float: left; +} + +.aioseop_meta_box_help, +.aioseop_meta_box_help:active { + float: right; + padding-left: 0; + width: 16px; + margin-right: 32px; + text-decoration: none; + height: 15px; + padding-top: 1px; + position: relative; +} + +.aioseop_tabs .aioseop_meta_box_help, +.aioseop_tabs .aioseop_meta_box_help:active { + margin-top: 4px; + margin-right: 45px; +} + +.aioseop_label { + color: #5F5F5F; + font-weight: bold; + line-height: 19px; + display: inline-block; + text-align: left; + position: absolute; + font-family: 'Open Sans', sans-serif; + width: 26%; + min-width: 120px; + max-width: 230px; +} + +.aioseop_option_div { + max-height: 360px; + min-height: 37px; + width: 95%; + overflow-y: auto; +} + +.aioseop_overflowed { + border: 1px solid #e1e1e1; +} + +.aioseop input[type="text"] { + color: #515151; + height: 35px; + padding: 10px 0 10px 10px; + font-size: 14px; + width: 95%; + max-width: 600px; +} + +.aioseop textarea { + color: #515151; + padding: 10px 0 0 10px; + margin: 0; + font-size: 14px; + line-height: 25px; + width: 95%; + max-width: 600px; +} + +.aioseop_help_text_div { + text-align: left; + width: 100%; + margin: 0; +} + +.aioseop_help_text { + font-size: 12px; + float: left; + clear: left; + color: #797979; + line-height: 15px; + font-style: italic; +} + +.aioseop_head_tagline { + color: #5F5F5F; + font-size: 13px; +} + +.aioseop_head_nav { + float: left; + font-size: 18px; + margin: 0 0 16px 0; + font-family: "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + sans-serif; + border-bottom: 1px solid #CCC; + width: 100%; +} + +.aioseop_head_nav_tab { + padding: 10px 15px 10px 15px; + margin: 0 0 0 15px; + border-radius: 4px 4px 0 0; + border: 1px solid #CCC; + border-bottom: 0 white; + float: left; + opacity: 0.5; + color: black; + text-shadow: white 0 1px 0; + text-decoration: none; +} + +.aioseop_head_nav_tab.aioseop_head_nav_active { + opacity: 1; + margin-bottom: -1px; + border-width: 1px; +} + +.aioseop_head_nav_tab:first-child { + margin-left: 0; +} + +.aioseop_head_nav_tab:hover { + opacity: 1; +} + +.aioseop_header { + float: left; + clear: left; +} + +.aioseop_advert { + padding: 10px; + margin-bottom: 30px; + border: 1px solid #DDD; + height: 200px; + width: 423px; +} + +.aioseop_nopad { + padding-left: 0; + padding-top: 0; +} + +.aioseop_nopad_all { + padding: 0; + height: 220px; + width: 445px; + margin-bottom: 20px; + border: none; +} + +.aioseop_adverts { + float: right; +} + +.wincherad { + width: 100%; + height: 100%; + background-size: 100%; + background-repeat: no-repeat; + margin-bottom: 0; + border: none; +} + +#wincher21 { + background-image: url(../../modules/images/banner21.jpg); +} + +#wincher22 { + background-image: url(../../modules/images/banner22.jpg); +} + +.aioseop_content { + min-width: 760px; + clear: left; +} + +.aioseop_options_wrapper .hndle { + font-size: 15px; + font-family: Georgia, + "Times New Roman", + "Bitstream Charter", + Times, + serif; + font-weight: normal; + padding: 7px 10px; + margin: 0; + line-height: 1; +} + +.aioseop_options_wrapper .submit input.button-primary { + margin-bottom: 5px; +} + +#aiosp_feature_manager_metabox.postbox { + margin-top: 20px; + float: left; +} + +.aioseop_advert p { + margin: 25px 0 25px 0; +} + +.aioseop_options_wrapper .postarea { + border-color: #DFDFDF; + -moz-box-shadow: inset 0 1px 0 #fff; + -webkit-box-shadow: inset 0 1px 0 #fff; + box-shadow: inset 0 1px 0 #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.aioseop_advert h3 { + padding: 0; + margin-top: 6px; +} + +.aioseop_metabox_text p { + margin: 0 0 0 0; + width: 101%; +} + +.aioseop_sidebar { + width: 457px; + margin-left: 10px; +} + +.aioseop_metabox_text { + margin-bottom: 0; +} + +.aioseop_metabox_wrapper { + padding: 0; +} + +.aioseop_metabox_text *:last-child { + margin: 0; +} + +.aioseop_metabox_feature { + margin-top: 20px; +} + +.aioseop_translations { + margin-top: 15px; +} + +.aioseop_option_label { + float: left; + margin: 0; + min-width: 150px; + width: 37%; + max-width: 270px; + padding-top: 3px; + padding-bottom: 3px; + height: 67px !important; /*added for certain language support*/ +} + +.aioseop_metabox_text h2 { + font-size: 14px; + padding: 0; + font-weight: bold; + line-height: 29px; +} + +#aioseop-about { + width: 443px; + margin-bottom: 20px; +} + +#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 { + font-size: 13px; +} + +.aioseop_sidebar #mc-embedded-subscribe-form { + margin: 0 0 10px 0; + background: white; + padding: 10px 10px; + border: 1px solid #DDD; +} + +#aioseop-about .aioseop_metabox_text ul { + list-style-type: disc; + padding-left: 15px; +} + +.aioseop input[readonly] { + background-color: #EEE; + margin: 5px 0 5px 0 !important; +} + +.aioseop_settings_left { + float: left; + padding: 0; + margin: 0; + width: 100%; +} + +body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left { + margin-top: 20px; +} + +body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left { + margin-top: 20px; +} + +#aioseop_top_button { + margin-top: 5px; + height: 30px; +} + +#aioseop-list #mce-EMAIL { + margin-top: 5px; + width: 250px; +} + +.aioseop_top { + margin: 10px 10px 0 0; + /* margin: 10px 477px 0px 0px; */ +} + +.aioseop_top #aioseop-list { + margin-bottom: 0; +} + +.aioseop_top #aioseop-list.postbox.closed { + overflow: hidden; +} + +.aioseop_right_sidebar { + float: right; + margin-top: 35px; +} + +#aiosp_settings_form .button-primary.hidden { + display: none; +} + +form#edittag div#aiosp_titleatr_wrapper, +form#edittag div#aiosp_menulabel_wrapper, +form#edittag div#aiosp_sitemap_exclude_wrapper { + display: none; +} + +.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button { + height: 5px; + position: absolute; + top: 0; + width: 97%; +} + +.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left { + margin-top: 10px; +} + +.All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper { + margin-top: 10px; +} + +div#aiosp_feature_manager_metabox .inside { + padding: 8px; +} + +div.aioseop_feature { + position: relative; + display: inline-block; + float: left; + vertical-align: top; + width: 240px; + height: 288px; + margin: 8px; + border: 1px solid #DEDEDE; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: white; + padding: 10px 0 0; + -webkit-box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-transition-duration: .4s; + -moz-transition-duration: .4s; +} + +.aioseop_feature .flag { + float: right; + margin-right: -7px; + background: none repeat scroll 0 0 #D23D46; + color: #FFFFFF; + padding: 5px 12px 6px 5px; + position: relative; +} + +.aioseop_feature .flag:before { + border-color: #D23D46 #D23D46 #D23D46 transparent; + border-style: solid; + border-width: 14px 4px 15px 10px; + content: ""; + left: -14px; + position: absolute; + top: 0; +} + +.aioseop_feature .flag:after { + border-color: #892026 transparent transparent; + border-style: solid; + border-width: 6px 6px 6px 0; + bottom: -12px; + content: ""; + position: absolute; + right: 0; +} + +.aioseop_feature .flag.pro { + display: none; +} + +#aioseop_coming_soon .free.flag, +.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag { + display: none; +} + +#aioseop_coming_soon .flag.pro { + display: block; + margin-top: -30px; +} + +.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro { + display: none; +} + +.aioseop_feature h3 { + font-size: 17px; + margin: 0; + padding: 0 10px 5px 10px; + font-weight: normal; + font-style: normal; + font-family: "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + Verdana, + "Bitstream Vera Sans", + sans-serif; +} + +.aioseop_feature p { + line-height: 150%; + font-size: 12px; + font-family: Georgia, + "Times New Roman", + "Bitstream Charter", + Times, serif; + margin-bottom: 20px; + color: #666; + padding: 0 10px; +} + +.aioseop_feature p.aioseop_desc { + min-height: 80px; +} + +.aioseop_feature .feature_button { + float: right; + margin-bottom: 10px; + margin-right: 10px; + min-width: 80px; + text-align: center; +} + +.aioseop_feature .feature_button:before { + content: "Activate"; +} + +.aioseop_feature .active.feature_button:before { + content: "Deactivate"; +} + +div.aioseop_feature .aioseop_featured_image { + min-height: 100px; + background-repeat: no-repeat; + display: block; + margin: 0 auto; + width: 133px; +} + +div.aioseop_feature .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Standard.png); +} + +div.aioseop_feature .aioseop_featured_image.active { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png); +} + +div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png); +} + +div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/VideoSitemap-BW-Standard.png); +} + +div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/VideoSitemap-Color-Standard.png); +} + +div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { + background-image: url(../../modules/images/SocialMeta-BW-Standard.png); +} + +div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { + background-image: url(../../modules/images/SocialMeta-Color-Standard.png); +} + +div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { + background-image: url(../../modules/images/Robots-BW-Standard.png); +} + +div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { + background-image: url(../../modules/images/Robots-Color-Standard.png); +} + +div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { + background-image: url(../../modules/images/FileEditor-BW-Standard.png); +} + +div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { + background-image: url(../../modules/images/FileEditor-Color-Standard.png); +} + +div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { + background-image: url(../../modules/images/ImporterExporter-BW-Standard.png); +} + +div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { + background-image: url(../../modules/images/ImporterExporter-Color-Standard.png); +} + +div.aioseop_feature#aioseop_performance .aioseop_featured_image { + background-image: url(../../modules/images/Performance-BW-Standard.png); +} + +div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { + background-image: url(../../modules/images/Performance-Color-Standard.png); +} + +div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +.All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table, +.All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table { + max-width: 500px; + clear: none; +} + +.aioseop_follow_button { + min-height: 50px; + background-repeat: no-repeat; + display: inline-block; + width: 100px; + background-size: auto 50px !important; + margin-right: 0; +} + +.aioseop_facebook_follow { + background-image: url(../../modules/images/facebook-follow-standard.png); +} + +.aioseop_twitter_follow { + background-image: url(../../modules/images/twitter-follow-standard.png); +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) { + div.aioseop_feature .aioseop_featured_image { + background-size: auto 100px !important; + } + + div.aioseop_feature .aioseop_featured_image.active { + background-image: url(../../modules/images/Default-Color-Retina.png); + } + + div.aioseop_feature .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png); + } + + div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png); + } + + div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/VideoSitemap-BW-Retina.png); + } + + div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/VideoSitemap-Color-Retina.png); + } + + div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { + background-image: url(../../modules/images/SocialMeta-BW-Retina.png); + } + + div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { + background-image: url(../../modules/images/SocialMeta-Color-Retina.png); + } + + div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { + background-image: url(../../modules/images/Robots-BW-Retina.png); + } + + div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { + background-image: url(../../modules/images/Robots-Color-Retina.png); + } + + div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { + background-image: url(../../modules/images/FileEditor-BW-Retina.png); + } + + div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { + background-image: url(../../modules/images/FileEditor-Color-Retina.png); + } + + div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { + background-image: url(../../modules/images/ImporterExporter-BW-Retina.png); + } + + div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { + background-image: url(../../modules/images/ImporterExporter-Color-Retina.png); + } + + div.aioseop_feature#aioseop_performance .aioseop_featured_image { + background-image: url(../../modules/images/Performance-BW-Retina.png); + } + + div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { + background-image: url(../../modules/images/Performance-Color-Retina.png); + } + + div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + .aioseop_facebook_follow { + background-image: url(../../modules/images/facebook-follow-retina.png); + } + + .aioseop_twitter_follow { + background-image: url(../../modules/images/twitter-follow-retina.png); + } +} + +.aioseop_options { + width: 100%; + margin: 18px 0 10px 0; +} + +.aioseop_wrapper { + width: 100%; + padding-left: 5px; +} + +.aioseop_input { + clear: left; + width: 100%; + padding: 5px; + display: inline; +} + +.aioseop_option_input { + float: left; + width: 61%; + margin: 0; + padding-left: 1px; + min-width: 160px; + /* max-width: 900px; */ +} + +#aiosp_sitemap_addl_pages, +#aiosp_video_sitemap_addl_pages { + clear: left; + margin-left: 20px; + max-width: 1072px; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper { + width: 23%; + min-width: 165px; + display: inline-block; + max-width: 265px; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div { + position: absolute; + margin: 5px 0 10px 0; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_option_input, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input { + width: 94%; + min-width: 94%; +} + +#aiosp_sitemap_addl_pages_metabox table.aioseop_table, +#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table { + width: 96%; + border: 1px solid #CCC; + margin: 5px 0 10px 0; +} + +table.aioseop_table tr:nth-child(odd) { + background-color: #EEE; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) { + background-color: rgba(238, 238, 238, 0.5); +} + +table.aioseop_table td { + width: 23%; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table { + width: 80%; + max-width: 800px; + display: block; + border-top: 1px solid #dfdfdf; + border-left: 1px solid #dfdfdf; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table th { + width: 18%; + border-right: 1px solid #dfdfdf; + border-bottom: 1px solid #dfdfdf; +} + +.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info { + margin-top: 10px; + border: 1px solid #dfdfdf; + width: 80%; + max-width: 800px; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th { + background: #f1f1f1; + background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); + background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: linear-gradient(to top, #ececec, #f9f9f9); + padding: 5px; + border-bottom-color: #dfdfdf; + text-shadow: #fff 0 1px 0; + -webkit-box-shadow: 0 1px 0 #fff; + -moz-box-shadow: 0 1px 0 #fff; + box-shadow: 0 1px 0 #fff; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table td { + border-right: 1px solid #dfdfdf; + border-bottom: 1px solid #dfdfdf; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item { + display: inline-block; + width: 30%; + vertical-align: top; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) { + font-weight: bold; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) { + width: 70%; +} + +#aiosp_sitemap_addl_pages_metabox table.aioseop_table td, +#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td { + width: 25%; + padding-left: 5%; +} + +table.aioseop_table td, table.aioseop_table th { + padding: 3px; +} + +.aioseop_top_label .aioseop_option_input, +.aioseop_no_label .aioseop_option_input { + width: 100%; +} + +#aiosp_settings_form .postbox { + margin: 0 0 20px 0; +} + +.aioseop_settings_left .postbox { + float: left; + width: 100%; +} + +.aioseop_option_setting_label { + min-height: 35px; + display: inline-block; + white-space: nowrap; + overflow: hidden; + padding-left: 1px; + max-width: 229px; + min-width: 160px; + width: 33%; +} + +.aioseop_settings_left .postbox .inside { + padding: 0; + margin: 0; + clear: right; +} + +#aiosp_settings_form .aioseop_no_label, .aioseop_no_label { + float: left; + width: 92%; + max-width: 100%; + margin: 0 23px 0 13px; +} + +#aiosp_sitemap_status_metabox .handlediv.button-link { + display: none; +} + +#aiosp_sitemap_status_metabox.closed .inside { + display: block; +} + +.aioseop_top_label { + width: 96%; + margin: 0 10px; +} + +.aioseop_hidden_type { + margin: 0; + padding: 0; + height: 0; +} + +#aiosp_title_metabox #aiosp_force_rewrites_wrapper { + display: none; + height: 0; +} + +.aioseop_module.error.below-h2 { + padding: 5px 0; + margin: 0 477px 15px 0 !important; +} + +#aioseop_opengraph_settings .inside { + margin: 0; +} + +#aioseop_opengraph_settings_image_wrapper img { + width: auto; + height: 75px; +} + +#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label { + max-width: 160px; + min-width: 100px; + width: 30%; +} + +.aioseop_input input[type="checkbox"], +.aioseop_input input[type="radio"] { + vertical-align: text-bottom; + margin-top: 8px; +} + +#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div { + max-height: initial; +} + +#aiosp { + width: auto; +} + +.aioseop_input.aioseop_top_label .aioseop_option_input { + margin: 0 0 10px 0; +} + +.aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div { + max-height: none; +} + +/* Robots.txt styling */ +#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div, +#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div { + max-height: none; +} + +.aioseop_option_input .widefat td { + vertical-align: middle; +} + +.entry-row.robots.quirks { + font-weight: bold; + opacity: 1; +} + +.entry-row.robots { + opacity: 0.8; +} + +.entry-row.robots.invalid { + opacity: 1; + font-weight: bold; +} + +.invalid .entry_label { + font-weight: bold; +} + +.aioseop .aioseop_option_input tbody { + background: #FCFCFC; +} + +.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody { + background: transparent; +} + +.entry-row.robots div { + height: 20px; + vertical-align: middle; + width: 90%; + margin: 0 0 4px 0; +} + +.robots img { + margin: 0 0 0 2px; + opacity: 0.6; +} + +.aioseop_option_docs { + width: 98%; + display: none; + border: 1px solid #D3D3D3; + margin-top: 20px; + padding: 1%; + background-color: #EEE; +} + +.aioseop_option_docs h3 { + background: none; +} + +div.aioseop_notice { + position: relative; +} + +div.aioseop_notice a.aioseop_dismiss_link { + position: absolute; + top: 10px; + right: 10px; +} + +.aioseop_error_notice { + color: #f00; + font-weight: bold; +} + +.aioseop_input select { + margin: 7px 0; +} + +.aioseop_help_text ul { + margin: 15px 0 0 20px; +} + +.aioseop_help_text ul li { + line-height: 20px; + margin: 0; +} + +.aioseop_sidebar #side-sortables { + width: 98%; +} + +#aioseop_opengraph_settings .aioseop_option_label { + width: 30%; +} + +.aioseop_tabs { + padding-top: 6px; +} + +.aioseop_tabs.hide, +.aioseop_header_tabs.hide { + display: block !important; +} + +.aioseop_header_tabs li { + display: inline; + padding: 0; + margin: 0; +} + +.aioseop_header_tabs { + margin: 0; +} + +.aioseop_header_nav { + margin: 0; +} + +.aioseop_header_tabs li a.aioseop_header_tab.active { + background-color: rgb(255, 255, 255); + border-bottom-color: rgba(255, 255, 255, 0.5); + font-weight: bold; +} + +.aioseop_header_tabs li a.aioseop_header_tab { + font-size: 14px; + line-height: 37px; + text-decoration: none; + margin: 5px 5px 0 0; + padding: 10px; + cursor: pointer; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + background-color: #e5e5e5; + border: 1px solid #ccc; + color: #5F5F5F; +} + +.aioseop_header_tabs li:first-child a.aioseop_header_tab { + border-left: solid 1px #CCC; + margin-left: 5px; +} + +.aioseop_tab { + border: solid 1px #CCC; + background-color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0.5); + padding: 10px; +} + +.aioseop_loading { + background-image: url('../../images/activity.gif'); + display: inline-block; + width: 24px; + height: 24px; + margin: 0; + padding: 0; + vertical-align: bottom; +} + +.aiosp_delete_url { + background-image: url('../../images/delete.png'); + display: inline-block; + width: 16px; + height: 16px; + margin: 0; + padding: 0; + vertical-align: bottom; +} + +form#aiosp_settings_form, +.aioseop_tabs_div { + padding-right: 477px; +} + +.aioseop_tabs_div { + margin-top: 10px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li strong { + display: block; + float: left; + text-align: right; + background-color: #DDD; + margin-right: 8px; + padding: 1px 8px 1px 1px; + overflow: auto; + width: 200px; + min-height: 16px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong { + background-color: #CCC; +} + +#aiosp_settings_form ul.sfwd_debug_settings li { + clear: left; + margin: 0; + padding: 0; + background-color: #EEE; + overflow: auto; + max-width: 75%; + min-width: 800px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) { + background-color: #DDD; +} + +div.sfwd_debug_mail_sent { + background-color: #080; + border: 1px solid #0A0; + margin: 10px 0 10px 0; + width: 598px; + color: #FFF; + text-align: center; +} + +div.sfwd_debug_error { + background-color: #F00; + color: #FFF; + border: 1px solid #A00; + margin: 10px 0 10px 0; + width: 598px; + text-align: center; + font-weight: bolder; +} + +#aiosp_performance_status_wrapper .aioseop_option_div { + max-height: 420px; +} + +#aioseop_coming_soon, #aioseop_coming_soon2 { + padding-top: 40px; + text-align: center; + height: 258px; + font-size: 16px; +} + +.MRL { + margin-left: 20px !important; + margin-bottom: 10px !important; +} + +/** +* Edit Post screen specific styling +* +*/ +.postbox-container .aioseop_option_div { + width: 100%; +} + +.postbox-container .aioseop_option_div input[type="text"], +.postbox-container .aioseop_option_div textarea { + width: 99%; + max-width: 900px; +} + +.postbox-container .aioseop_option_label { + max-width: none; + height: auto !important; +} + +.postbox-container .aioseop_wrapper { + padding: 0; +} + +.postbox-container .aioseop_input { + display: block; + margin-bottom: 10px; + padding: 0; +} + +.postbox-container .aioseop_option_input { + width: 63%; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper { + float: none; + width: auto; + margin: 0; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input { + display: block; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input { + float: none; + width: auto; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div { + width: auto; + min-height: 0; + padding: 10px 0; +} + +.aioseop_tabs .aioseop_options { + margin: 0; +} + +#aioseop_opengraph_settings .aioseop_options { + clear: both; + margin-top: 35px; +} + +#aioseop_opengraph_settings .aioseop_option_input { + width: 70%; +} + +/** +* Preview Snippet styling +* +*/ +div#aiosp_snippet_wrapper { + border: 1px solid #888; + clear: both; + padding: 10px 10px 0; + max-width: 97%; + margin-bottom: 15px; +} + +div#aiosp_snippet_wrapper .aioseop_option_label { + height: auto !important; +} + +div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input { + margin: 0; +} + +div#aioseop_snippet { + font-family: arial, sans-serif; + font-size: 13px; +} + +div#aioseop_snippet > h3 { + margin: 10px 0 5px; + font-size: 18px; + border: 0; + background: inherit; + font-weight: normal; +} + +div#aioseop_snippet > h3 > a { + color: #12c; + text-decoration: none; + cursor: pointer; +} + +div#aioseop_snippet > div { + color: #545454; + max-width: 48em; +} + +div#aioseop_snippet > div > div { + display: block; + margin-bottom: 1px; +} + +div#aioseop_snippet > div > div > cite { + color: #093; + font-style: normal; +} + +div#aioseop_snippet > div > span { + margin: 0; + padding: 0; + border: 0; +} + +/* the good, the bad and the ugly character counts */ +.aioseop_count_good { + color: #515151 !important; + background-color: #eee !important; +} +.aioseop_count_bad { + color: #515151 !important; + background-color: #ff0 !important; +} +.aioseop_count_ugly { + color: #fff !important; + background-color: #f00 !important; +} \ No newline at end of file diff --git a/js/modules/aioseop_module.js b/js/modules/aioseop_module.js index 45610c674..b21bcfe86 100644 --- a/js/modules/aioseop_module.js +++ b/js/modules/aioseop_module.js @@ -1,817 +1,828 @@ -/** - * Controls all the styling of the plugin. - * - * AIOSEOP Updates class. - * @author Michael Torbert. - * @author Semper Fi Web Design. - * @copyright https://semperplugins.com - * @version 1.0.0 - */ -if ( typeof aiosp_data != 'undefined' ) { - - /** - * @since 1.0.0 - * @param int $index. - * @param $value - */ - jQuery.each( - aiosp_data, function( index, value ) { - // aiosp_data[index] = value.json.replace(/"/g, '"'); - // aiosp_data[index] = jQuery.parseJSON( value ); - if ( index == 0 ) { - if ( typeof value.condshow == 'undefined' ) { - aiosp_data[ index ].condshow = []; - } - } else { - if ( typeof value.condshow != 'undefined' ) { - aiosp_data[ 0 ].condshow = - jQuery.merge( aiosp_data[0].condshow, value.condshow ); - } - } - } - ); - aiosp_data = aiosp_data[0]; -} - -/** - * @summary Changes visibility. - * - * @since 1.0.0 - * @param int $id. - */ -function toggleVisibility( id ) { - var e = document.getElementById( id ); - if ( e.style.display == 'block' ) { - e.style.display = 'none'; - } else { - e.style.display = 'block'; - } -} - -/** - * @summary Counts characters. - * - * @since 1.0.0 - * @param String $field. - * @param Int $cntfield. - * @return Mixed. - */ -function countChars( field, cntfield ) { - var extra = 0; - var field_size; - if ( ( field.name == 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { - extra = aiosp_title_extra; - } - cntfield.value = field.value.length + extra; - if ( typeof field.size != 'undefined' ) { - field_size = field.size; - } else { - field_size = field.rows * field.cols; - } - if ( field_size < 10 ) { - return; - } - if ( cntfield.value > field_size ) { - cntfield.style.color = "#fff"; - cntfield.style.backgroundColor = "#f00"; - } else { - if ( cntfield.value > ( field_size - 91 ) ) { - cntfield.style.color = "#515151"; - cntfield.style.backgroundColor = "#ff0"; - } else { - cntfield.style.color = "#515151"; - cntfield.style.backgroundColor = "#eee"; - } - } -} - -/** - * @summary Returns the fields value. - * - * @since 1.0.0 - * @param String $field. - * @return Mixed. - */ -function aioseop_get_field_value( field ) { - if ( field.length == 0 ) { - return field; - } - cur = jQuery( '[name=' + field + ']' ); - if ( cur.length == 0 ) { - return field; - } - type = cur.attr( 'type' ); - if ( type == "checkbox" || type == "radio" ) { - cur = jQuery( 'input[name=' + field + ']:checked' ); - } - return cur.val(); -} - -/** - * @summary Returns the fields value. - * - * @since 1.0.0 - * @param String $field. - * @return Mixed. - */ -function aioseop_get_field_values( field ) { - arr = []; - cur = jQuery( '[name=' + field + ']' ); - if ( cur.length == 0 ) { - return field; - } - type = cur.attr( 'type' ); - if ( type == "checkbox" || type == "radio" ) { - jQuery( 'input[name=' + field + ']:checked' ).each( - function() { - arr.push( jQuery( this ).val() ); - } - ); - } - if ( arr.length <= 0 ) { - arr.push( cur.val() ); - } - return arr; -} - -/** - * @summary Evaluates condshow logic. - * - * @since 1.0.0 - * @param String $statement. - * @return Mixed. - */ -function aioseop_eval_condshow_logic( statement ) { - var lhs, rhs; - if ( ( typeof statement ) == 'object' ) { - lhs = statement.lhs; - rhs = statement.rhs; - if ( lhs !== null && ( ( typeof lhs ) == 'object' ) ) { - lhs = aioseop_eval_condshow_logic( lhs ); - } - if ( rhs !== null && ( typeof rhs ) == 'object' ) { - rhs = aioseop_eval_condshow_logic( rhs ); - } - lhs = aioseop_get_field_value( lhs ); - rhs = aioseop_get_field_value( rhs ); - switch ( statement.op ) { - case 'NOT': - return ( ! lhs ); - case 'AND': - return ( lhs && rhs ); - case 'OR' : - return ( lhs || rhs ); - case '==' : - return ( lhs == rhs ); - case '!=' : - return ( lhs != rhs ); - default : - return null; - } - } - return statement; -} - -/** - * @summary Evaluates condshow logic. - * - * @since 1.0.0 - * @param String $index. - * @param $value. - * @return Mixed. - */ -function aioseop_do_condshow_match( index, value ) { - if ( typeof value != 'undefined' ) { - matches = true; - jQuery.each( - value, function(subopt, setting) { - var statement; - if ( ( typeof setting ) == 'object' ) { - statement = aioseop_eval_condshow_logic( setting ); - if ( ! statement ) { - matches = false; - } - } else { - if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb - cur = aioseop_get_field_values( subopt ); - if ( jQuery.inArray( setting, cur, 0 ) < 0 ) { - matches = false; - } - } else { - cur = aioseop_get_field_value( subopt ); - if ( cur != setting ) { - matches = false; - } - } - } - } - ); - if ( matches ) { - jQuery( '#' + index + '_wrapper' ).show(); - } else { - jQuery( '#' + index + '_wrapper' ).hide(); - } - return matches; - } - return false; -} - -/** - * @summary Adds condshow handlers. - * - * @since 1.0.0 - * @param String $index. - * @param $value. - */ -function aioseop_add_condshow_handlers( index, value ) { - if ( typeof value != 'undefined' ) { - jQuery.each( - value, function(subopt, setting) { - jQuery( '[name=' + subopt + ']' ).bind( - "change keyup", function() { - aioseop_do_condshow_match( index, value ); - } - ); - } - ); - } -} - -/** - * @summary Does condshow. - * - * @since 1.0.0 - * @param $condshow. - */ -function aioseop_do_condshow( condshow ) { - if ( typeof aiosp_data.condshow != 'undefined' ) { - jQuery.each( - aiosp_data.condshow, function( index, value ) { - aioseop_do_condshow_match( index, value ); - aioseop_add_condshow_handlers( index, value ); - } - ); - } -} - -/** - * @since 1.0.0 - */ -jQuery( document ).ready( - function() { - if ( typeof aiosp_data != 'undefined' ) { - if ( typeof aiosp_data.condshow != 'undefined' ) { - aioseop_do_condshow( aiosp_data.condshow ); - } - } - - /** - * Turns on image checker on custom url change. - * @since 2.3.16 - */ - jQuery( '.aioseop_upload_image_label' ).on( - 'change', function() { - this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' ); - if ( this.checker.length > 0 ) { - this.checker.val( 1 ); - } - } - ); - } -); - -/** - * @summary Custom jQuery plugin that enables image uploader in wordpress. - * - * @since 2.3.13 - * @since 2.4.14 Added success callback and options. - * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ - * - * @param object options Plugin options. - */ -jQuery.fn.aioseopImageUploader = function( options ) { - // Keep reference to this. - var self = this; - - // Options - self.options = jQuery.extend( - { - success: undefined, - }, options - ); - - // Set input target when to update image url value - self.target = jQuery( self ).next(); - - // Uploader per image button - // * Having only one uploader was causing problems when multiple image buttons where in place - self.uploader = wp.media( - { - title: 'Choose Image', - button: { - text: 'Choose Image' - }, - multiple: false - } - ); - - /** - * Event handler that will be called when an image is selected from media uploader. - */ - self.onSelect = function() { - var url = self.uploader.state().get( 'selection' ).first().toJSON().url; - if ( self.target.length >= 0 ) { - jQuery( self.target ).val( url ); - } - if ( self.options.success !== undefined ) { - self.options.success( url, self ); - } - }; - - /** - * Click event handler. - * @param object e Click event. - */ - self.onClick = function( e ) { - e.preventDefault(); - self.uploader.open(); - }; - - // Set uploader select handler - self.uploader.on( 'select', self.onSelect ); - - // Set click handler - jQuery( self ).click( self.onClick ); -}; - -/** - * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin. - * - * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ - * @since ? - * @since 2.3.11.2 Use WP 3.5 new media uploader - * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740) - * - */ -jQuery( document ).ready( - function($){ - - jQuery( '.aioseop_upload_image_button' ).each( - function() { - jQuery( this ).aioseopImageUploader( - { - success: function( url, el ) { - // Update checker - if ( jQuery( el ).prev().length > 0 ) { - jQuery( el ).prev().val( 1 ); - } - }, - } - ); - } - ); - - } -); - -/** - * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged. - * - * props to commentluv for this fix - * @author commentluv. - * @link https://core.trac.wordpress.org/ticket/16972 - * @since 1.0.0 - */ -jQuery( document ).ready( - function() { - - // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag - jQuery( '.hndle' ).mousedown( - function() { - - // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function - jQuery( '.wrap' ).mouseup( - function() { - aiosp_store_radio(); - setTimeout( function() { - aiosp_reclick_radio(); - }, 50 ); - } - ); - } - ); - } -); - -/** - * @summary Stores object of all radio buttons that are checked for entire form. - * - * @since 1.0.0 - */ -function aiosp_store_radio() { - var radioshack = {}; - jQuery( 'input[type="radio"]' ).each( - function() { - if ( jQuery( this ).is( ':checked' ) ) { - radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val(); - } - jQuery( document ).data( 'radioshack', radioshack ); - } - ); -} - -/** - * @summary Detects mouseup and restore all radio buttons that were checked. - * - * @since 1.0.0 - */ -function aiosp_reclick_radio() { - - // gets the object of checked radio button names and values - var radios = jQuery( document ).data( 'radioshack' ); - - // steps thru each object element and trigger a click on it's corresponding radio button - for ( var key in radios ) { - jQuery( 'input[name="' + key + '"]' ) - .filter( '[value="' + radios[ key ] + '"]' ) - .trigger( 'click' ); - } - // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function) - jQuery( '.wrap' ).unbind( 'mouseup' ); -} - -/** - * @summary Handdles ajax call. - * - * @since 1.0.0 - * @param $action. - * @param $setting. - * @param $options. - * @param $success. - */ -function aioseop_handle_ajax_call( action, settings, options, success ) { - var aioseop_sack = new sack( ajaxurl ); - aioseop_sack.execute = 1; - aioseop_sack.method = 'POST'; - aioseop_sack.setVar( "action", action ); - aioseop_sack.setVar( "settings", settings ); - aioseop_sack.setVar( "options", options ); - if ( typeof success != 'undefined' ) { - aioseop_sack.onCompletion = success; - } - aioseop_sack.setVar( - "nonce-aioseop", - jQuery( 'input[name="nonce-aioseop"]' ).val() - ); - aioseop_sack.setVar( - "nonce-aioseop-edit", - jQuery( 'input[name="nonce-aioseop-edit"]' ).val() - ); - aioseop_sack.onError = function() { - alert( 'Ajax error on saving.' ); - }; - aioseop_sack.runAJAX(); -} - -/** - * @summary Handdles posts URL. - * - * @since 1.0.0 - * @param $action. - * @param $setting. - * @param $options. - * @param $success. - */ -function aioseop_handle_post_url( action, settings, options, success) { - jQuery( "div#aiosp_" + settings ).fadeOut( - 'fast', function() { - var loading = ' Please wait...'; - jQuery( "div#aiosp_" + settings ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( action, settings, options, success ); - } - ); - jQuery( "div#aiosp_" + settings ).html( loading ); - } - ); -} - -/** - * @summary Handles when AIOSEOP is overflowed. - * - * @since 1.0.0 - * @param $element. - * @return mixed. - */ -function aioseop_is_overflowed( element ) { - return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth; -} - -/** - * @summary Handles when overflowed border. - * - * @since 1.0.0 - * @param $el. - */ -function aioseop_overflow_border( el ) { - if ( aioseop_is_overflowed( el ) ) { - el.className = 'aioseop_option_div aioseop_overflowed'; - } else { - el.className = 'aioseop_option_div'; - } -} - -/** - * @since 1.0.0 - * @return mixed. - */ -jQuery( document ).ready( - function() { - jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on( - 'click', function() { - var previousValue = jQuery( this ).attr( 'previousValue' ); - var name = jQuery( this ).attr( 'name' ); - if ( typeof previousValue == 'undefined' ) { - if ( jQuery( this ).prop( "checked" ) ) { - jQuery( this ).prop( 'checked', true ); - jQuery( this ).attr( 'previousValue', 'checked' ); - } else { - jQuery( this ).prop( 'checked', false ); - jQuery( this ).attr( 'previousValue', false ); - } - return; - } - if ( previousValue == 'checked' ) { - jQuery( this ).prop( 'checked', false ); - jQuery( this ).attr( 'previousValue', false ); - } else { - jQuery( "input[name=" + name + "]:radio" ) - .attr( 'previousValue', false ); - jQuery( this ).attr( 'previousValue', 'checked' ); - } - } - ); - if ( typeof aiosp_data.pointers != 'undefined' ) { - - /** - * @since 1.0.0 - * @param $index. - * @param $value. - * @return mixed. - */ - jQuery.each( - aiosp_data.pointers, function( index, value ) { - if ( value != 'undefined' && value.pointer_text != '' ) { - aioseop_show_pointer( index, value ); - } - } - ); - } - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_save_settings', - 'ajax_settings_message', - jQuery( 'form#aiosp_settings_form' ).serialize(), - function() { - jQuery( '.wp-has-current-submenu' ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( - 'aioseop_ajax_get_menu_links', - 'ajax_settings_message', - jQuery.param( {target: '.wp-has-current-submenu > ul'} ) - ); - } - ); - } - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_save_settings', - 'ajax_settings_message', - jQuery( 'form#aiosp_settings_form' ).serialize(), - function() { - jQuery( '.wp-has-current-submenu' ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( - 'aioseop_ajax_get_menu_links', - 'ajax_settings_message', - jQuery.param( {target: '.wp-has-current-submenu > ul'} ) - ); - } - ); - } - ); - return false; - } - ); - - var selectors = - "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div"; - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) - .delegate( - "input[name='Submit']", "click", function() { - aioseop_handle_post_url( - 'aioseop_ajax_save_url', - 'sitemap_addl_pages', - jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' ) - .serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) - .delegate( - "input[name='Submit']", "click", function() { - aioseop_handle_post_url( - 'aioseop_ajax_save_url', - 'video_sitemap_addl_pages', - jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select' ) - .serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) - .delegate( - "a.aiosp_delete_url", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_delete_url', - 'sitemap_addl_pages', - jQuery( this ).attr( "title" ) - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) - .delegate( - "a.aiosp_delete_url", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_delete_url', - 'video_sitemap_addl_pages', - jQuery( this ).attr( "title" ) - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_opengraph_scan_header" ) - .delegate( - "input[name='aiosp_opengraph_scan_header']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_scan_header', - 'opengraph_scan_header', - jQuery( 'div#aiosp_opengraph_scan_header' ).serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - */ - jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' ) - .click( - function() { - jQuery( this ) - .parents( 'div:eq(0)' ) - .find( ':checkbox' ) - .prop( 'checked', this.checked ); - } - ); - - /** - * @since 1.0.0 - */ - jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' ) - .click( - function () { - if ( ! this.checked ) { - jQuery( this ) - .parents( 'div:eq(0)' ) - .find( 'input[value="all"]:checkbox' ) - .prop( 'checked', this.checked ); - } - } - ); - - /** - * @since 1.0.0 - */ - jQuery( ".aioseop_tab:not(:first)" ).hide(); - - /** - * @since 1.0.0 - */ - jQuery( ".aioseop_tab:first" ).show(); - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "a.aioseop_header_tab" ).click( - function() { - var stringref = jQuery( this ).attr( "href" ).split( '#' )[1]; - jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' ); - jQuery( '.aioseop_tab#' + stringref ).show( 'slow' ); - jQuery( '.aioseop_header_tab[href!="#' + stringref + '"]' ).removeClass( 'active' ); - jQuery( '.aioseop_header_tab[href="#' + stringref + '"]' ).addClass( 'active' ); - return false; - } - ); - } -); - - -jQuery( document ).ready( - function() { - // TODO: consider moving EVERYTHING that needs ready() to this function - initAll( jQuery ); - } -); - -function initAll($){ - if ( $( '.aiseop-date' ).length > 0 && $( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) { - $( '.aiseop-date' ).datepicker( - { - dateFormat: "yy-mm-dd" - } - ); - } -} +/** + * Controls all the styling of the plugin. + * + * AIOSEOP Updates class. + * @author Michael Torbert. + * @author Semper Fi Web Design. + * @copyright https://semperplugins.com + * @version 1.0.0 + */ +if ( typeof aiosp_data != 'undefined' ) { + + /** + * @since 1.0.0 + * @param int $index. + * @param $value + */ + jQuery.each( + aiosp_data, function( index, value ) { + // aiosp_data[index] = value.json.replace(/"/g, '"'); + // aiosp_data[index] = jQuery.parseJSON( value ); + if ( index == 0 ) { + if ( typeof value.condshow == 'undefined' ) { + aiosp_data[ index ].condshow = []; + } + } else { + if ( typeof value.condshow != 'undefined' ) { + aiosp_data[ 0 ].condshow = + jQuery.merge( aiosp_data[0].condshow, value.condshow ); + } + } + } + ); + aiosp_data = aiosp_data[0]; +} + +/** + * @summary Changes visibility. + * + * @since 1.0.0 + * @param int $id. + */ +function toggleVisibility( id ) { + var e = document.getElementById( id ); + if ( e.style.display == 'block' ) { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +/** + * @summary Counts characters. + * + * @since 1.0.0 + * @param Object $field. + * @param Object $cntfield. + * @return Mixed. + */ +function countChars( field, cntfield ) { + var extra = 0; + var field_size; + if ( ( field.attr('name') == 'aiosp_title' ) + && ( typeof aiosp_title_extra !== 'undefined' ) ) { + extra = aiosp_title_extra; + } + cntfield.val(field.val().length + extra); + if ( typeof field.attr('size') != 'undefined' ) { + field_size = field.attr('size'); + } else { + field_size = field.attr('rows') * field.attr('cols'); + } + field_size = parseInt(field_size, 10); + if ( field_size < 10 ) { + return; + } + if ( cntfield.val() > field_size ) { + cntfield.removeClass().addClass('aioseop_count_ugly'); + } else { + if ( cntfield.val() > ( field_size - 6 ) ) { + cntfield.removeClass().addClass('aioseop_count_bad'); + } else { + cntfield.removeClass().addClass('aioseop_count_good'); + } + } +} + +/** + * @summary Returns the fields value. + * + * @since 1.0.0 + * @param String $field. + * @return Mixed. + */ +function aioseop_get_field_value( field ) { + if ( field.length == 0 ) { + return field; + } + cur = jQuery( '[name=' + field + ']' ); + if ( cur.length == 0 ) { + return field; + } + type = cur.attr( 'type' ); + if ( type == "checkbox" || type == "radio" ) { + cur = jQuery( 'input[name=' + field + ']:checked' ); + } + return cur.val(); +} + +/** + * @summary Returns the fields value. + * + * @since 1.0.0 + * @param String $field. + * @return Mixed. + */ +function aioseop_get_field_values( field ) { + arr = []; + cur = jQuery( '[name=' + field + ']' ); + if ( cur.length == 0 ) { + return field; + } + type = cur.attr( 'type' ); + if ( type == "checkbox" || type == "radio" ) { + jQuery( 'input[name=' + field + ']:checked' ).each( + function() { + arr.push( jQuery( this ).val() ); + } + ); + } + if ( arr.length <= 0 ) { + arr.push( cur.val() ); + } + return arr; +} + +/** + * @summary Evaluates condshow logic. + * + * @since 1.0.0 + * @param String $statement. + * @return Mixed. + */ +function aioseop_eval_condshow_logic( statement ) { + var lhs, rhs; + if ( ( typeof statement ) == 'object' ) { + lhs = statement.lhs; + rhs = statement.rhs; + if ( lhs !== null && ( ( typeof lhs ) == 'object' ) ) { + lhs = aioseop_eval_condshow_logic( lhs ); + } + if ( rhs !== null && ( typeof rhs ) == 'object' ) { + rhs = aioseop_eval_condshow_logic( rhs ); + } + lhs = aioseop_get_field_value( lhs ); + rhs = aioseop_get_field_value( rhs ); + switch ( statement.op ) { + case 'NOT': + return ( ! lhs ); + case 'AND': + return ( lhs && rhs ); + case 'OR' : + return ( lhs || rhs ); + case '==' : + return ( lhs == rhs ); + case '!=' : + return ( lhs != rhs ); + default : + return null; + } + } + return statement; +} + +/** + * @summary Evaluates condshow logic. + * + * @since 1.0.0 + * @param String $index. + * @param $value. + * @return Mixed. + */ +function aioseop_do_condshow_match( index, value ) { + if ( typeof value != 'undefined' ) { + matches = true; + jQuery.each( + value, function(subopt, setting) { + var statement; + if ( ( typeof setting ) == 'object' ) { + statement = aioseop_eval_condshow_logic( setting ); + if ( ! statement ) { + matches = false; + } + } else { + if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb + cur = aioseop_get_field_values( subopt ); + if ( jQuery.inArray( setting, cur, 0 ) < 0 ) { + matches = false; + } + } else { + cur = aioseop_get_field_value( subopt ); + if ( cur != setting ) { + matches = false; + } + } + } + } + ); + if ( matches ) { + jQuery( '#' + index + '_wrapper' ).show(); + } else { + jQuery( '#' + index + '_wrapper' ).hide(); + } + return matches; + } + return false; +} + +/** + * @summary Adds condshow handlers. + * + * @since 1.0.0 + * @param String $index. + * @param $value. + */ +function aioseop_add_condshow_handlers( index, value ) { + if ( typeof value != 'undefined' ) { + jQuery.each( + value, function(subopt, setting) { + jQuery( '[name=' + subopt + ']' ).bind( + "change keyup", function() { + aioseop_do_condshow_match( index, value ); + } + ); + } + ); + } +} + +/** + * @summary Does condshow. + * + * @since 1.0.0 + * @param $condshow. + */ +function aioseop_do_condshow( condshow ) { + if ( typeof aiosp_data.condshow != 'undefined' ) { + jQuery.each( + aiosp_data.condshow, function( index, value ) { + aioseop_do_condshow_match( index, value ); + aioseop_add_condshow_handlers( index, value ); + } + ); + } +} + +/** + * @since 1.0.0 + */ +jQuery( document ).ready( + function() { + if ( typeof aiosp_data != 'undefined' ) { + if ( typeof aiosp_data.condshow != 'undefined' ) { + aioseop_do_condshow( aiosp_data.condshow ); + } + } + + /** + * Turns on image checker on custom url change. + * @since 2.3.16 + */ + jQuery( '.aioseop_upload_image_label' ).on( + 'change', function() { + this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' ); + if ( this.checker.length > 0 ) { + this.checker.val( 1 ); + } + } + ); + } +); + +/** + * @summary Custom jQuery plugin that enables image uploader in wordpress. + * + * @since 2.3.13 + * @since 2.4.14 Added success callback and options. + * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ + * + * @param object options Plugin options. + */ +jQuery.fn.aioseopImageUploader = function( options ) { + // Keep reference to this. + var self = this; + + // Options + self.options = jQuery.extend( + { + success: undefined, + }, options + ); + + // Set input target when to update image url value + self.target = jQuery( self ).next(); + + // Uploader per image button + // * Having only one uploader was causing problems when multiple image buttons where in place + self.uploader = wp.media( + { + title: 'Choose Image', + button: { + text: 'Choose Image' + }, + multiple: false + } + ); + + /** + * Event handler that will be called when an image is selected from media uploader. + */ + self.onSelect = function() { + var url = self.uploader.state().get( 'selection' ).first().toJSON().url; + if ( self.target.length >= 0 ) { + jQuery( self.target ).val( url ); + } + if ( self.options.success !== undefined ) { + self.options.success( url, self ); + } + }; + + /** + * Click event handler. + * @param object e Click event. + */ + self.onClick = function( e ) { + e.preventDefault(); + self.uploader.open(); + }; + + // Set uploader select handler + self.uploader.on( 'select', self.onSelect ); + + // Set click handler + jQuery( self ).click( self.onClick ); +}; + +/** + * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin. + * + * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ + * @since ? + * @since 2.3.11.2 Use WP 3.5 new media uploader + * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740) + * + */ +jQuery( document ).ready( + function($){ + + jQuery( '.aioseop_upload_image_button' ).each( + function() { + jQuery( this ).aioseopImageUploader( + { + success: function( url, el ) { + // Update checker + if ( jQuery( el ).prev().length > 0 ) { + jQuery( el ).prev().val( 1 ); + } + }, + } + ); + } + ); + + } +); + +/** + * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged. + * + * props to commentluv for this fix + * @author commentluv. + * @link https://core.trac.wordpress.org/ticket/16972 + * @since 1.0.0 + */ +jQuery( document ).ready( + function() { + + // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag + jQuery( '.hndle' ).mousedown( + function() { + + // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function + jQuery( '.wrap' ).mouseup( + function() { + aiosp_store_radio(); + setTimeout( function() { + aiosp_reclick_radio(); + }, 50 ); + } + ); + } + ); + } +); + +/** + * @summary Stores object of all radio buttons that are checked for entire form. + * + * @since 1.0.0 + */ +function aiosp_store_radio() { + var radioshack = {}; + jQuery( 'input[type="radio"]' ).each( + function() { + if ( jQuery( this ).is( ':checked' ) ) { + radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val(); + } + jQuery( document ).data( 'radioshack', radioshack ); + } + ); +} + +/** + * @summary Detects mouseup and restore all radio buttons that were checked. + * + * @since 1.0.0 + */ +function aiosp_reclick_radio() { + + // gets the object of checked radio button names and values + var radios = jQuery( document ).data( 'radioshack' ); + + // steps thru each object element and trigger a click on it's corresponding radio button + for ( var key in radios ) { + jQuery( 'input[name="' + key + '"]' ) + .filter( '[value="' + radios[ key ] + '"]' ) + .trigger( 'click' ); + } + // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function) + jQuery( '.wrap' ).unbind( 'mouseup' ); +} + +/** + * @summary Handdles ajax call. + * + * @since 1.0.0 + * @param $action. + * @param $setting. + * @param $options. + * @param $success. + */ +function aioseop_handle_ajax_call( action, settings, options, success ) { + var aioseop_sack = new sack( ajaxurl ); + aioseop_sack.execute = 1; + aioseop_sack.method = 'POST'; + aioseop_sack.setVar( "action", action ); + aioseop_sack.setVar( "settings", settings ); + aioseop_sack.setVar( "options", options ); + if ( typeof success != 'undefined' ) { + aioseop_sack.onCompletion = success; + } + aioseop_sack.setVar( + "nonce-aioseop", + jQuery( 'input[name="nonce-aioseop"]' ).val() + ); + aioseop_sack.setVar( + "nonce-aioseop-edit", + jQuery( 'input[name="nonce-aioseop-edit"]' ).val() + ); + aioseop_sack.onError = function() { + alert( 'Ajax error on saving.' ); + }; + aioseop_sack.runAJAX(); +} + +/** + * @summary Handdles posts URL. + * + * @since 1.0.0 + * @param $action. + * @param $setting. + * @param $options. + * @param $success. + */ +function aioseop_handle_post_url( action, settings, options, success) { + jQuery( "div#aiosp_" + settings ).fadeOut( + 'fast', function() { + var loading = ' Please wait...'; + jQuery( "div#aiosp_" + settings ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( action, settings, options, success ); + } + ); + jQuery( "div#aiosp_" + settings ).html( loading ); + } + ); +} + +/** + * @summary Handles when AIOSEOP is overflowed. + * + * @since 1.0.0 + * @param $element. + * @return mixed. + */ +function aioseop_is_overflowed( element ) { + return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth; +} + +/** + * @summary Handles when overflowed border. + * + * @since 1.0.0 + * @param $el. + */ +function aioseop_overflow_border( el ) { + if ( aioseop_is_overflowed( el ) ) { + el.className = 'aioseop_option_div aioseop_overflowed'; + } else { + el.className = 'aioseop_option_div'; + } +} + +/** + * @since 1.0.0 + * @return mixed. + */ +jQuery( document ).ready( + function() { + jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on( + 'click', function() { + var previousValue = jQuery( this ).attr( 'previousValue' ); + var name = jQuery( this ).attr( 'name' ); + if ( typeof previousValue == 'undefined' ) { + if ( jQuery( this ).prop( "checked" ) ) { + jQuery( this ).prop( 'checked', true ); + jQuery( this ).attr( 'previousValue', 'checked' ); + } else { + jQuery( this ).prop( 'checked', false ); + jQuery( this ).attr( 'previousValue', false ); + } + return; + } + if ( previousValue == 'checked' ) { + jQuery( this ).prop( 'checked', false ); + jQuery( this ).attr( 'previousValue', false ); + } else { + jQuery( "input[name=" + name + "]:radio" ) + .attr( 'previousValue', false ); + jQuery( this ).attr( 'previousValue', 'checked' ); + } + } + ); + if ( typeof aiosp_data.pointers != 'undefined' ) { + + /** + * @since 1.0.0 + * @param $index. + * @param $value. + * @return mixed. + */ + jQuery.each( + aiosp_data.pointers, function( index, value ) { + if ( value != 'undefined' && value.pointer_text != '' ) { + aioseop_show_pointer( index, value ); + } + } + ); + } + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_save_settings', + 'ajax_settings_message', + jQuery( 'form#aiosp_settings_form' ).serialize(), + function() { + jQuery( '.wp-has-current-submenu' ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( + 'aioseop_ajax_get_menu_links', + 'ajax_settings_message', + jQuery.param( {target: '.wp-has-current-submenu > ul'} ) + ); + } + ); + } + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_save_settings', + 'ajax_settings_message', + jQuery( 'form#aiosp_settings_form' ).serialize(), + function() { + jQuery( '.wp-has-current-submenu' ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( + 'aioseop_ajax_get_menu_links', + 'ajax_settings_message', + jQuery.param( {target: '.wp-has-current-submenu > ul'} ) + ); + } + ); + } + ); + return false; + } + ); + + var selectors = + "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div"; + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) + .delegate( + "input[name='Submit']", "click", function() { + aioseop_handle_post_url( + 'aioseop_ajax_save_url', + 'sitemap_addl_pages', + jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' ) + .serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) + .delegate( + "input[name='Submit']", "click", function() { + aioseop_handle_post_url( + 'aioseop_ajax_save_url', + 'video_sitemap_addl_pages', + jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select' ) + .serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) + .delegate( + "a.aiosp_delete_url", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_delete_url', + 'sitemap_addl_pages', + jQuery( this ).attr( "title" ) + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) + .delegate( + "a.aiosp_delete_url", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_delete_url', + 'video_sitemap_addl_pages', + jQuery( this ).attr( "title" ) + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_opengraph_scan_header" ) + .delegate( + "input[name='aiosp_opengraph_scan_header']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_scan_header', + 'opengraph_scan_header', + jQuery( 'div#aiosp_opengraph_scan_header' ).serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + */ + jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' ) + .click( + function() { + jQuery( this ) + .parents( 'div:eq(0)' ) + .find( ':checkbox' ) + .prop( 'checked', this.checked ); + } + ); + + /** + * @since 1.0.0 + */ + jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' ) + .click( + function () { + if ( ! this.checked ) { + jQuery( this ) + .parents( 'div:eq(0)' ) + .find( 'input[value="all"]:checkbox' ) + .prop( 'checked', this.checked ); + } + } + ); + + /** + * @since 1.0.0 + */ + jQuery( ".aioseop_tab:not(:first)" ).hide(); + + /** + * @since 1.0.0 + */ + jQuery( ".aioseop_tab:first" ).show(); + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "a.aioseop_header_tab" ).click( + function() { + var stringref = jQuery( this ).attr( "href" ).split( '#' )[1]; + jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' ); + jQuery( '.aioseop_tab#' + stringref ).show( 'slow' ); + jQuery( '.aioseop_header_tab[href!="#' + stringref + '"]' ).removeClass( 'active' ); + jQuery( '.aioseop_header_tab[href="#' + stringref + '"]' ).addClass( 'active' ); + return false; + } + ); + } +); + + +jQuery( document ).ready( + function() { + // TODO: consider moving EVERYTHING that needs ready() to this function + initAll( jQuery ); + initCounting( jQuery ); + } +); + +function initAll($){ + if ( $( '.aiseop-date' ).length > 0 && $( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) { + $( '.aiseop-date' ).datepicker( + { + dateFormat: "yy-mm-dd" + } + ); + } +} + +function initCounting($){ + /* count them characters */ + $( '.aioseop_count_chars' ).on('keyup keydown', function(){ + countChars( $(this).eq(0), $(this).parent().find('[name="' + $(this).attr('data-length-field') + '"]').eq(0)); + }); + $( '.aioseop_count_chars' ).each(function(){ + countChars( $(this).eq(0), $(this).parent().find('[name="' + $(this).attr('data-length-field') + '"]').eq(0)); + }); +} + From 33ede304337250b06c68f7f738b2dbacdce7bbaf Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Tue, 20 Mar 2018 19:08:32 -0400 Subject: [PATCH 07/11] Error with Gutenburg (#1412) (#1619) * Error with Gutenburg #1410 * codeclimate --- admin/aioseop_module_class.php | 5 +- css/modules/aioseop_module.css | 2824 ++++++++++++++++---------------- js/modules/aioseop_module.js | 1645 ++++++++++--------- 3 files changed, 2250 insertions(+), 2224 deletions(-) diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php index 4738f9b96..269c47288 100644 --- a/admin/aioseop_module_class.php +++ b/admin/aioseop_module_class.php @@ -2234,8 +2234,9 @@ function get_option_html( $args ) { $onload = ''; if ( ! empty( $options['count'] ) ) { $n ++; - $attr .= " onKeyDown='if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n)' onKeyUp='if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n)'"; - $onload = "if (typeof countChars == \"function\") countChars(document.{$this->form}.$name,document.{$this->form}.{$prefix}length$n);"; + $classes = isset( $options['class'] ) ? $options['class'] : ''; + $classes .= ' aioseop_count_chars'; + $attr .= " class='{$classes}' data-length-field='{$prefix}length$n'"; } if ( isset( $opts['id'] ) ) { $attr .= " id=\"{$opts['id']}\" "; diff --git a/css/modules/aioseop_module.css b/css/modules/aioseop_module.css index 61d4b0e14..0f408ffa2 100644 --- a/css/modules/aioseop_module.css +++ b/css/modules/aioseop_module.css @@ -1,1405 +1,1419 @@ -/** - * Controls all the styling of the plugin. - * - * @author Michael Torbert. - * @author Semper Fi Web Design. - * @copyright http://semperplugins.com - * @package All-in-One-SEO-Pack. - */ - -.form-table.aioseop { - clear: none; -} - -.form-table.aioseop td { - vertical-align: top; - padding: 16px 0 10px 0; - line-height: 20px; - font-size: 12px; -} - -.form-table.aioseop th { - width: 200px; - padding: 10px 0 12px 9px; -} - -.aioseop_help_text_link, -.aioseop_help_text_link:active { - text-align: left; - float: left; - max-width: 300px; - min-width: 1px; - padding-top: 2px; - outline: none; - color: #888; - font-family: sans-serif; -} - -.aioseop_help_text_link span { - font-size: 14px; -} - -.aioseop_help_text_link:before { - content: "\f223"; - font-size: 27px; - font-family: dashicons; - vertical-align: middle; -} - -#aioseop-support .aioseop_metabox_text, -#aioseop-support a { - font-size: 14px; - color: #000; - text-decoration: none; -} - -.aioseop_icon { - display: inline-block; - width: 40px; - height: 40px; - background-repeat: no-repeat; - background-size: 100%; - vertical-align: middle; - margin: 10px; -} - -.aioseop_book_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==); -} - -.aioseop_cog_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=); -} - -.aioseop_file_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==); -} - -.aioseop_help_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC); -} - -.aioseop_support_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC); -} - -.aioseop_youtube_icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==); -} - -.aioseop_meta_box_help > label { - position: absolute; - margin-left: 8px; -} - -div.aioseop_tip_icon { - font-size: 14px; - border: 1px solid #888; - width: 1em; - text-align: center; - padding: 0 4px; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - -webkit-box-shadow: 1px 1px 1px #888; - -moz-box-shadow: 1px 1px 1px #888; - box-shadow: 1px 1px 1px #888; - border-radius: 12px; -} - -div.aioseop_tip_icon:before { - content: '?'; -} - -.aioseop_help_text_link img { - width: 40px; - float: left; -} - -.aioseop_meta_box_help, -.aioseop_meta_box_help:active { - float: right; - padding-left: 0; - width: 16px; - margin-right: 32px; - text-decoration: none; - height: 15px; - padding-top: 1px; - position: relative; -} - -.aioseop_tabs .aioseop_meta_box_help, -.aioseop_tabs .aioseop_meta_box_help:active { - margin-top: 4px; - margin-right: 45px; -} - -.aioseop_label { - color: #5F5F5F; - font-weight: bold; - line-height: 19px; - display: inline-block; - text-align: left; - position: absolute; - font-family: 'Open Sans', sans-serif; - width: 26%; - min-width: 120px; - max-width: 230px; -} - -.aioseop_option_div { - max-height: 360px; - min-height: 37px; - width: 95%; - overflow-y: auto; -} - -.aioseop_overflowed { - border: 1px solid #e1e1e1; -} - -.aioseop input[type="text"] { - color: #515151; - height: 35px; - padding: 10px 0 10px 10px; - font-size: 14px; - width: 95%; - max-width: 600px; -} - -.aioseop textarea { - color: #515151; - padding: 10px 0 0 10px; - margin: 0; - font-size: 14px; - line-height: 25px; - width: 95%; - max-width: 600px; -} - -.aioseop_help_text_div { - text-align: left; - width: 100%; - margin: 0; -} - -.aioseop_help_text { - font-size: 12px; - float: left; - clear: left; - color: #797979; - line-height: 15px; - font-style: italic; -} - -.aioseop_head_tagline { - color: #5F5F5F; - font-size: 13px; -} - -.aioseop_head_nav { - float: left; - font-size: 18px; - margin: 0 0 16px 0; - font-family: "HelveticaNeue-Light", - "Helvetica Neue Light", - "Helvetica Neue", - sans-serif; - border-bottom: 1px solid #CCC; - width: 100%; -} - -.aioseop_head_nav_tab { - padding: 10px 15px 10px 15px; - margin: 0 0 0 15px; - border-radius: 4px 4px 0 0; - border: 1px solid #CCC; - border-bottom: 0 white; - float: left; - opacity: 0.5; - color: black; - text-shadow: white 0 1px 0; - text-decoration: none; -} - -.aioseop_head_nav_tab.aioseop_head_nav_active { - opacity: 1; - margin-bottom: -1px; - border-width: 1px; -} - -.aioseop_head_nav_tab:first-child { - margin-left: 0; -} - -.aioseop_head_nav_tab:hover { - opacity: 1; -} - -.aioseop_header { - float: left; - clear: left; -} - -.aioseop_advert { - padding: 10px; - margin-bottom: 30px; - border: 1px solid #DDD; - height: 200px; - width: 423px; -} - -.aioseop_nopad { - padding-left: 0; - padding-top: 0; -} - -.aioseop_nopad_all { - padding: 0; - height: 220px; - width: 445px; - margin-bottom: 20px; - border: none; -} - -.aioseop_adverts { - float: right; -} - -.wincherad { - width: 100%; - height: 100%; - background-size: 100%; - background-repeat: no-repeat; - margin-bottom: 0; - border: none; -} - -#wincher21 { - background-image: url(../../modules/images/banner21.jpg); -} - -#wincher22 { - background-image: url(../../modules/images/banner22.jpg); -} - -.aioseop_content { - min-width: 760px; - clear: left; -} - -.aioseop_options_wrapper .hndle { - font-size: 15px; - font-family: Georgia, - "Times New Roman", - "Bitstream Charter", - Times, - serif; - font-weight: normal; - padding: 7px 10px; - margin: 0; - line-height: 1; -} - -.aioseop_options_wrapper .submit input.button-primary { - margin-bottom: 5px; -} - -#aiosp_feature_manager_metabox.postbox { - margin-top: 20px; - float: left; -} - -.aioseop_advert p { - margin: 25px 0 25px 0; -} - -.aioseop_options_wrapper .postarea { - border-color: #DFDFDF; - -moz-box-shadow: inset 0 1px 0 #fff; - -webkit-box-shadow: inset 0 1px 0 #fff; - box-shadow: inset 0 1px 0 #fff; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.aioseop_advert h3 { - padding: 0; - margin-top: 6px; -} - -.aioseop_metabox_text p { - margin: 0 0 0 0; - width: 101%; -} - -.aioseop_sidebar { - width: 457px; - margin-left: 10px; -} - -.aioseop_metabox_text { - margin-bottom: 0; -} - -.aioseop_metabox_wrapper { - padding: 0; -} - -.aioseop_metabox_text *:last-child { - margin: 0; -} - -.aioseop_metabox_feature { - margin-top: 20px; -} - -.aioseop_translations { - margin-top: 15px; -} - -.aioseop_option_label { - float: left; - margin: 0; - min-width: 150px; - width: 37%; - max-width: 270px; - padding-top: 3px; - padding-bottom: 3px; - height: 67px !important; /*added for certain language support*/ -} - -.aioseop_metabox_text h2 { - font-size: 14px; - padding: 0; - font-weight: bold; - line-height: 29px; -} - -#aioseop-about { - width: 443px; - margin-bottom: 20px; -} - -#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 { - font-size: 13px; -} - -.aioseop_sidebar #mc-embedded-subscribe-form { - margin: 0 0 10px 0; - background: white; - padding: 10px 10px; - border: 1px solid #DDD; -} - -#aioseop-about .aioseop_metabox_text ul { - list-style-type: disc; - padding-left: 15px; -} - -.aioseop input[readonly] { - background-color: #EEE; - margin: 5px 0 5px 0 !important; -} - -.aioseop_settings_left { - float: left; - padding: 0; - margin: 0; - width: 100%; -} - -body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left { - margin-top: 20px; -} - -body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left { - margin-top: 20px; -} - -#aioseop_top_button { - margin-top: 5px; - height: 30px; -} - -#aioseop-list #mce-EMAIL { - margin-top: 5px; - width: 250px; -} - -.aioseop_top { - margin: 10px 10px 0 0; - /* margin: 10px 477px 0px 0px; */ -} - -.aioseop_top #aioseop-list { - margin-bottom: 0; -} - -.aioseop_top #aioseop-list.postbox.closed { - overflow: hidden; -} - -.aioseop_right_sidebar { - float: right; - margin-top: 35px; -} - -#aiosp_settings_form .button-primary.hidden { - display: none; -} - -form#edittag div#aiosp_titleatr_wrapper, -form#edittag div#aiosp_menulabel_wrapper, -form#edittag div#aiosp_sitemap_exclude_wrapper { - display: none; -} - -.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button { - height: 5px; - position: absolute; - top: 0; - width: 97%; -} - -.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left { - margin-top: 10px; -} - -.All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper { - margin-top: 10px; -} - -div#aiosp_feature_manager_metabox .inside { - padding: 8px; -} - -div.aioseop_feature { - position: relative; - display: inline-block; - float: left; - vertical-align: top; - width: 240px; - height: 288px; - margin: 8px; - border: 1px solid #DEDEDE; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: white; - padding: 10px 0 0; - -webkit-box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 0 #fff, - inset 0 0 20px rgba(0, 0, 0, 0.05), - 0 1px 2px rgba(0, 0, 0, 0.1); - -webkit-transition-duration: .4s; - -moz-transition-duration: .4s; -} - -.aioseop_feature .flag { - float: right; - margin-right: -7px; - background: none repeat scroll 0 0 #D23D46; - color: #FFFFFF; - padding: 5px 12px 6px 5px; - position: relative; -} - -.aioseop_feature .flag:before { - border-color: #D23D46 #D23D46 #D23D46 transparent; - border-style: solid; - border-width: 14px 4px 15px 10px; - content: ""; - left: -14px; - position: absolute; - top: 0; -} - -.aioseop_feature .flag:after { - border-color: #892026 transparent transparent; - border-style: solid; - border-width: 6px 6px 6px 0; - bottom: -12px; - content: ""; - position: absolute; - right: 0; -} - -.aioseop_feature .flag.pro { - display: none; -} - -#aioseop_coming_soon .free.flag, -.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag { - display: none; -} - -#aioseop_coming_soon .flag.pro { - display: block; - margin-top: -30px; -} - -.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro { - display: none; -} - -.aioseop_feature h3 { - font-size: 17px; - margin: 0; - padding: 0 10px 5px 10px; - font-weight: normal; - font-style: normal; - font-family: "Helvetica Neue", - Helvetica, - Arial, - "Lucida Grande", - Verdana, - "Bitstream Vera Sans", - sans-serif; -} - -.aioseop_feature p { - line-height: 150%; - font-size: 12px; - font-family: Georgia, - "Times New Roman", - "Bitstream Charter", - Times, serif; - margin-bottom: 20px; - color: #666; - padding: 0 10px; -} - -.aioseop_feature p.aioseop_desc { - min-height: 80px; -} - -.aioseop_feature .feature_button { - float: right; - margin-bottom: 10px; - margin-right: 10px; - min-width: 80px; - text-align: center; -} - -.aioseop_feature .feature_button:before { - content: "Activate"; -} - -.aioseop_feature .active.feature_button:before { - content: "Deactivate"; -} - -div.aioseop_feature .aioseop_featured_image { - min-height: 100px; - background-repeat: no-repeat; - display: block; - margin: 0 auto; - width: 133px; -} - -div.aioseop_feature .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Standard.png); -} - -div.aioseop_feature .aioseop_featured_image.active { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png); -} - -div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png); -} - -div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/VideoSitemap-BW-Standard.png); -} - -div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/VideoSitemap-Color-Standard.png); -} - -div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { - background-image: url(../../modules/images/SocialMeta-BW-Standard.png); -} - -div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { - background-image: url(../../modules/images/SocialMeta-Color-Standard.png); -} - -div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { - background-image: url(../../modules/images/Robots-BW-Standard.png); -} - -div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { - background-image: url(../../modules/images/Robots-Color-Standard.png); -} - -div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { - background-image: url(../../modules/images/FileEditor-BW-Standard.png); -} - -div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { - background-image: url(../../modules/images/FileEditor-Color-Standard.png); -} - -div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { - background-image: url(../../modules/images/ImporterExporter-BW-Standard.png); -} - -div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { - background-image: url(../../modules/images/ImporterExporter-Color-Standard.png); -} - -div.aioseop_feature#aioseop_performance .aioseop_featured_image { - background-image: url(../../modules/images/Performance-BW-Standard.png); -} - -div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { - background-image: url(../../modules/images/Performance-Color-Standard.png); -} - -div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { - background-image: url(../../modules/images/Default-Color-Standard.png); -} - -.All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table, -.All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table { - max-width: 500px; - clear: none; -} - -.aioseop_follow_button { - min-height: 50px; - background-repeat: no-repeat; - display: inline-block; - width: 100px; - background-size: auto 50px !important; - margin-right: 0; -} - -.aioseop_facebook_follow { - background-image: url(../../modules/images/facebook-follow-standard.png); -} - -.aioseop_twitter_follow { - background-image: url(../../modules/images/twitter-follow-standard.png); -} - -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) { - div.aioseop_feature .aioseop_featured_image { - background-size: auto 100px !important; - } - - div.aioseop_feature .aioseop_featured_image.active { - background-image: url(../../modules/images/Default-Color-Retina.png); - } - - div.aioseop_feature .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png); - } - - div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png); - } - - div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { - background-image: url(../../modules/images/VideoSitemap-BW-Retina.png); - } - - div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { - background-image: url(../../modules/images/VideoSitemap-Color-Retina.png); - } - - div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { - background-image: url(../../modules/images/SocialMeta-BW-Retina.png); - } - - div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { - background-image: url(../../modules/images/SocialMeta-Color-Retina.png); - } - - div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { - background-image: url(../../modules/images/Robots-BW-Retina.png); - } - - div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { - background-image: url(../../modules/images/Robots-Color-Retina.png); - } - - div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { - background-image: url(../../modules/images/FileEditor-BW-Retina.png); - } - - div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { - background-image: url(../../modules/images/FileEditor-Color-Retina.png); - } - - div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { - background-image: url(../../modules/images/ImporterExporter-BW-Retina.png); - } - - div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { - background-image: url(../../modules/images/ImporterExporter-Color-Retina.png); - } - - div.aioseop_feature#aioseop_performance .aioseop_featured_image { - background-image: url(../../modules/images/Performance-BW-Retina.png); - } - - div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { - background-image: url(../../modules/images/Performance-Color-Retina.png); - } - - div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { - background-image: url(../../modules/images/Default-BW-Retina.png); - } - - .aioseop_facebook_follow { - background-image: url(../../modules/images/facebook-follow-retina.png); - } - - .aioseop_twitter_follow { - background-image: url(../../modules/images/twitter-follow-retina.png); - } -} - -.aioseop_options { - width: 100%; - margin: 18px 0 10px 0; -} - -.aioseop_wrapper { - width: 100%; - padding-left: 5px; -} - -.aioseop_input { - clear: left; - width: 100%; - padding: 5px; - display: inline; -} - -.aioseop_option_input { - float: left; - width: 61%; - margin: 0; - padding-left: 1px; - min-width: 160px; - /* max-width: 900px; */ -} - -#aiosp_sitemap_addl_pages, -#aiosp_video_sitemap_addl_pages { - clear: left; - margin-left: 20px; - max-width: 1072px; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper { - width: 23%; - min-width: 165px; - display: inline-block; - max-width: 265px; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div { - position: absolute; - margin: 5px 0 10px 0; -} - -#aiosp_sitemap_addl_pages_metabox .aioseop_option_input, -#aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input { - width: 94%; - min-width: 94%; -} - -#aiosp_sitemap_addl_pages_metabox table.aioseop_table, -#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table { - width: 96%; - border: 1px solid #CCC; - margin: 5px 0 10px 0; -} - -table.aioseop_table tr:nth-child(odd) { - background-color: #EEE; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) { - background-color: rgba(238, 238, 238, 0.5); -} - -table.aioseop_table td { - width: 23%; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table { - width: 80%; - max-width: 800px; - display: block; - border-top: 1px solid #dfdfdf; - border-left: 1px solid #dfdfdf; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table th { - width: 18%; - border-right: 1px solid #dfdfdf; - border-bottom: 1px solid #dfdfdf; -} - -.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info { - margin-top: 10px; - border: 1px solid #dfdfdf; - width: 80%; - max-width: 800px; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th { - background: #f1f1f1; - background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); - background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); - background-image: linear-gradient(to top, #ececec, #f9f9f9); - padding: 5px; - border-bottom-color: #dfdfdf; - text-shadow: #fff 0 1px 0; - -webkit-box-shadow: 0 1px 0 #fff; - -moz-box-shadow: 0 1px 0 #fff; - box-shadow: 0 1px 0 #fff; -} - -.All_in_One_SEO_Pack_Opengraph table.aioseop_table td { - border-right: 1px solid #dfdfdf; - border-bottom: 1px solid #dfdfdf; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item { - display: inline-block; - width: 30%; - vertical-align: top; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) { - font-weight: bold; -} - -#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) { - width: 70%; -} - -#aiosp_sitemap_addl_pages_metabox table.aioseop_table td, -#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td { - width: 25%; - padding-left: 5%; -} - -table.aioseop_table td, table.aioseop_table th { - padding: 3px; -} - -.aioseop_top_label .aioseop_option_input, -.aioseop_no_label .aioseop_option_input { - width: 100%; -} - -#aiosp_settings_form .postbox { - margin: 0 0 20px 0; -} - -.aioseop_settings_left .postbox { - float: left; - width: 100%; -} - -.aioseop_option_setting_label { - min-height: 35px; - display: inline-block; - white-space: nowrap; - overflow: hidden; - padding-left: 1px; - max-width: 229px; - min-width: 160px; - width: 33%; -} - -.aioseop_settings_left .postbox .inside { - padding: 0; - margin: 0; - clear: right; -} - -#aiosp_settings_form .aioseop_no_label, .aioseop_no_label { - float: left; - width: 92%; - max-width: 100%; - margin: 0 23px 0 13px; -} - -#aiosp_sitemap_status_metabox .handlediv.button-link { - display: none; -} - -#aiosp_sitemap_status_metabox.closed .inside { - display: block; -} - -.aioseop_top_label { - width: 96%; - margin: 0 10px; -} - -.aioseop_hidden_type { - margin: 0; - padding: 0; - height: 0; -} - -#aiosp_title_metabox #aiosp_force_rewrites_wrapper { - display: none; - height: 0; -} - -.aioseop_module.error.below-h2 { - padding: 5px 0; - margin: 0 477px 15px 0 !important; -} - -#aioseop_opengraph_settings .inside { - margin: 0; -} - -#aioseop_opengraph_settings_image_wrapper img { - width: auto; - height: 75px; -} - -#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label { - max-width: 160px; - min-width: 100px; - width: 30%; -} - -.aioseop_input input[type="checkbox"], -.aioseop_input input[type="radio"] { - vertical-align: text-bottom; - margin-top: 8px; -} - -#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div { - max-height: initial; -} - -#aiosp { - width: auto; -} - -.aioseop_input.aioseop_top_label .aioseop_option_input { - margin: 0 0 10px 0; -} - -.aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div { - max-height: none; -} - -/* Robots.txt styling */ -#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div, -#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div { - max-height: none; -} - -.aioseop_option_input .widefat td { - vertical-align: middle; -} - -.entry-row.robots.quirks { - font-weight: bold; - opacity: 1; -} - -.entry-row.robots { - opacity: 0.8; -} - -.entry-row.robots.invalid { - opacity: 1; - font-weight: bold; -} - -.invalid .entry_label { - font-weight: bold; -} - -.aioseop .aioseop_option_input tbody { - background: #FCFCFC; -} - -.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody { - background: transparent; -} - -.entry-row.robots div { - height: 20px; - vertical-align: middle; - width: 90%; - margin: 0 0 4px 0; -} - -.robots img { - margin: 0 0 0 2px; - opacity: 0.6; -} - -.aioseop_option_docs { - width: 98%; - display: none; - border: 1px solid #D3D3D3; - margin-top: 20px; - padding: 1%; - background-color: #EEE; -} - -.aioseop_option_docs h3 { - background: none; -} - -div.aioseop_notice { - position: relative; -} - -div.aioseop_notice a.aioseop_dismiss_link { - position: absolute; - top: 10px; - right: 10px; -} - -.aioseop_error_notice { - color: #f00; - font-weight: bold; -} - -.aioseop_input select { - margin: 7px 0; -} - -.aioseop_help_text ul { - margin: 15px 0 0 20px; -} - -.aioseop_help_text ul li { - line-height: 20px; - margin: 0; -} - -.aioseop_sidebar #side-sortables { - width: 98%; -} - -#aioseop_opengraph_settings .aioseop_option_label { - width: 30%; -} - -.aioseop_tabs { - padding-top: 6px; -} - -.aioseop_tabs.hide, -.aioseop_header_tabs.hide { - display: block !important; -} - -.aioseop_header_tabs li { - display: inline; - padding: 0; - margin: 0; -} - -.aioseop_header_tabs { - margin: 0; -} - -.aioseop_header_nav { - margin: 0; -} - -.aioseop_header_tabs li a.aioseop_header_tab.active { - background-color: rgb(255, 255, 255); - border-bottom-color: rgba(255, 255, 255, 0.5); - font-weight: bold; -} - -.aioseop_header_tabs li a.aioseop_header_tab { - font-size: 14px; - line-height: 37px; - text-decoration: none; - margin: 5px 5px 0 0; - padding: 10px; - cursor: pointer; - -webkit-border-top-right-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-right-radius: 3px; - border-top-left-radius: 3px; - background-color: #e5e5e5; - border: 1px solid #ccc; - color: #5F5F5F; -} - -.aioseop_header_tabs li:first-child a.aioseop_header_tab { - border-left: solid 1px #CCC; - margin-left: 5px; -} - -.aioseop_tab { - border: solid 1px #CCC; - background-color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0.5); - padding: 10px; -} - -.aioseop_loading { - background-image: url('../../images/activity.gif'); - display: inline-block; - width: 24px; - height: 24px; - margin: 0; - padding: 0; - vertical-align: bottom; -} - -.aiosp_delete_url { - background-image: url('../../images/delete.png'); - display: inline-block; - width: 16px; - height: 16px; - margin: 0; - padding: 0; - vertical-align: bottom; -} - -form#aiosp_settings_form, -.aioseop_tabs_div { - padding-right: 477px; -} - -.aioseop_tabs_div { - margin-top: 10px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li strong { - display: block; - float: left; - text-align: right; - background-color: #DDD; - margin-right: 8px; - padding: 1px 8px 1px 1px; - overflow: auto; - width: 200px; - min-height: 16px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong { - background-color: #CCC; -} - -#aiosp_settings_form ul.sfwd_debug_settings li { - clear: left; - margin: 0; - padding: 0; - background-color: #EEE; - overflow: auto; - max-width: 75%; - min-width: 800px; -} - -#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) { - background-color: #DDD; -} - -div.sfwd_debug_mail_sent { - background-color: #080; - border: 1px solid #0A0; - margin: 10px 0 10px 0; - width: 598px; - color: #FFF; - text-align: center; -} - -div.sfwd_debug_error { - background-color: #F00; - color: #FFF; - border: 1px solid #A00; - margin: 10px 0 10px 0; - width: 598px; - text-align: center; - font-weight: bolder; -} - -#aiosp_performance_status_wrapper .aioseop_option_div { - max-height: 420px; -} - -#aioseop_coming_soon, #aioseop_coming_soon2 { - padding-top: 40px; - text-align: center; - height: 258px; - font-size: 16px; -} - -.MRL { - margin-left: 20px !important; - margin-bottom: 10px !important; -} - -/** -* Edit Post screen specific styling -* -*/ -.postbox-container .aioseop_option_div { - width: 100%; -} - -.postbox-container .aioseop_option_div input[type="text"], -.postbox-container .aioseop_option_div textarea { - width: 99%; - max-width: 900px; -} - -.postbox-container .aioseop_option_label { - max-width: none; - height: auto !important; -} - -.postbox-container .aioseop_wrapper { - padding: 0; -} - -.postbox-container .aioseop_input { - display: block; - margin-bottom: 10px; - padding: 0; -} - -.postbox-container .aioseop_option_input { - width: 63%; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper { - float: none; - width: auto; - margin: 0; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input { - display: block; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input { - float: none; - width: auto; - padding: 0; -} - -.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div { - width: auto; - min-height: 0; - padding: 10px 0; -} - -.aioseop_tabs .aioseop_options { - margin: 0; -} - -#aioseop_opengraph_settings .aioseop_options { - clear: both; - margin-top: 35px; -} - -#aioseop_opengraph_settings .aioseop_option_input { - width: 70%; -} - -/** -* Preview Snippet styling -* -*/ -div#aiosp_snippet_wrapper { - border: 1px solid #888; - clear: both; - padding: 10px 10px 0; - max-width: 97%; - margin-bottom: 15px; -} - -div#aiosp_snippet_wrapper .aioseop_option_label { - height: auto !important; -} - -div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input { - margin: 0; -} - -div#aioseop_snippet { - font-family: arial, sans-serif; - font-size: 13px; -} - -div#aioseop_snippet > h3 { - margin: 10px 0 5px; - font-size: 18px; - border: 0; - background: inherit; - font-weight: normal; -} - -div#aioseop_snippet > h3 > a { - color: #12c; - text-decoration: none; - cursor: pointer; -} - -div#aioseop_snippet > div { - color: #545454; - max-width: 48em; -} - -div#aioseop_snippet > div > div { - display: block; - margin-bottom: 1px; -} - -div#aioseop_snippet > div > div > cite { - color: #093; - font-style: normal; -} - -div#aioseop_snippet > div > span { - margin: 0; - padding: 0; - border: 0; -} +/** + * Controls all the styling of the plugin. + * + * @author Michael Torbert. + * @author Semper Fi Web Design. + * @copyright http://semperplugins.com + * @package All-in-One-SEO-Pack. + */ + +.form-table.aioseop { + clear: none; +} + +.form-table.aioseop td { + vertical-align: top; + padding: 16px 0 10px 0; + line-height: 20px; + font-size: 12px; +} + +.form-table.aioseop th { + width: 200px; + padding: 10px 0 12px 9px; +} + +.aioseop_help_text_link, +.aioseop_help_text_link:active { + text-align: left; + float: left; + max-width: 300px; + min-width: 1px; + padding-top: 2px; + outline: none; + color: #888; + font-family: sans-serif; +} + +.aioseop_help_text_link span { + font-size: 14px; +} + +.aioseop_help_text_link:before { + content: "\f223"; + font-size: 27px; + font-family: dashicons; + vertical-align: middle; +} + +#aioseop-support .aioseop_metabox_text, +#aioseop-support a { + font-size: 14px; + color: #000; + text-decoration: none; +} + +.aioseop_icon { + display: inline-block; + width: 40px; + height: 40px; + background-repeat: no-repeat; + background-size: 100%; + vertical-align: middle; + margin: 10px; +} + +.aioseop_book_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==); +} + +.aioseop_cog_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=); +} + +.aioseop_file_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==); +} + +.aioseop_help_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC); +} + +.aioseop_support_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC); +} + +.aioseop_youtube_icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==); +} + +.aioseop_meta_box_help > label { + position: absolute; + margin-left: 8px; +} + +div.aioseop_tip_icon { + font-size: 14px; + border: 1px solid #888; + width: 1em; + text-align: center; + padding: 0 4px; + -webkit-border-radius: 12px; + -moz-border-radius: 12px; + -webkit-box-shadow: 1px 1px 1px #888; + -moz-box-shadow: 1px 1px 1px #888; + box-shadow: 1px 1px 1px #888; + border-radius: 12px; +} + +div.aioseop_tip_icon:before { + content: '?'; +} + +.aioseop_help_text_link img { + width: 40px; + float: left; +} + +.aioseop_meta_box_help, +.aioseop_meta_box_help:active { + float: right; + padding-left: 0; + width: 16px; + margin-right: 32px; + text-decoration: none; + height: 15px; + padding-top: 1px; + position: relative; +} + +.aioseop_tabs .aioseop_meta_box_help, +.aioseop_tabs .aioseop_meta_box_help:active { + margin-top: 4px; + margin-right: 45px; +} + +.aioseop_label { + color: #5F5F5F; + font-weight: bold; + line-height: 19px; + display: inline-block; + text-align: left; + position: absolute; + font-family: 'Open Sans', sans-serif; + width: 26%; + min-width: 120px; + max-width: 230px; +} + +.aioseop_option_div { + max-height: 360px; + min-height: 37px; + width: 95%; + overflow-y: auto; +} + +.aioseop_overflowed { + border: 1px solid #e1e1e1; +} + +.aioseop input[type="text"] { + color: #515151; + height: 35px; + padding: 10px 0 10px 10px; + font-size: 14px; + width: 95%; + max-width: 600px; +} + +.aioseop textarea { + color: #515151; + padding: 10px 0 0 10px; + margin: 0; + font-size: 14px; + line-height: 25px; + width: 95%; + max-width: 600px; +} + +.aioseop_help_text_div { + text-align: left; + width: 100%; + margin: 0; +} + +.aioseop_help_text { + font-size: 12px; + float: left; + clear: left; + color: #797979; + line-height: 15px; + font-style: italic; +} + +.aioseop_head_tagline { + color: #5F5F5F; + font-size: 13px; +} + +.aioseop_head_nav { + float: left; + font-size: 18px; + margin: 0 0 16px 0; + font-family: "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + sans-serif; + border-bottom: 1px solid #CCC; + width: 100%; +} + +.aioseop_head_nav_tab { + padding: 10px 15px 10px 15px; + margin: 0 0 0 15px; + border-radius: 4px 4px 0 0; + border: 1px solid #CCC; + border-bottom: 0 white; + float: left; + opacity: 0.5; + color: black; + text-shadow: white 0 1px 0; + text-decoration: none; +} + +.aioseop_head_nav_tab.aioseop_head_nav_active { + opacity: 1; + margin-bottom: -1px; + border-width: 1px; +} + +.aioseop_head_nav_tab:first-child { + margin-left: 0; +} + +.aioseop_head_nav_tab:hover { + opacity: 1; +} + +.aioseop_header { + float: left; + clear: left; +} + +.aioseop_advert { + padding: 10px; + margin-bottom: 30px; + border: 1px solid #DDD; + height: 200px; + width: 423px; +} + +.aioseop_nopad { + padding-left: 0; + padding-top: 0; +} + +.aioseop_nopad_all { + padding: 0; + height: 220px; + width: 445px; + margin-bottom: 20px; + border: none; +} + +.aioseop_adverts { + float: right; +} + +.wincherad { + width: 100%; + height: 100%; + background-size: 100%; + background-repeat: no-repeat; + margin-bottom: 0; + border: none; +} + +#wincher21 { + background-image: url(../../modules/images/banner21.jpg); +} + +#wincher22 { + background-image: url(../../modules/images/banner22.jpg); +} + +.aioseop_content { + min-width: 760px; + clear: left; +} + +.aioseop_options_wrapper .hndle { + font-size: 15px; + font-family: Georgia, + "Times New Roman", + "Bitstream Charter", + Times, + serif; + font-weight: normal; + padding: 7px 10px; + margin: 0; + line-height: 1; +} + +.aioseop_options_wrapper .submit input.button-primary { + margin-bottom: 5px; +} + +#aiosp_feature_manager_metabox.postbox { + margin-top: 20px; + float: left; +} + +.aioseop_advert p { + margin: 25px 0 25px 0; +} + +.aioseop_options_wrapper .postarea { + border-color: #DFDFDF; + -moz-box-shadow: inset 0 1px 0 #fff; + -webkit-box-shadow: inset 0 1px 0 #fff; + box-shadow: inset 0 1px 0 #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.aioseop_advert h3 { + padding: 0; + margin-top: 6px; +} + +.aioseop_metabox_text p { + margin: 0 0 0 0; + width: 101%; +} + +.aioseop_sidebar { + width: 457px; + margin-left: 10px; +} + +.aioseop_metabox_text { + margin-bottom: 0; +} + +.aioseop_metabox_wrapper { + padding: 0; +} + +.aioseop_metabox_text *:last-child { + margin: 0; +} + +.aioseop_metabox_feature { + margin-top: 20px; +} + +.aioseop_translations { + margin-top: 15px; +} + +.aioseop_option_label { + float: left; + margin: 0; + min-width: 150px; + width: 37%; + max-width: 270px; + padding-top: 3px; + padding-bottom: 3px; + height: 67px !important; /*added for certain language support*/ +} + +.aioseop_metabox_text h2 { + font-size: 14px; + padding: 0; + font-weight: bold; + line-height: 29px; +} + +#aioseop-about { + width: 443px; + margin-bottom: 20px; +} + +#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 { + font-size: 13px; +} + +.aioseop_sidebar #mc-embedded-subscribe-form { + margin: 0 0 10px 0; + background: white; + padding: 10px 10px; + border: 1px solid #DDD; +} + +#aioseop-about .aioseop_metabox_text ul { + list-style-type: disc; + padding-left: 15px; +} + +.aioseop input[readonly] { + background-color: #EEE; + margin: 5px 0 5px 0 !important; +} + +.aioseop_settings_left { + float: left; + padding: 0; + margin: 0; + width: 100%; +} + +body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left { + margin-top: 20px; +} + +body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left { + margin-top: 20px; +} + +#aioseop_top_button { + margin-top: 5px; + height: 30px; +} + +#aioseop-list #mce-EMAIL { + margin-top: 5px; + width: 250px; +} + +.aioseop_top { + margin: 10px 10px 0 0; + /* margin: 10px 477px 0px 0px; */ +} + +.aioseop_top #aioseop-list { + margin-bottom: 0; +} + +.aioseop_top #aioseop-list.postbox.closed { + overflow: hidden; +} + +.aioseop_right_sidebar { + float: right; + margin-top: 35px; +} + +#aiosp_settings_form .button-primary.hidden { + display: none; +} + +form#edittag div#aiosp_titleatr_wrapper, +form#edittag div#aiosp_menulabel_wrapper, +form#edittag div#aiosp_sitemap_exclude_wrapper { + display: none; +} + +.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button { + height: 5px; + position: absolute; + top: 0; + width: 97%; +} + +.All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left { + margin-top: 10px; +} + +.All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper { + margin-top: 10px; +} + +div#aiosp_feature_manager_metabox .inside { + padding: 8px; +} + +div.aioseop_feature { + position: relative; + display: inline-block; + float: left; + vertical-align: top; + width: 240px; + height: 288px; + margin: 8px; + border: 1px solid #DEDEDE; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: white; + padding: 10px 0 0; + -webkit-box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 0 #fff, + inset 0 0 20px rgba(0, 0, 0, 0.05), + 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-transition-duration: .4s; + -moz-transition-duration: .4s; +} + +.aioseop_feature .flag { + float: right; + margin-right: -7px; + background: none repeat scroll 0 0 #D23D46; + color: #FFFFFF; + padding: 5px 12px 6px 5px; + position: relative; +} + +.aioseop_feature .flag:before { + border-color: #D23D46 #D23D46 #D23D46 transparent; + border-style: solid; + border-width: 14px 4px 15px 10px; + content: ""; + left: -14px; + position: absolute; + top: 0; +} + +.aioseop_feature .flag:after { + border-color: #892026 transparent transparent; + border-style: solid; + border-width: 6px 6px 6px 0; + bottom: -12px; + content: ""; + position: absolute; + right: 0; +} + +.aioseop_feature .flag.pro { + display: none; +} + +#aioseop_coming_soon .free.flag, +.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag { + display: none; +} + +#aioseop_coming_soon .flag.pro { + display: block; + margin-top: -30px; +} + +.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro { + display: none; +} + +.aioseop_feature h3 { + font-size: 17px; + margin: 0; + padding: 0 10px 5px 10px; + font-weight: normal; + font-style: normal; + font-family: "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + Verdana, + "Bitstream Vera Sans", + sans-serif; +} + +.aioseop_feature p { + line-height: 150%; + font-size: 12px; + font-family: Georgia, + "Times New Roman", + "Bitstream Charter", + Times, serif; + margin-bottom: 20px; + color: #666; + padding: 0 10px; +} + +.aioseop_feature p.aioseop_desc { + min-height: 80px; +} + +.aioseop_feature .feature_button { + float: right; + margin-bottom: 10px; + margin-right: 10px; + min-width: 80px; + text-align: center; +} + +.aioseop_feature .feature_button:before { + content: "Activate"; +} + +.aioseop_feature .active.feature_button:before { + content: "Deactivate"; +} + +div.aioseop_feature .aioseop_featured_image { + min-height: 100px; + background-repeat: no-repeat; + display: block; + margin: 0 auto; + width: 133px; +} + +div.aioseop_feature .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Standard.png); +} + +div.aioseop_feature .aioseop_featured_image.active { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png); +} + +div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png); +} + +div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/VideoSitemap-BW-Standard.png); +} + +div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/VideoSitemap-Color-Standard.png); +} + +div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { + background-image: url(../../modules/images/SocialMeta-BW-Standard.png); +} + +div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { + background-image: url(../../modules/images/SocialMeta-Color-Standard.png); +} + +div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { + background-image: url(../../modules/images/Robots-BW-Standard.png); +} + +div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { + background-image: url(../../modules/images/Robots-Color-Standard.png); +} + +div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { + background-image: url(../../modules/images/FileEditor-BW-Standard.png); +} + +div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { + background-image: url(../../modules/images/FileEditor-Color-Standard.png); +} + +div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { + background-image: url(../../modules/images/ImporterExporter-BW-Standard.png); +} + +div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { + background-image: url(../../modules/images/ImporterExporter-Color-Standard.png); +} + +div.aioseop_feature#aioseop_performance .aioseop_featured_image { + background-image: url(../../modules/images/Performance-BW-Standard.png); +} + +div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { + background-image: url(../../modules/images/Performance-Color-Standard.png); +} + +div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { + background-image: url(../../modules/images/Default-Color-Standard.png); +} + +.All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table, +.All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table { + max-width: 500px; + clear: none; +} + +.aioseop_follow_button { + min-height: 50px; + background-repeat: no-repeat; + display: inline-block; + width: 100px; + background-size: auto 50px !important; + margin-right: 0; +} + +.aioseop_facebook_follow { + background-image: url(../../modules/images/facebook-follow-standard.png); +} + +.aioseop_twitter_follow { + background-image: url(../../modules/images/twitter-follow-standard.png); +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) { + div.aioseop_feature .aioseop_featured_image { + background-size: auto 100px !important; + } + + div.aioseop_feature .aioseop_featured_image.active { + background-image: url(../../modules/images/Default-Color-Retina.png); + } + + div.aioseop_feature .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + div.aioseop_feature#aioseop_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png); + } + + div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png); + } + + div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image { + background-image: url(../../modules/images/VideoSitemap-BW-Retina.png); + } + + div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active { + background-image: url(../../modules/images/VideoSitemap-Color-Retina.png); + } + + div.aioseop_feature#aioseop_opengraph .aioseop_featured_image { + background-image: url(../../modules/images/SocialMeta-BW-Retina.png); + } + + div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active { + background-image: url(../../modules/images/SocialMeta-Color-Retina.png); + } + + div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image { + background-image: url(../../modules/images/Robots-BW-Retina.png); + } + + div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active { + background-image: url(../../modules/images/Robots-Color-Retina.png); + } + + div.aioseop_feature#aioseop_file_editor .aioseop_featured_image { + background-image: url(../../modules/images/FileEditor-BW-Retina.png); + } + + div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active { + background-image: url(../../modules/images/FileEditor-Color-Retina.png); + } + + div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image { + background-image: url(../../modules/images/ImporterExporter-BW-Retina.png); + } + + div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active { + background-image: url(../../modules/images/ImporterExporter-Color-Retina.png); + } + + div.aioseop_feature#aioseop_performance .aioseop_featured_image { + background-image: url(../../modules/images/Performance-BW-Retina.png); + } + + div.aioseop_feature#aioseop_performance .aioseop_featured_image.active { + background-image: url(../../modules/images/Performance-Color-Retina.png); + } + + div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image { + background-image: url(../../modules/images/Default-BW-Retina.png); + } + + .aioseop_facebook_follow { + background-image: url(../../modules/images/facebook-follow-retina.png); + } + + .aioseop_twitter_follow { + background-image: url(../../modules/images/twitter-follow-retina.png); + } +} + +.aioseop_options { + width: 100%; + margin: 18px 0 10px 0; +} + +.aioseop_wrapper { + width: 100%; + padding-left: 5px; +} + +.aioseop_input { + clear: left; + width: 100%; + padding: 5px; + display: inline; +} + +.aioseop_option_input { + float: left; + width: 61%; + margin: 0; + padding-left: 1px; + min-width: 160px; + /* max-width: 900px; */ +} + +#aiosp_sitemap_addl_pages, +#aiosp_video_sitemap_addl_pages { + clear: left; + margin-left: 20px; + max-width: 1072px; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper { + width: 23%; + min-width: 165px; + display: inline-block; + max-width: 265px; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div { + position: absolute; + margin: 5px 0 10px 0; +} + +#aiosp_sitemap_addl_pages_metabox .aioseop_option_input, +#aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input { + width: 94%; + min-width: 94%; +} + +#aiosp_sitemap_addl_pages_metabox table.aioseop_table, +#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table { + width: 96%; + border: 1px solid #CCC; + margin: 5px 0 10px 0; +} + +table.aioseop_table tr:nth-child(odd) { + background-color: #EEE; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) { + background-color: rgba(238, 238, 238, 0.5); +} + +table.aioseop_table td { + width: 23%; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table { + width: 80%; + max-width: 800px; + display: block; + border-top: 1px solid #dfdfdf; + border-left: 1px solid #dfdfdf; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table th { + width: 18%; + border-right: 1px solid #dfdfdf; + border-bottom: 1px solid #dfdfdf; +} + +.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info { + margin-top: 10px; + border: 1px solid #dfdfdf; + width: 80%; + max-width: 800px; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th { + background: #f1f1f1; + background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9)); + background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9); + background-image: linear-gradient(to top, #ececec, #f9f9f9); + padding: 5px; + border-bottom-color: #dfdfdf; + text-shadow: #fff 0 1px 0; + -webkit-box-shadow: 0 1px 0 #fff; + -moz-box-shadow: 0 1px 0 #fff; + box-shadow: 0 1px 0 #fff; +} + +.All_in_One_SEO_Pack_Opengraph table.aioseop_table td { + border-right: 1px solid #dfdfdf; + border-bottom: 1px solid #dfdfdf; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item { + display: inline-block; + width: 30%; + vertical-align: top; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) { + font-weight: bold; +} + +#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) { + width: 70%; +} + +#aiosp_sitemap_addl_pages_metabox table.aioseop_table td, +#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td { + width: 25%; + padding-left: 5%; +} + +table.aioseop_table td, table.aioseop_table th { + padding: 3px; +} + +.aioseop_top_label .aioseop_option_input, +.aioseop_no_label .aioseop_option_input { + width: 100%; +} + +#aiosp_settings_form .postbox { + margin: 0 0 20px 0; +} + +.aioseop_settings_left .postbox { + float: left; + width: 100%; +} + +.aioseop_option_setting_label { + min-height: 35px; + display: inline-block; + white-space: nowrap; + overflow: hidden; + padding-left: 1px; + max-width: 229px; + min-width: 160px; + width: 33%; +} + +.aioseop_settings_left .postbox .inside { + padding: 0; + margin: 0; + clear: right; +} + +#aiosp_settings_form .aioseop_no_label, .aioseop_no_label { + float: left; + width: 92%; + max-width: 100%; + margin: 0 23px 0 13px; +} + +#aiosp_sitemap_status_metabox .handlediv.button-link { + display: none; +} + +#aiosp_sitemap_status_metabox.closed .inside { + display: block; +} + +.aioseop_top_label { + width: 96%; + margin: 0 10px; +} + +.aioseop_hidden_type { + margin: 0; + padding: 0; + height: 0; +} + +#aiosp_title_metabox #aiosp_force_rewrites_wrapper { + display: none; + height: 0; +} + +.aioseop_module.error.below-h2 { + padding: 5px 0; + margin: 0 477px 15px 0 !important; +} + +#aioseop_opengraph_settings .inside { + margin: 0; +} + +#aioseop_opengraph_settings_image_wrapper img { + width: auto; + height: 75px; +} + +#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label { + max-width: 160px; + min-width: 100px; + width: 30%; +} + +.aioseop_input input[type="checkbox"], +.aioseop_input input[type="radio"] { + vertical-align: text-bottom; + margin-top: 8px; +} + +#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div { + max-height: initial; +} + +#aiosp { + width: auto; +} + +.aioseop_input.aioseop_top_label .aioseop_option_input { + margin: 0 0 10px 0; +} + +.aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div { + max-height: none; +} + +/* Robots.txt styling */ +#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div, +#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div { + max-height: none; +} + +.aioseop_option_input .widefat td { + vertical-align: middle; +} + +.entry-row.robots.quirks { + font-weight: bold; + opacity: 1; +} + +.entry-row.robots { + opacity: 0.8; +} + +.entry-row.robots.invalid { + opacity: 1; + font-weight: bold; +} + +.invalid .entry_label { + font-weight: bold; +} + +.aioseop .aioseop_option_input tbody { + background: #FCFCFC; +} + +.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody { + background: transparent; +} + +.entry-row.robots div { + height: 20px; + vertical-align: middle; + width: 90%; + margin: 0 0 4px 0; +} + +.robots img { + margin: 0 0 0 2px; + opacity: 0.6; +} + +.aioseop_option_docs { + width: 98%; + display: none; + border: 1px solid #D3D3D3; + margin-top: 20px; + padding: 1%; + background-color: #EEE; +} + +.aioseop_option_docs h3 { + background: none; +} + +div.aioseop_notice { + position: relative; +} + +div.aioseop_notice a.aioseop_dismiss_link { + position: absolute; + top: 10px; + right: 10px; +} + +.aioseop_error_notice { + color: #f00; + font-weight: bold; +} + +.aioseop_input select { + margin: 7px 0; +} + +.aioseop_help_text ul { + margin: 15px 0 0 20px; +} + +.aioseop_help_text ul li { + line-height: 20px; + margin: 0; +} + +.aioseop_sidebar #side-sortables { + width: 98%; +} + +#aioseop_opengraph_settings .aioseop_option_label { + width: 30%; +} + +.aioseop_tabs { + padding-top: 6px; +} + +.aioseop_tabs.hide, +.aioseop_header_tabs.hide { + display: block !important; +} + +.aioseop_header_tabs li { + display: inline; + padding: 0; + margin: 0; +} + +.aioseop_header_tabs { + margin: 0; +} + +.aioseop_header_nav { + margin: 0; +} + +.aioseop_header_tabs li a.aioseop_header_tab.active { + background-color: rgb(255, 255, 255); + border-bottom-color: rgba(255, 255, 255, 0.5); + font-weight: bold; +} + +.aioseop_header_tabs li a.aioseop_header_tab { + font-size: 14px; + line-height: 37px; + text-decoration: none; + margin: 5px 5px 0 0; + padding: 10px; + cursor: pointer; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + background-color: #e5e5e5; + border: 1px solid #ccc; + color: #5F5F5F; +} + +.aioseop_header_tabs li:first-child a.aioseop_header_tab { + border-left: solid 1px #CCC; + margin-left: 5px; +} + +.aioseop_tab { + border: solid 1px #CCC; + background-color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0.5); + padding: 10px; +} + +.aioseop_loading { + background-image: url('../../images/activity.gif'); + display: inline-block; + width: 24px; + height: 24px; + margin: 0; + padding: 0; + vertical-align: bottom; +} + +.aiosp_delete_url { + background-image: url('../../images/delete.png'); + display: inline-block; + width: 16px; + height: 16px; + margin: 0; + padding: 0; + vertical-align: bottom; +} + +form#aiosp_settings_form, +.aioseop_tabs_div { + padding-right: 477px; +} + +.aioseop_tabs_div { + margin-top: 10px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li strong { + display: block; + float: left; + text-align: right; + background-color: #DDD; + margin-right: 8px; + padding: 1px 8px 1px 1px; + overflow: auto; + width: 200px; + min-height: 16px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong { + background-color: #CCC; +} + +#aiosp_settings_form ul.sfwd_debug_settings li { + clear: left; + margin: 0; + padding: 0; + background-color: #EEE; + overflow: auto; + max-width: 75%; + min-width: 800px; +} + +#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) { + background-color: #DDD; +} + +div.sfwd_debug_mail_sent { + background-color: #080; + border: 1px solid #0A0; + margin: 10px 0 10px 0; + width: 598px; + color: #FFF; + text-align: center; +} + +div.sfwd_debug_error { + background-color: #F00; + color: #FFF; + border: 1px solid #A00; + margin: 10px 0 10px 0; + width: 598px; + text-align: center; + font-weight: bolder; +} + +#aiosp_performance_status_wrapper .aioseop_option_div { + max-height: 420px; +} + +#aioseop_coming_soon, #aioseop_coming_soon2 { + padding-top: 40px; + text-align: center; + height: 258px; + font-size: 16px; +} + +.MRL { + margin-left: 20px !important; + margin-bottom: 10px !important; +} + +/** +* Edit Post screen specific styling +* +*/ +.postbox-container .aioseop_option_div { + width: 100%; +} + +.postbox-container .aioseop_option_div input[type="text"], +.postbox-container .aioseop_option_div textarea { + width: 99%; + max-width: 900px; +} + +.postbox-container .aioseop_option_label { + max-width: none; + height: auto !important; +} + +.postbox-container .aioseop_wrapper { + padding: 0; +} + +.postbox-container .aioseop_input { + display: block; + margin-bottom: 10px; + padding: 0; +} + +.postbox-container .aioseop_option_input { + width: 63%; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper { + float: none; + width: auto; + margin: 0; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input { + display: block; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input { + float: none; + width: auto; + padding: 0; +} + +.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div { + width: auto; + min-height: 0; + padding: 10px 0; +} + +.aioseop_tabs .aioseop_options { + margin: 0; +} + +#aioseop_opengraph_settings .aioseop_options { + clear: both; + margin-top: 35px; +} + +#aioseop_opengraph_settings .aioseop_option_input { + width: 70%; +} + +/** +* Preview Snippet styling +* +*/ +div#aiosp_snippet_wrapper { + border: 1px solid #888; + clear: both; + padding: 10px 10px 0; + max-width: 97%; + margin-bottom: 15px; +} + +div#aiosp_snippet_wrapper .aioseop_option_label { + height: auto !important; +} + +div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input { + margin: 0; +} + +div#aioseop_snippet { + font-family: arial, sans-serif; + font-size: 13px; +} + +div#aioseop_snippet > h3 { + margin: 10px 0 5px; + font-size: 18px; + border: 0; + background: inherit; + font-weight: normal; +} + +div#aioseop_snippet > h3 > a { + color: #12c; + text-decoration: none; + cursor: pointer; +} + +div#aioseop_snippet > div { + color: #545454; + max-width: 48em; +} + +div#aioseop_snippet > div > div { + display: block; + margin-bottom: 1px; +} + +div#aioseop_snippet > div > div > cite { + color: #093; + font-style: normal; +} + +div#aioseop_snippet > div > span { + margin: 0; + padding: 0; + border: 0; +} + +/* the good, the bad and the ugly character counts */ +.aioseop_count_good { + color: #515151 !important; + background-color: #eee !important; +} +.aioseop_count_bad { + color: #515151 !important; + background-color: #ff0 !important; +} +.aioseop_count_ugly { + color: #fff !important; + background-color: #f00 !important; +} \ No newline at end of file diff --git a/js/modules/aioseop_module.js b/js/modules/aioseop_module.js index 45610c674..b21bcfe86 100644 --- a/js/modules/aioseop_module.js +++ b/js/modules/aioseop_module.js @@ -1,817 +1,828 @@ -/** - * Controls all the styling of the plugin. - * - * AIOSEOP Updates class. - * @author Michael Torbert. - * @author Semper Fi Web Design. - * @copyright https://semperplugins.com - * @version 1.0.0 - */ -if ( typeof aiosp_data != 'undefined' ) { - - /** - * @since 1.0.0 - * @param int $index. - * @param $value - */ - jQuery.each( - aiosp_data, function( index, value ) { - // aiosp_data[index] = value.json.replace(/"/g, '"'); - // aiosp_data[index] = jQuery.parseJSON( value ); - if ( index == 0 ) { - if ( typeof value.condshow == 'undefined' ) { - aiosp_data[ index ].condshow = []; - } - } else { - if ( typeof value.condshow != 'undefined' ) { - aiosp_data[ 0 ].condshow = - jQuery.merge( aiosp_data[0].condshow, value.condshow ); - } - } - } - ); - aiosp_data = aiosp_data[0]; -} - -/** - * @summary Changes visibility. - * - * @since 1.0.0 - * @param int $id. - */ -function toggleVisibility( id ) { - var e = document.getElementById( id ); - if ( e.style.display == 'block' ) { - e.style.display = 'none'; - } else { - e.style.display = 'block'; - } -} - -/** - * @summary Counts characters. - * - * @since 1.0.0 - * @param String $field. - * @param Int $cntfield. - * @return Mixed. - */ -function countChars( field, cntfield ) { - var extra = 0; - var field_size; - if ( ( field.name == 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { - extra = aiosp_title_extra; - } - cntfield.value = field.value.length + extra; - if ( typeof field.size != 'undefined' ) { - field_size = field.size; - } else { - field_size = field.rows * field.cols; - } - if ( field_size < 10 ) { - return; - } - if ( cntfield.value > field_size ) { - cntfield.style.color = "#fff"; - cntfield.style.backgroundColor = "#f00"; - } else { - if ( cntfield.value > ( field_size - 91 ) ) { - cntfield.style.color = "#515151"; - cntfield.style.backgroundColor = "#ff0"; - } else { - cntfield.style.color = "#515151"; - cntfield.style.backgroundColor = "#eee"; - } - } -} - -/** - * @summary Returns the fields value. - * - * @since 1.0.0 - * @param String $field. - * @return Mixed. - */ -function aioseop_get_field_value( field ) { - if ( field.length == 0 ) { - return field; - } - cur = jQuery( '[name=' + field + ']' ); - if ( cur.length == 0 ) { - return field; - } - type = cur.attr( 'type' ); - if ( type == "checkbox" || type == "radio" ) { - cur = jQuery( 'input[name=' + field + ']:checked' ); - } - return cur.val(); -} - -/** - * @summary Returns the fields value. - * - * @since 1.0.0 - * @param String $field. - * @return Mixed. - */ -function aioseop_get_field_values( field ) { - arr = []; - cur = jQuery( '[name=' + field + ']' ); - if ( cur.length == 0 ) { - return field; - } - type = cur.attr( 'type' ); - if ( type == "checkbox" || type == "radio" ) { - jQuery( 'input[name=' + field + ']:checked' ).each( - function() { - arr.push( jQuery( this ).val() ); - } - ); - } - if ( arr.length <= 0 ) { - arr.push( cur.val() ); - } - return arr; -} - -/** - * @summary Evaluates condshow logic. - * - * @since 1.0.0 - * @param String $statement. - * @return Mixed. - */ -function aioseop_eval_condshow_logic( statement ) { - var lhs, rhs; - if ( ( typeof statement ) == 'object' ) { - lhs = statement.lhs; - rhs = statement.rhs; - if ( lhs !== null && ( ( typeof lhs ) == 'object' ) ) { - lhs = aioseop_eval_condshow_logic( lhs ); - } - if ( rhs !== null && ( typeof rhs ) == 'object' ) { - rhs = aioseop_eval_condshow_logic( rhs ); - } - lhs = aioseop_get_field_value( lhs ); - rhs = aioseop_get_field_value( rhs ); - switch ( statement.op ) { - case 'NOT': - return ( ! lhs ); - case 'AND': - return ( lhs && rhs ); - case 'OR' : - return ( lhs || rhs ); - case '==' : - return ( lhs == rhs ); - case '!=' : - return ( lhs != rhs ); - default : - return null; - } - } - return statement; -} - -/** - * @summary Evaluates condshow logic. - * - * @since 1.0.0 - * @param String $index. - * @param $value. - * @return Mixed. - */ -function aioseop_do_condshow_match( index, value ) { - if ( typeof value != 'undefined' ) { - matches = true; - jQuery.each( - value, function(subopt, setting) { - var statement; - if ( ( typeof setting ) == 'object' ) { - statement = aioseop_eval_condshow_logic( setting ); - if ( ! statement ) { - matches = false; - } - } else { - if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb - cur = aioseop_get_field_values( subopt ); - if ( jQuery.inArray( setting, cur, 0 ) < 0 ) { - matches = false; - } - } else { - cur = aioseop_get_field_value( subopt ); - if ( cur != setting ) { - matches = false; - } - } - } - } - ); - if ( matches ) { - jQuery( '#' + index + '_wrapper' ).show(); - } else { - jQuery( '#' + index + '_wrapper' ).hide(); - } - return matches; - } - return false; -} - -/** - * @summary Adds condshow handlers. - * - * @since 1.0.0 - * @param String $index. - * @param $value. - */ -function aioseop_add_condshow_handlers( index, value ) { - if ( typeof value != 'undefined' ) { - jQuery.each( - value, function(subopt, setting) { - jQuery( '[name=' + subopt + ']' ).bind( - "change keyup", function() { - aioseop_do_condshow_match( index, value ); - } - ); - } - ); - } -} - -/** - * @summary Does condshow. - * - * @since 1.0.0 - * @param $condshow. - */ -function aioseop_do_condshow( condshow ) { - if ( typeof aiosp_data.condshow != 'undefined' ) { - jQuery.each( - aiosp_data.condshow, function( index, value ) { - aioseop_do_condshow_match( index, value ); - aioseop_add_condshow_handlers( index, value ); - } - ); - } -} - -/** - * @since 1.0.0 - */ -jQuery( document ).ready( - function() { - if ( typeof aiosp_data != 'undefined' ) { - if ( typeof aiosp_data.condshow != 'undefined' ) { - aioseop_do_condshow( aiosp_data.condshow ); - } - } - - /** - * Turns on image checker on custom url change. - * @since 2.3.16 - */ - jQuery( '.aioseop_upload_image_label' ).on( - 'change', function() { - this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' ); - if ( this.checker.length > 0 ) { - this.checker.val( 1 ); - } - } - ); - } -); - -/** - * @summary Custom jQuery plugin that enables image uploader in wordpress. - * - * @since 2.3.13 - * @since 2.4.14 Added success callback and options. - * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ - * - * @param object options Plugin options. - */ -jQuery.fn.aioseopImageUploader = function( options ) { - // Keep reference to this. - var self = this; - - // Options - self.options = jQuery.extend( - { - success: undefined, - }, options - ); - - // Set input target when to update image url value - self.target = jQuery( self ).next(); - - // Uploader per image button - // * Having only one uploader was causing problems when multiple image buttons where in place - self.uploader = wp.media( - { - title: 'Choose Image', - button: { - text: 'Choose Image' - }, - multiple: false - } - ); - - /** - * Event handler that will be called when an image is selected from media uploader. - */ - self.onSelect = function() { - var url = self.uploader.state().get( 'selection' ).first().toJSON().url; - if ( self.target.length >= 0 ) { - jQuery( self.target ).val( url ); - } - if ( self.options.success !== undefined ) { - self.options.success( url, self ); - } - }; - - /** - * Click event handler. - * @param object e Click event. - */ - self.onClick = function( e ) { - e.preventDefault(); - self.uploader.open(); - }; - - // Set uploader select handler - self.uploader.on( 'select', self.onSelect ); - - // Set click handler - jQuery( self ).click( self.onClick ); -}; - -/** - * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin. - * - * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ - * @since ? - * @since 2.3.11.2 Use WP 3.5 new media uploader - * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740) - * - */ -jQuery( document ).ready( - function($){ - - jQuery( '.aioseop_upload_image_button' ).each( - function() { - jQuery( this ).aioseopImageUploader( - { - success: function( url, el ) { - // Update checker - if ( jQuery( el ).prev().length > 0 ) { - jQuery( el ).prev().val( 1 ); - } - }, - } - ); - } - ); - - } -); - -/** - * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged. - * - * props to commentluv for this fix - * @author commentluv. - * @link https://core.trac.wordpress.org/ticket/16972 - * @since 1.0.0 - */ -jQuery( document ).ready( - function() { - - // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag - jQuery( '.hndle' ).mousedown( - function() { - - // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function - jQuery( '.wrap' ).mouseup( - function() { - aiosp_store_radio(); - setTimeout( function() { - aiosp_reclick_radio(); - }, 50 ); - } - ); - } - ); - } -); - -/** - * @summary Stores object of all radio buttons that are checked for entire form. - * - * @since 1.0.0 - */ -function aiosp_store_radio() { - var radioshack = {}; - jQuery( 'input[type="radio"]' ).each( - function() { - if ( jQuery( this ).is( ':checked' ) ) { - radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val(); - } - jQuery( document ).data( 'radioshack', radioshack ); - } - ); -} - -/** - * @summary Detects mouseup and restore all radio buttons that were checked. - * - * @since 1.0.0 - */ -function aiosp_reclick_radio() { - - // gets the object of checked radio button names and values - var radios = jQuery( document ).data( 'radioshack' ); - - // steps thru each object element and trigger a click on it's corresponding radio button - for ( var key in radios ) { - jQuery( 'input[name="' + key + '"]' ) - .filter( '[value="' + radios[ key ] + '"]' ) - .trigger( 'click' ); - } - // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function) - jQuery( '.wrap' ).unbind( 'mouseup' ); -} - -/** - * @summary Handdles ajax call. - * - * @since 1.0.0 - * @param $action. - * @param $setting. - * @param $options. - * @param $success. - */ -function aioseop_handle_ajax_call( action, settings, options, success ) { - var aioseop_sack = new sack( ajaxurl ); - aioseop_sack.execute = 1; - aioseop_sack.method = 'POST'; - aioseop_sack.setVar( "action", action ); - aioseop_sack.setVar( "settings", settings ); - aioseop_sack.setVar( "options", options ); - if ( typeof success != 'undefined' ) { - aioseop_sack.onCompletion = success; - } - aioseop_sack.setVar( - "nonce-aioseop", - jQuery( 'input[name="nonce-aioseop"]' ).val() - ); - aioseop_sack.setVar( - "nonce-aioseop-edit", - jQuery( 'input[name="nonce-aioseop-edit"]' ).val() - ); - aioseop_sack.onError = function() { - alert( 'Ajax error on saving.' ); - }; - aioseop_sack.runAJAX(); -} - -/** - * @summary Handdles posts URL. - * - * @since 1.0.0 - * @param $action. - * @param $setting. - * @param $options. - * @param $success. - */ -function aioseop_handle_post_url( action, settings, options, success) { - jQuery( "div#aiosp_" + settings ).fadeOut( - 'fast', function() { - var loading = ' Please wait...'; - jQuery( "div#aiosp_" + settings ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( action, settings, options, success ); - } - ); - jQuery( "div#aiosp_" + settings ).html( loading ); - } - ); -} - -/** - * @summary Handles when AIOSEOP is overflowed. - * - * @since 1.0.0 - * @param $element. - * @return mixed. - */ -function aioseop_is_overflowed( element ) { - return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth; -} - -/** - * @summary Handles when overflowed border. - * - * @since 1.0.0 - * @param $el. - */ -function aioseop_overflow_border( el ) { - if ( aioseop_is_overflowed( el ) ) { - el.className = 'aioseop_option_div aioseop_overflowed'; - } else { - el.className = 'aioseop_option_div'; - } -} - -/** - * @since 1.0.0 - * @return mixed. - */ -jQuery( document ).ready( - function() { - jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on( - 'click', function() { - var previousValue = jQuery( this ).attr( 'previousValue' ); - var name = jQuery( this ).attr( 'name' ); - if ( typeof previousValue == 'undefined' ) { - if ( jQuery( this ).prop( "checked" ) ) { - jQuery( this ).prop( 'checked', true ); - jQuery( this ).attr( 'previousValue', 'checked' ); - } else { - jQuery( this ).prop( 'checked', false ); - jQuery( this ).attr( 'previousValue', false ); - } - return; - } - if ( previousValue == 'checked' ) { - jQuery( this ).prop( 'checked', false ); - jQuery( this ).attr( 'previousValue', false ); - } else { - jQuery( "input[name=" + name + "]:radio" ) - .attr( 'previousValue', false ); - jQuery( this ).attr( 'previousValue', 'checked' ); - } - } - ); - if ( typeof aiosp_data.pointers != 'undefined' ) { - - /** - * @since 1.0.0 - * @param $index. - * @param $value. - * @return mixed. - */ - jQuery.each( - aiosp_data.pointers, function( index, value ) { - if ( value != 'undefined' && value.pointer_text != '' ) { - aioseop_show_pointer( index, value ); - } - } - ); - } - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_save_settings', - 'ajax_settings_message', - jQuery( 'form#aiosp_settings_form' ).serialize(), - function() { - jQuery( '.wp-has-current-submenu' ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( - 'aioseop_ajax_get_menu_links', - 'ajax_settings_message', - jQuery.param( {target: '.wp-has-current-submenu > ul'} ) - ); - } - ); - } - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" ) - .delegate( - "input[name='Submit']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_save_settings', - 'ajax_settings_message', - jQuery( 'form#aiosp_settings_form' ).serialize(), - function() { - jQuery( '.wp-has-current-submenu' ).fadeIn( - 'fast', function() { - aioseop_handle_ajax_call( - 'aioseop_ajax_get_menu_links', - 'ajax_settings_message', - jQuery.param( {target: '.wp-has-current-submenu > ul'} ) - ); - } - ); - } - ); - return false; - } - ); - - var selectors = - "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div"; - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) - .delegate( - "input[name='Submit']", "click", function() { - aioseop_handle_post_url( - 'aioseop_ajax_save_url', - 'sitemap_addl_pages', - jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' ) - .serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) - .delegate( - "input[name='Submit']", "click", function() { - aioseop_handle_post_url( - 'aioseop_ajax_save_url', - 'video_sitemap_addl_pages', - jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select' ) - .serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) - .delegate( - "a.aiosp_delete_url", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_delete_url', - 'sitemap_addl_pages', - jQuery( this ).attr( "title" ) - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) - .delegate( - "a.aiosp_delete_url", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_delete_url', - 'video_sitemap_addl_pages', - jQuery( this ).attr( "title" ) - ); - return false; - } - ); - - /** - * @since 1.0.0 - * @param $e. - * @return boolean. - */ - jQuery( "div#aiosp_opengraph_scan_header" ) - .delegate( - "input[name='aiosp_opengraph_scan_header']", "click", function( e ) { - e.preventDefault(); - aioseop_handle_post_url( - 'aioseop_ajax_scan_header', - 'opengraph_scan_header', - jQuery( 'div#aiosp_opengraph_scan_header' ).serialize() - ); - return false; - } - ); - - /** - * @since 1.0.0 - */ - jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' ) - .click( - function() { - jQuery( this ) - .parents( 'div:eq(0)' ) - .find( ':checkbox' ) - .prop( 'checked', this.checked ); - } - ); - - /** - * @since 1.0.0 - */ - jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' ) - .click( - function () { - if ( ! this.checked ) { - jQuery( this ) - .parents( 'div:eq(0)' ) - .find( 'input[value="all"]:checkbox' ) - .prop( 'checked', this.checked ); - } - } - ); - - /** - * @since 1.0.0 - */ - jQuery( ".aioseop_tab:not(:first)" ).hide(); - - /** - * @since 1.0.0 - */ - jQuery( ".aioseop_tab:first" ).show(); - - /** - * @since 1.0.0 - * @return boolean. - */ - jQuery( "a.aioseop_header_tab" ).click( - function() { - var stringref = jQuery( this ).attr( "href" ).split( '#' )[1]; - jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' ); - jQuery( '.aioseop_tab#' + stringref ).show( 'slow' ); - jQuery( '.aioseop_header_tab[href!="#' + stringref + '"]' ).removeClass( 'active' ); - jQuery( '.aioseop_header_tab[href="#' + stringref + '"]' ).addClass( 'active' ); - return false; - } - ); - } -); - - -jQuery( document ).ready( - function() { - // TODO: consider moving EVERYTHING that needs ready() to this function - initAll( jQuery ); - } -); - -function initAll($){ - if ( $( '.aiseop-date' ).length > 0 && $( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) { - $( '.aiseop-date' ).datepicker( - { - dateFormat: "yy-mm-dd" - } - ); - } -} +/** + * Controls all the styling of the plugin. + * + * AIOSEOP Updates class. + * @author Michael Torbert. + * @author Semper Fi Web Design. + * @copyright https://semperplugins.com + * @version 1.0.0 + */ +if ( typeof aiosp_data != 'undefined' ) { + + /** + * @since 1.0.0 + * @param int $index. + * @param $value + */ + jQuery.each( + aiosp_data, function( index, value ) { + // aiosp_data[index] = value.json.replace(/"/g, '"'); + // aiosp_data[index] = jQuery.parseJSON( value ); + if ( index == 0 ) { + if ( typeof value.condshow == 'undefined' ) { + aiosp_data[ index ].condshow = []; + } + } else { + if ( typeof value.condshow != 'undefined' ) { + aiosp_data[ 0 ].condshow = + jQuery.merge( aiosp_data[0].condshow, value.condshow ); + } + } + } + ); + aiosp_data = aiosp_data[0]; +} + +/** + * @summary Changes visibility. + * + * @since 1.0.0 + * @param int $id. + */ +function toggleVisibility( id ) { + var e = document.getElementById( id ); + if ( e.style.display == 'block' ) { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +/** + * @summary Counts characters. + * + * @since 1.0.0 + * @param Object $field. + * @param Object $cntfield. + * @return Mixed. + */ +function countChars( field, cntfield ) { + var extra = 0; + var field_size; + if ( ( field.attr('name') == 'aiosp_title' ) + && ( typeof aiosp_title_extra !== 'undefined' ) ) { + extra = aiosp_title_extra; + } + cntfield.val(field.val().length + extra); + if ( typeof field.attr('size') != 'undefined' ) { + field_size = field.attr('size'); + } else { + field_size = field.attr('rows') * field.attr('cols'); + } + field_size = parseInt(field_size, 10); + if ( field_size < 10 ) { + return; + } + if ( cntfield.val() > field_size ) { + cntfield.removeClass().addClass('aioseop_count_ugly'); + } else { + if ( cntfield.val() > ( field_size - 6 ) ) { + cntfield.removeClass().addClass('aioseop_count_bad'); + } else { + cntfield.removeClass().addClass('aioseop_count_good'); + } + } +} + +/** + * @summary Returns the fields value. + * + * @since 1.0.0 + * @param String $field. + * @return Mixed. + */ +function aioseop_get_field_value( field ) { + if ( field.length == 0 ) { + return field; + } + cur = jQuery( '[name=' + field + ']' ); + if ( cur.length == 0 ) { + return field; + } + type = cur.attr( 'type' ); + if ( type == "checkbox" || type == "radio" ) { + cur = jQuery( 'input[name=' + field + ']:checked' ); + } + return cur.val(); +} + +/** + * @summary Returns the fields value. + * + * @since 1.0.0 + * @param String $field. + * @return Mixed. + */ +function aioseop_get_field_values( field ) { + arr = []; + cur = jQuery( '[name=' + field + ']' ); + if ( cur.length == 0 ) { + return field; + } + type = cur.attr( 'type' ); + if ( type == "checkbox" || type == "radio" ) { + jQuery( 'input[name=' + field + ']:checked' ).each( + function() { + arr.push( jQuery( this ).val() ); + } + ); + } + if ( arr.length <= 0 ) { + arr.push( cur.val() ); + } + return arr; +} + +/** + * @summary Evaluates condshow logic. + * + * @since 1.0.0 + * @param String $statement. + * @return Mixed. + */ +function aioseop_eval_condshow_logic( statement ) { + var lhs, rhs; + if ( ( typeof statement ) == 'object' ) { + lhs = statement.lhs; + rhs = statement.rhs; + if ( lhs !== null && ( ( typeof lhs ) == 'object' ) ) { + lhs = aioseop_eval_condshow_logic( lhs ); + } + if ( rhs !== null && ( typeof rhs ) == 'object' ) { + rhs = aioseop_eval_condshow_logic( rhs ); + } + lhs = aioseop_get_field_value( lhs ); + rhs = aioseop_get_field_value( rhs ); + switch ( statement.op ) { + case 'NOT': + return ( ! lhs ); + case 'AND': + return ( lhs && rhs ); + case 'OR' : + return ( lhs || rhs ); + case '==' : + return ( lhs == rhs ); + case '!=' : + return ( lhs != rhs ); + default : + return null; + } + } + return statement; +} + +/** + * @summary Evaluates condshow logic. + * + * @since 1.0.0 + * @param String $index. + * @param $value. + * @return Mixed. + */ +function aioseop_do_condshow_match( index, value ) { + if ( typeof value != 'undefined' ) { + matches = true; + jQuery.each( + value, function(subopt, setting) { + var statement; + if ( ( typeof setting ) == 'object' ) { + statement = aioseop_eval_condshow_logic( setting ); + if ( ! statement ) { + matches = false; + } + } else { + if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb + cur = aioseop_get_field_values( subopt ); + if ( jQuery.inArray( setting, cur, 0 ) < 0 ) { + matches = false; + } + } else { + cur = aioseop_get_field_value( subopt ); + if ( cur != setting ) { + matches = false; + } + } + } + } + ); + if ( matches ) { + jQuery( '#' + index + '_wrapper' ).show(); + } else { + jQuery( '#' + index + '_wrapper' ).hide(); + } + return matches; + } + return false; +} + +/** + * @summary Adds condshow handlers. + * + * @since 1.0.0 + * @param String $index. + * @param $value. + */ +function aioseop_add_condshow_handlers( index, value ) { + if ( typeof value != 'undefined' ) { + jQuery.each( + value, function(subopt, setting) { + jQuery( '[name=' + subopt + ']' ).bind( + "change keyup", function() { + aioseop_do_condshow_match( index, value ); + } + ); + } + ); + } +} + +/** + * @summary Does condshow. + * + * @since 1.0.0 + * @param $condshow. + */ +function aioseop_do_condshow( condshow ) { + if ( typeof aiosp_data.condshow != 'undefined' ) { + jQuery.each( + aiosp_data.condshow, function( index, value ) { + aioseop_do_condshow_match( index, value ); + aioseop_add_condshow_handlers( index, value ); + } + ); + } +} + +/** + * @since 1.0.0 + */ +jQuery( document ).ready( + function() { + if ( typeof aiosp_data != 'undefined' ) { + if ( typeof aiosp_data.condshow != 'undefined' ) { + aioseop_do_condshow( aiosp_data.condshow ); + } + } + + /** + * Turns on image checker on custom url change. + * @since 2.3.16 + */ + jQuery( '.aioseop_upload_image_label' ).on( + 'change', function() { + this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' ); + if ( this.checker.length > 0 ) { + this.checker.val( 1 ); + } + } + ); + } +); + +/** + * @summary Custom jQuery plugin that enables image uploader in wordpress. + * + * @since 2.3.13 + * @since 2.4.14 Added success callback and options. + * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ + * + * @param object options Plugin options. + */ +jQuery.fn.aioseopImageUploader = function( options ) { + // Keep reference to this. + var self = this; + + // Options + self.options = jQuery.extend( + { + success: undefined, + }, options + ); + + // Set input target when to update image url value + self.target = jQuery( self ).next(); + + // Uploader per image button + // * Having only one uploader was causing problems when multiple image buttons where in place + self.uploader = wp.media( + { + title: 'Choose Image', + button: { + text: 'Choose Image' + }, + multiple: false + } + ); + + /** + * Event handler that will be called when an image is selected from media uploader. + */ + self.onSelect = function() { + var url = self.uploader.state().get( 'selection' ).first().toJSON().url; + if ( self.target.length >= 0 ) { + jQuery( self.target ).val( url ); + } + if ( self.options.success !== undefined ) { + self.options.success( url, self ); + } + }; + + /** + * Click event handler. + * @param object e Click event. + */ + self.onClick = function( e ) { + e.preventDefault(); + self.uploader.open(); + }; + + // Set uploader select handler + self.uploader.on( 'select', self.onSelect ); + + // Set click handler + jQuery( self ).click( self.onClick ); +}; + +/** + * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin. + * + * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/ + * @since ? + * @since 2.3.11.2 Use WP 3.5 new media uploader + * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740) + * + */ +jQuery( document ).ready( + function($){ + + jQuery( '.aioseop_upload_image_button' ).each( + function() { + jQuery( this ).aioseopImageUploader( + { + success: function( url, el ) { + // Update checker + if ( jQuery( el ).prev().length > 0 ) { + jQuery( el ).prev().val( 1 ); + } + }, + } + ); + } + ); + + } +); + +/** + * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged. + * + * props to commentluv for this fix + * @author commentluv. + * @link https://core.trac.wordpress.org/ticket/16972 + * @since 1.0.0 + */ +jQuery( document ).ready( + function() { + + // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag + jQuery( '.hndle' ).mousedown( + function() { + + // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function + jQuery( '.wrap' ).mouseup( + function() { + aiosp_store_radio(); + setTimeout( function() { + aiosp_reclick_radio(); + }, 50 ); + } + ); + } + ); + } +); + +/** + * @summary Stores object of all radio buttons that are checked for entire form. + * + * @since 1.0.0 + */ +function aiosp_store_radio() { + var radioshack = {}; + jQuery( 'input[type="radio"]' ).each( + function() { + if ( jQuery( this ).is( ':checked' ) ) { + radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val(); + } + jQuery( document ).data( 'radioshack', radioshack ); + } + ); +} + +/** + * @summary Detects mouseup and restore all radio buttons that were checked. + * + * @since 1.0.0 + */ +function aiosp_reclick_radio() { + + // gets the object of checked radio button names and values + var radios = jQuery( document ).data( 'radioshack' ); + + // steps thru each object element and trigger a click on it's corresponding radio button + for ( var key in radios ) { + jQuery( 'input[name="' + key + '"]' ) + .filter( '[value="' + radios[ key ] + '"]' ) + .trigger( 'click' ); + } + // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function) + jQuery( '.wrap' ).unbind( 'mouseup' ); +} + +/** + * @summary Handdles ajax call. + * + * @since 1.0.0 + * @param $action. + * @param $setting. + * @param $options. + * @param $success. + */ +function aioseop_handle_ajax_call( action, settings, options, success ) { + var aioseop_sack = new sack( ajaxurl ); + aioseop_sack.execute = 1; + aioseop_sack.method = 'POST'; + aioseop_sack.setVar( "action", action ); + aioseop_sack.setVar( "settings", settings ); + aioseop_sack.setVar( "options", options ); + if ( typeof success != 'undefined' ) { + aioseop_sack.onCompletion = success; + } + aioseop_sack.setVar( + "nonce-aioseop", + jQuery( 'input[name="nonce-aioseop"]' ).val() + ); + aioseop_sack.setVar( + "nonce-aioseop-edit", + jQuery( 'input[name="nonce-aioseop-edit"]' ).val() + ); + aioseop_sack.onError = function() { + alert( 'Ajax error on saving.' ); + }; + aioseop_sack.runAJAX(); +} + +/** + * @summary Handdles posts URL. + * + * @since 1.0.0 + * @param $action. + * @param $setting. + * @param $options. + * @param $success. + */ +function aioseop_handle_post_url( action, settings, options, success) { + jQuery( "div#aiosp_" + settings ).fadeOut( + 'fast', function() { + var loading = ' Please wait...'; + jQuery( "div#aiosp_" + settings ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( action, settings, options, success ); + } + ); + jQuery( "div#aiosp_" + settings ).html( loading ); + } + ); +} + +/** + * @summary Handles when AIOSEOP is overflowed. + * + * @since 1.0.0 + * @param $element. + * @return mixed. + */ +function aioseop_is_overflowed( element ) { + return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth; +} + +/** + * @summary Handles when overflowed border. + * + * @since 1.0.0 + * @param $el. + */ +function aioseop_overflow_border( el ) { + if ( aioseop_is_overflowed( el ) ) { + el.className = 'aioseop_option_div aioseop_overflowed'; + } else { + el.className = 'aioseop_option_div'; + } +} + +/** + * @since 1.0.0 + * @return mixed. + */ +jQuery( document ).ready( + function() { + jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on( + 'click', function() { + var previousValue = jQuery( this ).attr( 'previousValue' ); + var name = jQuery( this ).attr( 'name' ); + if ( typeof previousValue == 'undefined' ) { + if ( jQuery( this ).prop( "checked" ) ) { + jQuery( this ).prop( 'checked', true ); + jQuery( this ).attr( 'previousValue', 'checked' ); + } else { + jQuery( this ).prop( 'checked', false ); + jQuery( this ).attr( 'previousValue', false ); + } + return; + } + if ( previousValue == 'checked' ) { + jQuery( this ).prop( 'checked', false ); + jQuery( this ).attr( 'previousValue', false ); + } else { + jQuery( "input[name=" + name + "]:radio" ) + .attr( 'previousValue', false ); + jQuery( this ).attr( 'previousValue', 'checked' ); + } + } + ); + if ( typeof aiosp_data.pointers != 'undefined' ) { + + /** + * @since 1.0.0 + * @param $index. + * @param $value. + * @return mixed. + */ + jQuery.each( + aiosp_data.pointers, function( index, value ) { + if ( value != 'undefined' && value.pointer_text != '' ) { + aioseop_show_pointer( index, value ); + } + } + ); + } + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_save_settings', + 'ajax_settings_message', + jQuery( 'form#aiosp_settings_form' ).serialize(), + function() { + jQuery( '.wp-has-current-submenu' ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( + 'aioseop_ajax_get_menu_links', + 'ajax_settings_message', + jQuery.param( {target: '.wp-has-current-submenu > ul'} ) + ); + } + ); + } + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" ) + .delegate( + "input[name='Submit']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_save_settings', + 'ajax_settings_message', + jQuery( 'form#aiosp_settings_form' ).serialize(), + function() { + jQuery( '.wp-has-current-submenu' ).fadeIn( + 'fast', function() { + aioseop_handle_ajax_call( + 'aioseop_ajax_get_menu_links', + 'ajax_settings_message', + jQuery.param( {target: '.wp-has-current-submenu > ul'} ) + ); + } + ); + } + ); + return false; + } + ); + + var selectors = + "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div"; + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) + .delegate( + "input[name='Submit']", "click", function() { + aioseop_handle_post_url( + 'aioseop_ajax_save_url', + 'sitemap_addl_pages', + jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' ) + .serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) + .delegate( + "input[name='Submit']", "click", function() { + aioseop_handle_post_url( + 'aioseop_ajax_save_url', + 'video_sitemap_addl_pages', + jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select' ) + .serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_sitemap_addl_pages_metabox" ) + .delegate( + "a.aiosp_delete_url", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_delete_url', + 'sitemap_addl_pages', + jQuery( this ).attr( "title" ) + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" ) + .delegate( + "a.aiosp_delete_url", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_delete_url', + 'video_sitemap_addl_pages', + jQuery( this ).attr( "title" ) + ); + return false; + } + ); + + /** + * @since 1.0.0 + * @param $e. + * @return boolean. + */ + jQuery( "div#aiosp_opengraph_scan_header" ) + .delegate( + "input[name='aiosp_opengraph_scan_header']", "click", function( e ) { + e.preventDefault(); + aioseop_handle_post_url( + 'aioseop_ajax_scan_header', + 'opengraph_scan_header', + jQuery( 'div#aiosp_opengraph_scan_header' ).serialize() + ); + return false; + } + ); + + /** + * @since 1.0.0 + */ + jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' ) + .click( + function() { + jQuery( this ) + .parents( 'div:eq(0)' ) + .find( ':checkbox' ) + .prop( 'checked', this.checked ); + } + ); + + /** + * @since 1.0.0 + */ + jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' ) + .click( + function () { + if ( ! this.checked ) { + jQuery( this ) + .parents( 'div:eq(0)' ) + .find( 'input[value="all"]:checkbox' ) + .prop( 'checked', this.checked ); + } + } + ); + + /** + * @since 1.0.0 + */ + jQuery( ".aioseop_tab:not(:first)" ).hide(); + + /** + * @since 1.0.0 + */ + jQuery( ".aioseop_tab:first" ).show(); + + /** + * @since 1.0.0 + * @return boolean. + */ + jQuery( "a.aioseop_header_tab" ).click( + function() { + var stringref = jQuery( this ).attr( "href" ).split( '#' )[1]; + jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' ); + jQuery( '.aioseop_tab#' + stringref ).show( 'slow' ); + jQuery( '.aioseop_header_tab[href!="#' + stringref + '"]' ).removeClass( 'active' ); + jQuery( '.aioseop_header_tab[href="#' + stringref + '"]' ).addClass( 'active' ); + return false; + } + ); + } +); + + +jQuery( document ).ready( + function() { + // TODO: consider moving EVERYTHING that needs ready() to this function + initAll( jQuery ); + initCounting( jQuery ); + } +); + +function initAll($){ + if ( $( '.aiseop-date' ).length > 0 && $( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) { + $( '.aiseop-date' ).datepicker( + { + dateFormat: "yy-mm-dd" + } + ); + } +} + +function initCounting($){ + /* count them characters */ + $( '.aioseop_count_chars' ).on('keyup keydown', function(){ + countChars( $(this).eq(0), $(this).parent().find('[name="' + $(this).attr('data-length-field') + '"]').eq(0)); + }); + $( '.aioseop_count_chars' ).each(function(){ + countChars( $(this).eq(0), $(this).parent().find('[name="' + $(this).attr('data-length-field') + '"]').eq(0)); + }); +} + From 47d9727ac277c4d0a65ab3c35bfeb03ff8adfa6d Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Fri, 23 Mar 2018 01:32:51 +0530 Subject: [PATCH 08/11] Make date format filterable (#1417) --- aioseop_class.php | 16 +++++++++------- inc/aioseop_functions.php | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/aioseop_class.php b/aioseop_class.php index b66e08b97..6aeb02059 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -1211,10 +1211,11 @@ function custom_output_option( $buf, $args ) { $title_format = str_replace( '%page_title%', $replace_title, $title_format ); } if ( strpos( $title_format, '%current_date%' ) !== false ) { - $title_format = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $title_format ); + $title_format = str_replace( '%current_date%', aioseop_formatted_date(), $title_format ); } - if ( strpos( $title_format, '%post_date%' ) !== false ) { - $title_format = str_replace( '%post_date%', get_the_date(), $title_format ); + + if ( strpos( $title_format, "%post_date%" ) !== false ){ + $title_format = str_replace( '%post_date%', aioseop_formatted_date( get_the_time( 'U' ) ), $title_format ); } if ( strpos( $title_format, '%post_year%' ) !== false ) { $title_format = str_replace( '%post_year%', get_the_date( 'Y' ), $title_format ); @@ -2082,11 +2083,12 @@ function title_placeholder_helper( $title, $post, $type = 'post', $title_format if ( strpos( $new_title, "%{$type}_author_lastname%" ) !== false ) { $new_title = str_replace( "%{$type}_author_lastname%", $this->ucwords( $authordata->last_name ), $new_title ); } - if ( strpos( $new_title, '%current_date%' ) !== false ) { - $new_title = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $new_title ); + + if ( strpos( $new_title, "%current_date%" ) !== false ){ + $new_title = str_replace( '%current_date%', aioseop_formatted_date(), $new_title ); } - if ( strpos( $new_title, '%post_date%' ) !== false ) { - $new_title = str_replace( '%post_date%', get_the_date(), $new_title ); + if ( strpos( $new_title, "%post_date%" ) !== false ){ + $new_title = str_replace( '%post_date%', aioseop_formatted_date( get_the_date( 'U' ) ), $new_title ); } if ( strpos( $new_title, '%post_year%' ) !== false ) { $new_title = str_replace( '%post_year%', get_the_date( 'Y' ), $new_title ); diff --git a/inc/aioseop_functions.php b/inc/aioseop_functions.php index cdd6b7340..537dc89f0 100644 --- a/inc/aioseop_functions.php +++ b/inc/aioseop_functions.php @@ -1048,3 +1048,26 @@ function aiosp_include_images() { return true; } } + + +if ( ! function_exists( 'aioseop_formatted_date' ) ) { + /** + * Get formatted date. For custom formatting, the user has 2 options: + * 1. provide the native date_i18n filter. + * 2. provide a custom aioseop_format_date filter. + * + * @param int $date Date in UNIX timestamp format. + * @param string $format Require date format. + */ + function aioseop_formatted_date( $date = null, $format = null ) { + if ( ! $format ) { + $format = get_option( 'date_format' ); + } + if ( ! $date ) { + $date = time(); + } + + $formatted_date = date_i18n( $format, $date ); + return apply_filters( 'aioseop_format_date', $formatted_date, $date, $format ); + } +} From cffbd20f61339738d2d469478868602f628fa9e4 Mon Sep 17 00:00:00 2001 From: EkoJr Date: Thu, 22 Mar 2018 14:41:03 -0700 Subject: [PATCH 09/11] Fix PHP Error & Sitemap not generating #1428 (#1435) * Issue#1428 - Fix PHP Error and Sitemap not generating. * Fix AIOSEOP Error message "Removed empty file *" with Static Compressed Sitemap being deleted automatically because of a false-false return. * Fix PHP 7.1.0 - 7.2.0+ (current) Warning with Compressed Streams to file path. * Fix Static Sitemap undetected to delete when Dynamic Sitemap is enabled. * Fix Error message "Potential conflict with unknown file *" with a valid .xml file. --- modules/aioseop_sitemap.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/aioseop_sitemap.php b/modules/aioseop_sitemap.php index 1ba77ed57..2dae30162 100644 --- a/modules/aioseop_sitemap.php +++ b/modules/aioseop_sitemap.php @@ -1046,9 +1046,12 @@ function get_problem_files( $files, &$msg ) { } } else { if ( $compressed ) { - $fn = 'compress.zlib://' . $fn; + $file_resource = gzopen( $fn, 'rb' ); + $file = gzread( $file_resource, 4096 ); + gzclose( $file_resource ); + } else { + $file = file_get_contents( $fn, false, null, 0, 4096 ); } - $file = file_get_contents( $fn, false, null, - 1, 4096 ); } if ( ! empty( $file ) ) { $matches = array(); @@ -1071,6 +1074,8 @@ function get_problem_files( $files, &$msg ) { $msg .= '

' . sprintf( __( 'Removed empty file %s.', 'all-in-one-seo-pack' ), $f ) . "

\n"; $problem_files[] = $f; + // This is causing all problem_files to be deleted automatically; which may be the intent. + // TODO Either create a seperate variable for this set of problem_files, or a final loop to clean problem_files before returning. foreach ( $problem_files as $f => $file ) { $files[ $f ] = realpath( $file ); $this->delete_file( realpath( $file ) ); From 556d0f856b747341bb2a40cc951ffcd54a2a8142 Mon Sep 17 00:00:00 2001 From: EkoJr Date: Tue, 27 Mar 2018 08:11:44 -0700 Subject: [PATCH 10/11] 7.2 PHP Warning on Page Editor #1491 (#1595) * Testcase for PHP Error on page & function #1491 * Fix PHP Warning on Page Editor #1491 * Change file location & file name * Unit Test for Admin Screen Edit-Post * Travis-CI fixes * Removed namespace in test class * Clean up * Fix for TravisCI * Fix for TravisCI --- aioseop_class.php | 6 +- ...est-All_in_One_SEO_Pack-aiospMrtGetUrl.php | 257 ++++++++++++++++++ 2 files changed, 262 insertions(+), 1 deletion(-) create mode 100644 tests/modules/general/test-All_in_One_SEO_Pack-aiospMrtGetUrl.php diff --git a/aioseop_class.php b/aioseop_class.php index 6aeb02059..07635ab33 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -2661,7 +2661,11 @@ function aiosp_mrt_get_url( $query, $show_page = true ) { return false; } $link = ''; - $haspost = count( $query->posts ) > 0; + $haspost = false; + if ( ! empty( $query->posts ) ) { + $haspost = count( $query->posts ) > 0; + } + if ( get_query_var( 'm' ) ) { $m = preg_replace( '/[^0-9]/', '', get_query_var( 'm' ) ); switch ( $this->strlen( $m ) ) { diff --git a/tests/modules/general/test-All_in_One_SEO_Pack-aiospMrtGetUrl.php b/tests/modules/general/test-All_in_One_SEO_Pack-aiospMrtGetUrl.php new file mode 100644 index 000000000..6df13eba1 --- /dev/null +++ b/tests/modules/general/test-All_in_One_SEO_Pack-aiospMrtGetUrl.php @@ -0,0 +1,257 @@ +setup_posts_aiospMrtGetUrl( 3 ); + } + + /** + * Set up posts + * + * Set up post environment. + * + * @since 2.4.4.1 + * + * @requires PHPUnit 5.7 + * + * @param int $how_many + */ + public function setup_posts_aiospMrtGetUrl( $how_many = 0 ) { + $args = array( + 'post_type' => 'post', + 'post_title' => 'title without image', + 'post_content' => 'content without image', + ); + + $ids = $this->factory->post->create_many( $how_many, $args ); + + foreach ( $ids as $v1_id ) { + $this->post_ids[] = $v1_id; + $image = AIOSEOP_UNIT_TESTING_DIR . '/resources/images/footer-logo.png'; + $attachment_id = $this->factory->attachment->create_upload_object( $image, $v1_id ); + if ( 0 !== $v1_id ) { + update_post_meta( $v1_id, '_thumbnail_id', $attachment_id ); + } + } + } + + /** + * PHPUnit Fixture - tearDown() + * + * Sets up the environment to test. + * NOTE: Patent must be called last according to WP Handbook. + * + * @since 2.4.4.1 + * + * @link https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#shared-setup-between-related-tests + */ + public function tearDown() { + $this->clean(); + + $this->go_to( site_url() ); + unset( $GLOBALS['wp_query'], $GLOBALS['wp_the_query'] ); + $GLOBALS['wp_the_query'] = new WP_Query(); + $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; + + parent::tearDown(); + } + + /** + * Test - All_in_One_SEO_Pack::aiosp_mrt_get_url() + * + * Issue #1491 Class Method to test. + * + * Function: Gets the url associated to the post in WP_Query + * Expected: On edit-post screen, false is returned. + * Actual: It is throwing a PHP Error. count(): `Parameter must be an array or an object that implements Countable` + * Reproduce: Go to edit-post screen. + * + * @since 2.4.4.1 + * + * @requires PHPUnit 5.7 + * + * @ticket 1491 Warning: count(): Parameter must be an array or an object that implements Countable #1491 + * @link https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1355 + * + * set_current_screen. + * @link https://developer.wordpress.org/reference/functions/set_current_screen/ + * @link https://codex.wordpress.org/Plugin_API/Admin_Screen_Reference + * + * @group url + * @group post_permalink + * @group All_in_One_SEO_Pack + * @group aiosp_mrt_get_url + * + * @expectedException count(): Parameter must be an array or an object that implements Countable + * @expectedExceptionMessage Error Exception Message in Annotations. + */ + public function test_aiosp_mrt_get_url_issue1491() { + global $aioseop_class; + if ( ! isset( $aioseop_class ) ) { + $aioseop_class = new All_in_One_SEO_Pack(); + } + + // On post Edit Screen. ERROR. + set_current_screen( 'post.php?post=' . $this->post_ids[0] . '&action=edit' ); + $this->go_to( site_url() . 'post.php?post=' . $this->post_ids[0] . '&action=edit' ); + unset( $GLOBALS['wp_query'], $GLOBALS['wp_the_query'] ); + $GLOBALS['wp_the_query'] = new WP_Query(); + $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; + + global $wp_query; + $t01 = $aioseop_class->aiosp_mrt_get_url( $wp_query, true ); + $this->assertFalse( $t01, 'All_in_One_SEO_Pack_Sitemap::aiosp_mrt_get_url() has failed. \tests\modules\general\test-All_in_One_SEO_Pack-aiospMrtGetUrl.php' ); + } + + /** + * Test - All_in_One_SEO_Pack::aiosp_mrt_get_url() on Post Edit + * + * @since 2.4.4.1 + * + * @requires PHPUnit 5.7 + * + * @ticket 1491 Warning: count(): Parameter must be an array or an object that implements Countable + * + * @see set_current_screen. + * @link https://developer.wordpress.org/reference/functions/set_current_screen/ + * @link https://codex.wordpress.org/Plugin_API/Admin_Screen_Reference + * + * @see WP_UnitTestCase::go_to() + * + * @group url + * @group post_permalink + * @group All_in_One_SEO_Pack + * @group aiosp_mrt_get_url + * + * @expectedException count(): Parameter must be an array or an object that implements Countable + * @expectedExceptionMessage Error Exception Message in Annotations. + * + */ + public function test_aiosp_mrt_get_url_post_edit() { + global $aioseop_class; + if ( ! isset( $aioseop_class ) ) { + unset( $aioseop_class ); + $aioseop_class = new All_in_One_SEO_Pack(); + } + + /* + * Unit Testcase go_to workaround. + * + * When loading an admin page, edit-post doesn't modify the query in any way. This + * appears to be a potentual bug with WP_UnitTestCase. + */ + //$this->go_to_edit_post( site_url() . '/wp-admin/post.php?post=' . $this->post_ids[0] . '&action=edit' ); + /* OR ( Could change to override function as well) */ + //$this->go_to( site_url() . '/wp-admin/post.php?post=' . $this->post_ids[0] . '&action=edit' ); + //unset( $GLOBALS['wp_query'], $GLOBALS['wp_the_query'] ); + //$GLOBALS['wp_the_query'] = new WP_Query(); + //$GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; + $this->go_to_edit_post( site_url() . '/wp-admin/post.php?post=' . $this->post_ids[0] . '&action=edit' ); + + /* + * Unit Testcase go_to workaround. + * + * The global $post variable isn't being properly set + */ + // - Operations in `/wp-admin/post.php`. + // Set global $post with the post ID. $post = get_post( $post_id ); + global $post, $post_type, $post_type_object; + if ( ! is_object( $post ) || $post->ID !== $this->post_ids[0] ) { + $post = get_post( $this->post_ids[0] ); + } + // Set global $post_type with $post->post_type. + $post_type = $post->post_type; + // Set global $post_type_object = get_post_type_object( $post_type ); + $post_type_object = get_post_type_object( $post_type ); + // Switch-case sets global $post = get_post($post_id, OBJECT, 'edit'); + $post = get_post( $this->post_ids[0], OBJECT, 'edit' ); + + // - Operations in All_in_One_SEO_Pack::get_page_snippet_info(). + // The global $wp_query is still un-initiated/null values. + // global $post is set to page being edited. $post = get_post( ID ) + global $wp_query; + // Set $wp_query->is_single = true; + $wp_query->is_single = true; + // Set $this->is_front_page = false; + $this->is_front_page = false; + // Set $wp_query->queried_object = $post; + // When ! empty( $aioseop_options['aiosp_no_paged_canonical_links'], is when $show_page = false. + + // - Operation in test function. + // Would need to be empty + //$aioseop_options['aiosp_customize_canonical_links'] + //$opts['aiosp_custom_link'] + + global $aioseop_options; + $aioseop_options['aiosp_no_paged_canonical_links'] = false; + $aioseop_options['aiosp_customize_canonical_links'] = false; + $t01 = $aioseop_class->aiosp_mrt_get_url( $wp_query, true ); + $t02 = $aioseop_class->aiosp_mrt_get_url( $wp_query, false ); + $this->assertFalse( $t01, 'All_in_One_SEO_Pack_Sitemap::aiosp_mrt_get_url() has failed on Admin Post-Edit screen. \tests\modules\general\test-All_in_One_SEO_Pack-aiospMrtGetUrl.php' ); + $this->assertFalse( $t02, 'All_in_One_SEO_Pack_Sitemap::aiosp_mrt_get_url() has failed on Admin Post-Edit screen. \tests\modules\general\test-All_in_One_SEO_Pack-aiospMrtGetUrl.php' ); + + global $aioseop_options; + $aioseop_options['aiosp_no_paged_canonical_links'] = true; + $aioseop_options['aiosp_customize_canonical_links'] = true; + $t03 = $aioseop_class->aiosp_mrt_get_url( $wp_query, true ); + $t04 = $aioseop_class->aiosp_mrt_get_url( $wp_query, false ); + $this->assertFalse( $t03, 'All_in_One_SEO_Pack_Sitemap::aiosp_mrt_get_url() has failed on Admin Post-Edit screen. \tests\modules\general\test-All_in_One_SEO_Pack-aiospMrtGetUrl.php' ); + $this->assertFalse( $t04, 'All_in_One_SEO_Pack_Sitemap::aiosp_mrt_get_url() has failed on Admin Post-Edit screen. \tests\modules\general\test-All_in_One_SEO_Pack-aiospMrtGetUrl.php' ); + } + + /** + * Override function for go_to edit-posts + * + * @since 2.4 + * + * @see WP_UnitTestCase::go_to() + * + * @param string $url The URL for the request. + */ + public function go_to_edit_post( $url ) { + parent::go_to( $url ); + unset( $GLOBALS['wp_query'], $GLOBALS['wp_the_query'] ); + $GLOBALS['wp_the_query'] = new WP_Query(); + $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; + } +} From b95f82324a121fd3d3bc5e96e91a82a655fb8ace Mon Sep 17 00:00:00 2001 From: Arnaud Broes Date: Thu, 29 Mar 2018 16:11:06 +0200 Subject: [PATCH 11/11] Fixed character counter for title & home title (#1581) (#1633) * Fixed character counter for title #1581 * Fixed character counter for home title #1581 --- js/modules/aioseop_module.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/modules/aioseop_module.js b/js/modules/aioseop_module.js index b21bcfe86..3c810bbf0 100644 --- a/js/modules/aioseop_module.js +++ b/js/modules/aioseop_module.js @@ -75,13 +75,19 @@ function countChars( field, cntfield ) { } if ( cntfield.val() > field_size ) { cntfield.removeClass().addClass('aioseop_count_ugly'); - } else { - if ( cntfield.val() > ( field_size - 6 ) ) { + } else if ( ( 'aiosp_title' === field.attr('name' ) ) || ( 'aiosp_home_title' === field.attr('name') ) ) { + if ( cntfield.val() > ( field_size - 6 ) ) { cntfield.removeClass().addClass('aioseop_count_bad'); - } else { + } else { cntfield.removeClass().addClass('aioseop_count_good'); - } - } + } + } else { + if ( cntfield.val() > ( field_size - 91 ) ) { + cntfield.removeClass().addClass('aioseop_count_bad'); + } else { + cntfield.removeClass().addClass('aioseop_count_good'); + } + } } /**