diff --git a/includes/dependencies/less/lessc.inc.php b/includes/dependencies/less/lessc.inc.php index d5fbcd5..5a4c434 100644 --- a/includes/dependencies/less/lessc.inc.php +++ b/includes/dependencies/less/lessc.inc.php @@ -3529,9 +3529,11 @@ public function throwError($msg = "parse error", $count = null) { // TODO this depends on $this->count if ($this->peek("(.*?)(\n|$)", $m, $count)) { - throw new exception("$msg: failed at `$m[1]` $loc"); + error_log("$msg: failed at `$m[1]` $loc"); +// throw new exception("$msg: failed at `$m[1]` $loc"); } else { - throw new exception("$msg: $loc"); + error_log("$msg: $loc"); + //throw new exception("$msg: $loc"); } } diff --git a/wp-content/plugins/wordpress-seo/.babelrc b/wp-content/plugins/wordpress-seo/.babelrc new file mode 100644 index 0000000..4f654b8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-react-jsx"] +} diff --git a/wp-content/plugins/wordpress-seo/.csslintrc b/wp-content/plugins/wordpress-seo/.csslintrc new file mode 100644 index 0000000..aacba95 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/.csslintrc @@ -0,0 +1,2 @@ +--exclude-exts=.min.css +--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes diff --git a/wp-content/plugins/wordpress-seo/.eslintignore b/wp-content/plugins/wordpress-seo/.eslintignore new file mode 100644 index 0000000..96212a3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/.eslintignore @@ -0,0 +1 @@ +**/*{.,-}min.js diff --git a/wp-content/plugins/wordpress-seo/.eslintrc b/wp-content/plugins/wordpress-seo/.eslintrc new file mode 100644 index 0000000..d4c412e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/.eslintrc @@ -0,0 +1,9 @@ +extends: yoast + +rules: + complexity: [1, 6] + react/prop-types: 1 + camelcase: 1 + brace-style: 1 + max-len: 1 + max-statements: 1 diff --git a/wp-content/plugins/wordpress-seo/admin/ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax.php new file mode 100644 index 0000000..9c94904 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax.php @@ -0,0 +1,453 @@ +' . $file . '' + ); + } + } + + if ( is_dir( $file ) ) { + if ( ! @ rmdir( $file ) ) { + $errors[] = sprintf( + /* translators: %s expands to the directory path and name. */ + __( 'The directory %s could not be removed. Please remove it via FTP.', 'wordpress-seo' ), + '' . $file . '' + ); + } + } + } + } + + if ( $errors ) { + $message = implode( '
', $errors ); + wp_send_json_error( array( 'message' => $message ) ); + } + else { + $message = __( 'Files successfully removed.', 'wordpress-seo' ); + wp_send_json_success( array( 'message' => $message ) ); + } +} + +add_action( 'wp_ajax_wpseo_kill_blocking_files', 'wpseo_kill_blocking_files' ); + +/** + * Used in the editor to replace vars for the snippet preview + */ +function wpseo_ajax_replace_vars() { + global $post; + check_ajax_referer( 'wpseo-replace-vars' ); + + $post = get_post( intval( filter_input( INPUT_POST, 'post_id' ) ) ); + global $wp_query; + $wp_query->queried_object = $post; + $wp_query->queried_object_id = $post->ID; + $omit = array( 'excerpt', 'excerpt_only', 'title' ); + echo wpseo_replace_vars( stripslashes( filter_input( INPUT_POST, 'string' ) ), $post, $omit ); + die; +} + +add_action( 'wp_ajax_wpseo_replace_vars', 'wpseo_ajax_replace_vars' ); + +/** + * Save an individual SEO title from the Bulk Editor. + */ +function wpseo_save_title() { + wpseo_save_what( 'title' ); +} + +add_action( 'wp_ajax_wpseo_save_title', 'wpseo_save_title' ); + +/** + * Save an individual meta description from the Bulk Editor. + */ +function wpseo_save_description() { + wpseo_save_what( 'metadesc' ); +} + +add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' ); + +/** + * Save titles & descriptions + * + * @param string $what Type of item to save (title, description). + */ +function wpseo_save_what( $what ) { + check_ajax_referer( 'wpseo-bulk-editor' ); + + $new = filter_input( INPUT_POST, 'new_value' ); + $post_id = intval( filter_input( INPUT_POST, 'wpseo_post_id' ) ); + $original = filter_input( INPUT_POST, 'existing_value' ); + + $results = wpseo_upsert_new( $what, $post_id, $new, $original ); + + wpseo_ajax_json_echo_die( $results ); +} + +/** + * Helper function to update a post's meta data, returning relevant information + * about the information updated and the results or the meta update. + * + * @param int $post_id Post ID. + * @param string $new_meta_value New meta value to record. + * @param string $orig_meta_value Original meta value. + * @param string $meta_key Meta key string. + * @param string $return_key Return key string to use in results. + * + * @return string + */ +function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_key, $return_key ) { + + $post_id = intval( $post_id ); + $sanitized_new_meta_value = wp_strip_all_tags( $new_meta_value ); + $orig_meta_value = wp_strip_all_tags( $orig_meta_value ); + + $upsert_results = array( + 'status' => 'success', + 'post_id' => $post_id, + "new_{$return_key}" => $sanitized_new_meta_value, + "original_{$return_key}" => $orig_meta_value, + ); + + $the_post = get_post( $post_id ); + if ( empty( $the_post ) ) { + + $upsert_results['status'] = 'failure'; + $upsert_results['results'] = __( 'Post doesn\'t exist.', 'wordpress-seo' ); + + return $upsert_results; + } + + $post_type_object = get_post_type_object( $the_post->post_type ); + if ( ! $post_type_object ) { + + $upsert_results['status'] = 'failure'; + $upsert_results['results'] = sprintf( __( 'Post has an invalid Post Type: %s.', 'wordpress-seo' ), $the_post->post_type ); + + return $upsert_results; + } + + if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { + + $upsert_results['status'] = 'failure'; + $upsert_results['results'] = sprintf( __( 'You can\'t edit %s.', 'wordpress-seo' ), $post_type_object->label ); + + return $upsert_results; + } + + if ( ! current_user_can( $post_type_object->cap->edit_others_posts ) && $the_post->post_author != get_current_user_id() ) { + + $upsert_results['status'] = 'failure'; + $upsert_results['results'] = sprintf( __( 'You can\'t edit %s that aren\'t yours.', 'wordpress-seo' ), $post_type_object->label ); + + return $upsert_results; + + } + + if ( $sanitized_new_meta_value === $orig_meta_value && $sanitized_new_meta_value !== $new_meta_value ) { + $upsert_results['status'] = 'failure'; + $upsert_results['results'] = __( 'You have used HTML in your value which is not allowed.', 'wordpress-seo' ); + + return $upsert_results; + } + + $res = update_post_meta( $post_id, $meta_key, $sanitized_new_meta_value ); + + $upsert_results['status'] = ( $res !== false ) ? 'success' : 'failure'; + $upsert_results['results'] = $res; + + return $upsert_results; +} + +/** + * Save all titles sent from the Bulk Editor. + */ +function wpseo_save_all_titles() { + wpseo_save_all( 'title' ); +} + +add_action( 'wp_ajax_wpseo_save_all_titles', 'wpseo_save_all_titles' ); + +/** + * Save all description sent from the Bulk Editor. + */ +function wpseo_save_all_descriptions() { + wpseo_save_all( 'metadesc' ); +} + +add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' ); + +/** + * Utility function to save values + * + * @param string $what Type of item so save. + */ +function wpseo_save_all( $what ) { + check_ajax_referer( 'wpseo-bulk-editor' ); + + // @todo the WPSEO Utils class can't filter arrays in POST yet. + $new_values = $_POST['items']; + $original_values = $_POST['existing_items']; + + $results = array(); + + if ( is_array( $new_values ) && $new_values !== array() ) { + foreach ( $new_values as $post_id => $new_value ) { + $original_value = $original_values[ $post_id ]; + $results[] = wpseo_upsert_new( $what, $post_id, $new_value, $original_value ); + } + } + wpseo_ajax_json_echo_die( $results ); +} + +/** + * Insert a new value + * + * @param string $what Item type (such as title). + * @param int $post_id Post ID. + * @param string $new New value to record. + * @param string $original Original value. + * + * @return string + */ +function wpseo_upsert_new( $what, $post_id, $new, $original ) { + $meta_key = WPSEO_Meta::$meta_prefix . $what; + + return wpseo_upsert_meta( $post_id, $new, $original, $meta_key, $what ); +} + +/** + * Handles the posting of a new FB admin. + */ +function wpseo_add_fb_admin() { + check_ajax_referer( 'wpseo_fb_admin_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + die( '-1' ); + } + + $facebook_social = new Yoast_Social_Facebook(); + + wp_die( $facebook_social->add_admin( filter_input( INPUT_POST, 'admin_name' ), filter_input( INPUT_POST, 'admin_id' ) ) ); +} + +add_action( 'wp_ajax_wpseo_add_fb_admin', 'wpseo_add_fb_admin' ); + +/** + * Retrieves the keyword for the keyword doubles. + */ +function ajax_get_keyword_usage() { + $post_id = filter_input( INPUT_POST, 'post_id' ); + $keyword = filter_input( INPUT_POST, 'keyword' ); + + if ( ! current_user_can( 'edit_post', $post_id ) ) { + die( '-1' ); + } + + wp_die( + wp_json_encode( WPSEO_Meta::keyword_usage( $keyword, $post_id ) ) + ); +} + +add_action( 'wp_ajax_get_focus_keyword_usage', 'ajax_get_keyword_usage' ); + +/** + * Retrieves the keyword for the keyword doubles of the termpages. + */ +function ajax_get_term_keyword_usage() { + $post_id = filter_input( INPUT_POST, 'post_id' ); + $keyword = filter_input( INPUT_POST, 'keyword' ); + $taxonomyName = filter_input( INPUT_POST, 'taxonomy' ); + + $taxonomy = get_taxonomy( $taxonomyName ); + + if ( ! $taxonomy ) { + wp_die( 0 ); + } + + if ( ! current_user_can( $taxonomy->cap->edit_terms ) ) { + wp_die( -1 ); + } + + $usage = WPSEO_Taxonomy_Meta::get_keyword_usage( $keyword, $post_id, $taxonomyName ); + + // Normalize the result so it it the same as the post keyword usage AJAX request. + $usage = $usage[ $keyword ]; + + wp_die( + wp_json_encode( $usage ) + ); +} + +add_action( 'wp_ajax_get_term_keyword_usage', 'ajax_get_term_keyword_usage' ); + +/** + * Removes stopword from the sample permalink that is generated in an AJAX request + * + * @param array $permalink The permalink generated for this post by WordPress. + * @param int $post_ID The ID of the post. + * @param string $title The title for the post that the user used. + * @param string $name The name for the post that the user used. + * + * @return array + */ +function wpseo_remove_stopwords_sample_permalink( $permalink, $post_ID, $title, $name ) { + WPSEO_Options::get_instance(); + $options = WPSEO_Options::get_options( array( 'wpseo_permalinks' ) ); + if ( $options['cleanslugs'] !== true ) { + return $permalink; + } + + /* + * If the name is empty and the title is not, WordPress will generate a slug. In that case we want to remove stop + * words from the slug. + */ + if ( empty( $name ) && ! empty( $title ) ) { + $stop_words = new WPSEO_Admin_Stop_Words(); + + // The second element is the slug. + $permalink[1] = $stop_words->remove_in( $permalink[1] ); + } + + return $permalink; +} + +add_action( 'get_sample_permalink', 'wpseo_remove_stopwords_sample_permalink', 10, 4 ); + +// Crawl Issue Manager AJAX hooks. +new WPSEO_GSC_Ajax; + +// SEO Score Recalculations. +new WPSEO_Recalculate_Scores_Ajax; + +new Yoast_Dashboard_Widget(); + +new Yoast_OnPage_Ajax(); + +new WPSEO_Shortcode_Filter(); + +new WPSEO_Taxonomy_Columns(); + + +// Setting the notice for the recalculate the posts. +new Yoast_Dismissable_Notice_Ajax( 'recalculate', Yoast_Dismissable_Notice_Ajax::FOR_SITE ); + +/********************** DEPRECATED METHODS **********************/ + +/** + * Create an export and return the URL + * + * @deprecated 3.3.2 + */ +function wpseo_get_export() { + _deprecated_function( __METHOD__, 'WPSEO 3.3.2', 'This method is deprecated.' ); + + wpseo_ajax_json_echo_die( '' ); +} diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php new file mode 100644 index 0000000..66f31b4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php @@ -0,0 +1,119 @@ + $this->calculate_posts(), + 'terms' => $this->calculate_terms(), + ) + ) + ); + } + + /** + * Start recalculation + */ + public function recalculate_scores() { + check_ajax_referer( 'wpseo_recalculate', 'nonce' ); + + $fetch_object = $this->get_fetch_object(); + if ( ! empty( $fetch_object ) ) { + $paged = filter_input( INPUT_POST, 'paged', FILTER_VALIDATE_INT ); + $response = $fetch_object->get_items_to_recalculate( $paged ); + + if ( ! empty( $response ) ) { + wp_die( wp_json_encode( $response ) ); + } + } + + wp_die( '' ); + } + + /** + * Saves the new linkdex score for given post + */ + public function save_score() { + check_ajax_referer( 'wpseo_recalculate', 'nonce' ); + + $fetch_object = $this->get_fetch_object(); + if ( ! empty( $fetch_object ) ) { + $scores = filter_input( INPUT_POST, 'scores', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); + $fetch_object->save_scores( $scores ); + } + + wp_die(); + } + + /** + * Returns the needed object for recalculating scores. + * + * @return WPSEO_Recalculate_Posts|WPSEO_Recalculate_Terms + */ + private function get_fetch_object() { + switch ( filter_input( INPUT_POST, 'type' ) ) { + case 'post': + return new WPSEO_Recalculate_Posts(); + case 'term': + return new WPSEO_Recalculate_Terms(); + } + + return null; + } + + /** + * Gets the total number of posts + * + * @return int + */ + private function calculate_posts() { + $count_posts_query = new WP_Query( + array( + 'post_type' => 'any', + 'meta_key' => '_yoast_wpseo_focuskw', + 'posts_per_page' => 1, + 'fields' => 'ids', + ) + ); + + return $count_posts_query->found_posts; + } + + /** + * Get the total number of terms + * + * @return int + */ + private function calculate_terms() { + $total = 0; + foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) { + $total += wp_count_terms( $taxonomy->name, array( 'hide_empty' => false ) ); + } + + return $total; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php new file mode 100644 index 0000000..834001f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php @@ -0,0 +1,39 @@ + $shortcode, + 'output' => do_shortcode( $shortcode ), + ); + } + + wp_die( wp_json_encode( $parsed_shortcodes ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php new file mode 100644 index 0000000..48fd916 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php @@ -0,0 +1,69 @@ +notice_name = $notice_name; + $this->notice_type = $notice_type; + + add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, array( $this, 'dismiss_notice' ) ); + } + + /** + * Handles the dismiss notice request + */ + public function dismiss_notice() { + check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name ); + + $this->save_dismissed(); + + wp_die( 'true' ); + } + + /** + * Storing the dismissed value in the database. The target location is based on the set notification type. + */ + private function save_dismissed() { + if ( $this->notice_type === self::FOR_SITE ) { + update_option( 'wpseo_dismiss_' . $this->notice_name, 1 ); + + return; + } + + if ( $this->notice_type === self::FOR_NETWORK ) { + update_site_option( 'wpseo_dismiss_' . $this->notice_name, 1 ); + + return; + } + + update_user_meta( get_current_user_id(), 'wpseo_dismiss_' . $this->notice_name, 1 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php new file mode 100644 index 0000000..35f791f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php @@ -0,0 +1,38 @@ +save_dismissed(); + + wp_die( 'true' ); + } + + /** + * Storing the dismissed value as an user option in the database + */ + private function save_dismissed() { + update_user_meta( get_current_user_id(), WPSEO_OnPage::USER_META_KEY, 1 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php new file mode 100644 index 0000000..398beb2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php @@ -0,0 +1,105 @@ +dismissed_conflicts = $this->get_dismissed_conflicts( $conflict_data['section'] ); + + $this->compare_plugins( $conflict_data['plugins'] ); + + $this->save_dismissed_conflicts( $conflict_data['section'] ); + + wp_die( 'true' ); + } + + /** + * Getting the user option from the database + * + * @return bool|array + */ + private function get_dismissed_option() { + return get_user_meta( get_current_user_id(), $this->option_name, true ); + } + + /** + * Getting the dismissed conflicts from the database + * + * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). + * + * @return array + */ + private function get_dismissed_conflicts( $plugin_section ) { + $dismissed_conflicts = $this->get_dismissed_option(); + + if ( is_array( $dismissed_conflicts ) && array_key_exists( $plugin_section, $dismissed_conflicts ) ) { + return $dismissed_conflicts[ $plugin_section ]; + } + + return array(); + } + + /** + * Storing the conflicting plugins as an user option in the database + * + * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap). + */ + private function save_dismissed_conflicts( $plugin_section ) { + $dismissed_conflicts = $this->get_dismissed_option(); + + $dismissed_conflicts[ $plugin_section ] = $this->dismissed_conflicts; + + update_user_meta( get_current_user_id(), $this->option_name, $dismissed_conflicts ); + } + + /** + * Loop through the plugins to compare them with the already stored dismissed plugin conflicts + * + * @param array $posted_plugins Plugin set to check. + */ + public function compare_plugins( array $posted_plugins ) { + foreach ( $posted_plugins as $posted_plugin ) { + $this->compare_plugin( $posted_plugin ); + } + } + + /** + * Check if plugin is already dismissed, if not store it in the array that will be saved later + * + * @param string $posted_plugin Plugin to check against dismissed conflicts. + */ + private function compare_plugin( $posted_plugin ) { + if ( ! in_array( $posted_plugin, $this->dismissed_conflicts ) ) { + $this->dismissed_conflicts[] = $posted_plugin; + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php new file mode 100644 index 0000000..347b8f1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php @@ -0,0 +1,48 @@ +get_url() ) . '">'; + $output .= '' . esc_attr( $banner->get_alt() ) . ''; + $output .= ''; + + return $output; + } + + /** + * Sets the base path, where the images are located. + * + * @param string $base_path The image location. + */ + public function set_base_path( $base_path ) { + $this->base_path = $base_path; + } + + /** + * Returns the full path for the image. + * + * @param string $image The image path. + * + * @return string + */ + protected function get_image_path( $image ) { + return rtrim( $this->base_path, '/' ) . '/' . ltrim( $image, '/' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php new file mode 100644 index 0000000..93fef4a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php @@ -0,0 +1,60 @@ +spot_renderer = $spot_renderer; + } + + /** + * Renders the admin banner sidebar. + * + * @param WPSEO_Admin_Banner_Sidebar $banner_sidebar The sidebar to render. + * + * @return string + */ + public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) { + return sprintf( ' + ', + $banner_sidebar->get_title(), + $this->render_banner_spots( $banner_sidebar->get_banner_spots() ) + ); + } + + /** + * Renders the admin banner spots. + * + * @param WPSEO_Admin_Banner_Spot[] $banner_spots The banner spots to render. + * + * @return string + */ + protected function render_banner_spots( array $banner_spots ) { + $return = ''; + foreach ( $banner_spots as $banner_spot ) { + $return .= $this->spot_renderer->render( $banner_spot ); + } + + return $return; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php new file mode 100644 index 0000000..a2fe82a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php @@ -0,0 +1,356 @@ +title = $title; + $this->banner_renderer = $banner_renderer; + } + + /** + * Returns the set title. + * + * @return string + */ + public function get_title() { + return $this->title; + } + + /** + * Initializes the banner sidebar by setting its banner spots. + * + * @param WPSEO_Features $features Class regarding WPSEO Features. + */ + public function initialize( WPSEO_Features $features ) { + if ( $features->is_free() ) { + $this->add_banner_spot( $this->get_premium_spot() ); + } + + $this->add_banner_spot( $this->get_services_spot() ); + + $extensions_spot = $this->get_extensions_spot( $this->get_active_extensions() ); + if ( $extensions_spot->has_banners() ) { + $this->add_banner_spot( $extensions_spot ); + } + + $this->add_banner_spot( $this->get_courses_spot() ); + $this->add_banner_spot( $this->get_remove_banner_spot() ); + } + + /** + * Returns array with bannerspots. + * + * @return WPSEO_Admin_Banner_Spot[] + */ + public function get_banner_spots() { + return $this->banner_spots; + } + + /** + * Adds a banner spot. + * + * @param WPSEO_Admin_Banner_Spot $spot The spot to add. + */ + protected function add_banner_spot( WPSEO_Admin_Banner_Spot $spot ) { + $this->banner_spots[] = $spot; + } + + /** + * Returns the premium banner spot. + * + * @return WPSEO_Admin_Banner_Spot + */ + protected function get_premium_spot() { + $premium_spot = new WPSEO_Admin_Banner_Spot( __( 'Premium', 'wordpress-seo' ), $this->banner_renderer ); + + $premium_spot->set_description( + sprintf( + /* translators: %1$s expands to a link start tag to the Yoast plugin page, %2$s is the link closing tag */ + __( 'Want to get the most out of your SEO-strategy? %1$sGo premium!%2$s.', 'wordpress-seo' ), + '', + '' + ) + ); + + $premium_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jj', + 'premium-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast SEO Premium. */ + __( 'Buy the %1$s plugin now and get access to extra features and 24/7 support!', 'wordpress-seo' ), + 'Yoast SEO Premium' + ) + ) + ); + + return $premium_spot; + } + + /** + * Returns the services banner spot. + * + * @return WPSEO_Admin_Banner_Spot + */ + protected function get_services_spot() { + $service_spot = new WPSEO_Admin_Banner_Spot( __( 'Services', 'wordpress-seo' ), $this->banner_renderer ); + + $service_spot->set_description( + sprintf( + /* translators: %1$s expands to a link start tag to the Yoast Services page, %2$s to Yoast, %3$s is the link closing tag. */ + __( 'Do you want to know how to improve your rankings? %1$sLet team %2$s help you!%3$s', 'wordpress-seo' ), + '', + 'Yoast', + '' + ) + ); + + $service_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jl', + 'website-review.png', + 261, + 152, + __( 'Order a Website Review and we will tell you what to improve to attract more visitors!', 'wordpress-seo' ) + ) + ); + + $service_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jm', + 'configuration-service.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast SEO Premium. */ + __( 'Let our experts set up your %1$s plugin!', 'wordpress-seo' ), + 'Yoast SEO Premium' + ) + ) + ); + + $service_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/seo-care-banner', + 'seo-care.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast SEO Care. */ + __( 'Let us help you take care of the SEO of your website. Order %1$s now!', 'wordpress-seo' ), + 'Yoast SEO Care' + ) + ) + ); + + return $service_spot; + } + + /** + * Returns an array with the Yoast SEO extensions with the value true when they are active. + * + * @return array + */ + protected function get_active_extensions() { + return array( + 'video' => class_exists( 'wpseo_Video_Sitemap' ), + 'woocommerce' => class_exists( 'Woocommerce' ) && class_exists( 'Yoast_WooCommerce_SEO' ), + 'news' => class_exists( 'WPSEO_News' ), + 'local' => defined( 'WPSEO_LOCAL_VERSION' ), + ); + } + + /** + * Returns the extensions banner spot. + * + * @param array $active_extensions The active extensions. + * + * @return WPSEO_Admin_Banner_Spot + */ + protected function get_extensions_spot( array $active_extensions ) { + $extension_spot = new WPSEO_Admin_Banner_Spot( __( 'Extensions', 'wordpress-seo' ), $this->banner_renderer ); + + $extension_spot->set_description( + sprintf( + /* translators: %1$s expands to a link start tag to the Yoast plugin page, %2$s is the link closing tag. */ + __( 'Take your SEO to the next level and outrank your competition with our %1$sSEO plugins%2$s.', 'wordpress-seo' ), + '', + '' + ) + ); + + if ( empty( $active_extensions['video'] ) ) { + $extension_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jo', + 'video-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast Video SEO. */ + __( 'Buy the %1$s plugin now and optimize your videos for video search results and social media!', 'wordpress-seo' ), + 'Yoast Video SEO' + ) + ) + ); + } + + if ( empty( $active_extensions['woocommerce'] ) ) { + $extension_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jp', + 'woocommerce-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast WooCommerce SEO. */ + __( 'Buy the %1$s plugin now and optimize your shop today to improve your product promotion!', 'wordpress-seo' ), + 'Yoast WooCommerce SEO' + ) + ) + ); + } + + if ( empty( $active_extensions['local'] ) ) { + $extension_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jq', + 'local-seo.png', 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast Local SEO. */ + __( 'Buy the %1$s plugin now to improve your site’s Local SEO and ranking in Google Maps!', 'wordpress-seo' ), + 'Yoast Local SEO' + ) + ) + ); + } + + if ( empty( $active_extensions['news'] ) ) { + $extension_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jr', + 'news-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast News SEO. */ + __( 'Buy the %1$s plugin now and start optimizing to get your site featured in Google News!', 'wordpress-seo' ), + 'Yoast News SEO' + ) + ) + ); + } + + return $extension_spot; + } + + /** + * Returns the courses banner spot. + * + * @return WPSEO_Admin_Banner_Spot + */ + protected function get_courses_spot() { + $courses_spot = new WPSEO_Admin_Banner_Spot( __( 'Courses', 'wordpress-seo' ), $this->banner_renderer ); + + $courses_spot->set_description( + sprintf( + /* translators: %1$s expands to a link start tag to the Yoast Services page, %2$s is the link closing tag. */ + __( 'Do you want to get a grip on your own SEO-strategy? Learn all about it in one of %1$sour courses%2$s.', 'wordpress-seo' ), + '', + '' + ) + ); + + $courses_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/ju', + 'basic-seo-training.png', + 261, + 152, + __( 'Take the online Basic SEO Training course and learn the fundamentals of SEO!', 'wordpress-seo' ) + ) + ); + + $courses_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jv', + 'yoast-seo-for-wordpress-training.png', + 261, + 152, + /* translators: %1$s expands to Yoast SEO for WordPress Training, %2$s to Yoast SEO for WordPress. */ + sprintf( + __( 'Take the %s course and become a certified %2$s expert!', 'wordpress-seo' ), + 'Yoast SEO for WordPress Training', + 'Yoast SEO for WordPress' + ) + ) + ); + + $courses_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jw', + 'seo-copywriting-training.png', + 261, + 152, + __( 'Take the online SEO Copywriting Training course and learn how to write awesome copy that ranks!', 'wordpress-seo' ) + ) + ); + + $courses_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoa.st/jx', + 'keyword-research-training.png', + 261, + 152, + __( 'Take the online Keyword Research Training course and learn how to rank with your keywords!', 'wordpress-seo' ) + ) + ); + + return $courses_spot; + } + + /** + * Returns the remove banner spot. + * + * @return WPSEO_Admin_Banner_Spot + */ + protected function get_remove_banner_spot() { + + $remove_banner_spot = new WPSEO_Admin_Banner_Spot( + __( 'Remove these ads?', 'wordpress-seo' ) + ); + + $remove_banner_spot->set_description( + ''. + /* translators: %1$s expands to Yoast SEO Premium */ + sprintf( __( 'Upgrade to %1$s »', 'wordpress-seo' ), 'Yoast SEO Premium' ) . + '' + ); + + return $remove_banner_spot; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php new file mode 100644 index 0000000..7acf81d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php @@ -0,0 +1,30 @@ +' . $banner_spot->get_title() . ''; + + if ( $banner_spot->get_description() !== '' ) { + $output .= '

' . $banner_spot->get_description() . '

'; + } + + $output .= $banner_spot->render_banner(); + $output .= ''; + + return $output; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php new file mode 100644 index 0000000..f7af825 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php @@ -0,0 +1,97 @@ +title = $title; + $this->banner_renderer = ( is_null( $banner_renderer ) ? new WPSEO_Admin_Banner_Renderer() : $banner_renderer ); + } + + /** + * Returns the title. + * + * @return string + */ + public function get_title() { + return $this->title; + } + + /** + * Returns the description. + * + * @return string + */ + public function get_description() { + return $this->description; + } + + /** + * Sets the description + * + * @param string $description The description. + */ + public function set_description( $description ) { + $this->description = $description; + } + + /** + * Adds an admin banner. + * + * @param WPSEO_Admin_Banner $banner The banner to add. + */ + public function add_banner( WPSEO_Admin_Banner $banner ) { + $this->banners[] = $banner; + } + + /** + * Renders the banner. + * + * @return string + */ + public function render_banner() { + if ( ! $this->has_banners() ) { + return ''; + } + + return $this->banner_renderer->render( $this->get_random_banner() ); + } + + /** + * Checks if there are any banners set. + * + * @return bool + */ + public function has_banners() { + return ! empty( $this->banners ); + } + + /** + * Returns a random banner. + * + * @return null|WPSEO_Admin_Banner + */ + protected function get_random_banner() { + return $this->banners[ array_rand( $this->banners, 1 ) ]; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php new file mode 100644 index 0000000..d179c42 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php @@ -0,0 +1,87 @@ +url = $url; + $this->image = $image; + $this->alt = $alt; + $this->width = $width; + $this->height = $height; + } + + /** + * Returns the set url. + * + * @return string + */ + public function get_url() { + return $this->url; + } + + /** + * Returns the image. + * + * @return string + */ + public function get_image() { + return $this->image; + } + + /** + * Returns the alt-text. + * + * @return string + */ + public function get_alt() { + return $this->alt; + } + + /** + * Returns the width. + * + * @return string + */ + public function get_width() { + return $this->width; + } + + /** + * Returns the height. + * + * @return string + */ + public function get_height() { + return $this->height; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php new file mode 100644 index 0000000..cca1b15 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php @@ -0,0 +1,350 @@ +get_name(), + $script->get_url( WPSEO_Admin_Asset::TYPE_JS, WPSEO_FILE ), + $script->get_deps(), + $script->get_version(), + $script->is_in_footer() + ); + } + + /** + * Registers styles based on it's parameters. + * + * @param WPSEO_Admin_Asset $style The style to register. + */ + public function register_style( WPSEO_Admin_Asset $style ) { + wp_register_style( + self::PREFIX . $style->get_name(), + $style->get_url( WPSEO_Admin_Asset::TYPE_CSS, WPSEO_FILE ), + $style->get_deps(), + $style->get_version(), + $style->get_media() + ); + } + + /** + * Calls the functions that register scripts and styles with the scripts and styles to be registered as arguments. + */ + public function register_assets() { + $this->register_scripts( $this->scripts_to_be_registered() ); + $this->register_styles( $this->styles_to_be_registered() ); + } + + /** + * Registers all the scripts passed to it. + * + * @param array $scripts The scripts passed to it. + */ + public function register_scripts( $scripts ) { + foreach ( $scripts as $script ) { + $script = new WPSEO_Admin_Asset( $script ); + $this->register_script( $script ); + } + } + + /** + * Registers all the styles it recieves. + * + * @param array $styles Styles that need to be registerd. + */ + public function register_styles( $styles ) { + foreach ( $styles as $style ) { + $style = new WPSEO_Admin_Asset( $style ); + $this->register_style( $style ); + } + } + + /** + * A list of styles that shouldn't be registered but are needed in other locations in the plugin. + * + * @return array + */ + public function special_styles() { + return array( + 'inside-editor' => new WPSEO_Admin_Asset( array( + 'name' => 'inside-editor', + 'src' => 'inside-editor-331', + ) ), + ); + } + + /** + * Returns the scripts that need to be registered. + * + * @TODO data format is not self-documenting. Needs explanation inline. R. + * + * @return array scripts that need to be registered. + */ + private function scripts_to_be_registered() { + + $select2_language = 'en'; + $locale = WPSEO_Utils::get_user_locale(); + $language = WPSEO_Utils::get_language( $locale ); + + if ( file_exists( WPSEO_PATH . "js/dist/select2/i18n/{$locale}.js" ) ) { + $select2_language = $locale; // Chinese and some others use full locale. + } + elseif ( file_exists( WPSEO_PATH . "js/dist/select2/i18n/{$language}.js" ) ) { + $select2_language = $language; + } + + return array( + array( + 'name' => 'admin-script', + 'src' => 'wp-seo-admin-400', + 'deps' => array( + 'jquery', + 'jquery-ui-core', + 'jquery-ui-progressbar', + self::PREFIX . 'select2', + self::PREFIX . 'select2-translations', + ), + ), + array( + 'name' => 'admin-media', + 'src' => 'wp-seo-admin-media-350', + 'deps' => array( + 'jquery', + 'jquery-ui-core', + ), + ), + array( + 'name' => 'bulk-editor', + 'src' => 'wp-seo-bulk-editor-350', + 'deps' => array( 'jquery' ), + ), + array( + 'name' => 'dismissible', + 'src' => 'wp-seo-dismissible-350', + 'deps' => array( 'jquery' ), + ), + array( + 'name' => 'admin-global-script', + 'src' => 'wp-seo-admin-global-390', + 'deps' => array( 'jquery' ), + ), + array( + 'name' => 'metabox', + 'src' => 'wp-seo-metabox-400', + 'deps' => array( + 'jquery', + 'jquery-ui-core', + 'jquery-ui-autocomplete', + self::PREFIX . 'select2', + self::PREFIX . 'select2-translations', + ), + 'in_footer' => false, + ), + array( + 'name' => 'featured-image', + 'src' => 'wp-seo-featured-image-350', + 'deps' => array( + 'jquery' + ), + ), + array( + 'name' => 'admin-gsc', + 'src' => 'wp-seo-admin-gsc-350', + 'deps' => array(), + 'in_footer' => false, + ), + array( + 'name' => 'post-scraper', + 'src' => 'wp-seo-post-scraper-400', + 'deps' => array( + self::PREFIX . 'replacevar-plugin', + self::PREFIX . 'shortcode-plugin', + 'wp-util', + ), + ), + array( + 'name' => 'term-scraper', + 'src' => 'wp-seo-term-scraper-400', + 'deps' => array( + self::PREFIX . 'replacevar-plugin', + ), + ), + array( + 'name' => 'replacevar-plugin', + 'src' => 'wp-seo-replacevar-plugin-380', + ), + array( + 'name' => 'shortcode-plugin', + 'src' => 'wp-seo-shortcode-plugin-350', + ), + array( + 'name' => 'recalculate', + 'src' => 'wp-seo-recalculate-400', + 'deps' => array( + 'jquery', + 'jquery-ui-core', + 'jquery-ui-progressbar', + ), + ), + array( + 'name' => 'primary-category', + 'src' => 'wp-seo-metabox-category-380', + 'deps' => array( + 'jquery', + 'wp-util', + ), + ), + array( + 'name' => 'select2', + 'src' => 'select2/select2', + 'suffix' => '.min', + 'deps' => array( + 'jquery', + ), + 'version' => '4.0.3', + ), + array( + 'name' => 'select2-translations', + 'src' => 'select2/i18n/' . $select2_language, + 'deps' => array( + 'jquery', + self::PREFIX . 'select2', + ), + 'version' => '4.0.3', + 'suffix' => '', + ), + array( + 'name' => 'configuration-wizard', + 'src' => 'configuration-wizard-400', + 'deps' => array( + 'jquery', + ), + ), + ); + } + + /** + * Returns the styles that need to be registered. + * + * @TODO data format is not self-documenting. Needs explanation inline. R. + * + * @return array styles that need to be registered. + */ + private function styles_to_be_registered() { + return array( + array( + 'name' => 'admin-css', + 'src' => 'yst_plugin_tools-400', + 'deps' => array( self::PREFIX . 'toggle-switch' ), + ), + array( + 'name' => 'toggle-switch', + 'src' => 'toggle-switch-390', + ), + array( + 'name' => 'dismissible', + 'src' => 'wpseo-dismissible-350', + ), + array( + 'name' => 'alerts', + 'src' => 'alerts-340', + ), + array( + 'name' => 'edit-page', + 'src' => 'edit-page-330', + ), + array( + 'name' => 'featured-image', + 'src' => 'featured-image-330', + ), + array( + 'name' => 'metabox-css', + 'src' => 'metabox-400', + 'deps' => array( + self::PREFIX . 'select2', + ), + ), + array( + 'name' => 'wp-dashboard', + 'src' => 'dashboard-360', + ), + array( + 'name' => 'scoring', + 'src' => 'yst_seo_score-390', + ), + array( + 'name' => 'snippet', + 'src' => 'snippet-330', + ), + array( + 'name' => 'adminbar', + 'src' => 'adminbar-340', + ), + array( + 'name' => 'primary-category', + 'src' => 'metabox-primary-category', + ), + array( + 'name' => 'select2', + 'src' => 'dist/select2/select2', + 'suffix' => '.min', + 'version' => '4.0.1', + 'rtl' => false, + ), + array( + 'name' => 'kb-search', + 'src' => 'kb-search-350', + ), + array( + 'name' => 'help-center', + 'src' => 'help-center-340', + ), + array( + 'name' => 'admin-global', + 'src' => 'admin-global-370', + ), + array( + 'name' => 'yoast-components', + 'src' => 'yoast-components-400', + ), + array( + 'name' => 'extensions', + 'src' => 'yoast-extensions-390', + ), + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php b/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php new file mode 100644 index 0000000..74550e4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php @@ -0,0 +1,91 @@ +id = $id; + $this->help_button_text = $help_button_text; + $this->help_content = $help_content; + $this->wrapper = $wrapper; + } + + /** + * Returns the html for the Help Button. + * + * @return string + */ + public function get_button_html() { + + if ( ! $this->id || ! $this->help_button_text || ! $this->help_content ) { + return ''; + } + + return sprintf( + ' ', + esc_attr( $this->id ), + $this->help_button_text + ); + } + + /** + * Returns the html for the Help Panel. + * + * @return string + */ + public function get_panel_html() { + + if ( ! $this->id || ! $this->help_button_text || ! $this->help_content ) { + return ''; + } + + $wrapper_start = $wrapper_end = ''; + + if ( 'has-wrapper' === $this->wrapper ) { + $wrapper_start = '
'; + $wrapper_end = '
'; + } + + return sprintf( + '%1$s

%3$s

%4$s', + $wrapper_start, + esc_attr( $this->id ), + $this->help_content, + $wrapper_end + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-init.php b/wp-content/plugins/wordpress-seo/admin/class-admin-init.php new file mode 100644 index 0000000..8946ca0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-admin-init.php @@ -0,0 +1,547 @@ +options = WPSEO_Options::get_option( 'wpseo_xml' ); + + $GLOBALS['wpseo_admin'] = new WPSEO_Admin; + + $this->pagenow = $GLOBALS['pagenow']; + + $this->asset_manager = new WPSEO_Admin_Asset_Manager(); + + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dismissible' ) ); + add_action( 'admin_init', array( $this, 'tagline_notice' ), 15 ); + add_action( 'admin_init', array( $this, 'blog_public_notice' ), 15 ); + add_action( 'admin_init', array( $this, 'permalink_notice' ), 15 ); + add_action( 'admin_init', array( $this, 'page_comments_notice' ), 15 ); + add_action( 'admin_init', array( $this, 'ga_compatibility_notice' ), 15 ); + add_action( 'admin_init', array( $this, 'yoast_plugin_compatibility_notification' ), 15 ); + add_action( 'admin_init', array( $this, 'recalculate_notice' ), 15 ); + add_action( 'admin_init', array( $this->asset_manager, 'register_assets' ) ); + add_action( 'admin_init', array( $this, 'show_hook_deprecation_warnings' ) ); + add_action( 'admin_init', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ) ); + + $this->load_meta_boxes(); + $this->load_taxonomy_class(); + $this->load_admin_page_class(); + $this->load_admin_user_class(); + $this->load_xml_sitemaps_admin(); + } + + /** + * Enqueue our styling for dismissible yoast notifications. + */ + public function enqueue_dismissible() { + $this->asset_manager->enqueue_style( 'dismissible' ); + } + + /** + * Helper to verify if the current user has already seen the about page for the current version + * + * @return bool + */ + private function seen_about() { + $seen_about_version = substr( get_user_meta( get_current_user_id(), 'wpseo_seen_about_version', true ), 0, 3 ); + $last_minor_version = substr( WPSEO_VERSION, 0, 3 ); + + return version_compare( $seen_about_version, $last_minor_version, '>=' ); + } + + /** + * Notify about the default tagline if the user hasn't changed it + */ + public function tagline_notice() { + + $current_url = ( is_ssl() ? 'https://' : 'http://' ); + $current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] ); + $customize_url = add_query_arg( array( + 'url' => urlencode( $current_url ), + ), wp_customize_url() ); + + $info_message = sprintf( + __( 'You still have the default WordPress tagline, even an empty one is probably better. %1$sYou can fix this in the customizer%2$s.', 'wordpress-seo' ), + '', + '' + ); + + $notification_options = array( + 'type' => Yoast_Notification::ERROR, + 'id' => 'wpseo-dismiss-tagline-notice', + 'capabilities' => 'manage_options', + ); + + $tagline_notification = new Yoast_Notification( $info_message, $notification_options ); + + $notification_center = Yoast_Notification_Center::get(); + if ( $this->has_default_tagline() ) { + $notification_center->add_notification( $tagline_notification ); + } + else { + $notification_center->remove_notification( $tagline_notification ); + } + } + + /** + * Add an alert if the blog is not publicly visible + */ + public function blog_public_notice() { + + $info_message = '' . __( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ) . ' '; + $info_message .= sprintf( + /* translators: %1$s resolves to the opening tag of the link to the reading settings, %1$s resolves to the closing tag for the link */ + __( 'You must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ), + '', + '' + ); + + $notification_options = array( + 'type' => Yoast_Notification::ERROR, + 'id' => 'wpseo-dismiss-blog-public-notice', + 'priority' => 1.0, + 'capabilities' => 'manage_options', + ); + + $notification = new Yoast_Notification( $info_message, $notification_options ); + + $notification_center = Yoast_Notification_Center::get(); + if ( ! $this->is_blog_public() ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Display notice to disable comment pagination + */ + public function page_comments_notice() { + + $info_message = __( 'Paging comments is enabled, this is not needed in 999 out of 1000 cases, we recommend to disable it.', 'wordpress-seo' ); + $info_message .= '
'; + + /* translators: %1$s resolves to the opening tag of the link to the comment setting page, %2$s resolves to the closing tag of the link */ + $info_message .= sprintf( + __( 'Simply uncheck the box before "Break comments into pages..." on the %1$sComment settings page%2$s.', 'wordpress-seo' ), + '', + '' + ); + + $notification_options = array( + 'type' => Yoast_Notification::WARNING, + 'id' => 'wpseo-dismiss-page_comments-notice', + 'capabilities' => 'manage_options', + ); + + $tagline_notification = new Yoast_Notification( $info_message, $notification_options ); + + $notification_center = Yoast_Notification_Center::get(); + if ( $this->has_page_comments() ) { + $notification_center->add_notification( $tagline_notification ); + } + else { + $notification_center->remove_notification( $tagline_notification ); + } + } + + /** + * Returns whether or not the site has the default tagline + * + * @return bool + */ + public function has_default_tagline() { + $blog_description = get_bloginfo( 'description' ); + $default_blog_description = 'Just another WordPress site'; + return __( $default_blog_description ) === $blog_description || $default_blog_description === $blog_description; + } + + /** + * Show alert when the permalink doesn't contain %postname% + */ + public function permalink_notice() { + + $info_message = __( 'You do not have your postname in the URL of your posts and pages, it is highly recommended that you do. Consider setting your permalink structure to /%postname%/.', 'wordpress-seo' ); + $info_message .= '
'; + $info_message .= sprintf( + /* translators: %1$s resolves to the starting tag of the link to the permalink settings page, %2$s resolves to the closing tag of the link */ + __( 'You can fix this on the %1$sPermalink settings page%2$s.', 'wordpress-seo' ), + '', + '' + ); + + $notification_options = array( + 'type' => Yoast_Notification::WARNING, + 'id' => 'wpseo-dismiss-permalink-notice', + 'capabilities' => 'manage_options', + 'priority' => 0.8, + ); + + $notification = new Yoast_Notification( $info_message, $notification_options ); + + $notification_center = Yoast_Notification_Center::get(); + if ( ! $this->has_postname_in_permalink() ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Are page comments enabled + * + * @return bool + */ + public function has_page_comments() { + return '1' === get_option( 'page_comments' ); + } + + /** + * Shows a notice to the user if they have Google Analytics for WordPress 5.4.3 installed because it causes an error + * on the google search console page. + */ + public function ga_compatibility_notice() { + + $notification = $this->get_compatibility_notification(); + $notification_center = Yoast_Notification_Center::get(); + + if ( defined( 'GAWP_VERSION' ) && '5.4.3' === GAWP_VERSION ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Build compatibility problem notification + * + * @return Yoast_Notification + */ + private function get_compatibility_notification() { + $info_message = sprintf( + /* translators: %1$s expands to Yoast SEO, %2$s expands to 5.4.3, %3$s expands to Google Analytics by Yoast */ + __( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ), + 'Yoast SEO', + '5.4.3', + 'Google Analytics by Yoast' + ); + + return new Yoast_Notification( + $info_message, + array( + 'id' => 'gawp-compatibility-notice', + 'type' => Yoast_Notification::ERROR, + ) + ); + } + + /** + * Add an alert if outdated versions of Yoast SEO plugins are running. + */ + public function yoast_plugin_compatibility_notification() { + $compatibility_checker = new WPSEO_Plugin_Compatibility( WPSEO_VERSION ); + $plugins = $compatibility_checker->get_installed_plugins_compatibility(); + + $notification_center = Yoast_Notification_Center::get(); + + foreach ( $plugins as $name => $plugin ) { + $type = ( $plugin['active'] ) ? Yoast_Notification::ERROR : Yoast_Notification::WARNING; + $notification = $this->get_yoast_seo_compatibility_notification( $name, $plugin, $type ); + + if ( $plugin['compatible'] === false ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + } + + /** + * Build Yoast SEO compatibility problem notification + * + * @param string $name The plugin name to use for the unique ID. + * @param array $plugin The plugin to retrieve the data from. + * @param string $level The severity level to use for the notification. + * + * @return Yoast_Notification + */ + private function get_yoast_seo_compatibility_notification( $name, $plugin, $level = Yoast_Notification::WARNING ) { + $info_message = sprintf( + /* translators: %1$s expands to Yoast SEO, %2$s expands to the plugin version, %3$s expands to the plugin name */ + __( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ), + 'Yoast SEO', + $plugin['version'], + $plugin['title'] + ); + + return new Yoast_Notification( + $info_message, + array( + 'id' => 'wpseo-outdated-yoast-seo-plugin-' . $name, + 'type' => $level, + ) + ); + } + + /** + * Shows the notice for recalculating the post. the Notice will only be shown if the user hasn't dismissed it before. + */ + public function recalculate_notice() { + // Just a return, because we want to temporary disable this notice (#3998 and #4532). + return; + + if ( filter_input( INPUT_GET, 'recalculate' ) === '1' ) { + update_option( 'wpseo_dismiss_recalculate', '1' ); + return; + } + + $can_access = is_multisite() ? WPSEO_Utils::grant_access() : current_user_can( 'manage_options' ); + if ( $can_access && ! $this->is_site_notice_dismissed( 'wpseo_dismiss_recalculate' ) ) { + Yoast_Notification_Center::get()->add_notification( + new Yoast_Notification( + /* translators: 1: is a link to 'admin_url / admin.php?page=wpseo_tools&recalculate=1' 2: closing link tag */ + sprintf( + __( 'We\'ve updated our SEO score algorithm. %1$sRecalculate the SEO scores%2$s for all posts and pages.', 'wordpress-seo' ), + '', + '' + ), + array( + 'type' => 'updated yoast-dismissible', + 'id' => 'wpseo-dismiss-recalculate', + 'nonce' => wp_create_nonce( 'wpseo-dismiss-recalculate' ), + ) + ) + ); + } + } + + /** + * Check if the user has dismissed the given notice (by $notice_name) + * + * @param string $notice_name The name of the notice that might be dismissed. + * + * @return bool + */ + private function is_site_notice_dismissed( $notice_name ) { + return '1' === get_option( $notice_name, true ); + } + + /** + * Helper to verify if the user is currently visiting one of our admin pages. + * + * @return bool + */ + private function on_wpseo_admin_page() { + return 'admin.php' === $this->pagenow && strpos( filter_input( INPUT_GET, 'page' ), 'wpseo' ) === 0; + } + + /** + * Determine whether we should load the meta box class and if so, load it. + */ + private function load_meta_boxes() { + + $is_editor = WPSEO_Metabox::is_post_overview( $this->pagenow ) || WPSEO_Metabox::is_post_edit( $this->pagenow ); + $is_inline_save = filter_input( INPUT_POST, 'action' ) === 'inline-save'; + + /** + * Filter: 'wpseo_always_register_metaboxes_on_admin' - Allow developers to change whether + * the WPSEO metaboxes are only registered on the typical pages (lean loading) or always + * registered when in admin. + * + * @api bool Whether to always register the metaboxes or not. Defaults to false. + */ + if ( $is_editor || $is_inline_save || apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) + ) { + $GLOBALS['wpseo_metabox'] = new WPSEO_Metabox; + $GLOBALS['wpseo_meta_columns'] = new WPSEO_Meta_Columns(); + } + } + + /** + * Determine if we should load our taxonomy edit class and if so, load it. + */ + private function load_taxonomy_class() { + if ( + WPSEO_Taxonomy::is_term_edit( $this->pagenow ) + || WPSEO_Taxonomy::is_term_overview( $this->pagenow ) + ) { + new WPSEO_Taxonomy; + } + } + + /** + * Determine if we should load our admin pages class and if so, load it. + * + * Loads admin page class for all admin pages starting with `wpseo_`. + */ + private function load_admin_user_class() { + if ( in_array( $this->pagenow, array( 'user-edit.php', 'profile.php' ) ) && current_user_can( 'edit_users' ) ) { + new WPSEO_Admin_User_Profile; + } + } + + /** + * Determine if we should load our admin pages class and if so, load it. + * + * Loads admin page class for all admin pages starting with `wpseo_`. + */ + private function load_admin_page_class() { + + if ( $this->on_wpseo_admin_page() ) { + // For backwards compatabilty, this still needs a global, for now... + $GLOBALS['wpseo_admin_pages'] = new WPSEO_Admin_Pages; + + // Only register the yoast i18n when the page is a Yoast SEO page. + if ( WPSEO_Utils::is_yoast_seo_free_page( filter_input( INPUT_GET, 'page' ) ) ) { + $this->register_i18n_promo_class(); + } + } + } + + /** + * Register the promotion class for our GlotPress instance + * + * @link https://github.com/Yoast/i18n-module + */ + private function register_i18n_promo_class() { + new yoast_i18n( + array( + 'textdomain' => 'wordpress-seo', + 'project_slug' => 'wordpress-seo', + 'plugin_name' => 'Yoast SEO', + 'hook' => 'wpseo_admin_promo_footer', + 'glotpress_url' => 'http://translate.yoast.com/gp/', + 'glotpress_name' => 'Yoast Translate', + 'glotpress_logo' => 'https://translate.yoast.com/gp-templates/images/Yoast_Translate.svg', + 'register_url' => 'https://translate.yoast.com/gp/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=wpseo-i18n-promo', + ) + ); + } + + /** + * See if we should start our XML Sitemaps Admin class + */ + private function load_xml_sitemaps_admin() { + if ( $this->options['enablexmlsitemap'] === true ) { + new WPSEO_Sitemaps_Admin; + } + } + + /** + * Check if the site is set to be publicly visible + * + * @return bool + */ + private function is_blog_public() { + return '1' == get_option( 'blog_public' ); + } + + /** + * Shows deprecation warnings to the user if a plugin has registered a filter we have deprecated. + */ + public function show_hook_deprecation_warnings() { + global $wp_filter; + + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + return false; + } + + // WordPress hooks that have been deprecated in Yoast SEO 3.0. + $deprecated_30 = array( + 'wpseo_pre_analysis_post_content', + 'wpseo_metadesc_length', + 'wpseo_metadesc_length_reason', + 'wpseo_body_length_score', + 'wpseo_linkdex_results', + 'wpseo_snippet', + ); + + $deprecated_notices = array_intersect( + $deprecated_30, + array_keys( $wp_filter ) + ); + + foreach ( $deprecated_notices as $deprecated_filter ) { + _deprecated_function( + /* %s expands to the actual filter/action that has been used. */ + sprintf( __( '%s filter/action', 'wordpress-seo' ), $deprecated_filter ), + 'WPSEO 3.0', + 'javascript' + ); + } + } + + /** + * Check if there is a dismiss notice action. + * + * @param string $notice_name The name of the notice to dismiss. + * + * @return bool + */ + private function dismiss_notice( $notice_name ) { + return filter_input( INPUT_GET, $notice_name ) === '1' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), $notice_name ); + } + + /** + * Returns whether or not the user has seen the tagline notice + * + * @deprecated 3.3 + * + * @return bool + */ + public function seen_tagline_notice() { + return false; + } + + /** + * Check if the permalink uses %postname% + * + * @return bool + */ + private function has_postname_in_permalink() { + return ( false !== strpos( get_option( 'permalink_structure' ), '%postname%' ) ); + } + + /** + * Redirect first time or just upgraded users to the about screen. + * + * @deprecated 3.5 + */ + public function after_update_notice() { + _deprecated_function( 'WPSEO_Admin_Init::after_update_notice', 'WPSEO 3.5' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php b/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php new file mode 100644 index 0000000..c547535 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php @@ -0,0 +1,89 @@ +filter_input_post( 'wpseo_nonce' ); + + if ( empty( $nonce_value ) ) { // Submit from alternate forms. + return; + } + + check_admin_referer( 'wpseo_user_profile_update', 'wpseo_nonce' ); + + update_user_meta( $user_id, 'wpseo_title', $this->filter_input_post( 'wpseo_author_title' ) ); + update_user_meta( $user_id, 'wpseo_metadesc', $this->filter_input_post( 'wpseo_author_metadesc' ) ); + update_user_meta( $user_id, 'wpseo_metakey', $this->filter_input_post( 'wpseo_author_metakey' ) ); + update_user_meta( $user_id, 'wpseo_excludeauthorsitemap', $this->filter_input_post( 'wpseo_author_exclude' ) ); + update_user_meta( $user_id, 'wpseo_content_analysis_disable', $this->filter_input_post( 'wpseo_content_analysis_disable' ) ); + update_user_meta( $user_id, 'wpseo_keyword_analysis_disable', $this->filter_input_post( 'wpseo_keyword_analysis_disable' ) ); + } + + /** + * Add the inputs needed for SEO values to the User Profile page + * + * @param WP_User $user User instance to output for. + */ + public function user_profile( $user ) { + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + + wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' ); + + require_once( 'views/user-profile.php' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin.php b/wp-content/plugins/wordpress-seo/admin/class-admin.php new file mode 100644 index 0000000..3a0110b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-admin.php @@ -0,0 +1,809 @@ +options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_permalinks' ) ); + + if ( is_multisite() ) { + WPSEO_Options::maybe_set_multisite_defaults( false ); + } + + if ( $this->options['stripcategorybase'] === true ) { + add_action( 'created_category', array( $this, 'schedule_rewrite_flush' ) ); + add_action( 'edited_category', array( $this, 'schedule_rewrite_flush' ) ); + add_action( 'delete_category', array( $this, 'schedule_rewrite_flush' ) ); + } + + $this->admin_features = array( + // Google Search Console. + 'google_search_console' => new WPSEO_GSC(), + 'dashboard_widget' => new Yoast_Dashboard_Widget(), + ); + + if ( WPSEO_Metabox::is_post_overview( $pagenow ) || WPSEO_Metabox::is_post_edit( $pagenow ) ) { + $this->admin_features['primary_category'] = new WPSEO_Primary_Term_Admin(); + } + + if ( filter_input( INPUT_GET, 'page' ) === 'wpseo_tools' && filter_input( INPUT_GET, 'tool' ) === null ) { + new WPSEO_Recalculate_Scores(); + } + + // Needs the lower than default priority so other plugins can hook underneath it without issue. + add_action( 'admin_menu', array( $this, 'register_settings_page' ), 5 ); + add_action( 'network_admin_menu', array( $this, 'register_network_settings_page' ) ); + + add_filter( 'plugin_action_links_' . WPSEO_BASENAME, array( $this, 'add_action_link' ), 10, 2 ); + + add_action( 'admin_enqueue_scripts', array( $this, 'config_page_scripts' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_global_style' ) ); + + if ( $this->options['cleanslugs'] === true ) { + add_filter( 'name_save_pre', array( $this, 'remove_stopwords_from_slug' ), 0 ); + } + + add_filter( 'user_contactmethods', array( $this, 'update_contactmethods' ), 10, 1 ); + + add_action( 'after_switch_theme', array( $this, 'switch_theme' ) ); + add_action( 'switch_theme', array( $this, 'switch_theme' ) ); + + add_filter( 'set-screen-option', array( $this, 'save_bulk_edit_options' ), 10, 3 ); + + add_action( 'admin_init', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ), 10, 1 ); + add_action( 'admin_init', array( $this, 'import_plugin_hooks' ) ); + + add_filter( 'wpseo_submenu_pages', array( $this, 'filter_settings_pages' ) ); + + WPSEO_Sitemaps_Cache::register_clear_on_option_update( 'wpseo' ); + + if ( WPSEO_Utils::is_yoast_seo_page() ) { + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); + } + + if ( WPSEO_Utils::is_api_available() ) { + $configuration = new WPSEO_Configuration_Page; + $configuration->catch_configuration_request(); + } + + $this->set_upsell_notice(); + } + + /** + * Setting the hooks for importing data from other plugins + */ + public function import_plugin_hooks() { + if ( current_user_can( $this->get_manage_options_cap() ) ) { + $plugin_imports = array( + 'wpSEO' => new WPSEO_Import_WPSEO_Hooks(), + 'aioseo' => new WPSEO_Import_AIOSEO_Hooks(), + ); + } + } + + /** + * Schedules a rewrite flush to happen at shutdown + */ + function schedule_rewrite_flush() { + add_action( 'shutdown', 'flush_rewrite_rules' ); + } + + /** + * Returns all the classes for the admin features + * + * @return array + */ + public function get_admin_features() { + return $this->admin_features; + } + + /** + * Register the menu item and its sub menu's. + * + * @global array $submenu used to change the label on the first item. + */ + function register_settings_page() { + if ( WPSEO_Utils::grant_access() !== true ) { + return; + } + + global $admin_page_hooks; + + // Base 64 encoded SVG image. + $icon_svg = WPSEO_Utils::get_icon_svg(); + + $manage_options_cap = $this->get_manage_options_cap(); + + $notification_center = Yoast_Notification_Center::get(); + $notification_count = $notification_center->get_notification_count(); + + // Add main page. + /* translators: %s: number of notifications */ + $counter_screen_reader_text = sprintf( _n( '%s notification', '%s notifications', $notification_count, 'wordpress-seo' ), number_format_i18n( $notification_count ) ); + $counter = sprintf( '%2$s', $notification_count, $counter_screen_reader_text ); + + $admin_page = add_menu_page( 'Yoast SEO: ' . __( 'Dashboard', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ) . ' ' . $counter, $manage_options_cap, self::PAGE_IDENTIFIER, array( + $this, + 'load_page', + ), $icon_svg, '99.31337' ); + + $admin_page_hooks[ self::PAGE_IDENTIFIER ] = 'seo'; // Wipe notification bits from hooks. R. + + // Sub menu pages. + $submenu_pages = array( + array( + self::PAGE_IDENTIFIER, + '', + __( 'General', 'wordpress-seo' ), + $manage_options_cap, + self::PAGE_IDENTIFIER, + array( $this, 'load_page' ), + null, + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Titles & Metas', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_titles', + array( $this, 'load_page' ), + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Social', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_social', + array( $this, 'load_page' ), + null, + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'XML Sitemaps', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_xml', + array( $this, 'load_page' ), + null, + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Advanced', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_advanced', + array( $this, 'load_page' ), + null, + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Tools', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_tools', + array( $this, 'load_page' ), + null, + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Search Console', 'wordpress-seo' ), + $manage_options_cap, + 'wpseo_search_console', + array( $this->admin_features['google_search_console'], 'display' ), + array( array( $this->admin_features['google_search_console'], 'set_help' ) ), + ), + array( + self::PAGE_IDENTIFIER, + '', + __( 'Go Premium', 'wordpress-seo' ) . ' ' . $this->get_premium_indicator(), + $manage_options_cap, + 'wpseo_licenses', + array( $this, 'load_page' ), + null, + ), + ); + + // Allow submenu pages manipulation. + $submenu_pages = apply_filters( 'wpseo_submenu_pages', $submenu_pages ); + + // Loop through submenu pages and add them. + if ( count( $submenu_pages ) ) { + foreach ( $submenu_pages as $submenu_page ) { + + $page_title = $submenu_page[2] . ' - Yoast SEO'; + + // We cannot use $submenu_page[1] because add-ons define that, so hard-code this value. + if ( 'wpseo_licenses' === $submenu_page[4] ) { + $page_title = __( 'Premium', 'wordpress-seo' ) . ' - Yoast SEO'; + } + + // Add submenu page. + $admin_page = add_submenu_page( $submenu_page[0], $page_title, $submenu_page[2], $submenu_page[3], $submenu_page[4], $submenu_page[5] ); + + // Check if we need to hook. + if ( isset( $submenu_page[6] ) && ( is_array( $submenu_page[6] ) && $submenu_page[6] !== array() ) ) { + foreach ( $submenu_page[6] as $submenu_page_action ) { + add_action( 'load-' . $admin_page, $submenu_page_action ); + } + } + } + } + + global $submenu; + if ( isset( $submenu[ self::PAGE_IDENTIFIER ] ) && current_user_can( $manage_options_cap ) ) { + $submenu[ self::PAGE_IDENTIFIER ][0][0] = __( 'Dashboard', 'wordpress-seo' ); + } + } + + /** + * Register assets needed on admin pages + */ + public function enqueue_assets() { + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'help-center' ); + + if ( 'wpseo_licenses' === filter_input( INPUT_GET, 'page' ) ) { + $asset_manager->enqueue_style( 'extensions' ); + } + } + + /** + * Returns the manage_options cap + * + * @return mixed|void + */ + private function get_manage_options_cap() { + /** + * Filter: 'wpseo_manage_options_capability' - Allow changing the capability users need to view the settings pages + * + * @api string unsigned The capability + */ + $manage_options_cap = apply_filters( 'wpseo_manage_options_capability', 'manage_options' ); + + return $manage_options_cap; + } + + /** + * Adds contextual help to the titles & metas page. + */ + function title_metas_help_tab() { + $screen = get_current_screen(); + + $screen->set_help_sidebar( ' +

' . __( 'For more information:', 'wordpress-seo' ) . '

+

' . __( 'Title optimization', 'wordpress-seo' ) . '

+

' . __( 'Why Google won\'t display the right page title', 'wordpress-seo' ) . '

' + ); + + $screen->add_help_tab( + array( + 'id' => 'basic-help', + 'title' => __( 'Template explanation', 'wordpress-seo' ), + /* translators: %1$s expands to Yoast SEO */ + 'content' => '

' . sprintf( __( 'The title & metas settings for %1$s are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo' ), 'Yoast SEO' ) . '

' . '

' . __( 'Note that not all variables can be used in every template.', 'wordpress-seo' ) . '

', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'title-vars', + 'title' => __( 'Basic Variables', 'wordpress-seo' ), + 'content' => "\n\t\t

" . __( 'Basic Variables', 'wordpress-seo' ) . "

\n\t\t" . WPSEO_Replace_Vars::get_basic_help_texts(), + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'title-vars-advanced', + 'title' => __( 'Advanced Variables', 'wordpress-seo' ), + 'content' => "\n\t\t

" . __( 'Advanced Variables', 'wordpress-seo' ) . "

\n\t\t" . WPSEO_Replace_Vars::get_advanced_help_texts(), + ) + ); + } + + /** + * Register the settings page for the Network settings. + */ + function register_network_settings_page() { + if ( WPSEO_Utils::grant_access() ) { + // Base 64 encoded SVG image. + $icon_svg = WPSEO_Utils::get_icon_svg(); + + add_menu_page( 'Yoast SEO: ' . __( 'MultiSite Settings', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'delete_users', self::PAGE_IDENTIFIER, array( + $this, + 'network_config_page', + ), $icon_svg ); + + if ( WPSEO_Utils::allow_system_file_edit() === true ) { + add_submenu_page( self::PAGE_IDENTIFIER, 'Yoast SEO: ' . __( 'Edit Files', 'wordpress-seo' ), __( 'Edit Files', 'wordpress-seo' ), 'delete_users', 'wpseo_files', array( + $this, + 'load_page', + ) ); + } + + // Add Extension submenu page. + add_submenu_page( self::PAGE_IDENTIFIER, 'Yoast SEO: ' . __( 'Extensions', 'wordpress-seo' ), __( 'Extensions', 'wordpress-seo' ), 'delete_users', 'wpseo_licenses', array( + $this, + 'load_page', + ) ); + } + } + + + /** + * Load the form for a WPSEO admin page + */ + function load_page() { + $page = filter_input( INPUT_GET, 'page' ); + + switch ( $page ) { + case 'wpseo_advanced': + require_once( WPSEO_PATH . 'admin/pages/advanced.php' ); + break; + + case 'wpseo_tools': + require_once( WPSEO_PATH . 'admin/pages/tools.php' ); + break; + + case 'wpseo_titles': + require_once( WPSEO_PATH . 'admin/pages/metas.php' ); + break; + + case 'wpseo_social': + require_once( WPSEO_PATH . 'admin/pages/social.php' ); + break; + + case 'wpseo_xml': + require_once( WPSEO_PATH . 'admin/pages/xml-sitemaps.php' ); + break; + + case 'wpseo_licenses': + require_once( WPSEO_PATH . 'admin/pages/licenses.php' ); + break; + + case 'wpseo_files': + require_once( WPSEO_PATH . 'admin/views/tool-file-editor.php' ); + break; + + case 'wpseo_tutorial_videos': + require_once( WPSEO_PATH . 'admin/pages/tutorial-videos.php' ); + break; + + case 'wpseo_configurator': + require_once( WPSEO_PATH . 'admin/config-ui/class-configuration-page.php' ); + break; + + case self::PAGE_IDENTIFIER: + default: + require_once( WPSEO_PATH . 'admin/pages/dashboard.php' ); + break; + } + } + + /** + * Loads the form for the network configuration page. + */ + function network_config_page() { + require_once( WPSEO_PATH . 'admin/pages/network.php' ); + } + + + /** + * Adds the ability to choose how many posts are displayed per page + * on the bulk edit pages. + */ + function bulk_edit_options() { + $option = 'per_page'; + $args = array( + 'label' => __( 'Posts', 'wordpress-seo' ), + 'default' => 10, + 'option' => 'wpseo_posts_per_page', + ); + add_screen_option( $option, $args ); + } + + /** + * Saves the posts per page limit for bulk edit pages. + * + * @param int $status Status value to pass through. + * @param string $option Option name. + * @param int $value Count value to check. + * + * @return int + */ + function save_bulk_edit_options( $status, $option, $value ) { + if ( 'wpseo_posts_per_page' === $option && ( $value > 0 && $value < 1000 ) ) { + return $value; + } + + return $status; + } + + /** + * Add a link to the settings page to the plugins list + * + * @staticvar string $this_plugin holds the directory & filename for the plugin + * + * @param array $links array of links for the plugins, adapted when the current plugin is found. + * @param string $file the filename for the current plugin, which the filter loops through. + * + * @return array $links + */ + function add_action_link( $links, $file ) { + if ( WPSEO_BASENAME === $file && WPSEO_Utils::grant_access() ) { + $settings_link = '' . __( 'Settings', 'wordpress-seo' ) . ''; + array_unshift( $links, $settings_link ); + } + + if ( class_exists( 'WPSEO_Product_Premium' ) ) { + $license_manager = new Yoast_Plugin_License_Manager( new WPSEO_Product_Premium() ); + if ( $license_manager->license_is_valid() ) { + return $links; + } + } + + // Add link to premium support landing page. + $premium_link = '' . __( 'Premium Support', 'wordpress-seo' ) . ''; + array_unshift( $links, $premium_link ); + + // Add link to docs. + $faq_link = '' . __( 'FAQ', 'wordpress-seo' ) . ''; + array_unshift( $links, $faq_link ); + + return $links; + } + + /** + * Enqueues the (tiny) global JS needed for the plugin. + */ + function config_page_scripts() { + if ( WPSEO_Utils::grant_access() ) { + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_script( 'admin-global-script' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'wpseoAdminGlobalL10n', $this->localize_admin_global_script() ); + } + } + + /** + * Enqueues the (tiny) global stylesheet needed for the plugin. + */ + public function enqueue_global_style() { + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'admin-global' ); + } + + /** + * Filter the $contactmethods array and add Facebook, Google+ and Twitter. + * + * These are used with the Facebook author, rel="author" and Twitter cards implementation. + * + * @param array $contactmethods currently set contactmethods. + * + * @return array $contactmethods with added contactmethods. + */ + public function update_contactmethods( $contactmethods ) { + // Add Google+. + $contactmethods['googleplus'] = __( 'Google+', 'wordpress-seo' ); + // Add Twitter. + $contactmethods['twitter'] = __( 'Twitter username (without @)', 'wordpress-seo' ); + // Add Facebook. + $contactmethods['facebook'] = __( 'Facebook profile URL', 'wordpress-seo' ); + + return $contactmethods; + } + + /** + * Cleans stopwords out of the slug, if the slug hasn't been set yet. + * + * @since 1.1.7 + * + * @param string $slug if this isn't empty, the function will return an unaltered slug. + * + * @return string $clean_slug cleaned slug + */ + function remove_stopwords_from_slug( $slug ) { + return $this->filter_stopwords_from_slug( $slug, filter_input( INPUT_POST, 'post_title' ) ); + } + + /** + * Filter the stopwords from the slug + * + * @param string $slug The current slug, if not empty there will be done nothing. + * @param string $post_title The title which will be used in case of an empty slug. + * + * @return string + */ + public function filter_stopwords_from_slug( $slug, $post_title ) { + // Don't change an existing slug. + if ( isset( $slug ) && $slug !== '' ) { + return $slug; + } + + // When the post title is empty, just return the slug. + if ( empty( $post_title ) ) { + return $slug; + } + + // Don't change the slug if this is a multisite installation and the site has been switched. + if ( is_multisite() && ms_is_switched() ) { + return $slug; + } + + // Don't change slug if the post is a draft, this conflicts with polylang. + // Doesn't work with filter_input() since need current value, not originally submitted one. + if ( 'draft' === $_POST['post_status'] ) { + return $slug; + } + + // Lowercase the slug and strip slashes. + $new_slug = sanitize_title( stripslashes( $post_title ) ); + + $stop_words = new WPSEO_Admin_Stop_Words(); + return $stop_words->remove_in( $new_slug ); + } + + /** + * Filters all advanced settings pages from the given pages. + * + * @param array $pages The pages to filter. + * + * @return array + */ + public function filter_settings_pages( array $pages ) { + + if ( wpseo_advanced_settings_enabled( $this->options ) ) { + return $pages; + } + + $pages_to_hide = array( 'wpseo_titles', 'wpseo_social', 'wpseo_xml', 'wpseo_advanced', 'wpseo_tools' ); + + foreach ( $pages as $page_key => $page ) { + $page_name = $page[4]; + + if ( in_array( $page_name, $pages_to_hide ) ) { + unset( $pages[ $page_key ] ); + } + } + + return $pages; + } + + /** + * Returns the stopwords for the current language + * + * @since 1.1.7 + * @deprecated 3.1 Use WPSEO_Admin_Stop_Words::list_stop_words() instead. + * + * @return array $stopwords array of stop words to check and / or remove from slug + */ + function stopwords() { + $stop_words = new WPSEO_Admin_Stop_Words(); + return $stop_words->list_stop_words(); + } + + + /** + * Check whether the stopword appears in the string + * + * @deprecated 3.1 + * + * @param string $haystack The string to be checked for the stopword. + * @param bool $checkingUrl Whether or not we're checking a URL. + * + * @return bool|mixed + */ + function stopwords_check( $haystack, $checkingUrl = false ) { + $stopWords = $this->stopwords(); + + if ( is_array( $stopWords ) && $stopWords !== array() ) { + foreach ( $stopWords as $stopWord ) { + // If checking a URL remove the single quotes. + if ( $checkingUrl ) { + $stopWord = str_replace( "'", '', $stopWord ); + } + + // Check whether the stopword appears as a whole word. + // @todo [JRF => whomever] check whether the use of \b (=word boundary) would be more efficient ;-). + $res = preg_match( "`(^|[ \n\r\t\.,'\(\)\"\+;!?:])" . preg_quote( $stopWord, '`' ) . "($|[ \n\r\t\.,'\(\)\"\+;!?:])`iu", $haystack ); + if ( $res > 0 ) { + return $stopWord; + } + } + } + + return false; + } + + /** + * Log the updated timestamp for user profiles when theme is changed + */ + function switch_theme() { + $users = get_users( array( 'who' => 'authors' ) ); + if ( is_array( $users ) && $users !== array() ) { + foreach ( $users as $user ) { + update_user_meta( $user->ID, '_yoast_wpseo_profile_updated', time() ); + } + } + } + + /** + * Localization for the dismiss urls. + * + * @return array + */ + private function localize_admin_global_script() { + return array( + 'dismiss_about_url' => $this->get_dismiss_url( 'wpseo-dismiss-about' ), + 'dismiss_tagline_url' => $this->get_dismiss_url( 'wpseo-dismiss-tagline-notice' ), + 'help_video_iframe_title' => __( 'Yoast SEO video tutorial', 'wordpress-seo' ), + ); + } + + /** + * Extending the current page URL with two params to be able to ignore the notice. + * + * @param string $dismiss_param The param used to dismiss the notification. + * + * @return string + */ + private function get_dismiss_url( $dismiss_param ) { + $arr_params = array( + $dismiss_param => '1', + 'nonce' => wp_create_nonce( $dismiss_param ), + ); + + return esc_url( add_query_arg( $arr_params ) ); + } + + /** + * @return string + */ + private function get_premium_indicator() { + /** + * The class that will be applied to the premium indicator. + * + * @type array Classes that will be applied tot the premium indicator. + */ + $classes = apply_filters( 'wpseo_premium_indicator_classes', array( + 'wpseo-premium-indicator', + 'wpseo-premium-indicator--no', + 'wpseo-js-premium-indicator', + 'update-plugins', + ) ); + + /** + * The text to put inside the premium indicator. + * + * @type string The text to read to screen readers. + */ + $text = apply_filters( 'wpseo_premium_indicator_text', __( 'Disabled', 'wordpress-seo' ) ); + + $premium_indicator = sprintf( + "%s", + esc_attr( implode( ' ', $classes ) ), + esc_html( $text ) + ); + + return $premium_indicator; + } + + /** + * Sets the upsell notice. + */ + protected function set_upsell_notice() { + $upsell = new WPSEO_Product_Upsell_Notice(); + $upsell->dismiss_notice_listener(); + $upsell->initialize(); + } + + /********************** DEPRECATED METHODS **********************/ + + /** + * Check whether the current user is allowed to access the configuration. + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Utils::grant_access() + * @see WPSEO_Utils::grant_access() + * + * @return boolean + */ + function grant_access() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Utils::grant_access()' ); + + return WPSEO_Utils::grant_access(); + } + + /** + * Check whether the current user is allowed to access the configuration. + * + * @deprecated 1.5.0 + * @deprecated use wpseo_do_upgrade() + * @see WPSEO_Upgrade + */ + function maybe_upgrade() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'wpseo_do_upgrade' ); + new WPSEO_Upgrade(); + } + + /** + * Clears the cache + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Utils::clear_cache() + * @see WPSEO_Utils::clear_cache() + */ + function clear_cache() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Utils::clear_cache()' ); + WPSEO_Utils::clear_cache(); + } + + /** + * Clear rewrites + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Utils::clear_rewrites() + * @see WPSEO_Utils::clear_rewrites() + */ + function clear_rewrites() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Utils::clear_rewrites()' ); + WPSEO_Utils::clear_rewrites(); + } + + /** + * Register all the options needed for the configuration pages. + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Option::register_setting() on each individual option + * @see WPSEO_Option::register_setting() + */ + function options_init() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Option::register_setting()' ); + } + + /** + * Display an error message when the blog is set to private. + * + * @deprecated 3.3 + */ + function blog_public_warning() { + return; + } + + /** + * Display an error message when the theme contains a meta description tag. + * + * @since 1.4.14 + * + * @deprecated 3.3 + */ + function meta_description_warning() { + _deprecated_function( __FUNCTION__, 'WPSEO 3.3.0' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-asset.php b/wp-content/plugins/wordpress-seo/admin/class-asset.php new file mode 100644 index 0000000..3721a05 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-asset.php @@ -0,0 +1,223 @@ + array(), + 'version' => WPSEO_VERSION, + 'in_footer' => true, + 'rtl' => true, + 'media' => 'all', + 'suffix' => WPSEO_CSSJS_SUFFIX, + ), $args ); + + $this->name = $args['name']; + $this->src = $args['src']; + $this->deps = $args['deps']; + $this->version = $args['version']; + $this->media = $args['media']; + $this->in_footer = $args['in_footer']; + $this->rtl = $args['rtl']; + $this->suffix = $args['suffix']; + } + + /** + * @return string + */ + public function get_name() { + return $this->name; + } + + /** + * @return string + */ + public function get_src() { + return $this->src; + } + + /** + * @return array|string + */ + public function get_deps() { + return $this->deps; + } + + /** + * @return string + */ + public function get_version() { + return $this->version; + } + + /** + * @return string + */ + public function get_media() { + return $this->media; + } + + /** + * @return boolean + */ + public function is_in_footer() { + return $this->in_footer; + } + + /** + * @return boolean + */ + public function has_rtl() { + return $this->rtl; + } + + /** + * @return string + */ + public function get_suffix() { + return $this->suffix; + } + + /** + * Returns the full URL for this asset based on the path to the plugin file. + * + * @param string $type Type of asset. + * @param string $plugin_file Absolute path to the plugin file. + * + * @return string The full URL to the asset. + */ + public function get_url( $type, $plugin_file ) { + + $relative_path = $this->get_relative_path( $type ); + if ( empty( $relative_path ) ) { + return ''; + } + + if ( 'development' !== YOAST_ENVIRONMENT && ! $this->get_suffix() ) { + $plugin_path = plugin_dir_path( $plugin_file ); + if ( ! file_exists( $plugin_path . $relative_path ) ) { + + // Give a notice to the user in the console (only once). + WPSEO_Utils::javascript_console_notification( + 'Development Files', + sprintf( + /* translators: %1$s resolves to https://github.com/Yoast/wordpress-seo */ + __( 'You are trying to load non-minified files, these are only available in our development package. Check out %1$s to see all the source files.', 'wordpress-seo' ), + 'https://github.com/Yoast/wordpress-seo' + ), + true + ); + + // Just load the .min file. + $relative_path = $this->get_relative_path( $type, '.min' ); + } + } + + return plugins_url( $relative_path, $plugin_file ); + } + + /** + * Get the relative file for this asset + * + * @param string $type Type of this asset. + * @param null $force_suffix Force use suffix. + * + * @return string + */ + protected function get_relative_path( $type, $force_suffix = null ) { + $relative_path = $rtl_path = $rtl_suffix = ''; + + $suffix = ( is_null( $force_suffix ) ) ? $this->get_suffix() : $force_suffix; + + switch ( $type ) { + case self::TYPE_JS: + $relative_path = 'js/dist/' . $this->get_src() . $suffix . '.js'; + break; + + case self::TYPE_CSS: + // Path and suffix for RTL stylesheets. + if ( function_exists( 'is_rtl' ) && is_rtl() && $this->has_rtl() ) { + $rtl_path = 'dist/'; + $rtl_suffix = '-rtl'; + } + $relative_path = 'css/' . $rtl_path . $this->get_src() . $rtl_suffix . $suffix . '.css'; + break; + } + + return $relative_path; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php new file mode 100644 index 0000000..2b2c647 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php @@ -0,0 +1,76 @@ + 'wpseo_bulk_description', + 'plural' => 'wpseo_bulk_descriptions', + 'ajax' => true, + ); + + /** + * The field in the database where meta field is saved. + * + * @var string + */ + protected $target_db_field = 'metadesc'; + + /** + * The columns shown on the table + * + * @return array + */ + public function get_columns() { + $columns = array( + 'col_existing_yoast_seo_metadesc' => __( 'Existing Yoast Meta Description', 'wordpress-seo' ), + 'col_new_yoast_seo_metadesc' => __( 'New Yoast Meta Description', 'wordpress-seo' ), + ); + + return $this->merge_columns( $columns ); + } + + /** + * Parse the metadescription + * + * @param string $column_name Column name. + * @param object $record Data object. + * @param string $attributes HTML attributes. + * + * @return string + */ + protected function parse_page_specific_column( $column_name, $record, $attributes ) { + switch ( $column_name ) { + case 'col_new_yoast_seo_metadesc': + return sprintf( + '', + 'wpseo-new-metadesc-' . $record->ID, + $record->ID + ); + break; + + case 'col_existing_yoast_seo_metadesc': + // TODO inconsistent return/echo behavior R. + echo $this->parse_meta_data_field( $record->ID, $attributes ); + break; + } + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php new file mode 100644 index 0000000..b6751ec --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php @@ -0,0 +1,973 @@ +page_type) there will be constructed an url part, for subpages and + * navigation + * + * @var string + */ + protected $page_url; + + /** + * The settings which will be used in the __construct. + * + * @var array + */ + protected $settings; + + /** + * @var array + */ + protected $pagination = array(); + + /** + * Class constructor + */ + function __construct() { + parent::__construct( $this->settings ); + + $this->request_url = $_SERVER['REQUEST_URI']; + $this->current_page = ( ! empty( $_GET['paged'] ) ) ? $_GET['paged'] : 1; + $this->current_filter = ( ! empty( $_GET['post_type_filter'] ) ) ? $_GET['post_type_filter'] : 1; + $this->current_status = ( ! empty( $_GET['post_status'] ) ) ? $_GET['post_status'] : 1; + $this->current_order = array( + 'order' => ( ! empty( $_GET['order'] ) ) ? $_GET['order'] : 'asc', + 'orderby' => ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'post_title', + ); + + $this->verify_nonce(); + + $this->nonce = wp_create_nonce( 'bulk-editor-table' ); + $this->page_url = "&nonce={$this->nonce}&type={$this->page_type}#top#{$this->page_type}"; + + $this->populate_editable_post_types(); + + } + + /** + * Verifies nonce if additional parameters have been sent. + * + * Shows an error notification if the nonce check fails. + */ + private function verify_nonce() { + if ( $this->should_verify_nonce() && ! wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'bulk-editor-table' ) ) { + Yoast_Notification_Center::get()->add_notification( + new Yoast_Notification( + __( 'You are not allowed to access this page.', 'wordpress-seo' ), + array( 'type' => Yoast_Notification::ERROR ) + ) + ); + Yoast_Notification_Center::get()->display_notifications(); + die; + } + } + + /** + * Checks if additional parameters have been sent to determine if nonce should be checked or not. + * + * @return bool + */ + private function should_verify_nonce() { + $possible_params = array( + 'type', + 'paged', + 'post_type_filter', + 'post_status', + 'order', + 'orderby', + ); + + foreach ( $possible_params as $param_name ) { + if ( filter_input( INPUT_GET, $param_name ) ) { + return true; + } + } + } + + /** + * Prepares the data and renders the page. + */ + public function show_page() { + $this->prepare_page_navigation(); + $this->prepare_items(); + + $this->views(); + $this->display(); + } + + /** + * Used in the constructor to build a reference list of post types the current user can edit. + */ + protected function populate_editable_post_types() { + $post_types = get_post_types( array( 'public' => true, 'exclude_from_search' => false ), 'object' ); + + $this->all_posts = array(); + $this->own_posts = array(); + + if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $post_type ) { + if ( ! current_user_can( $post_type->cap->edit_posts ) ) { + continue; + } + + if ( current_user_can( $post_type->cap->edit_others_posts ) ) { + $this->all_posts[] = esc_sql( $post_type->name ); + } + else { + $this->own_posts[] = esc_sql( $post_type->name ); + } + } + } + } + + + /** + * Will shown the navigation for the table like pagenavigation and pagefilter; + * + * @param string $which Table nav location (such as top). + */ + function display_tablenav( $which ) { + $post_status = sanitize_text_field( filter_input( INPUT_GET, 'post_status' ) ); + ?> +
+ + +
+ + + + + + + + + + + + + extra_tablenav( $which ); + $this->pagination( $which ); + ?> + +
+ +
+ +
+ + prepare(), passing the current user_id in as the first parameter. + */ + function get_base_subquery() { + global $wpdb; + + $all_posts_string = "'" . implode( "', '", $this->all_posts ) . "'"; + $own_posts_string = "'" . implode( "', '", $this->own_posts ) . "'"; + + $post_author = esc_sql( (int) get_current_user_id() ); + + $subquery = "( + SELECT * + FROM {$wpdb->posts} + WHERE post_type IN ({$all_posts_string}) + UNION ALL + SELECT * + FROM {$wpdb->posts} + WHERE post_type IN ({$own_posts_string}) AND post_author = {$post_author} + ) sub_base"; + + return $subquery; + } + + + /** + * @return array + */ + function get_views() { + global $wpdb; + + $status_links = array(); + + $states = get_post_stati( array( 'show_in_admin_all_list' => true ) ); + $states['trash'] = 'trash'; + $states = esc_sql( $states ); + $all_states = "'" . implode( "', '", $states ) . "'"; + + $subquery = $this->get_base_subquery(); + + $total_posts = $wpdb->get_var( + " + SELECT COUNT(ID) FROM {$subquery} + WHERE post_status IN ({$all_states}) + " + ); + + + $post_status = filter_input( INPUT_GET, 'post_status' ); + $class = empty( $post_status ) ? ' class="current"' : ''; + $status_links['all'] = '' . sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'posts', 'wordpress-seo' ), number_format_i18n( $total_posts ) ) . ''; + + $post_stati = get_post_stati( array( 'show_in_admin_all_list' => true ), 'objects' ); + if ( is_array( $post_stati ) && $post_stati !== array() ) { + foreach ( $post_stati as $status ) { + + $status_name = esc_sql( $status->name ); + + $total = (int) $wpdb->get_var( + $wpdb->prepare( + " + SELECT COUNT(ID) FROM {$subquery} + WHERE post_status = %s + ", + $status_name + ) + ); + + if ( $total === 0 ) { + continue; + } + + $class = ''; + if ( $status_name === $post_status ) { + $class = ' class="current"'; + } + + $status_links[ $status_name ] = '' . sprintf( translate_nooped_plural( $status->label_count, $total ), number_format_i18n( $total ) ) . ''; + } + } + unset( $post_stati, $status, $status_name, $total, $class ); + + $trashed_posts = $wpdb->get_var( + " + SELECT COUNT(ID) FROM {$subquery} + WHERE post_status IN ('trash') + " + ); + + $class = ''; + if ( 'trash' === $post_status ) { + $class = 'class="current"'; + } + $status_links['trash'] = '' . sprintf( _nx( 'Trash (%s)', 'Trash (%s)', $trashed_posts, 'posts', 'wordpress-seo' ), number_format_i18n( $trashed_posts ) ) . ''; + + return $status_links; + } + + + /** + * @param string $which Table nav location (such as top). + */ + function extra_tablenav( $which ) { + + if ( 'top' === $which ) { + $post_types = get_post_types( array( 'public' => true, 'exclude_from_search' => false ) ); + + $instance_type = esc_attr( $this->page_type ); + + if ( is_array( $post_types ) && $post_types !== array() ) { + global $wpdb; + + echo '
'; + + $post_types = esc_sql( $post_types ); + $post_types = "'" . implode( "', '", $post_types ) . "'"; + + $states = get_post_stati( array( 'show_in_admin_all_list' => true ) ); + $states['trash'] = 'trash'; + $states = esc_sql( $states ); + $all_states = "'" . implode( "', '", $states ) . "'"; + + $subquery = $this->get_base_subquery(); + + $post_types = $wpdb->get_results( + " + SELECT DISTINCT post_type FROM {$subquery} + WHERE post_status IN ({$all_states}) + ORDER BY 'post_type' ASC + " + ); + + $post_type_filter = filter_input( INPUT_GET, 'post_type_filter' ); + $selected = ( ! empty( $post_type_filter ) ) ? sanitize_text_field( $post_type_filter ) : '-1'; + + $options = ''; + + if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $post_type ) { + $obj = get_post_type_object( $post_type->post_type ); + $options .= sprintf( '', $obj->labels->name, $post_type->post_type, selected( $selected, $post_type->post_type, false ) ); + } + } + + printf( + '', + 'post-type-filter-' . $instance_type, + __( 'Filter by post type', 'wordpress-seo' ) + ); + echo sprintf( '', $options, $instance_type ); + submit_button( __( 'Filter', 'wordpress-seo' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); + echo '
'; + } + } + } + + /** + * + * @return array + */ + function get_sortable_columns() { + return $sortable = array( + 'col_page_title' => array( 'post_title', true ), + 'col_post_type' => array( 'post_type', false ), + 'col_post_date' => array( 'post_date', false ), + ); + } + + /** + * Sets the correct pagenumber and pageurl for the navigation + */ + function prepare_page_navigation() { + + $request_url = $this->request_url . $this->page_url; + + $current_page = $this->current_page; + $current_filter = $this->current_filter; + $current_status = $this->current_status; + $current_order = $this->current_order; + + // If current type doesn't compare with objects page_type, than we have to unset some vars in the requested url (which will be use for internal table urls). + if ( $_GET['type'] != $this->page_type ) { + $request_url = remove_query_arg( 'paged', $request_url ); // Page will be set with value 1 below. + $request_url = remove_query_arg( 'post_type_filter', $request_url ); + $request_url = remove_query_arg( 'post_status', $request_url ); + $request_url = remove_query_arg( 'orderby', $request_url ); + $request_url = remove_query_arg( 'order', $request_url ); + $request_url = add_query_arg( 'pages', 1, $request_url ); + + $current_page = 1; + $current_filter = '-1'; + $current_status = ''; + $current_order = array( 'orderby' => 'post_title', 'order' => 'asc' ); + + } + + $_SERVER['REQUEST_URI'] = $request_url; + + $_GET['paged'] = $current_page; + $_REQUEST['paged'] = $current_page; + $_REQUEST['post_type_filter'] = $current_filter; + $_GET['post_type_filter'] = $current_filter; + $_GET['post_status'] = $current_status; + $_GET['orderby'] = $current_order['orderby']; + $_GET['order'] = $current_order['order']; + + } + + /** + * Preparing the requested pagerows and setting the needed variables + */ + function prepare_items() { + + $post_type_clause = $this->get_post_type_clause(); + $all_states = $this->get_all_states(); + $subquery = $this->get_base_subquery(); + + // Setting the column headers. + $this->set_column_headers(); + + // Count the total number of needed items and setting pagination given $total_items. + $total_items = $this->count_items( $subquery, $all_states, $post_type_clause ); + $this->set_pagination( $total_items ); + + // Getting items given $query. + $query = $this->parse_item_query( $subquery, $all_states, $post_type_clause ); + $this->get_items( $query ); + + // Get the metadata for the current items ($this->items). + $this->get_meta_data(); + + } + + /** + * Getting the columns for first row + * + * @return array + */ + public function get_columns() { + return $this->merge_columns(); + } + + /** + * Setting the column headers + */ + protected function set_column_headers() { + $columns = $this->get_columns(); + $hidden = array(); + $sortable = $this->get_sortable_columns(); + $this->_column_headers = array( $columns, $hidden, $sortable ); + } + + /** + * Counting total items + * + * @param string $subquery SQL FROM part. + * @param string $all_states SQL IN part. + * @param string $post_type_clause SQL post type part. + * + * @return mixed + */ + protected function count_items( $subquery, $all_states, $post_type_clause ) { + global $wpdb; + $total_items = $wpdb->get_var( + " + SELECT COUNT(ID) + FROM {$subquery} + WHERE post_status IN ({$all_states}) $post_type_clause + " + ); + + return $total_items; + } + + /** + * Getting the post_type_clause filter + * + * @return string + */ + protected function get_post_type_clause() { + // Filter Block. + $post_types = null; + $post_type_clause = ''; + $post_type_filter = filter_input( INPUT_GET, 'post_type_filter' ); + + if ( ! empty( $post_type_filter ) && get_post_type_object( sanitize_text_field( $post_type_filter ) ) ) { + $post_types = esc_sql( sanitize_text_field( $post_type_filter ) ); + $post_type_clause = "AND post_type IN ('{$post_types}')"; + } + + return $post_type_clause; + } + + /** + * Setting the pagination. + * + * Total items is the number of all visible items. + * + * @param int $total_items Total items counts. + */ + protected function set_pagination( $total_items ) { + + // Calculate items per page. + $per_page = $this->get_items_per_page( 'wpseo_posts_per_page', 10 ); + $paged = esc_sql( sanitize_text_field( filter_input( INPUT_GET, 'paged' ) ) ); + + if ( empty( $paged ) || ! is_numeric( $paged ) || $paged <= 0 ) { + $paged = 1; + } + + $this->set_pagination_args( + array( + 'total_items' => $total_items, + 'total_pages' => ceil( $total_items / $per_page ), + 'per_page' => $per_page, + ) + ); + + $this->pagination = array( + 'per_page' => $per_page, + 'offset' => ( $paged - 1 ) * $per_page, + ); + + } + + /** + * Parse the query to get items from database. + * + * Based on given parameters there will be parse a query which will get all the pages/posts and other post_types + * from the database. + * + * @param string $subquery SQL FROM part. + * @param string $all_states SQL IN part. + * @param string $post_type_clause SQL post type part. + * + * @return string + */ + protected function parse_item_query( $subquery, $all_states, $post_type_clause ) { + // Order By block. + $orderby = filter_input( INPUT_GET, 'orderby' ); + + $orderby = ! empty( $orderby ) ? esc_sql( sanitize_text_field( $orderby ) ) : 'post_title'; + $orderby = $this->sanitize_orderby( $orderby ); + + // Order clause. + $order = filter_input( INPUT_GET, 'order' ); + $order = ! empty( $order ) ? esc_sql( strtoupper( sanitize_text_field( $order ) ) ) : 'ASC'; + $order = $this->sanitize_order( $order ); + + // Get all needed results. + $query = " + SELECT ID, post_title, post_type, post_status, post_modified, post_date + FROM {$subquery} + WHERE post_status IN ({$all_states}) $post_type_clause + ORDER BY {$orderby} {$order} + LIMIT %d,%d + "; + + return $query; + } + + /** + * Heavily restricts the possible columns by which a user can order the table in the bulk editor, thereby preventing a possible CSRF vulnerability. + * + * @param string $orderby The column by which we want to order. + * + * @return string $orderby + */ + protected function sanitize_orderby( $orderby ) { + $valid_column_names = array( + 'post_title', + 'post_type', + 'post_date', + ); + + if ( in_array( $orderby, $valid_column_names ) ) { + return $orderby; + } + + return 'post_title'; + } + + /** + * Makes sure the order clause is always ASC or DESC for the bulk editor table, thereby preventing a possible CSRF vulnerability. + * + * @param string $order Whether we want to sort ascending or descending. + * + * @return string $order SQL order string (ASC, DESC). + */ + protected function sanitize_order( $order ) { + if ( in_array( strtoupper( $order ), array( 'ASC', 'DESC' ) ) ) { + return $order; + } + + return 'ASC'; + } + + /** + * Getting all the items. + * + * @param string $query SQL query to use. + */ + protected function get_items( $query ) { + global $wpdb; + + $this->items = $wpdb->get_results( + $wpdb->prepare( + $query, + $this->pagination['offset'], + $this->pagination['per_page'] + ) + ); + } + + /** + * Getting all the states. + * + * @return string + */ + protected function get_all_states() { + $states = get_post_stati( array( 'show_in_admin_all_list' => true ) ); + $states['trash'] = 'trash'; + + if ( ! empty( $_GET['post_status'] ) ) { + $requested_state = sanitize_text_field( $_GET['post_status'] ); + if ( in_array( $requested_state, $states ) ) { + $states = array( $requested_state ); + } + } + + $states = esc_sql( $states ); + $all_states = "'" . implode( "', '", $states ) . "'"; + + return $all_states; + } + + + /** + * Based on $this->items and the defined columns, the table rows will be displayed. + */ + function display_rows() { + + $records = $this->items; + + list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); + + if ( ( is_array( $records ) && $records !== array() ) && ( is_array( $columns ) && $columns !== array() ) ) { + + foreach ( $records as $rec ) { + + echo ''; + + foreach ( $columns as $column_name => $column_display_name ) { + + $classes = ''; + if ( $primary === $column_name ) { + $classes .= ' has-row-actions column-primary'; + } + + $attributes = $this->column_attributes( $column_name, $hidden, $classes ); + + $column_value = $this->parse_column( $column_name, $rec ); + + if ( method_exists( $this, 'parse_page_specific_column' ) && empty( $column_value ) ) { + $column_value = $this->parse_page_specific_column( $column_name, $rec, $attributes ); + } + + if ( ! empty( $column_value ) ) { + echo sprintf( '%1$s', $column_value, $attributes ); + } + } + + echo ''; + } + } + } + + /** + * Getting the attributes for each table cell. + * + * @param string $column_name Column name string. + * @param array $hidden Set of hidden columns. + * @param string $classes Additional CSS classes. + * + * @return string + */ + protected function column_attributes( $column_name, $hidden, $classes ) { + + $attributes = ''; + $class = array( $column_name, "column-$column_name$classes" ); + + if ( in_array( $column_name, $hidden ) ) { + $class[] = 'hidden'; + } + + if ( ! empty( $class ) ) { + $attributes = 'class="' . implode( ' ', $class ) . '"'; + } + + return $attributes; + } + + /** + * Parsing the title. + * + * @param WP_Post $rec Post object. + * + * @return string + */ + protected function parse_page_title_column( $rec ) { + + $title = empty( $rec->post_title ) ? __( '(no title)', 'wordpress-seo' ) : $rec->post_title; + + $return = sprintf( '%1$s', stripslashes( wp_strip_all_tags( $title ) ) ); + + $post_type_object = get_post_type_object( $rec->post_type ); + $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $rec->ID ); + + $actions = array(); + + if ( $can_edit_post && 'trash' !== $rec->post_status ) { + $actions['edit'] = sprintf( + '%s', + esc_url( get_edit_post_link( $rec->ID, true ) ), + /* translators: %s: post title */ + esc_attr( sprintf( __( 'Edit “%s”', 'wordpress-seo' ), $title ) ), + __( 'Edit', 'wordpress-seo' ) + ); + } + + if ( $post_type_object->public ) { + if ( in_array( $rec->post_status, array( 'pending', 'draft', 'future' ) ) ) { + if ( $can_edit_post ) { + $actions['view'] = sprintf( + '%s', + esc_url( add_query_arg( 'preview', 'true', get_permalink( $rec->ID ) ) ), + /* translators: %s: post title */ + esc_attr( sprintf( __( 'Preview “%s”', 'wordpress-seo' ), $title ) ), + __( 'Preview', 'wordpress-seo' ) + ); + } + } + elseif ( 'trash' !== $rec->post_status ) { + $actions['view'] = sprintf( + '%s', + esc_url( get_permalink( $rec->ID ) ), + /* translators: %s: post title */ + esc_attr( sprintf( __( 'View “%s”', 'wordpress-seo' ), $title ) ), + __( 'View', 'wordpress-seo' ) + ); + } + } + + $return .= $this->row_actions( $actions ); + + return $return; + + } + + /** + * Parsing the column based on the $column_name. + * + * @param string $column_name Column name. + * @param WP_Post $rec Post object. + * + * @return string + */ + protected function parse_column( $column_name, $rec ) { + + static $date_format; + + if ( $date_format == null ) { + $date_format = get_option( 'date_format' ); + } + + switch ( $column_name ) { + case 'col_page_title': + $column_value = $this->parse_page_title_column( $rec ); + break; + + case 'col_page_slug': + $permalink = get_permalink( $rec->ID ); + $display_slug = str_replace( get_bloginfo( 'url' ), '', $permalink ); + $column_value = sprintf( '%1$s', stripslashes( $display_slug ), esc_url( $permalink ) ); + break; + + case 'col_post_type': + $post_type = get_post_type_object( $rec->post_type ); + $column_value = $post_type->labels->singular_name; + break; + + case 'col_post_status': + $post_status = get_post_status_object( $rec->post_status ); + $column_value = $post_status->label; + break; + + case 'col_post_date': + $column_value = date_i18n( $date_format, strtotime( $rec->post_date ) ); + break; + + case 'col_row_action': + $column_value = sprintf( 'Save Save All', $rec->ID ); + break; + } + + if ( ! empty( $column_value ) ) { + return $column_value; + } + } + + /** + * Parse the field where the existing meta-data value is displayed. + * + * @param integer $record_id Record ID. + * @param string $attributes HTML attributes. + * @param bool|array $values Optional values data array. + * + * @return string + */ + protected function parse_meta_data_field( $record_id, $attributes, $values = false ) { + + // Fill meta data if exists in $this->meta_data. + $meta_data = ( ! empty( $this->meta_data[ $record_id ] ) ) ? $this->meta_data[ $record_id ] : array(); + $meta_key = WPSEO_Meta::$meta_prefix . $this->target_db_field; + $meta_value = ( ! empty( $meta_data[ $meta_key ] ) ) ? $meta_data[ $meta_key ] : ''; + + if ( ! empty( $values ) ) { + $meta_value = $values[ $meta_value ]; + } + + return sprintf( '%1$s', $meta_value, $attributes, $record_id, $this->target_db_field ); + } + + /** + * Method for setting the meta data, which belongs to the records that will be shown on the current page. + * + * This method will loop through the current items ($this->items) for getting the post_id. With this data + * ($needed_ids) the method will query the meta-data table for getting the title. + */ + protected function get_meta_data() { + + $post_ids = $this->get_post_ids(); + $meta_data = $this->get_meta_data_result( $post_ids ); + + $this->parse_meta_data( $meta_data ); + + // Little housekeeping. + unset( $post_ids, $meta_data ); + + } + + /** + * Getting all post_ids from to $this->items. + * + * @return string + */ + protected function get_post_ids() { + $needed_ids = array(); + foreach ( $this->items as $item ) { + $needed_ids[] = $item->ID; + } + + $post_ids = "'" . implode( "', '", $needed_ids ) . "'"; + + return $post_ids; + } + + /** + * Getting the meta_data from database. + * + * @param string $post_ids Post IDs string for SQL IN part. + * + * @return mixed + */ + protected function get_meta_data_result( $post_ids ) { + global $wpdb; + + $meta_data = $wpdb->get_results( + " + SELECT * + FROM {$wpdb->postmeta} + WHERE post_id IN({$post_ids}) && meta_key = '" . WPSEO_Meta::$meta_prefix . $this->target_db_field . "' + " + ); + + return $meta_data; + } + + /** + * Setting $this->meta_data. + * + * @param array $meta_data Meta data set. + */ + protected function parse_meta_data( $meta_data ) { + + foreach ( $meta_data as $row ) { + $this->meta_data[ $row->post_id ][ $row->meta_key ] = $row->meta_value; + } + + } + + /** + * This method will merge general array with given parameter $columns. + * + * @param array $columns Optional columns set. + * + * @return array + */ + protected function merge_columns( $columns = array() ) { + $columns = array_merge( + array( + 'col_page_title' => __( 'WP Page Title', 'wordpress-seo' ), + 'col_post_type' => __( 'Post Type', 'wordpress-seo' ), + 'col_post_status' => __( 'Post Status', 'wordpress-seo' ), + 'col_post_date' => __( 'Publication date', 'wordpress-seo' ), + 'col_page_slug' => __( 'Page URL/Slug', 'wordpress-seo' ), + ), + $columns + ); + + $columns['col_row_action'] = __( 'Action', 'wordpress-seo' ); + + return $columns; + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php new file mode 100644 index 0000000..2c12227 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php @@ -0,0 +1,86 @@ + 'wpseo_bulk_title', + 'plural' => 'wpseo_bulk_titles', + 'ajax' => true, + ); + + /** + * The field in the database where meta field is saved. + * + * @var string + */ + protected $target_db_field = 'title'; + + /** + * The columns shown on the table + * + * @return array + */ + public function get_columns() { + + $columns = array( + /* translators: %1$s expands to Yoast SEO */ + 'col_existing_yoast_seo_title' => sprintf( __( 'Existing %1$s Title', 'wordpress-seo' ), 'Yoast SEO' ), + /* translators: %1$s expands to Yoast SEO */ + 'col_new_yoast_seo_title' => sprintf( __( 'New %1$s Title', 'wordpress-seo' ), 'Yoast SEO' ), + ); + + return $this->merge_columns( $columns ); + } + + /** + * Parse the title columns + * + * @param string $column_name Column name. + * @param object $record Data object. + * @param string $attributes HTML attributes. + * + * @return string + */ + protected function parse_page_specific_column( $column_name, $record, $attributes ) { + + // Fill meta data if exists in $this->meta_data. + $meta_data = ( ! empty( $this->meta_data[ $record->ID ] ) ) ? $this->meta_data[ $record->ID ] : array(); + + switch ( $column_name ) { + case 'col_existing_yoast_seo_title': + // TODO inconsistent echo/return behavior R. + echo $this->parse_meta_data_field( $record->ID, $attributes ); + break; + + case 'col_new_yoast_seo_title': + return sprintf( + '', + 'wpseo-new-title-' . $record->ID, + $record->ID + ); + break; + } + + unset( $meta_data ); + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/admin/class-config.php b/wp-content/plugins/wordpress-seo/admin/class-config.php new file mode 100644 index 0000000..9f3b2f7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-config.php @@ -0,0 +1,435 @@ +asset_manager = new WPSEO_Admin_Asset_Manager(); + } + + /** + * Make sure the needed scripts are loaded for admin pages + */ + function init() { + if ( filter_input( INPUT_GET, 'wpseo_reset_defaults' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo_reset_defaults' ) && current_user_can( 'manage_options' ) ) { + WPSEO_Options::reset(); + wp_redirect( admin_url( 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ) ); + } + + if ( WPSEO_Utils::grant_access() ) { + add_action( 'admin_init', array( $this, 'admin_init' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'config_page_scripts' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'config_page_styles' ) ); + } + } + + /** + * Run admin-specific actions. + */ + public function admin_init() { + + $page = filter_input( INPUT_GET, 'page' ); + $tool = filter_input( INPUT_GET, 'tool' ); + $export_nonce = filter_input( INPUT_POST, WPSEO_Export::NONCE_NAME ); + + if ( 'wpseo_tools' === $page && 'import-export' === $tool && $export_nonce !== null ) { + $this->do_yoast_export(); + } + } + + /** + * Loads the required styles for the config page. + */ + function config_page_styles() { + wp_enqueue_style( 'dashboard' ); + wp_enqueue_style( 'thickbox' ); + wp_enqueue_style( 'global' ); + wp_enqueue_style( 'wp-admin' ); + $this->asset_manager->enqueue_style( 'select2' ); + + $this->asset_manager->enqueue_style( 'admin-css' ); + + $this->asset_manager->enqueue_style( 'kb-search' ); + } + + /** + * Loads the required scripts for the config page. + */ + function config_page_scripts() { + $this->asset_manager->enqueue_script( 'admin-script' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-script', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() ); + + wp_enqueue_script( 'dashboard' ); + wp_enqueue_script( 'thickbox' ); + + $page = filter_input( INPUT_GET, 'page' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-script', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) ); + + if ( in_array( $page, array( 'wpseo_social', WPSEO_Admin::PAGE_IDENTIFIER ) ) ) { + wp_enqueue_media(); + + $this->asset_manager->enqueue_script( 'admin-media' ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', $this->localize_media_script() ); + } + + if ( 'wpseo_tools' === $page ) { + $this->enqueue_tools_scripts(); + } + } + + /** + * Pass some variables to js for upload module. + * + * @return array + */ + public function localize_media_script() { + return array( + 'choose_image' => __( 'Use Image', 'wordpress-seo' ), + ); + } + + /** + * Enqueues and handles all the tool dependencies. + */ + private function enqueue_tools_scripts() { + $tool = filter_input( INPUT_GET, 'tool' ); + + if ( empty( $tool ) ) { + $this->asset_manager->enqueue_script( 'yoast-seo' ); + } + + if ( 'bulk-editor' === $tool ) { + $this->asset_manager->enqueue_script( 'bulk-editor' ); + } + } + + /** + * Runs the yoast exporter class to possibly init the file download. + */ + private function do_yoast_export() { + check_admin_referer( WPSEO_Export::NONCE_ACTION, WPSEO_Export::NONCE_NAME ); + + if ( ! current_user_can( 'manage_options' ) ) { + return; + } + + $wpseo_post = filter_input( INPUT_POST, 'wpseo' ); + $include_taxonomy = ! empty( $wpseo_post['include_taxonomy'] ); + $export = new WPSEO_Export( $include_taxonomy ); + + if ( $export->has_error() ) { + add_action( 'admin_notices', array( $export, 'set_error_hook' ) ); + + } + } + + /********************** DEPRECATED METHODS **********************/ + + /** + * Exports the current site's Yoast SEO settings. + * + * @param bool $include_taxonomy Whether to include the taxonomy metadata the plugin creates. + * + * @return bool|string $return False when failed, the URL to the export file when succeeded. + */ + public function export_settings( $include_taxonomy ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the WPSEO_Export class.' ); + + $export = new WPSEO_Export( $include_taxonomy ); + if ( $export->success ) { + return $export->export_zip_url; + } + + return false; + } + + /** + * Generates the header for admin pages + * + * @deprecated 2.0 + * + * @param bool $form Whether or not the form start tag should be included. + * @param mixed $option_long_name The long name of the option to use for the current page. + * @param string $option The short name of the option to use for the current page. + * @param bool $contains_files Whether the form should allow for file uploads. + */ + public function admin_header( $form = true, $option_long_name = false, $option = 'wpseo', $contains_files = false ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + Yoast_Form::get_instance()->admin_header( $form, $option, $contains_files, $option_long_name ); + } + + /** + * Generates the footer for admin pages + * + * @deprecated 2.0 + * + * @param bool $submit Whether or not a submit button and form end tag should be shown. + * @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it. + */ + public function admin_footer( $submit = true, $show_sidebar = true ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + Yoast_Form::get_instance()->admin_footer( $submit, $show_sidebar ); + } + + /** + * Generates the sidebar for admin pages. + * + * @deprecated 2.0 + */ + public function admin_sidebar() { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + Yoast_Form::get_instance()->admin_sidebar(); + } + + /** + * Create a Checkbox input field. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the checkbox for. + * @param string $label The label to show for the variable. + * @param bool $label_left Whether the label should be left (true) or right (false). + * @param string $option The option the variable belongs to. + */ + public function checkbox( $var, $label, $label_left = false, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->checkbox( $var, $label, $label_left ); + } + + /** + * Create a Text input field. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the text input field for. + * @param string $label The label to show for the variable. + * @param string $option The option the variable belongs to. + */ + function textinput( $var, $label, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + Yoast_Form::get_instance()->textinput( $var, $label ); + } + + /** + * Create a textarea. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the textarea for. + * @param string $label The label to show for the variable. + * @param string $option The option the variable belongs to. + * @param array $attr The CSS class to assign to the textarea. + */ + function textarea( $var, $label, $option = '', $attr = array() ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->textarea( $var, $label, $attr ); + } + + /** + * Create a hidden input field. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the hidden input for. + * @param string $option The option the variable belongs to. + */ + function hidden( $var, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->hidden( $var ); + } + + /** + * Create a Select Box. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the select for. + * @param string $label The label to show for the variable. + * @param array $values The select options to choose from. + * @param string $option The option the variable belongs to. + */ + function select( $var, $label, $values, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->select( $var, $label, $values ); + } + + /** + * Create a File upload field. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the file upload field for. + * @param string $label The label to show for the variable. + * @param string $option The option the variable belongs to. + */ + function file_upload( $var, $label, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->file_upload( $var, $label ); + } + + /** + * Media input + * + * @deprecated 2.0 + * + * @param string $var Option name. + * @param string $label Label message. + * @param string $option Optional option key. + */ + function media_input( $var, $label, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->media_input( $var, $label ); + } + + /** + * Create a Radio input field. + * + * @deprecated 2.0 + * + * @param string $var The variable within the option to create the file upload field for. + * @param array $values The radio options to choose from. + * @param string $label The label to show for the variable. + * @param string $option The option the variable belongs to. + */ + function radio( $var, $values, $label, $option = '' ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the Yoast_Form class.' ); + + if ( $option !== '' ) { + Yoast_Form::get_instance()->set_option( $option ); + } + + Yoast_Form::get_instance()->radio( $var, $values, $label ); + } + + /** + * Create a postbox widget. + * + * @deprecated 2.0 + * + * @param string $id ID of the postbox. + * @param string $title Title of the postbox. + * @param string $content Content of the postbox. + */ + function postbox( $id, $title, $content ) { + _deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please re-implement the admin pages.' ); + + ?> +
+

+ +
+ '; + foreach ( $rows as $row ) { + $content .= ''; + if ( isset( $row['id'] ) && $row['id'] != '' ) { + $content .= ''; + } + else { + $content .= esc_html( $row['label'] ); + } + if ( isset( $row['desc'] ) && $row['desc'] != '' ) { + $content .= '
' . esc_html( $row['desc'] ) . ''; + } + $content .= ''; + $content .= $row['content']; + $content .= ''; + } + $content .= ''; + + return $content; + } + + /** + * Resets the site to the default Yoast SEO settings and runs a title test to check + * whether force rewrite needs to be on. + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Options::reset() + * @see WPSEO_Options::reset() + */ + function reset_defaults() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Options::reset()' ); + WPSEO_Options::reset(); + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/admin/class-customizer.php b/wp-content/plugins/wordpress-seo/admin/class-customizer.php new file mode 100644 index 0000000..1c6a9e4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-customizer.php @@ -0,0 +1,255 @@ +wp_customize = $wp_customize; + + $this->breadcrumbs_section(); + $this->breadcrumbs_blog_remove_setting(); + $this->breadcrumbs_separator_setting(); + $this->breadcrumbs_home_setting(); + $this->breadcrumbs_prefix_setting(); + $this->breadcrumbs_archiveprefix_setting(); + $this->breadcrumbs_searchprefix_setting(); + $this->breadcrumbs_404_setting(); + } + + /** + * Add the breadcrumbs section to the customizer + */ + private function breadcrumbs_section() { + $this->wp_customize->add_section( + 'wpseo_breadcrumbs_customizer_section', array( + /* translators: %s is the name of the plugin */ + 'title' => sprintf( __( '%s Breadcrumbs', 'wordpress-seo' ), 'Yoast SEO' ), + 'priority' => 999, + 'active_callback' => array( $this, 'breadcrumbs_active_callback' ), + ) + ); + + } + + /** + * Returns whether or not the breadcrumbs are active + * + * @return bool + */ + public function breadcrumbs_active_callback() { + $options = WPSEO_Options::get_option( 'wpseo_internallinks' ); + + return true === ( current_theme_supports( 'yoast-seo-breadcrumbs' ) || $options['breadcrumbs-enable'] ); + } + + /** + * Adds the breadcrumbs remove blog checkbox + */ + private function breadcrumbs_blog_remove_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-blog-remove]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-blog-remove', array( + 'label' => __( 'Remove blog page from breadcrumbs', 'wordpress-seo' ), + 'type' => 'checkbox', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-blog-remove]', + 'context' => '', + 'active_callback' => array( $this, 'breadcrumbs_blog_remove_active_cb' ), + ) + ) + ); + } + + /** + * Returns whether or not to show the breadcrumbs blog remove option + * + * @return bool + */ + public function breadcrumbs_blog_remove_active_cb() { + return 'page' === get_option( 'show_on_front' ); + } + + /** + * Adds the breadcrumbs separator text field + */ + private function breadcrumbs_separator_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-sep]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-separator', array( + 'label' => __( 'Breadcrumbs separator:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-sep]', + 'context' => '', + ) + ) + ); + } + + /** + * Adds the breadcrumbs home anchor text field + */ + private function breadcrumbs_home_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-home]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-home', array( + 'label' => __( 'Anchor text for the homepage:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-home]', + 'context' => '', + ) + ) + ); + } + + /** + * Adds the breadcrumbs prefix text field + */ + private function breadcrumbs_prefix_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-prefix]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-prefix', array( + 'label' => __( 'Prefix for breadcrumbs:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-prefix]', + 'context' => '', + ) + ) + ); + } + + /** + * Adds the breadcrumbs archive prefix text field + */ + private function breadcrumbs_archiveprefix_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-archiveprefix]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-archiveprefix', array( + 'label' => __( 'Prefix for archive pages:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-archiveprefix]', + 'context' => '', + ) + ) + ); + } + + /** + * Adds the breadcrumbs search prefix text field + */ + private function breadcrumbs_searchprefix_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-searchprefix]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-searchprefix', array( + 'label' => __( 'Prefix for search result pages:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-searchprefix]', + 'context' => '', + ) + ) + ); + } + + /** + * Adds the breadcrumb 404 prefix text field + */ + private function breadcrumbs_404_setting() { + $this->wp_customize->add_setting( + 'wpseo_internallinks[breadcrumbs-404crumb]', array( + 'default' => '', + 'type' => 'option', + 'transport' => 'refresh', + ) + ); + + $this->wp_customize->add_control( + new WP_Customize_Control( + $this->wp_customize, 'wpseo-breadcrumbs-404crumb', array( + 'label' => __( 'Breadcrumb for 404 pages:', 'wordpress-seo' ), + 'type' => 'text', + 'section' => 'wpseo_breadcrumbs_customizer_section', + 'settings' => 'wpseo_internallinks[breadcrumbs-404crumb]', + 'context' => '', + ) + ) + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-export.php b/wp-content/plugins/wordpress-seo/admin/class-export.php new file mode 100644 index 0000000..14a8fce --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-export.php @@ -0,0 +1,276 @@ +include_taxonomy = $include_taxonomy; + $this->dir = wp_upload_dir(); + + $this->export_settings(); + } + + /** + * Returns true when the property error has a value. + * + * @return bool + */ + public function has_error() { + return ( $this->error !== '' ); + } + + /** + * Sets the error hook, to display the error to the user. + */ + public function set_error_hook() { + $class = 'notice notice-error'; + $message = sprintf( __( 'Error creating %1$s export: ', 'wordpress-seo' ), 'Yoast SEO' ) . $this->error; + + printf( '

%2$s

', $class, $message ); + } + + /** + * Exports the current site's WP SEO settings. + */ + private function export_settings() { + + $this->export_header(); + + foreach ( WPSEO_Options::get_option_names() as $opt_group ) { + $this->write_opt_group( $opt_group ); + } + + $this->taxonomy_metadata(); + + if ( ! $this->write_settings_file() ) { + $this->error = __( 'Could not write settings to file.', 'wordpress-seo' ); + + return; + } + + if ( $this->zip_file() ) { + // Just exit, because there is a download being served. + exit; + } + } + + /** + * Writes the header of the export file. + */ + private function export_header() { + /* translators: %1$s expands to Yoast SEO */ + $this->write_line( '; ' . sprintf( __( 'This is a settings export file for the %1$s plugin by Yoast.com', 'wordpress-seo' ), 'Yoast SEO' ) . ' - https://yoast.com/wordpress/plugins/seo/' ); + if ( $this->include_taxonomy ) { + $this->write_line( '; ' . __( 'This export includes taxonomy metadata', 'wordpress-seo' ) ); + } + } + + /** + * Writes a line to the export + * + * @param string $line Line string. + * @param boolean $newline_first Boolean flag whether to prepend with new line. + */ + private function write_line( $line, $newline_first = false ) { + if ( $newline_first ) { + $this->export .= PHP_EOL; + } + $this->export .= $line . PHP_EOL; + } + + /** + * Writes an entire option group to the export + * + * @param string $opt_group Option group name. + */ + private function write_opt_group( $opt_group ) { + + $this->write_line( '[' . $opt_group . ']', true ); + + $options = get_option( $opt_group ); + + if ( ! is_array( $options ) ) { + return; + } + + foreach ( $options as $key => $elem ) { + if ( is_array( $elem ) ) { + for ( $i = 0; $i < count( $elem ); $i ++ ) { + $this->write_setting( $key . '[]', $elem[ $i ] ); + } + } + else { + $this->write_setting( $key, $elem ); + } + } + } + + /** + * Writes a settings line to the export + * + * @param string $key Key string. + * @param string $val Value string. + */ + private function write_setting( $key, $val ) { + if ( is_string( $val ) ) { + $val = '"' . $val . '"'; + } + $this->write_line( $key . ' = ' . $val ); + } + + /** + * Adds the taxonomy meta data if there is any + */ + private function taxonomy_metadata() { + if ( $this->include_taxonomy ) { + $taxonomy_meta = get_option( 'wpseo_taxonomy_meta' ); + if ( is_array( $taxonomy_meta ) ) { + $this->write_line( '[wpseo_taxonomy_meta]', true ); + $this->write_setting( 'wpseo_taxonomy_meta', urlencode( wp_json_encode( $taxonomy_meta ) ) ); + } + else { + $this->write_line( '; ' . __( 'No taxonomy metadata found', 'wordpress-seo' ), true ); + } + } + } + + /** + * Writes the settings to our temporary settings.ini file + * + * @return boolean unsigned + */ + private function write_settings_file() { + $handle = fopen( $this->dir['path'] . '/' . self::INI_FILENAME, 'w' ); + if ( ! $handle ) { + return false; + } + + $res = fwrite( $handle, $this->export ); + if ( ! $res ) { + return false; + } + + fclose( $handle ); + + return true; + } + + /** + * Zips the settings ini file + * + * @return bool|null + */ + private function zip_file() { + $is_zip_created = $this->create_zip(); + + // The settings.ini isn't needed, because it's in the zipfile. + $this->remove_settings_ini(); + + if ( ! $is_zip_created ) { + $this->error = __( 'Could not zip settings-file.', 'wordpress-seo' ); + + return false; + } + + $this->serve_settings_export(); + $this->remove_zip(); + + return true; + } + + /** + * Creates the zipfile and returns true if it created successful. + * + * @return bool + */ + private function create_zip() { + chdir( $this->dir['path'] ); + $zip = new PclZip( './' . self::ZIP_FILENAME ); + if ( 0 === $zip->create( './' . self::INI_FILENAME ) ) { + return false; + } + + return file_exists( self::ZIP_FILENAME ); + } + + /** + * Downloads the zip file. + */ + private function serve_settings_export() { + // Clean any content that has been already output. For example by other plugins or faulty PHP files. + if ( ob_get_contents() ) { + ob_clean(); + } + header( 'Content-Type: application/octet-stream; charset=utf-8' ); + header( 'Content-Transfer-Encoding: Binary' ); + header( 'Content-Disposition: attachment; filename=' . self::ZIP_FILENAME ); + header( 'Content-Length: ' . filesize( self::ZIP_FILENAME ) ); + + readfile( self::ZIP_FILENAME ); + } + + /** + * Removes the settings ini file. + */ + private function remove_settings_ini() { + unlink( './' . self::INI_FILENAME ); + } + + /** + * Removes the files because they are already downloaded. + */ + private function remove_zip() { + unlink( './' . self::ZIP_FILENAME ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php b/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php new file mode 100644 index 0000000..cc3449c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php @@ -0,0 +1,94 @@ +identifier = $identifier; + $this->label = $label; + $this->dashicon = $dashicon; + $this->args = $args; + } + + /** + * Get the label. + * + * @return string + */ + public function get_label() { + return $this->label; + } + + /** + * Get the identifier. + * + * @return string + */ + public function get_identifier() { + return $this->identifier; + } + + /** + * Get the dashicon. + * + * @return string + */ + public function get_dashicon() { + return $this->dashicon; + } + + /** + * Get the content of this tab. + * + * @return mixed|string + */ + public function get_content() { + if ( ! empty( $this->args['content'] ) ) { + return $this->args['content']; + } + + if ( ! empty( $this->args['callback'] ) ) { + return call_user_func_array( $this->args['callback'], array( $this ) ); + } + + if ( ! empty( $this->args['view'] ) ) { + $view = $this->args['view']; + if ( substr( $view, - 4 ) === '.php' ) { + $view = substr( $view, 0, - 4 ); + } + + if ( ! empty( $this->args['view_arguments'] ) ) { + extract( $this->args['view_arguments'] ); + } + + include WPSEO_PATH . 'admin/views/' . $view . '.php'; + } + + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-help-center.php b/wp-content/plugins/wordpress-seo/admin/class-help-center.php new file mode 100644 index 0000000..828e8e8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-help-center.php @@ -0,0 +1,213 @@ +group_name = $group_name; + $this->tab = $tab; + + $this->add_video_tutorial_item(); + $this->add_kb_search_item(); + $this->add_contact_support_item(); + } + + /** + * Add the knowledge base search help center item to the help center. + */ + private function add_kb_search_item() { + $kb_help_center_item = new WPSEO_Help_Center_Item( + 'knowledge-base', + __( 'Knowledge base', 'wordpress-seo' ), + array( + 'content' => '', + 'view_arguments' => array( 'identifier' => $this->tab->get_name() ), + ), + 'dashicons-search' + ); + array_push( $this->help_center_items, $kb_help_center_item ); + } + + /** + * Add the contact support help center item to the help center. + */ + private function add_contact_support_item() { + $popup_title = sprintf( __( 'Email support is a %s feature', 'wordpress-seo' ), 'Yoast SEO Premium' ); + /* translators: %1$s: expands to 'Yoast SEO Premium', %2$s: links to Yoast SEO Premium plugin page. */ + $popup_content = sprintf( __( 'To be able to contact our support team, you need %1$s. You can buy the plugin, including one year of support, updates and upgrades, on %2$s.', 'wordpress-seo' ), + 'Yoast SEO Premium', + 'yoast.com' ); + + $premium_popup = new WPSEO_Premium_Popup( 'contact-support', 'h3', $popup_title, $popup_content ); + $contact_support_help_center_item = new WPSEO_Help_Center_Item( + 'contact-support', + __( 'Email support', 'wordpress-seo' ), + array( 'content' => $premium_popup->get_premium_message( false ) ), + 'dashicons-email-alt' + ); + + array_push( $this->help_center_items, $contact_support_help_center_item ); + } + + /** + * Add the video tutorial help center item to the help center. + */ + private function add_video_tutorial_item() { + array_push( $this->help_center_items, $this->get_video_help_center_item() ); + } + + /** + * @return mixed (WPSEO_Help_Center_Item | null) Returns a help center item containing a video. + */ + private function get_video_help_center_item() { + $url = $this->tab->get_video_url(); + if ( empty( $url ) ) { + return null; + } + + return new WPSEO_Help_Center_Item( + 'video', + __( 'Video tutorial', 'wordpress-seo' ), + array( + 'view' => 'partial-help-center-video', + 'view_arguments' => array( + 'tab_video_url' => $url, + ), + ), + 'dashicons-video-alt3' + ); + } + + /** + * Outputs the help center. + */ + public function output_help_center() { + $help_center_items = apply_filters( 'wpseo_help_center_items', $this->help_center_items ); + $help_center_items = array_filter( $help_center_items, array( $this, 'is_a_help_center_item' ) ); + if ( empty( $help_center_items ) ) { + return; + } + + $id = sprintf( 'tab-help-center-%s-%s', $this->group_name, $this->tab->get_name() ); + ?> +
+ +
+
+
    + get_identifier(); + $dashicon = $help_center_item->get_dashicon(); + if ( ! empty( $dashicon ) ) { + $dashicon = 'dashicons-before ' . $dashicon; + } + $link_id = "tab-link-{$this->group_name}_{$this->tab->get_name()}__{$id}"; + $panel_id = "tab-panel-{$this->group_name}_{$this->tab->get_name()}__{$id}"; + ?> + + + +
+
+
+ get_identifier(); + + $panel_id = "tab-panel-{$this->group_name}_{$this->tab->get_name()}__{$id}"; + ?> +
+ get_content(); ?> +
+ +
+
+
+ %s and replaced again in the javascript with the actual variable. + * + * @return array Translated text strings for the help center. + */ + public static function get_translated_texts() { + return array( + /* translators: %s: '%%term_title%%' variable used in titles and meta's template that's not compatible with the given template */ + 'variable_warning' => sprintf( __( 'Warning: the variable %s cannot be used in this template. See the help center for more info.', 'wordpress-seo' ), '%s' ), + 'locale' => get_locale(), + 'userLocale' => WPSEO_Utils::get_user_locale(), + /* translators: %d: number of knowledge base search results found. */ + 'kb_found_results' => __( 'Number of search results: %d', 'wordpress-seo' ), + 'kb_no_results' => __( 'No results found.', 'wordpress-seo' ), + 'kb_heading' => __( 'Search the Yoast knowledge base', 'wordpress-seo' ), + 'kb_search_button_text' => __( 'Search', 'wordpress-seo' ), + 'kb_search_results_heading' => __( 'Search results', 'wordpress-seo' ), + 'kb_error_message' => __( 'Something went wrong. Please try again later.', 'wordpress-seo' ), + 'kb_loading_placeholder' => __( 'Loading...', 'wordpress-seo' ), + 'kb_search' => __( 'search', 'wordpress-seo' ), + 'kb_back' => __( 'Back', 'wordpress-seo' ), + 'kb_back_label' => __( 'Back to search results' , 'wordpress-seo' ), + 'kb_open' => __( 'Open', 'wordpress-seo' ), + 'kb_open_label' => __( 'Open the knowledge base article in a new window or read it in the iframe below' , 'wordpress-seo' ), + 'kb_iframe_title' => __( 'Knowledge base article', 'wordpress-seo' ), + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-import-aioseo.php b/wp-content/plugins/wordpress-seo/admin/class-import-aioseo.php new file mode 100644 index 0000000..5546284 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-import-aioseo.php @@ -0,0 +1,98 @@ +aioseo_options = get_option( 'aioseop_options' ); + + $this->import_metas(); + $this->import_ga(); + } + + /** + * Import All In One SEO meta values + */ + private function import_metas() { + WPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace ); + WPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace ); + WPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace ); + } + + /** + * Import the Google Analytics settings + */ + private function import_ga() { + if ( isset( $this->aioseo_options['aiosp_google_analytics_id'] ) ) { + + if ( get_option( 'yst_ga' ) === false ) { + update_option( 'yst_ga', $this->determine_ga_settings() ); + } + + $plugin_install_nonce = wp_create_nonce( 'install-plugin_google-analytics-for-wordpress' ); // Use the old name because that's the WordPress.org repo. + + $this->set_msg( __( sprintf( + 'All in One SEO data successfully imported. Would you like to %sdisable the All in One SEO plugin%s. You\'ve had Google Analytics enabled in All in One SEO, would you like to install our %sGoogle Analytics plugin%s?', + '', + '', + '', + '' + ), 'wordpress-seo' ) ); + } + else { + $this->set_msg( __( sprintf( 'All in One SEO data successfully imported. Would you like to %sdisable the All in One SEO plugin%s.', '', '' ), 'wordpress-seo' ) ); + } + } + + /** + * Determine the appropriate GA settings for this site + * + * @return array $ga_settings + */ + private function determine_ga_settings() { + $ga_universal = 0; + if ( $this->aioseo_options['aiosp_ga_use_universal_analytics'] == 'on' ) { + $ga_universal = 1; + } + + $ga_track_outbound = 0; + if ( $this->aioseo_options['aiosp_ga_track_outbound_links'] == 'on' ) { + $ga_track_outbound = 1; + } + + $ga_anonymize_ip = 0; + if ( $this->aioseo_options['aiosp_ga_anonymize_ip'] == 'on' ) { + $ga_anonymize_ip = 1; + } + + return array( + 'ga_general' => array( + 'manual_ua_code' => (int) 1, + 'manual_ua_code_field' => $this->aioseo_options['aiosp_google_analytics_id'], + 'enable_universal' => $ga_universal, + 'track_outbound' => $ga_track_outbound, + 'ignore_users' => (array) $this->aioseo_options['aiosp_ga_exclude_users'], + 'anonymize_ips' => (int) $ga_anonymize_ip, + ), + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-import-external.php b/wp-content/plugins/wordpress-seo/admin/class-import-external.php new file mode 100644 index 0000000..cb40a33 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-import-external.php @@ -0,0 +1,108 @@ +replace = $replace; + + WPSEO_Options::initialize(); + } + + /** + * Convenience function to set import message + * + * @param string $msg Message string. + */ + protected function set_msg( $msg ) { + if ( ! empty( $this->msg ) ) { + $this->msg .= PHP_EOL; + } + $this->msg .= $msg; + } + + /** + * Deletes an option depending on the class replace state + * + * @param string $option Option key. + */ + protected function perhaps_delete( $option ) { + if ( $this->replace ) { + delete_option( $option ); + } + } + + /** + * Import HeadSpace SEO settings + */ + public function import_headspace() { + global $wpdb; + + WPSEO_Meta::replace_meta( '_headspace_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace ); + WPSEO_Meta::replace_meta( '_headspace_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace ); + WPSEO_Meta::replace_meta( '_headspace_page_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace ); + + /** + * @todo [JRF => whomever] verify how headspace sets these metas ( 'noindex', 'nofollow', 'noarchive', 'noodp', 'noydir' ) + * and if the values saved are concurrent with the ones we use (i.e. 0/1/2) + */ + WPSEO_Meta::replace_meta( '_headspace_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $this->replace ); + WPSEO_Meta::replace_meta( '_headspace_nofollow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $this->replace ); + + /* + * @todo - [JRF => whomever] check if this can be done more efficiently by querying only the meta table + * possibly directly changing it using concat on the existing values + */ + $posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts" ); + if ( is_array( $posts ) && $posts !== array() ) { + foreach ( $posts as $post ) { + $custom = get_post_custom( $post->ID ); + $robotsmeta_adv = ''; + if ( isset( $custom['_headspace_noarchive'] ) ) { + $robotsmeta_adv .= 'noarchive,'; + } + if ( isset( $custom['_headspace_noodp'] ) ) { + $robotsmeta_adv .= 'noodp,'; + } + $robotsmeta_adv = preg_replace( '`,$`', '', $robotsmeta_adv ); + WPSEO_Meta::set_value( 'meta-robots-adv', $robotsmeta_adv, $post->ID ); + } + } + + if ( $this->replace ) { + // We no longer use noydir, but we remove the meta key as it's unneeded. + $hs_meta = array( 'noarchive', 'noodp', 'noydir' ); + foreach ( $hs_meta as $meta ) { + delete_post_meta_by_key( '_headspace_' . $meta ); + } + unset( $hs_meta, $meta ); + } + $this->set_msg( __( 'HeadSpace2 data successfully imported', 'wordpress-seo' ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-import-woothemes-seo.php b/wp-content/plugins/wordpress-seo/admin/class-import-woothemes-seo.php new file mode 100644 index 0000000..f06fcd3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-import-woothemes-seo.php @@ -0,0 +1,146 @@ +import_home(); + $this->import_option( 'seo_woo_single_layout', 'post' ); + $this->import_option( 'seo_woo_page_layout', 'page' ); + $this->import_archive_option(); + $this->import_custom_values( 'seo_woo_meta_home_desc', 'metadesc-home-wpseo' ); + $this->import_custom_values( 'seo_woo_meta_home_key', 'metakey-home-wpseo' ); + $this->import_metas(); + + update_option( 'wpseo_titles', $this->options ); + + $this->set_msg( __( 'WooThemes SEO framework settings & data successfully imported.', 'wordpress-seo' ) ); + } + + /** + * Holds the WPSEO Title Options + * + * @var array + */ + private $options; + + /** + * Import options. + * + * @param string $option Option key. + * @param string $post_type Post type name to import for. + */ + private function import_option( $option, $post_type ) { + switch ( get_option( $option ) ) { + case 'a': + $this->options[ 'title-' . $post_type ] = '%%title%% %%sep%% %%sitename%%'; + break; + case 'b': + $this->options[ 'title-' . $post_type ] = '%%title%%'; + break; + case 'c': + $this->options[ 'title-' . $post_type ] = '%%sitename%% %%sep%% %%title%%'; + break; + case 'd': + $this->options[ 'title-' . $post_type ] = '%%title%% %%sep%% %%sitedesc%%'; + break; + case 'e': + $this->options[ 'title-' . $post_type ] = '%%sitename%% %%sep%% %%title%% %%sep%% %%sitedesc%%'; + break; + } + $this->perhaps_delete( $option ); + } + + /** + * Import the archive layout for all taxonomies + */ + private function import_archive_option() { + $reinstate_replace = false; + if ( $this->replace ) { + $this->replace = false; + $reinstate_replace = true; + } + $taxonomies = get_taxonomies( array( 'public' => true ), 'names' ); + if ( is_array( $taxonomies ) && $taxonomies !== array() ) { + foreach ( $taxonomies as $tax ) { + $this->import_option( 'seo_woo_archive_layout', 'tax-' . $tax ); + } + } + if ( $reinstate_replace ) { + $this->replace = true; + $this->perhaps_delete( 'seo_woo_archive_layout' ); + } + } + + /** + * Import custom descriptions and meta keys + * + * @param string $option Option key. + * @param string $key Internal key to import over. + */ + private function import_custom_values( $option, $key ) { + // Import the custom homepage description. + if ( 'c' == get_option( $option ) ) { + $this->options[ $key ] = get_option( $option . '_custom' ); + } + $this->perhaps_delete( $option ); + $this->perhaps_delete( $option . '_custom' ); + } + + /** + * Imports the WooThemes SEO homepage settings + */ + private function import_home() { + switch ( get_option( 'seo_woo_home_layout' ) ) { + case 'a': + $this->options['title-home-wpseo'] = '%%sitename%% %%sep%% %%sitedesc%%'; + break; + case 'b': + $this->options['title-home-wpseo'] = '%%sitename%% ' . get_option( 'seo_woo_paged_var' ) . ' %%pagenum%%'; + break; + case 'c': + $this->options['title-home-wpseo'] = '%%sitedesc%%'; + break; + } + $this->perhaps_delete( 'seo_woo_home_layout' ); + } + + /** + * Import meta values if they're applicable + */ + private function import_metas() { + WPSEO_Meta::replace_meta( 'seo_follow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $this->replace ); + WPSEO_Meta::replace_meta( 'seo_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $this->replace ); + + // If WooSEO is set to use the Woo titles, import those. + if ( 'true' == get_option( 'seo_woo_wp_title' ) ) { + WPSEO_Meta::replace_meta( 'seo_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace ); + } + + // If WooSEO is set to use the Woo meta descriptions, import those. + if ( 'b' == get_option( 'seo_woo_meta_single_desc' ) ) { + WPSEO_Meta::replace_meta( 'seo_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace ); + } + + // If WooSEO is set to use the Woo meta keywords, import those. + if ( 'b' == get_option( 'seo_woo_meta_single_key' ) ) { + WPSEO_Meta::replace_meta( 'seo_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace ); + } + + foreach ( array( 'seo_woo_wp_title', 'seo_woo_meta_single_desc', 'seo_woo_meta_single_key' ) as $option ) { + $this->perhaps_delete( $option ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-import-wpseo.php b/wp-content/plugins/wordpress-seo/admin/class-import-wpseo.php new file mode 100644 index 0000000..ea742a7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-import-wpseo.php @@ -0,0 +1,185 @@ +import_post_metas(); + $this->import_taxonomy_metas(); + + $this->set_msg( + __( + sprintf( + 'wpSEO data successfully imported. Would you like to %sdisable the wpSEO plugin%s?', + '', + '' + ), + 'wordpress-seo' + ) + ); + + } + + /** + * Import the post meta values to Yoast SEO by replacing the wpSEO fields by Yoast SEO fields + */ + private function import_post_metas() { + WPSEO_Meta::replace_meta( '_wpseo_edit_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace ); + WPSEO_Meta::replace_meta( '_wpseo_edit_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace ); + WPSEO_Meta::replace_meta( '_wpseo_edit_keywords', WPSEO_Meta::$meta_prefix . 'keywords', $this->replace ); + WPSEO_Meta::replace_meta( '_wpseo_edit_canonical', WPSEO_Meta::$meta_prefix . 'canonical', $this->replace ); + + $this->import_post_robots(); + } + + /** + * Importing the robot values from WPSEO plugin. These have to be converted to the Yoast format. + */ + private function import_post_robots() { + $query_posts = new WP_Query( 'post_type=any&meta_key=_wpseo_edit_robots&order=ASC' ); + + if ( ! empty( $query_posts->posts ) ) { + foreach ( $query_posts->posts as $post ) { + $this->import_post_robot( $post->ID ); + } + } + } + + /** + * Getting the wpSEO robot value and map this to Yoast SEO values. + * + * @param integer $post_id The post id of the current post. + */ + private function import_post_robot( $post_id ) { + $wpseo_robots = get_post_meta( $post_id, '_wpseo_edit_robots', true ); + + // Does the value exists in our mapping. + if ( $robot_value = $this->get_robot_value( $wpseo_robots ) ) { + // Saving the new meta values for Yoast SEO. + WPSEO_Meta::set_value( $robot_value['index'], 'meta-robots-noindex', $post_id ); + WPSEO_Meta::set_value( $robot_value['follow'], 'meta-robots-nofollow', $post_id ); + } + + $this->delete_post_robot( $post_id ); + } + + /** + * Delete the wpSEO robot values, because they aren't needed anymore. + * + * @param integer $post_id The post id of the current post. + */ + private function delete_post_robot( $post_id ) { + if ( $this->replace ) { + delete_post_meta( $post_id, '_wpseo_edit_robots' ); + } + } + + /** + * Import the taxonomy metas from wpSEO + */ + private function import_taxonomy_metas() { + $terms = get_terms( get_taxonomies(), array( 'hide_empty' => false ) ); + $tax_meta = get_option( 'wpseo_taxonomy_meta' ); + + foreach ( $terms as $term ) { + $this->import_taxonomy_description( $tax_meta, $term->taxonomy, $term->term_id ); + $this->import_taxonomy_robots( $tax_meta, $term->taxonomy, $term->term_id ); + $this->delete_taxonomy_metas( $term->taxonomy, $term->term_id ); + } + + update_option( 'wpseo_taxonomy_meta', $tax_meta ); + } + + /** + * Import the meta description to Yoast SEO + * + * @param array $tax_meta The array with the current metadata. + * @param string $taxonomy String with the name of the taxonomy. + * @param string $term_id The ID of the current term. + */ + private function import_taxonomy_description( & $tax_meta, $taxonomy, $term_id ) { + $description = get_option( 'wpseo_' . $taxonomy . '_' . $term_id, false ); + if ( $description !== false ) { + // Import description. + $tax_meta[ $taxonomy ][ $term_id ]['wpseo_desc'] = $description; + } + } + + /** + * Import the robot value to Yoast SEO + * + * @param array $tax_meta The array with the current metadata. + * @param string $taxonomy String with the name of the taxonomy. + * @param string $term_id The ID of the current term. + */ + private function import_taxonomy_robots( & $tax_meta, $taxonomy, $term_id ) { + $wpseo_robots = get_option( 'wpseo_' . $taxonomy . '_' . $term_id . '_robots', false ); + if ( $wpseo_robots !== false ) { + // The value 1, 2 and 6 are the index values in wpSEO. + $new_robot_value = ( in_array( $wpseo_robots, array( 1, 2, 6 ) ) ) ? 'index' : 'noindex'; + + $tax_meta[ $taxonomy ][ $term_id ]['wpseo_noindex'] = $new_robot_value; + } + } + + /** + * Delete the wpSEO taxonomy meta data. + * + * @param string $taxonomy String with the name of the taxonomy. + * @param string $term_id The ID of the current term. + */ + private function delete_taxonomy_metas( $taxonomy, $term_id ) { + if ( $this->replace ) { + delete_option( 'wpseo_' . $taxonomy . '_' . $term_id ); + delete_option( 'wpseo_' . $taxonomy . '_' . $term_id . '_robots' ); + } + } + + /** + * Getting the robot config by given wpSEO robots value. + * + * @param string $wpseo_robots The value in wpSEO that needs to be converted to the Yoast format. + * + * @return array + */ + private function get_robot_value( $wpseo_robots ) { + static $robot_values; + + if ( $robot_values === null ) { + /** + * The values 1 - 6 are the configured values from wpSEO. This array will map the values of wpSEO to our values. + * + * There are some double array like 1-6 and 3-4. The reason is they only set the index value. The follow value is + * the default we use in the cases there isn't a follow value present. + * + * @var array + */ + $robot_values = array( + 1 => array( 'index' => 2, 'follow' => 0 ), // In wpSEO: index, follow. + 2 => array( 'index' => 2, 'follow' => 1 ), // In wpSEO: index, nofollow. + 3 => array( 'index' => 1, 'follow' => 0 ), // In wpSEO: noindex. + 4 => array( 'index' => 1, 'follow' => 0 ), // In wpSEO: noindex, follow. + 5 => array( 'index' => 1, 'follow' => 1 ), // In wpSEO: noindex, nofollow. + 6 => array( 'index' => 2, 'follow' => 0 ), // In wpSEO: index. + ); + } + + if ( array_key_exists( $wpseo_robots, $robot_values ) ) { + return $robot_values[ $wpseo_robots ]; + } + + return array( 'index' => 2, 'follow' => 0 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-import.php b/wp-content/plugins/wordpress-seo/admin/class-import.php new file mode 100644 index 0000000..0affee8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-import.php @@ -0,0 +1,196 @@ +handle_upload() ) { + return; + } + + $this->determine_path(); + + if ( ! $this->unzip_file() ) { + $this->clean_up(); + + return; + } + + $this->parse_options(); + + $this->clean_up(); + } + + /** + * Handle the file upload + * + * @return boolean + */ + private function handle_upload() { + $overrides = array( 'mimes' => array( 'zip' => 'application/zip' ) ); // Explicitly allow zip in multisite. + $this->file = wp_handle_upload( $_FILES['settings_import_file'], $overrides ); + + if ( is_wp_error( $this->file ) ) { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . $this->file->get_error_message(); + + return false; + } + + if ( is_array( $this->file ) && isset( $this->file['error'] ) ) { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . $this->file['error']; + + return false; + } + + if ( ! isset( $this->file['file'] ) ) { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'Upload failed.', 'wordpress-seo' ); + + return false; + } + + return true; + } + + /** + * Determine the path to the import file + */ + private function determine_path() { + $this->upload_dir = wp_upload_dir(); + + if ( ! defined( 'DIRECTORY_SEPARATOR' ) ) { + define( 'DIRECTORY_SEPARATOR', '/' ); + } + $this->path = $this->upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'wpseo-import' . DIRECTORY_SEPARATOR; + + if ( ! isset( $GLOBALS['wp_filesystem'] ) || ! is_object( $GLOBALS['wp_filesystem'] ) ) { + WP_Filesystem(); + } + } + + /** + * Unzip the file + * + * @return boolean + */ + private function unzip_file() { + $unzipped = unzip_file( $this->file['file'], $this->path ); + if ( is_wp_error( $unzipped ) ) { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . sprintf( __( 'Unzipping failed with error "%s".', 'wordpress-seo' ), $unzipped->get_error_message() ); + + return false; + } + + $this->filename = $this->path . 'settings.ini'; + if ( ! is_file( $this->filename ) || ! is_readable( $this->filename ) ) { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'Unzipping failed - file settings.ini not found.', 'wordpress-seo' ); + + return false; + } + + return true; + } + + /** + * Parse the option file + */ + private function parse_options() { + $options = parse_ini_file( $this->filename, true ); + + if ( is_array( $options ) && $options !== array() ) { + if ( isset( $options['wpseo']['version'] ) && $options['wpseo']['version'] !== '' ) { + $this->old_wpseo_version = $options['wpseo']['version']; + } + foreach ( $options as $name => $opt_group ) { + $this->parse_option_group( $name, $opt_group, $options ); + } + $this->msg = __( 'Settings successfully imported.', 'wordpress-seo' ); + $this->success = true; + } + else { + $this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'No settings found in file.', 'wordpress-seo' ); + } + } + + /** + * Parse the option group and import it + * + * @param string $name Name string. + * @param array $opt_group Option group data. + * @param array $options Options data. + */ + private function parse_option_group( $name, $opt_group, $options ) { + if ( $name === 'wpseo_taxonomy_meta' ) { + $opt_group = json_decode( urldecode( $opt_group['wpseo_taxonomy_meta'] ), true ); + } + + // Make sure that the imported options are cleaned/converted on import. + $option_instance = WPSEO_Options::get_option_instance( $name ); + if ( is_object( $option_instance ) && method_exists( $option_instance, 'import' ) ) { + $option_instance->import( $opt_group, $this->old_wpseo_version, $options ); + } + elseif ( WP_DEBUG === true || ( defined( 'WPSEO_DEBUG' ) && WPSEO_DEBUG === true ) ) { + $this->msg = sprintf( __( 'Setting "%s" is no longer used and has been discarded.', 'wordpress-seo' ), $name ); + } + } + + /** + * Remove the files + */ + private function clean_up() { + if ( file_exists( $this->filename ) && is_writable( $this->filename ) ) { + unlink( $this->filename ); + } + if ( ! empty( $this->file['file'] ) && file_exists( $this->file['file'] ) && is_writable( $this->file['file'] ) ) { + unlink( $this->file['file'] ); + } + if ( file_exists( $this->path ) && is_writable( $this->path ) ) { + $wp_file = new WP_Filesystem_Direct( $this->path ); + $wp_file->rmdir( $this->path, true ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php b/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php new file mode 100644 index 0000000..bd5d888 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php @@ -0,0 +1,501 @@ +analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + $this->analysis_readability = new WPSEO_Metabox_Analysis_Readability(); + } + + /** + * Setting up the hooks + */ + public function setup_hooks() { + $this->set_post_type_hooks(); + + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + + if ( ! empty( $options['keyword-analysis-active'] ) ) { + add_action( 'restrict_manage_posts', array( $this, 'posts_filter_dropdown' ) ); + } + + add_filter( 'request', array( $this, 'column_sort_orderby' ) ); + } + + /** + * Adds the column headings for the SEO plugin for edit posts / pages overview + * + * @param array $columns Already existing columns. + * + * @return array + */ + public function column_heading( $columns ) { + if ( $this->is_metabox_hidden() === true ) { + return $columns; + } + + $added_columns = array(); + + if ( $this->analysis_seo->is_enabled() ) { + $added_columns['wpseo-score'] = __( 'SEO', 'wordpress-seo' ); + } + if ( $this->analysis_readability->is_enabled() ) { + $added_columns['wpseo-score-readability'] = __( 'Readability', 'wordpress-seo' ); + } + $added_columns['wpseo-title'] = __( 'SEO Title', 'wordpress-seo' ); + $added_columns['wpseo-metadesc'] = __( 'Meta Desc.', 'wordpress-seo' ); + + if ( $this->analysis_seo->is_enabled() ) { + $added_columns['wpseo-focuskw'] = __( 'Focus KW', 'wordpress-seo' ); + } + + return array_merge( $columns, $added_columns ); + } + + /** + * Display the column content for the given column + * + * @param string $column_name Column to display the content for. + * @param int $post_id Post to display the column content for. + */ + public function column_content( $column_name, $post_id ) { + if ( $this->is_metabox_hidden() === true ) { + return; + } + + switch ( $column_name ) { + case 'wpseo-score' : + echo $this->parse_column_score( $post_id ); + break; + case 'wpseo-score-readability': + echo $this->parse_column_score_readability( $post_id ); + break; + case 'wpseo-title' : + echo esc_html( apply_filters( 'wpseo_title', wpseo_replace_vars( $this->page_title( $post_id ), get_post( $post_id, ARRAY_A ) ) ) ); + break; + case 'wpseo-metadesc' : + $metadesc_val = apply_filters( 'wpseo_metadesc', wpseo_replace_vars( WPSEO_Meta::get_value( 'metadesc', $post_id ), get_post( $post_id, ARRAY_A ) ) ); + $metadesc = ( '' === $metadesc_val ) ? '' . __( 'Meta description not set.', 'wordpress-seo' ) . '' : esc_html( $metadesc_val ); + echo $metadesc; + break; + case 'wpseo-focuskw' : + $focuskw_val = WPSEO_Meta::get_value( 'focuskw', $post_id ); + $focuskw = ( '' === $focuskw_val ) ? '' . __( 'Focus keyword not set.', 'wordpress-seo' ) . '' : esc_html( $focuskw_val ); + echo $focuskw; + break; + } + } + + /** + * Indicate which of the SEO columns are sortable. + * + * @param array $columns appended with their orderby variable. + * + * @return array + */ + public function column_sort( $columns ) { + if ( $this->is_metabox_hidden() === true ) { + return $columns; + } + + $columns['wpseo-metadesc'] = 'wpseo-metadesc'; + + if ( $this->analysis_seo->is_enabled() ) { + $columns['wpseo-focuskw'] = 'wpseo-focuskw'; + } + + return $columns; + } + + /** + * Hide the SEO Title, Meta Desc and Focus KW columns if the user hasn't chosen which columns to hide + * + * @param array|false $result The hidden columns. + * @param string $option The option name used to set which columns should be hidden. + * @param WP_User $user The User. + * + * @return array|false $result + */ + public function column_hidden( $result, $option, $user ) { + global $wpdb; + + $prefix = $wpdb->get_blog_prefix(); + if ( ! $user->has_prop( $prefix . $option ) && ! $user->has_prop( $option ) ) { + + if ( ! is_array( $result ) ) { + $result = array(); + } + + array_push( $result, 'wpseo-title', 'wpseo-metadesc' ); + + if ( $this->analysis_seo->is_enabled() ) { + array_push( $result, 'wpseo-focuskw' ); + } + } + + return $result; + } + + /** + * Adds a dropdown that allows filtering on the posts SEO Quality. + * + * @return void + */ + public function posts_filter_dropdown() { + if ( $GLOBALS['pagenow'] === 'upload.php' || $this->is_metabox_hidden() === true ) { + return; + } + + $ranks = WPSEO_Rank::get_all_ranks(); + $current_seo_filter = filter_input( INPUT_GET, 'seo_filter' ); + + echo ' + + '; + } + + /** + * Modify the query based on the seo_filter variable in $_GET + * + * @param array $vars Query variables. + * + * @return array + */ + public function column_sort_orderby( $vars ) { + if ( $seo_filter = filter_input( INPUT_GET, 'seo_filter' ) ) { + $rank = new WPSEO_Rank( $seo_filter ); + + if ( WPSEO_Rank::NO_FOCUS === $seo_filter || WPSEO_Rank::NO_INDEX === $seo_filter ) { + $vars = $this->filter_other( $vars, $seo_filter ); + } + else { + $vars = array_merge( $vars, $this->filter_scored( $rank->get_starting_score(), $rank->get_end_score() ) ); + } + } + + if ( $seo_kw_filter = filter_input( INPUT_GET, 'seo_kw_filter' ) ) { + $vars = array_merge( + $vars, array( + 'post_type' => get_query_var( 'post_type', 'post' ), + 'meta_key' => WPSEO_Meta::$meta_prefix . 'focuskw', + 'meta_value' => sanitize_text_field( $seo_kw_filter ), + ) + ); + } + + if ( isset( $vars['orderby'] ) ) { + $vars = array_merge( $vars, $this->filter_order_by( $vars['orderby'] ) ); + } + + return $vars; + } + + /** + * When there is a score just return this meta query array + * + * @param string $low The lowest number in the score range. + * @param string $high The highest number in the score range. + * + * @return array + */ + private function filter_scored( $low, $high ) { + /** + * @internal DON'T touch the order of these without double-checking/adjusting the seo_score_posts_where() method below! + */ + return array( + 'meta_query' => array( + 'relation' => 'AND', + array( + 'key' => WPSEO_Meta::$meta_prefix . 'linkdex', + 'value' => array( $low, $high ), + 'type' => 'numeric', + 'compare' => 'BETWEEN', + ), + array( + 'relation' => 'OR', + array( + 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', + 'value' => '1', + 'compare' => '!=', + ), + ), + ), + ); + } + + /** + * Get vars for noindex or na filters + * + * @param array $vars The unmerged vars. + * @param string $seo_filter The SEO filter. + * + * @return array + */ + private function filter_other( $vars, $seo_filter ) { + switch ( $seo_filter ) { + case 'noindex': + $vars = array_merge( + $vars, + array( + 'meta_query' => array( + array( + 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', + 'value' => '1', + 'compare' => '=', + ), + ), + ) + ); + break; + case 'na': + $vars = array_merge( + $vars, + array( + 'meta_query' => array( + 'relation' => 'AND', + array( + 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', + 'value' => 'needs-a-value-anyway', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => WPSEO_Meta::$meta_prefix . 'linkdex', + 'value' => 'needs-a-value-anyway', + 'compare' => 'NOT EXISTS', + ) + ), + ) + ); + break; + } + + return $vars; + } + + /** + * Returning filters when $order_by is matched in the if-statement + * + * @param string $order_by The ID of the column by which to order the posts. + * + * @return array + */ + private function filter_order_by( $order_by ) { + switch ( $order_by ) { + case 'wpseo-metadesc' : + return array( + 'meta_key' => WPSEO_Meta::$meta_prefix . 'metadesc', + 'orderby' => 'meta_value', + ); + break; + case 'wpseo-focuskw' : + return array( + 'meta_key' => WPSEO_Meta::$meta_prefix . 'focuskw', + 'orderby' => 'meta_value', + ); + break; + } + + return array(); + } + + /** + * Parsing the score column + * + * @param integer $post_id The ID of the post for which to show the score. + * + * @return string The HTML for the SEO score indicator. + */ + private function parse_column_score( $post_id ) { + if ( '1' === WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ) ) { + $rank = new WPSEO_Rank( WPSEO_Rank::NO_INDEX ); + $title = __( 'Post is set to noindex.', 'wordpress-seo' ); + WPSEO_Meta::set_value( 'linkdex', 0, $post_id ); + } + elseif ( '' === WPSEO_Meta::get_value( 'focuskw', $post_id ) ) { + $rank = new WPSEO_Rank( WPSEO_Rank::NO_FOCUS ); + $title = __( 'Focus keyword not set.', 'wordpress-seo' ); + } + else { + $score = (int) WPSEO_Meta::get_value( 'linkdex', $post_id ); + $rank = WPSEO_Rank::from_numeric_score( $score ); + $title = $rank->get_label(); + } + + return $this->render_score_indicator( $rank, $title ); + } + + /** + * Parsing the readability score column. + * + * @param int $post_id The ID of the post for which to show the readability score. + * + * @return string The HTML for the readability score indicator. + */ + private function parse_column_score_readability( $post_id ) { + $score = (int) WPSEO_Meta::get_value( 'content_score', $post_id ); + $rank = WPSEO_Rank::from_numeric_score( $score ); + + return $this->render_score_indicator( $rank ); + } + + /** + * Setting the hooks for the post_types + */ + private function set_post_type_hooks() { + $post_types = get_post_types( array( 'public' => true ), 'names' ); + + if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $pt ) { + if ( $this->is_metabox_hidden( $pt ) === false ) { + add_filter( 'manage_' . $pt . '_posts_columns', array( $this, 'column_heading' ), 10, 1 ); + add_action( 'manage_' . $pt . '_posts_custom_column', array( + $this, + 'column_content', + ), 10, 2 ); + add_action( 'manage_edit-' . $pt . '_sortable_columns', array( + $this, + 'column_sort', + ), 10, 2 ); + + /* + * Use the `get_user_option_{$option}` filter to change the output of the get_user_option + * function for the `manage{$screen}columnshidden` option, which is based on the current + * admin screen. The admin screen we want to target is the `edit-{$post_type}` screen. + */ + $filter = sprintf( 'get_user_option_%s', sprintf( 'manage%scolumnshidden', 'edit-' . $pt ) ); + add_filter( $filter, array( $this, 'column_hidden' ), 10, 3 ); + } + } + unset( $pt ); + } + } + + /** + * Test whether the metabox should be hidden either by choice of the admin or because + * the post type is not a public post type + * + * @since 1.5.0 + * + * @param string $post_type (optional) The post type to test, defaults to the current post post_type. + * + * @return bool Whether or not the meta box (and associated columns etc) should be hidden + */ + private function is_metabox_hidden( $post_type = null ) { + if ( ! isset( $post_type ) && $get_post_type = filter_input( INPUT_GET, 'post_type' ) ) { + $post_type = sanitize_text_field( $get_post_type ); + } + + if ( isset( $post_type ) ) { + // Don't make static as post_types may still be added during the run. + $cpts = get_post_types( array( 'public' => true ), 'names' ); + $options = get_option( 'wpseo_titles' ); + + return ( ( isset( $options[ 'hideeditbox-' . $post_type ] ) && $options[ 'hideeditbox-' . $post_type ] === true ) || in_array( $post_type, $cpts ) === false ); + } + + return false; + } + + /** + * Retrieve the page title. + * + * @param int $post_id Post to retrieve the title for. + * + * @return string + */ + private function page_title( $post_id ) { + $fixed_title = WPSEO_Meta::get_value( 'title', $post_id ); + if ( $fixed_title !== '' ) { + return $fixed_title; + } + + $post = get_post( $post_id ); + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + if ( is_object( $post ) && ( isset( $options[ 'title-' . $post->post_type ] ) && $options[ 'title-' . $post->post_type ] !== '' ) ) { + $title_template = $options[ 'title-' . $post->post_type ]; + $title_template = str_replace( ' %%page%% ', ' ', $title_template ); + + return wpseo_replace_vars( $title_template, $post ); + } + + return wpseo_replace_vars( '%%title%%', $post ); + } + + /** + * @param WPSEO_Rank $rank The rank this indicator should have. + * @param string $title Optional. The title for this rank, defaults to the title of the rank. + * + * @return string The HTML for a score indicator. + */ + private function render_score_indicator( $rank, $title = '' ) { + if ( empty( $title ) ) { + $title = $rank->get_label(); + } + + return '' . $title . ''; + } + + /** + * Hacky way to get round the limitation that you can only have AND *or* OR relationship between + * meta key clauses and not a combination - which is what we need. + * + * @deprecated 3.5 Unnecessary with nested meta queries in core. + * + * @param string $where Where clause. + * + * @return string + */ + public function seo_score_posts_where( $where ) { + + _deprecated_function( 'WPSEO_Metabox_Columns::seo_score_posts_where', '3.5' ); + + global $wpdb; + + /* Find the two mutually exclusive noindex clauses which should be changed from AND to OR relation */ + $find = '`([\s]+AND[\s]+)((?:' . $wpdb->prefix . 'postmeta|mt[0-9]|mt1)\.post_id IS NULL[\s]+)AND([\s]+\([\s]*(?:' . $wpdb->prefix . 'postmeta|mt[0-9])\.meta_key = \'' . WPSEO_Meta::$meta_prefix . 'meta-robots-noindex\' AND CAST\([^\)]+\)[^\)]+\))`'; + + $replace = '$1( $2OR$3 )'; + + $new_where = preg_replace( $find, $replace, $where ); + + if ( $new_where ) { + return $new_where; + } + return $where; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tab.php b/wp-content/plugins/wordpress-seo/admin/class-option-tab.php new file mode 100644 index 0000000..10fe2d2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-option-tab.php @@ -0,0 +1,80 @@ +name = sanitize_title( $name ); + $this->label = $label; + $this->arguments = (array) $arguments; + } + + /** + * Get the name + * + * @return string + */ + public function get_name() { + return $this->name; + } + + /** + * Get the label + * + * @return string + */ + public function get_label() { + return $this->label; + } + + /** + * Get the video URL + * + * @return string + */ + public function get_video_url() { + return $this->get_argument( 'video_url' ); + } + + /** + * Get the option group + * + * @return string + */ + public function get_opt_group() { + return $this->get_argument( 'opt_group' ); + } + + /** + * Get the variable from the supplied arguments + * + * @param string $variable Variable to retrieve. + * @param string $default Default to use when variable not found. + * + * @return mixed|string + */ + protected function get_argument( $variable, $default = '' ) { + return ! empty( $this->arguments[ $variable ] ) ? $this->arguments[ $variable ] : $default; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php b/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php new file mode 100644 index 0000000..7377b80 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php @@ -0,0 +1,53 @@ +get_base() . '/' . $tab->get_name() . '.php'; + } + + /** + * @param WPSEO_Option_Tabs $option_tabs Option Tabs to get tabs from. + * @param Yoast_Form $yform Yoast Form which is being used in the views. + * @param array $options Options which are being used in the views. + */ + public function run( WPSEO_Option_Tabs $option_tabs, Yoast_Form $yform, $options = array() ) { + + echo ''; + + foreach ( $option_tabs->get_tabs() as $tab ) { + // Prepare the help center for each tab. + $help_center = new WPSEO_Help_Center( $option_tabs->get_base(), $tab ); + + $identifier = $tab->get_name(); + printf( '
', $identifier ); + + // Output the help center. + $help_center->output_help_center(); + + // Output the settings view for all tabs. + $tab_view = $this->get_tab_view( $option_tabs, $tab ); + if ( is_file( $tab_view ) ) { + require_once $tab_view; + } + + echo '
'; + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php b/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php new file mode 100644 index 0000000..2d5bd54 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php @@ -0,0 +1,106 @@ +base = sanitize_title( $base ); + + $tab = filter_input( INPUT_GET, 'tab' ); + $this->active_tab = empty( $tab ) ? $active_tab : $tab; + } + + /** + * Get the base + * + * @return string + */ + public function get_base() { + return $this->base; + } + + /** + * Add a tab + * + * @param WPSEO_Option_Tab $tab Tab to add. + * + * @return $this + */ + public function add_tab( WPSEO_Option_Tab $tab ) { + $this->tabs[] = $tab; + + return $this; + } + + /** + * Get active tab + * + * @return null|WPSEO_Option_Tab Get the active tab. + */ + public function get_active_tab() { + if ( empty( $this->active_tab ) ) { + return null; + } + + $active_tabs = array_filter( $this->tabs, array( $this, 'is_active_tab' ) ); + if ( ! empty( $active_tabs ) ) { + $active_tabs = array_values( $active_tabs ); + if ( count( $active_tabs ) === 1 ) { + return $active_tabs[0]; + } + } + + return null; + } + + /** + * Is the tab the active tab + * + * @param WPSEO_Option_Tab $tab Tab to check for active tab. + * + * @return bool + */ + public function is_active_tab( WPSEO_Option_Tab $tab ) { + return ( $tab->get_name() === $this->active_tab ); + } + + /** + * Get all tabs + * + * @return WPSEO_Option_Tab[] + */ + public function get_tabs() { + return $this->tabs; + } + + /** + * Display the tabs + * + * @param Yoast_Form $yform Yoast Form needed in the views. + * @param array $options Options needed in the views. + */ + public function display( Yoast_Form $yform, $options = array() ) { + $formatter = new WPSEO_Option_Tabs_Formatter(); + $formatter->run( $this, $yform, $options ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php new file mode 100644 index 0000000..7a04b59 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php @@ -0,0 +1,241 @@ +register_yoast_plugins(); + $this->register_yoast_plugins_status(); + } + + /** + * Registers all the available Yoast SEO plugins. + */ + protected function register_yoast_plugins() { + $this->plugins = array( + 'yoast-seo-premium' => array( + 'url' => 'https://yoast.com/wordpress/plugins/seo-premium/', + 'title' => 'Yoast SEO Premium', + /* translators: %1$s expands to Yoast SEO */ + 'description' => sprintf( __( 'The premium version of %1$s with more features & support.', 'wordpress-seo' ), 'Yoast SEO' ), + 'installed' => false, + 'slug' => 'wordpress-seo-premium/wp-seo-premium.php', + ), + + 'video-seo-for-wordpress-seo-by-yoast' => array( + 'url' => 'https://yoast.com/wordpress/plugins/video-seo/', + 'title' => 'Video SEO', + 'description' => __( 'Optimize your videos to show them off in search results and get more clicks!', 'wordpress-seo' ), + 'installed' => false, + 'slug' => 'wpseo-video/video-seo.php', + ), + + 'yoast-news-seo' => array( + 'url' => 'https://yoast.com/wordpress/plugins/news-seo/', + 'title' => 'News SEO', + 'description' => __( 'Are you in Google News? Increase your traffic from Google News by optimizing for it!', 'wordpress-seo' ), + 'installed' => false, + 'slug' => 'wpseo-news/wpseo-news.php', + ), + + 'local-seo-for-yoast-seo' => array( + 'url' => 'https://yoast.com/wordpress/plugins/local-seo/', + 'title' => 'Local SEO', + 'description' => __( 'Rank better locally and in Google Maps, without breaking a sweat!', 'wordpress-seo' ), + 'installed' => false, + 'slug' => 'wordpress-seo-local/local-seo.php', + ), + + 'yoast-woocommerce-seo' => array( + 'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/', + 'title' => 'Yoast WooCommerce SEO', + /* translators: %1$s expands to Yoast SEO */ + 'description' => sprintf( __( 'Seamlessly integrate WooCommerce with %1$s and get extra features!', 'wordpress-seo' ), 'Yoast SEO' ), + 'installed' => false, + 'slug' => 'wpseo-woocommerce/wpseo-woocommerce.php', + ), + ); + } + + /** + * Sets certain plugin properties based on WordPress' status. + */ + protected function register_yoast_plugins_status() { + + foreach ( $this->plugins as $name => $plugin ) { + + $plugin_slug = $plugin['slug']; + $plugin_path = WP_PLUGIN_DIR . '/' . $plugin_slug; + + if ( file_exists( $plugin_path ) ) { + $plugin_data = get_plugin_data( $plugin_path, false, false ); + $this->plugins[ $name ]['installed'] = true; + $this->plugins[ $name ]['version'] = $plugin_data['Version']; + $this->plugins[ $name ]['active'] = is_plugin_active( $plugin_slug ); + } + } + } + + /** + * Checks whether or not a plugin is known within the Yoast SEO collection. + * + * @param {string} $plugin The plugin to search for. + * + * @return bool Whether or not the plugin is exists. + */ + protected function plugin_exists( $plugin ) { + return isset( $this->plugins[ $plugin ] ); + } + + /** + * Gets all the possibly available plugins. + * + * @return array Array containing the information about the plugins. + */ + public function get_plugins() { + return $this->plugins; + } + + /** + * Gets a specific plugin. Returns an empty array if it cannot be found. + * + * @param {string} $plugin The plugin to search for. + * + * @return array The plugin properties. + */ + public function get_plugin( $plugin ) { + if ( ! $this->plugin_exists( $plugin ) ) { + return array(); + } + + return $this->plugins[ $plugin ]; + } + + /** + * Gets the version of the plugin. + * + * @param {string} $plugin The plugin to search for. + * + * @return string The version associated with the plugin. + */ + public function get_version( $plugin ) { + if ( ! isset( $plugin['version'] ) ) { + return ''; + } + + return $plugin['version']; + } + + /** + * Checks if there are dependencies available for the plugin. + * + * @param {string} $plugin The plugin to search for. + * + * @return bool Whether or not there is a dependency present. + */ + public function has_dependencies( $plugin ) { + return ( isset( $plugin['_dependencies'] ) && ! empty( $plugin['_dependencies'] ) ); + } + + /** + * Gets the dependencies for the plugin. + * + * @param {string} $plugin The plugin to search for. + * + * @return array Array containing all the dependencies associated with the plugin. + */ + public function get_dependencies( $plugin ) { + if ( ! $this->has_dependencies( $plugin ) ) { + return array(); + } + + return $plugin['_dependencies']; + } + + /** + * Checks if all dependencies are satisfied. + * + * @param {string} $plugin The plugin to search for. + * + * @return bool Whether or not the dependencies are satisfied. + */ + public function dependencies_are_satisfied( $plugin ) { + if ( ! $this->has_dependencies( $plugin ) ) { + return true; + } + + $dependencies = $this->get_dependencies( $plugin ); + $installed_dependencies = array_filter( $dependencies, array( $this, 'is_dependency_available' ) ); + + return count( $installed_dependencies ) === count( $dependencies ); + } + + /** + * Checks whether or not one of the plugins is properly installed and usable. + * + * @param {string} $plugin The plugin to search for. + * + * @return bool Whether or not the plugin is properly installed. + */ + public function is_installed( $plugin ) { + if ( empty( $plugin ) ) { + return false; + } + + $dependencies_are_satisfied = $this->dependencies_are_satisfied( $plugin ); + + return $dependencies_are_satisfied && $this->is_available( $plugin ); + } + + /** + * Gets all installed plugins. + * + * @return array + */ + public function get_installed_plugins() { + $installed = array(); + + foreach ( $this->plugins as $pluginKey => $plugin ) { + if ( $this->is_installed( $plugin ) ) { + $installed[ $pluginKey ] = $plugin; + } + } + + return $installed; + } + + /** + * Checks for the availability of the plugin. + * + * @param {string} $plugin The plugin to search for. + * + * @return bool Whether or not the plugin is available. + */ + public function is_available( $plugin ) { + return isset( $plugin['installed'] ) && $plugin['installed'] === true; + } + + /** + * Checks whether a dependency is available. + * + * @param {string} $dependency The dependency to look for. + * + * @return bool Whether or not the dependency is available. + */ + public function is_dependency_available( $dependency ) { + return class_exists( $dependency ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php new file mode 100644 index 0000000..9b0ee88 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php @@ -0,0 +1,101 @@ +current_wpseo_version = $this->get_major_minor_version( $version ); + $this->availability_checker = $this->retrieve_availability_checker( $availability_checker ); + $this->installed_plugins = $this->availability_checker->get_installed_plugins(); + } + + /** + * Retrieves the availability checker. + * + * @param null|object $checker The checker to set. + * + * @return WPSEO_Plugin_Availability The checker to use. + */ + private function retrieve_availability_checker( $checker ) { + if ( is_null( $checker ) || ! is_object( $checker ) ) { + return new WPSEO_Plugin_Availability(); + } + + return $checker; + } + + /** + * Wraps the availability checker's get_installed_plugins method. + * + * @return array Array containing all the installed plugins. + */ + public function get_installed_plugins() { + return $this->installed_plugins; + } + + /** + * Creates a list of installed plugins and whether or not they are compatible. + * + * @return array Array containing the installed plugins and compatibility. + */ + public function get_installed_plugins_compatibility() { + foreach ( $this->installed_plugins as $key => $plugin ) { + + $this->installed_plugins[ $key ]['compatible'] = $this->is_compatible( $key ); + } + + return $this->installed_plugins; + } + + /** + * Checks whether or not a plugin is compatible. + * + * @param string $plugin The plugin to look for and match. + * + * @return bool Whether or not the plugin is compatible. + */ + public function is_compatible( $plugin ) { + $plugin = $this->availability_checker->get_plugin( $plugin ); + $plugin_version = $this->availability_checker->get_version( $plugin ); + + return $this->get_major_minor_version( $plugin_version ) === $this->current_wpseo_version; + } + + /** + * Gets the major/minor version of the plugin for easier comparing. + * + * @param string $version The version to trim. + * + * @return string The major/minor version of the plugin. + */ + protected function get_major_minor_version( $version ) { + return substr( $version, 0, 3 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php new file mode 100644 index 0000000..bb0b751 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php @@ -0,0 +1,155 @@ + array( + '2-click-socialmedia-buttons/2-click-socialmedia-buttons.php', + // 2 Click Social Media Buttons. + 'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook. + 'add-meta-tags/add-meta-tags.php', // Add Meta Tags. + 'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail. + 'facebook/facebook.php', // Facebook (official plugin). + 'facebook-awd/AWD_facebook.php', // Facebook AWD All in one. + 'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php', + // Facebook Featured Image & OG Meta Tags. + 'facebook-meta-tags/facebook-metatags.php', // Facebook Meta Tags. + 'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php', + // Facebook Open Graph Meta Tags for WordPress. + 'facebook-revised-open-graph-meta-tag/index.php', // Facebook Revised Open Graph Meta Tag. + 'facebook-thumb-fixer/_facebook-thumb-fixer.php', // Facebook Thumb Fixer. + 'facebook-and-digg-thumbnail-generator/facebook-and-digg-thumbnail-generator.php', + // Fedmich's Facebook Open Graph Meta. + 'header-footer/plugin.php', // Header and Footer. + 'network-publisher/networkpub.php', // Network Publisher. + 'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG. + 'opengraph/opengraph.php', // Open Graph. + 'open-graph-protocol-framework/open-graph-protocol-framework.php', + // Open Graph Protocol Framework. + 'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments. + 'seo-ultimate/seo-ultimate.php', // SEO Ultimate. + 'sexybookmarks/sexy-bookmarks.php', // Shareaholic. + 'shareaholic/sexy-bookmarks.php', // Shareaholic. + 'sharepress/sharepress.php', // SharePress. + 'simple-facebook-connect/sfc.php', // Simple Facebook Connect. + 'social-discussions/social-discussions.php', // Social Discussions. + 'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit. + 'socialize/socialize.php', // Socialize. + 'only-tweet-like-share-and-google-1/tweet-like-plusone.php', + // Tweet, Like, Google +1 and Share. + 'wordbooker/wordbooker.php', // Wordbooker. + 'wpsso/wpsso.php', // WordPress Social Sharing Optimization. + 'wp-caregiver/wp-caregiver.php', // WP Caregiver. + 'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php', + // WP Facebook Like Send & Open Graph Meta. + 'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol. + 'wp-ogp/wp-ogp.php', // WP-OGP. + 'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin. + ), + 'xml_sitemaps' => array( + 'google-sitemap-plugin/google-sitemap-plugin.php', + // Google Sitemap (BestWebSoft). + 'xml-sitemaps/xml-sitemaps.php', + // XML Sitemaps (Denis de Bernardy and Mike Koepke). + 'bwp-google-xml-sitemaps/bwp-simple-gxs.php', + // Better WordPress Google XML Sitemaps (Khang Minh). + 'google-sitemap-generator/sitemap.php', + // Google XML Sitemaps (Arne Brachhold). + 'xml-sitemap-feed/xml-sitemap.php', + // XML Sitemap & Google News feeds (RavanH). + 'google-monthly-xml-sitemap/monthly-xml-sitemap.php', + // Google Monthly XML Sitemap (Andrea Pernici). + 'simple-google-sitemap-xml/simple-google-sitemap-xml.php', + // Simple Google Sitemap XML (iTx Technologies). + 'another-simple-xml-sitemap/another-simple-xml-sitemap.php', + // Another Simple XML Sitemap. + 'xml-maps/google-sitemap.php', + // Xml Sitemap (Jason Martens). + 'google-xml-sitemap-generator-by-anton-dachauer/adachauer-google-xml-sitemap.php', + // Google XML Sitemap Generator by Anton Dachauer (Anton Dachauer). + 'wp-xml-sitemap/wp-xml-sitemap.php', + // WP XML Sitemap (Team Vivacity). + 'sitemap-generator-for-webmasters/sitemap.php', + // Sitemap Generator for Webmasters (iwebslogtech). + 'xml-sitemap-xml-sitemapcouk/xmls.php', + // XML Sitemap - XML-Sitemap.co.uk (Simon Hancox). + 'sewn-in-xml-sitemap/sewn-xml-sitemap.php', + // Sewn In XML Sitemap (jcow). + 'rps-sitemap-generator/rps-sitemap-generator.php', + // RPS Sitemap Generator (redpixelstudios). + ), + ); + + /** + * Overrides instance to set with this class as class + * + * @param string $class_name Optional class name. + * + * @return Yoast_Plugin_Conflict + */ + public static function get_instance( $class_name = __CLASS__ ) { + return parent::get_instance( $class_name ); + } + + /** + * After activating any plugin, this method will be executed by a hook. + * + * If the activated plugin is conflicting with ours a notice will be shown. + * + * @param string|bool $plugin Optional plugin basename to check. + */ + public static function hook_check_for_plugin_conflicts( $plugin = false ) { + + // The instance of itself. + $instance = self::get_instance(); + + // Only add plugin as active plugin if $plugin isn't false. + if ( $plugin && is_string( $plugin ) ) { + // Because it's just activated. + $instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin ); + } + + $plugin_sections = array(); + + // Only check for open graph problems when they are enabled. + $social_options = WPSEO_Options::get_option( 'wpseo_social' ); + if ( $social_options['opengraph'] ) { + /* translators: %1$s expands to Yoast SEO, %2%s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output*/ + $plugin_sections['open_graph'] = __( 'Both %1$s and %2$s create OpenGraph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' ) + . '

' + . '' + /* translators: %1$s expands to Yoast SEO */ + . sprintf( __( 'Configure %1$s\'s OpenGraph settings', 'wordpress-seo' ), 'Yoast SEO' ) + . ''; + } + + // Only check for XML conflicts if sitemaps are enabled. + $xml_sitemap_options = WPSEO_Options::get_option( 'wpseo_xml' ); + if ( $xml_sitemap_options['enablexmlsitemap'] ) { + /* translators: %1$s expands to Yoast SEO, %2$s: 'Google XML Sitemaps' plugin name of possibly conflicting plugin with regard to the creation of sitemaps*/ + $plugin_sections['xml_sitemaps'] = __( 'Both %1$s and %2$s can create XML sitemaps. Having two XML sitemaps is not beneficial for search engines, yet might slow down your site.', 'wordpress-seo' ) + . '

' + . '' + /* translators: %1$s expands to Yoast SEO */ + . sprintf( __( 'Configure %1$s\'s XML Sitemap settings', 'wordpress-seo' ), 'Yoast SEO' ) + . ''; + } + + $instance->check_plugin_conflicts( $plugin_sections ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php b/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php new file mode 100644 index 0000000..302e39e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php @@ -0,0 +1,87 @@ +identifier = $identifier; + $this->heading_level = $heading_level; + $this->title = $title; + $this->content = $content; + } + + /** + * Returns the premium popup as an HTML string. + * + * @param bool $popup Show this message as a popup show it straight away. + * + * @return string + */ + public function get_premium_message( $popup = true ) { + // Don't show in Premium. + if ( defined( 'WPSEO_PREMIUM_FILE' ) ) { + return ''; + } + + $assets_uri = trailingslashit( plugin_dir_url( WPSEO_FILE ) ); + $premium_uri = 'https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-metabox&utm_medium=popup&utm_campaign=help-center-contact-support'; + + /* translators: %s expands to Yoast SEO Premium */ + $cta_text = sprintf( __( 'Buy %s', 'wordpress-seo' ), 'Yoast SEO Premium' ); + $classes = ''; + if ( $popup ) { + $classes = ' hidden'; + } + + $popup = << + Yoast SEO + <{$this->heading_level} id="wpseo-contact-support-popup-title" class="wpseo-premium-popup-title">{$this->title}heading_level}> +

{$this->content}

+ {$cta_text} + +EO_POPUP; + + return $popup; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php b/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php new file mode 100644 index 0000000..2d21231 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php @@ -0,0 +1,226 @@ +register_hooks(); + } + + /** + * Get the current post ID. + * + * @return integer The post ID. + */ + protected function get_current_id() { + return filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT ); + } + + /** + * Add primary term templates + */ + public function wp_footer() { + $taxonomies = $this->get_primary_term_taxonomies(); + + if ( ! empty( $taxonomies ) ) { + $this->include_js_templates(); + } + } + + /** + * Enqueues all the assets needed for the primary term interface + * + * @return void + */ + public function enqueue_assets() { + global $pagenow; + + if ( ! WPSEO_Metabox::is_post_edit( $pagenow ) ) { + return; + } + + $taxonomies = $this->get_primary_term_taxonomies(); + + // Only enqueue if there are taxonomies that need a primary term. + if ( empty( $taxonomies ) ) { + return; + } + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'primary-category' ); + $asset_manager->enqueue_script( 'primary-category' ); + + $taxonomies = array_map( array( $this, 'map_taxonomies_for_js' ), $taxonomies ); + + $data = array( + 'taxonomies' => $taxonomies, + ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'primary-category', 'wpseoPrimaryCategoryL10n', $data ); + } + + /** + * Saves all selected primary terms + * + * @param int $post_ID Post ID to save primary terms for. + */ + public function save_primary_terms( $post_ID ) { + // Bail if this is a multisite installation and the site has been switched. + if ( is_multisite() && ms_is_switched() ) { + return; + } + + $taxonomies = $this->get_primary_term_taxonomies( $post_ID ); + + foreach ( $taxonomies as $taxonomy ) { + $this->save_primary_term( $post_ID, $taxonomy ); + } + } + + /** + * /** + * Get the id of the primary term + * + * @param string $taxonomy_name Taxonomy name for the term. + * + * @return int primary term id + */ + protected function get_primary_term( $taxonomy_name ) { + $primary_term = new WPSEO_Primary_Term( $taxonomy_name, $this->get_current_id() ); + + return $primary_term->get_primary_term(); + } + + /** + * Returns all the taxonomies for which the primary term selection is enabled + * + * @param int $post_ID Default current post ID. + * @return array + */ + protected function get_primary_term_taxonomies( $post_ID = null ) { + + if ( null === $post_ID ) { + $post_ID = $this->get_current_id(); + } + + if ( false !== ( $taxonomies = wp_cache_get( 'primary_term_taxonomies_' . $post_ID, 'wpseo' ) ) ) { + return $taxonomies; + } + + $taxonomies = $this->generate_primary_term_taxonomies( $post_ID ); + + wp_cache_set( 'primary_term_taxonomies_' . $post_ID, $taxonomies, 'wpseo' ); + + return $taxonomies; + } + + /** + * Include templates file + */ + protected function include_js_templates() { + include_once WPSEO_PATH . '/admin/views/js-templates-primary-term.php'; + } + + /** + * Save the primary term for a specific taxonomy + * + * @param int $post_ID Post ID to save primary term for. + * @param WP_Term $taxonomy Taxonomy to save primary term for. + */ + protected function save_primary_term( $post_ID, $taxonomy ) { + $primary_term = filter_input( INPUT_POST, WPSEO_Meta::$form_prefix . 'primary_' . $taxonomy->name . '_term', FILTER_SANITIZE_NUMBER_INT ); + + // We accept an empty string here because we need to save that if no terms are selected. + if ( null !== $primary_term && check_admin_referer( 'save-primary-term', WPSEO_Meta::$form_prefix . 'primary_' . $taxonomy->name . '_nonce' ) ) { + $primary_term_object = new WPSEO_Primary_Term( $taxonomy->name, $post_ID ); + $primary_term_object->set_primary_term( $primary_term ); + } + } + + /** + * Generate the primary term taxonomies. + * + * @param int $post_ID ID of the post. + * + * @return array + */ + protected function generate_primary_term_taxonomies( $post_ID ) { + $post_type = get_post_type( $post_ID ); + $all_taxonomies = get_object_taxonomies( $post_type, 'objects' ); + $all_taxonomies = array_filter( $all_taxonomies, array( $this, 'filter_hierarchical_taxonomies' ) ); + + /** + * Filters which taxonomies for which the user can choose the primary term. + * + * @api array $taxonomies An array of taxonomy objects that are primary_term enabled. + * + * @param string $post_type The post type for which to filter the taxonomies. + * @param array $all_taxonomies All taxonomies for this post types, even ones that don't have primary term + * enabled. + */ + $taxonomies = (array) apply_filters( 'wpseo_primary_term_taxonomies', $all_taxonomies, $post_type, $all_taxonomies ); + + return $taxonomies; + } + + /** + * Returns an array suitable for use in the javascript + * + * @param stdClass $taxonomy The taxonomy to map. + * + * @return array + */ + private function map_taxonomies_for_js( $taxonomy ) { + $primary_term = $this->get_primary_term( $taxonomy->name ); + + if ( empty( $primary_term ) ) { + $primary_term = ''; + } + + return array( + 'title' => $taxonomy->labels->singular_name, + 'name' => $taxonomy->name, + 'primary' => $primary_term, + 'terms' => array_map( array( $this, 'map_terms_for_js' ), get_terms( $taxonomy->name ) ), + ); + } + + /** + * Returns an array suitable for use in the javascript + * + * @param stdClass $term The term to map. + * + * @return array + */ + private function map_terms_for_js( $term ) { + return array( + 'id' => $term->term_id, + 'name' => $term->name, + ); + } + + /** + * Returns whether or not a taxonomy is hierarchical + * + * @param stdClass $taxonomy Taxonomy object. + * + * @return bool + */ + private function filter_hierarchical_taxonomies( $taxonomy ) { + return (bool) $taxonomy->hierarchical; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php b/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php new file mode 100644 index 0000000..fe00692 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php @@ -0,0 +1,201 @@ +options = $this->get_options(); + } + + /** + * Checks if the notice should be added or removed. + */ + public function initialize() { + if ( $this->is_notice_dismissed() ) { + $this->remove_notification(); + + return; + } + + if ( $this->should_add_notification() ) { + $this->add_notification(); + } + } + + /** + * Sets the upgrade notice. + */ + public function set_upgrade_notice() { + + if ( $this->has_first_activated_on() ) { + return; + } + + $this->set_first_activated_on(); + $this->add_notification(); + } + + /** + * Listener for the upsell notice. + */ + public function dismiss_notice_listener() { + if ( filter_input( INPUT_GET, 'yoast_dismiss' ) !== 'upsell' ) { + return; + } + + $this->dismiss_notice(); + + wp_redirect( admin_url( 'admin.php?page=wpseo_dashboard' ) ); + exit; + } + + /** + * When the notice should be shown. + * + * @return bool + */ + protected function should_add_notification() { + return ( $this->options['first_activated_on'] < strtotime( '-2weeks' ) ); + } + + /** + * Checks if the options has a first activated on date value. + */ + protected function has_first_activated_on() { + return $this->options['first_activated_on'] !== false; + } + + /** + * Sets the first activated on. + */ + protected function set_first_activated_on() { + $this->options['first_activated_on'] = strtotime( '-2weeks' ); + + $this->save_options(); + } + + /** + * Adds a notification to the notification center. + */ + protected function add_notification() { + $notification_center = Yoast_Notification_Center::get(); + $notification_center->add_notification( $this->get_notification() ); + } + + /** + * Adds a notification to the notification center. + */ + protected function remove_notification() { + $notification_center = Yoast_Notification_Center::get(); + $notification_center->remove_notification( $this->get_notification() ); + } + + /** + * Returns a premium upsell section if using the free plugin. + * + * @return string + */ + protected function get_premium_upsell_section() { + $features = new WPSEO_Features(); + if ( $features->is_free() ) { + /* translators: %1$s expands anchor to premium plugin page, %2$s expands to */ + return sprintf( + __( 'By the way, did you know we also have a %1$sPremium plugin%2$s? It offers advanced features, like a redirect manager and support for multiple keywords. It also comes with 24/7 personal support.' , 'wordpress-seo' ), + "", + '' + ); + } + + return ''; + } + + /** + * Gets the notification value. + * + * @return Yoast_Notification + */ + protected function get_notification() { + /* translators: %1$s expands to Yoast SEO, %2$s is a link start tag to the plugin page on WordPress.org, %3$s is the link closing tag. */ + $message = sprintf( + __( 'We\'ve noticed you\'ve been using %1$s for some time now; we hope you love it! We\'d be thrilled if you could %2$sgive us a 5 stars rating on WordPress.org%3$s!', 'wordpress-seo' ), + 'Yoast SEO', + '', + '' + ) . "\n\n"; + + $message .= sprintf( + /* translators: %1$s is a link start tag to the bugreport guidelines on the Yoast knowledge base, %2$s is the link closing tag. */ + __( 'If you are experiencing issues, %1$splease file a bug report%2$s and we\'ll do our best to help you out.', 'wordpress-seo' ), + '', + '' + ) . "\n\n"; + + $message .= $this->get_premium_upsell_section() . "\n\n"; + + $message .= sprintf( + /* translators: %1$s is the notification dismissal link start tag, %2$s is the link closing tag. */ + __( '%1$sPlease don\'t show me this notification anymore%2$s', 'wordpress-seo' ), + '', + '' + ); + + $notification = new Yoast_Notification( + $message, + array( + 'type' => Yoast_Notification::WARNING, + 'id' => 'wpseo-upsell-notice', + 'capabilities' => 'manage_options', + 'priority' => 0.8, + ) + ); + + return $notification; + } + + /** + * Dismisses the notice. + * + * @return string + */ + protected function is_notice_dismissed() { + return get_user_meta( get_current_user_id(), self::USER_META_DISMISSED, true ) === '1'; + } + + /** + * Dismisses the notice. + */ + protected function dismiss_notice() { + update_user_meta( get_current_user_id(), self::USER_META_DISMISSED, true ); + } + + /** + * Returns the set options + * + * @return mixed|void + */ + protected function get_options() { + return get_option( self::OPTION_NAME ); + } + + /** + * Saves the options to the database. + */ + protected function save_options() { + update_option( self::OPTION_NAME, $this->options ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-recalculate-scores.php b/wp-content/plugins/wordpress-seo/admin/class-recalculate-scores.php new file mode 100644 index 0000000..4e1a72f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-recalculate-scores.php @@ -0,0 +1,52 @@ +enqueue_script( 'recalculate' ); + } + + /** + * Initialize the modal box to be displayed when needed. + */ + public function modal_box() { + // Adding the thickbox. + add_thickbox(); + + $progress = sprintf( + /* translators: 1: expands to a containing the number of posts recalculated. 2: expands to a containing the total number of posts. */ + __( '%1$s of %2$s done.', 'wordpress-seo' ), + '0', + '0' + ); + + ?> + + options = WPSEO_Options::get_option( 'wpseo_social' ); + self::translate_meta_boxes(); + add_filter( 'wpseo_save_metaboxes', array( $this, 'save_meta_boxes' ), 10, 1 ); + add_action( 'wpseo_save_compare_data', array( $this, 'og_data_compare' ), 10, 1 ); + } + + /** + * Translate text strings for use in the meta box + * + * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to + * the main meta box definition array in the class WPSEO_Meta() as well!!!! + */ + public static function translate_meta_boxes() { + /* translators: %s expands to the social network's name */ + $title_text = __( 'If you don\'t want to use the post title for sharing the post on %s but instead want another title there, write it here.', 'wordpress-seo' ); + /* translators: %s expands to the social network's name */ + $description_text = __( 'If you don\'t want to use the meta description for sharing the post on %s but want another description there, write it here.', 'wordpress-seo' ); + /* translators: %s expands to the social network's name */ + $image_text = __( 'If you want to override the image used on %s for this post, upload / choose an image or add the URL here.', 'wordpress-seo' ); + /* translators: %1$s expands to the social network, %2$s to the recommended image size */ + $image_size_text = __( 'The recommended image size for %1$s is %2$s pixels.', 'wordpress-seo' ); + + $options = WPSEO_Options::get_option( 'wpseo_social' ); + + $social_networks = array( + 'opengraph' => __( 'Facebook', 'wordpress-seo' ), + 'twitter' => __( 'Twitter', 'wordpress-seo' ), + ); + + // Source: https://blog.bufferapp.com/ideal-image-sizes-social-media-posts. + $recommended_image_sizes = array( + /* translators: %1$s expands to the image recommended width, %2$s to its height. */ + 'opengraph' => sprintf( __( '%1$s by %2$s', 'wordpress-seo' ), '1200', '630' ), // Source: https://developers.facebook.com/docs/sharing/best-practices#images. + /* translators: %1$s expands to the image recommended width, %2$s to its height. */ + 'twitter' => sprintf( __( '%1$s by %2$s', 'wordpress-seo' ), '1024', '512' ), + ); + + foreach ( $social_networks as $network => $label ) { + if ( true === $options[ $network ] ) { + + self::$meta_fields['social'][ $network . '-title' ]['title'] = sprintf( __( '%s Title', 'wordpress-seo' ), $label ); + self::$meta_fields['social'][ $network . '-title' ]['description'] = sprintf( $title_text, $label ); + + self::$meta_fields['social'][ $network . '-description' ]['title'] = sprintf( __( '%s Description', 'wordpress-seo' ), $label ); + self::$meta_fields['social'][ $network . '-description' ]['description'] = sprintf( $description_text, $label ); + + self::$meta_fields['social'][ $network . '-image' ]['title'] = sprintf( __( '%s Image', 'wordpress-seo' ), $label ); + self::$meta_fields['social'][ $network . '-image' ]['description'] = sprintf( $image_text, $label ) . ' ' . sprintf( $image_size_text, $label, $recommended_image_sizes[ $network ] ); + } + } + } + + /** + * Returns the metabox section for the social settings. + * + * @return WPSEO_Metabox_Tab_Section + */ + public function get_meta_section() { + $tabs = array(); + $social_meta_fields = $this->get_meta_field_defs( 'social' ); + $single = true; + + if ( $this->options['opengraph'] === true && $this->options['twitter'] === true ) { + $single = null; + } + + if ( $this->options['opengraph'] === true ) { + $tabs[] = new WPSEO_Metabox_Form_Tab( + 'facebook', + $this->get_social_tab_content( 'opengraph', $social_meta_fields ), + '' . __( 'Facebook / Open Graph metadata', 'wordpress-seo' ) . '', + array( + 'link_aria_label' => __( 'Facebook / Open Graph metadata', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-se', + 'single' => $single, + ) + ); + } + + if ( $this->options['twitter'] === true ) { + $tabs[] = new WPSEO_Metabox_Form_Tab( + 'twitter', + $this->get_social_tab_content( 'twitter', $social_meta_fields ), + '' . __( 'Twitter metadata', 'wordpress-seo' ) . '', + array( + 'link_aria_label' => __( 'Twitter metadata', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-se', + 'single' => $single, + ) + ); + } + + return new WPSEO_Metabox_Tab_Section( + 'social', + '' . __( 'Social', 'wordpress-seo' ) . '', + $tabs, + array( + 'link_aria_label' => __( 'Social', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Generates the html for a social settings tab for one of the supported social media. + * + * @param string $medium can be 'opengraph' or 'twitter'. + * @param array $meta_field_defs The social meta field definitions. + * + * @return string + */ + private function get_social_tab_content( $medium, $meta_field_defs ) { + $field_names = array( + $medium . '-title', + $medium . '-description', + $medium . '-image', + ); + + $tab_content = ''; + + foreach ( $field_names as $field_name ) { + $tab_content .= $this->do_meta_box( $meta_field_defs[ $field_name ], $field_name ); + } + + return $tab_content; + } + + /** + * Filter over the meta boxes to save, this function adds the Social meta boxes. + * + * @param array $field_defs Array of metaboxes to save. + * + * @return array + */ + public function save_meta_boxes( $field_defs ) { + return array_merge( $field_defs, $this->get_meta_field_defs( 'social' ) ); + } + + /** + * This method will compare opengraph fields with the posted values. + * + * When fields are changed, the facebook cache will be purge. + * + * @param WP_Post $post Post instance. + */ + public function og_data_compare( $post ) { + + // Check if post data is available, if post_id is set and if original post_status is publish. + if ( + ! empty( $_POST ) && ! empty( $post->ID ) && $post->post_status == 'publish' && + isset( $_POST['original_post_status'] ) && $_POST['original_post_status'] === 'publish' + ) { + + $fields_to_compare = array( + 'opengraph-title', + 'opengraph-description', + 'opengraph-image', + ); + + $reset_facebook_cache = false; + + foreach ( $fields_to_compare as $field_to_compare ) { + $old_value = self::get_value( $field_to_compare, $post->ID ); + $new_value = self::get_post_value( self::$form_prefix . $field_to_compare ); + + if ( $old_value !== $new_value ) { + $reset_facebook_cache = true; + break; + } + } + unset( $field_to_compare, $old_value, $new_value ); + + if ( $reset_facebook_cache ) { + wp_remote_get( + 'https://graph.facebook.com/?id=' . get_permalink( $post->ID ) . '&scrape=true&method=post' + ); + } + } + } + + + /********************** DEPRECATED METHODS **********************/ + + /** + * Define the meta boxes for the Social tab + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Meta::get_meta_field_defs() + * @see WPSEO_Meta::get_meta_field_defs() + * + * @param string $post_type Optional post type string. + * + * @return array Array containing the meta boxes + */ + public function get_meta_boxes( $post_type = 'post' ) { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Meta::get_meta_field_defs()' ); + + return $this->get_meta_field_defs( 'social' ); + } + + /** + * @deprecated 3.0 Removed. + * + * @return string + */ + public function tab_header() { + _deprecated_function( 'WPSEO_Social_Admin::tab_header', 'WPSEO 3.0' ); + + return ''; + } + + /** + * @deprecated 3.0 Removed. + * + * @return string + */ + public function tab_content() { + _deprecated_function( 'WPSEO_Social_Admin::tab_content', 'WPSEO 3.0' ); + + return ''; + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/admin/class-social-facebook.php b/wp-content/plugins/wordpress-seo/admin/class-social-facebook.php new file mode 100644 index 0000000..84748a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-social-facebook.php @@ -0,0 +1,480 @@ +options = get_option( 'wpseo_social' ); + + $this->get_listener(); + + $this->form = new Yoast_Social_Facebook_Form(); + } + + /** + * Returns the output from the form class + */ + public function show_form() { + $this->form->show_form(); + } + + /** + * Adding a new admin + * + * @param string $admin_name Name string. + * @param string $admin_id ID string. + * + * @return string + */ + public function add_admin( $admin_name, $admin_id ) { + $success = 0; + + // If one of the fields is empty. + if ( empty( $admin_name ) || empty( $admin_id ) ) { + $response_body = $this->get_response_body( 'not_present' ); + } + else { + $admin_id = $this->parse_admin_id( $admin_id ); + + if ( ! isset( $this->options['fb_admins'][ $admin_id ] ) ) { + $name = sanitize_text_field( urldecode( $admin_name ) ); + $admin_id = sanitize_text_field( $admin_id ); + + if ( preg_match( '/[0-9]+?/', $admin_id ) && preg_match( '/[\w\s]+?/', $name ) ) { + $this->options['fb_admins'][ $admin_id ]['name'] = $name; + $this->options['fb_admins'][ $admin_id ]['link'] = urldecode( 'http://www.facebook.com/' . $admin_id ); + + $this->save_options(); + + $success = 1; + $response_body = $this->form->get_admin_link( $admin_id, $this->options['fb_admins'][ $admin_id ] ); + } + else { + $response_body = $this->get_response_body( 'invalid_format' ); + } + } + else { + $response_body = $this->get_response_body( 'already_exists' ); + } + } + + return wp_json_encode( + array( + 'success' => $success, + 'html' => $response_body, + ) + ); + } + + /** + * Fetches the id if the full meta tag or a full url was given + * + * @param string $admin_id Admin ID input string to process. + * + * @return string + */ + private function parse_admin_id( $admin_id ) { + if ( preg_match( '/^\

'; + break; + case 'invalid_format': + $return = "

" . __( 'Your input contains invalid characters. Please make sure both fields are filled in correctly.', 'wordpress-seo' ) . '

'; + break; + case 'already_exists': + $return = "

" . __( 'This Facebook user has already been added as an admin.', 'wordpress-seo' ) . '

'; + break; + default: + $return = ''; + break; + } + + return $return; + } + + /** + * This method will hook into the defined get params + */ + private function get_listener() { + if ( $delfbadmin = filter_input( INPUT_GET, 'delfbadmin' ) ) { + $this->delete_admin( $delfbadmin ); + } + elseif ( filter_input( INPUT_GET, 'fbclearall' ) ) { + $this->clear_all(); + } + } + + /** + * Deletes the admin from the options + * + * @param string $delfbadmin Facebook admin ID. + */ + private function delete_admin( $delfbadmin ) { + $this->verify_nonce( 'delfbadmin' ); + + $admin_id = sanitize_text_field( $delfbadmin ); + if ( isset( $this->options['fb_admins'][ $admin_id ] ) ) { + $fbadmin = $this->options['fb_admins'][ $admin_id ]['name']; + unset( $this->options['fb_admins'][ $admin_id ] ); + + $this->save_options(); + $this->success_notice( sprintf( __( 'Successfully removed admin %s', 'wordpress-seo' ), $fbadmin ) ); + + unset( $fbadmin ); + } + + unset( $admin_id ); + + // Clean up the referrer url for later use. + if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { + $this->cleanup_referrer_url( 'nonce', 'delfbadmin' ); + } + } + + /** + * Clear all the facebook that has been set already + */ + private function clear_all() { + $this->verify_nonce( 'fbclearall' ); + + // Reset to defaults, don't unset as otherwise the old values will be retained. + $this->options['fb_admins'] = WPSEO_Options::get_default( 'wpseo_social', 'fb_admins' ); + + $this->save_options(); + $this->success_notice( __( 'Successfully cleared all Facebook Data', 'wordpress-seo' ) ); + + // Clean up the referrer url for later use. + if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { + $this->cleanup_referrer_url( 'nonce', 'fbclearall' ); + } + } + + /** + * Clean up the request_uri. The given params are the params that will be removed from the URL + */ + private function cleanup_referrer_url() { + $_SERVER['REQUEST_URI'] = remove_query_arg( + func_get_args(), + sanitize_text_field( $_SERVER['REQUEST_URI'] ) + ); + } + + /** + * When something is going well, show a success notice + * + * @param string $notice_text Message string. + */ + private function success_notice( $notice_text ) { + add_settings_error( 'yoast_wpseo_social_options', 'success', $notice_text, 'updated' ); + } + + /** + * Verify the nonce from the URL with the saved nonce + * + * @param string $nonce_name Nonce name string. + */ + private function verify_nonce( $nonce_name ) { + if ( wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), $nonce_name ) != 1 ) { + die( "I don't think that's really nice of you!." ); + } + } + + /** + * Saving the options + */ + private function save_options() { + update_option( 'wpseo_social', $this->options ); + } +} + +/** + * This will display the HTML for the facebook insights part + */ +class Yoast_Social_Facebook_Form { + + /** + * @var array - The options for social + */ + private $options; + + /** + * @var array - The repository for the buttons that will be shown + */ + private $buttons = array(); + + /** + * @var string - The URL to link to + */ + private $admin_url = 'admin.php?page=wpseo_social'; + + /** + * Setting the options and call the methods to display everything + */ + public function __construct() { + $this->options = get_option( 'wpseo_social' ); + } + + /** + * Returns the output-property + */ + public function show_form() { + $this + ->form_head() + ->manage_user_admin() + ->form_thickbox() + ->show_buttons() + ->manage_app_as_admin(); + } + + /** + * Parses the admin_link + * + * @param string $admin_id Facebook admin ID string. + * @param array $admin Admin data array. + * @param string|bool $nonce Optional nonce string. + * + * @return string + */ + public function get_admin_link( $admin_id, $admin, $nonce = false ) { + if ( $nonce === false ) { + $nonce = $this->get_delete_nonce(); + } + + $return = '
  • ' . esc_html( $admin['name'] ) . ''; + $return .= ' - X
  • '; + + return $return; + } + + /** + * SHow the top of the social insights part of the page + * + * @return $this + */ + private function form_head() { + echo '

    ' . esc_html__( 'Facebook Insights and Admins', 'wordpress-seo' ) . '

    '; + echo '

    ', sprintf( + /* translators: %1$s and %2$s expand to a link to Facebook Insights */ + esc_html__( 'To be able to access %1$sFacebook Insights%2$s for your site, you need to specify a Facebook Admin. This can be a user. If you have an app for your site, you could use that as well.', 'wordpress-seo' ), + '', + '' + ); + echo ' '; + /* translators: %1$s and %2$s expand to a link to the Yoast Knowledge Base */ + printf( __( 'More info can be found %1$son our knowledge base%2$s.', 'wordpress-seo' ), '', '' ); + echo '

    '; + + return $this; + } + + /** + * Show the form inside the thickbox + */ + private function form_thickbox() { + // Adding the thickbox. + add_thickbox(); + + echo ''; + + return $this; + } + + /** + * Display the buttons to add an admin or add another admin from Facebook and display the admin that has been added already. + * + * @return $this + */ + private function manage_user_admin() { + $button_text = __( 'Add Facebook admin', 'wordpress-seo' ); + $nonce = false; + $class_attr = ' class="hidden"'; + + if ( is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array() ) { + $nonce = $this->get_delete_nonce(); + $button_text = __( 'Add Another Facebook Admin', 'wordpress-seo' ); + $class_attr = ''; + } + + echo "
    "; + echo '

    ' . __( 'Currently connected Facebook admins:', 'wordpress-seo' ) . '

    '; + echo '
      '; + $this->show_user_admins( $nonce ); + echo '
    '; + echo '
    '; + + unset( $nonce ); + + $this->add_button( + array( + 'url' => '#TB_inline?width=600&height=350&inlineId=add_facebook_admin', + 'value' => $button_text, + 'class' => 'thickbox', + 'title' => $button_text, + ) + ); + + return $this; + } + + /** + * Show input field to set a facebook apps as an admin + * + * @return $this + */ + private function manage_app_as_admin() { + echo '

    '; + Yoast_Form::get_instance()->textinput( 'fbadminapp', __( 'Facebook App ID', 'wordpress-seo' ) ); + + return $this; + } + + /** + * Loop through the fb-admins to parse the output for them + * + * @param string $nonce Nonce string. + */ + private function show_user_admins( $nonce ) { + foreach ( $this->options['fb_admins'] as $admin_id => $admin ) { + echo $this->get_admin_link( $admin_id, $admin, $nonce ); + } + } + + /** + * Parsing the link that directs to the admin removal + * + * @param string $admin_id Facebook admin ID. + * @param string $nonce Nonce string. + * + * @return string + */ + private function admin_delete_link( $admin_id, $nonce ) { + return esc_url( + add_query_arg( + array( + 'delfbadmin' => esc_attr( $admin_id ), + 'nonce' => $nonce, + ), + admin_url( $this->admin_url . '#top#facebook' ) + ) + ); + } + + /** + * Adding a button to the button property + * + * @param array $args Arguments data array. + */ + private function add_button( $args ) { + $args = wp_parse_args( + $args, + array( + 'url' => '', + 'value' => '', + 'class' => '', + 'id' => '', + 'title' => '', + + ) + ); + + $this->buttons[] = '' . esc_html( $args['value'] ) . ''; + } + + /** + * Showing the buttons + */ + private function show_buttons() { + if ( $this->get_clearall() ) { + $this->add_button( + array( + 'url' => add_query_arg( array( + 'nonce' => wp_create_nonce( 'fbclearall' ), + 'fbclearall' => 'true', + ), admin_url( $this->admin_url . '#top#facebook' ) ), + 'value' => __( 'Clear all Facebook Data', 'wordpress-seo' ), + ) + ); + } + + if ( is_array( $this->buttons ) && $this->buttons !== array() ) { + echo '

    ' . implode( '', $this->buttons ) . '

    '; + } + + return $this; + } + + /** + * Check if the clear button should be displayed. This is based on the set options. + * + * @return bool + */ + private function get_clearall() { + return is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array(); + } + + /** + * Creates nonce for removal link + * + * @return mixed + */ + private function get_delete_nonce() { + return wp_create_nonce( 'delfbadmin' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-stop-words.php b/wp-content/plugins/wordpress-seo/admin/class-stop-words.php new file mode 100644 index 0000000..ca0ef00 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-stop-words.php @@ -0,0 +1,52 @@ +list_stop_words() ); + + // Don't change the slug if there are less than 3 words left. + if ( count( $new_slug_parts ) < 3 ) { + return $original_slug; + } + + // Turn the sanitized array into a string. + $new_slug = join( '-', $new_slug_parts ); + + return $new_slug; + } + + /** + * Returns a translated, filtered list of stop words + * + * @return array An array of stop words. + */ + public function list_stop_words() { + /* translators: this should be an array of stop words for your language, separated by comma's. */ + $stopwords = explode( ',', __( "a,about,above,after,again,against,all,am,an,and,any,are,as,at,be,because,been,before,being,below,between,both,but,by,could,did,do,does,doing,down,during,each,few,for,from,further,had,has,have,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,it,it's,its,itself,let's,me,more,most,my,myself,nor,of,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,she,she'd,she'll,she's,should,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,we,we'd,we'll,we're,we've,were,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,would,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves", 'wordpress-seo' ) ); + + /** + * Allows filtering of the stop words list + * Especially useful for users on a language in which WPSEO is not available yet + * and/or users who want to turn off stop word filtering + * + * @api array $stopwords Array of all lowercase stop words to check and/or remove from slug + */ + $stopwords = apply_filters( 'wpseo_stopwords', $stopwords ); + + return $stopwords; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-alerts.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-alerts.php new file mode 100644 index 0000000..317d466 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-alerts.php @@ -0,0 +1,258 @@ +add_hooks(); + } + + /** + * Add hooks + */ + private function add_hooks() { + + $page = filter_input( INPUT_GET, 'page' ); + if ( self::ADMIN_PAGE === $page ) { + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); + } + + // Needed for adminbar and Alerts page. + add_action( 'admin_init', array( __CLASS__, 'collect_alerts' ), 99 ); + + // Add AJAX hooks. + add_action( 'wp_ajax_yoast_dismiss_alert', array( $this, 'ajax_dismiss_alert' ) ); + add_action( 'wp_ajax_yoast_restore_alert', array( $this, 'ajax_restore_alert' ) ); + } + + /** + * Enqueue assets + */ + public function enqueue_assets() { + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'alerts' ); + } + + /** + * Handle ajax request to dismiss an alert + */ + public function ajax_dismiss_alert() { + + $notification = $this->get_notification_from_ajax_request(); + if ( $notification ) { + $notification_center = Yoast_Notification_Center::get(); + $notification_center->maybe_dismiss_notification( $notification ); + + $this->output_ajax_response( $notification->get_type() ); + } + + wp_die(); + } + + /** + * Handle ajax request to restore an alert + */ + public function ajax_restore_alert() { + + $notification = $this->get_notification_from_ajax_request(); + if ( $notification ) { + delete_user_meta( get_current_user_id(), $notification->get_dismissal_key() ); + + $this->output_ajax_response( $notification->get_type() ); + } + + wp_die(); + } + + /** + * Create AJAX response data + * + * @param string $type Alert type. + */ + private function output_ajax_response( $type ) { + + $html = $this->get_view_html( $type ); + echo wp_json_encode( + array( + 'html' => $html, + 'total' => self::get_active_alert_count(), + ) + ); + } + + /** + * Get the HTML to return in the AJAX request + * + * @param string $type Alert type. + * + * @return bool|string + */ + private function get_view_html( $type ) { + + switch ( $type ) { + case 'error': + $view = 'errors'; + break; + + case 'warning': + default: + $view = 'warnings'; + break; + } + + // Re-collect alerts. + self::collect_alerts(); + + /** @noinspection PhpUnusedLocalVariableInspection */ + $alerts_data = self::get_template_variables(); + + ob_start(); + include WPSEO_PATH . 'admin/views/partial-alerts-' . $view . '.php'; + $html = ob_get_clean(); + + return $html; + } + + /** + * Extract the Yoast Notification from the AJAX request + * + * @return null|Yoast_Notification + */ + private function get_notification_from_ajax_request() { + + $notification_center = Yoast_Notification_Center::get(); + $notification_id = filter_input( INPUT_POST, 'notification' ); + + return $notification_center->get_notification_by_id( $notification_id ); + } + + /** + * Show the alerts overview page + */ + public static function show_overview_page() { + + /** @noinspection PhpUnusedLocalVariableInspection */ + $alerts_data = self::get_template_variables(); + + include WPSEO_PATH . 'admin/views/alerts-dashboard.php'; + } + + /** + * Collect the alerts and group them together + */ + public static function collect_alerts() { + + $notification_center = Yoast_Notification_Center::get(); + + $notifications = $notification_center->get_sorted_notifications(); + self::$notification_count = count( $notifications ); + + self::$errors = array_filter( $notifications, array( __CLASS__, 'filter_error_alerts' ) ); + self::$dismissed_errors = array_filter( self::$errors, array( __CLASS__, 'filter_dismissed_alerts' ) ); + self::$active_errors = array_diff( self::$errors, self::$dismissed_errors ); + + self::$warnings = array_filter( $notifications, array( __CLASS__, 'filter_warning_alerts' ) ); + self::$dismissed_warnings = array_filter( self::$warnings, array( __CLASS__, 'filter_dismissed_alerts' ) ); + self::$active_warnings = array_diff( self::$warnings, self::$dismissed_warnings ); + } + + /** + * Get the variables needed in the views + * + * @return array + */ + public static function get_template_variables() { + + return array( + 'metrics' => array( + 'total' => self::$notification_count, + 'active' => self::get_active_alert_count(), + 'errors' => count( self::$errors ), + 'warnings' => count( self::$warnings ), + ), + 'errors' => array( + 'dismissed' => self::$dismissed_errors, + 'active' => self::$active_errors, + ), + 'warnings' => array( + 'dismissed' => self::$dismissed_warnings, + 'active' => self::$active_warnings, + ), + ); + } + + /** + * Get the number of active alerts + * + * @return int + */ + public static function get_active_alert_count() { + + return ( count( self::$active_errors ) + count( self::$active_warnings ) ); + } + + /** + * Filter out any non-errors + * + * @param Yoast_Notification $notification Notification to test. + * + * @return bool + */ + private static function filter_error_alerts( Yoast_Notification $notification ) { + + return $notification->get_type() === 'error'; + } + + /** + * Filter out any non-warnings + * + * @param Yoast_Notification $notification Notification to test. + * + * @return bool + */ + private static function filter_warning_alerts( Yoast_Notification $notification ) { + + return $notification->get_type() !== 'error'; + } + + /** + * Filter out any dismissed notifications + * + * @param Yoast_Notification $notification Notification to test. + * + * @return bool + */ + private static function filter_dismissed_alerts( Yoast_Notification $notification ) { + + return Yoast_Notification_Center::is_notification_dismissed( $notification ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php new file mode 100644 index 0000000..a65eaf2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php @@ -0,0 +1,204 @@ +statistics = $statistics; + + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dashboard_stylesheet' ) ); + add_action( 'wp_insert_post', array( $this, 'clear_cache' ) ); + add_action( 'delete_post', array( $this, 'clear_cache' ) ); + + if ( $this->show_widget() ) { + add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) ); + } + } + + /** + * Adds dashboard widget to WordPress + */ + public function add_dashboard_widget() { + add_filter( 'postbox_classes_dashboard_wpseo-dashboard-overview', array( $this, 'wpseo_dashboard_overview_class' ) ); + wp_add_dashboard_widget( + 'wpseo-dashboard-overview', + /* translators: %s is the plugin name */ + sprintf( __( '%s Posts Overview', 'wordpress-seo' ), 'Yoast SEO' ), + array( $this, 'display_dashboard_widget' ) + ); + } + + /** + * Adds CSS classes to the dashboard widget. + * + * @param array $classes An array of postbox CSS classes. + * + * @return array + */ + public function wpseo_dashboard_overview_class( $classes ) { + $classes[] = 'yoast wpseo-dashboard-overview'; + return $classes; + } + + /** + * Display the dashboard widget + */ + public function display_dashboard_widget() { + $statistics = $this->statistic_items(); + + $onpage_option = new WPSEO_OnPage_Option(); + $onpage = false; + if ( $onpage_option->is_enabled() ) { + $onpage = array( + 'indexable' => $onpage_option->get_status(), + 'can_fetch' => $onpage_option->should_be_fetched(), + ); + } + + include WPSEO_PATH . '/admin/views/dashboard-widget.php'; + } + + /** + * Enqueue's stylesheet for the dashboard if the current page is the dashboard + */ + public function enqueue_dashboard_stylesheet() { + $current_screen = get_current_screen(); + + if ( $current_screen instanceof WP_Screen && 'dashboard' === $current_screen->id ) { + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'wp-dashboard' ); + } + } + + /** + * Clears the dashboard widget items cache + */ + public function clear_cache() { + delete_transient( self::CACHE_TRANSIENT_KEY ); + } + + /** + * An array representing items to be added to the At a Glance dashboard widget + * + * @return array + */ + private function statistic_items() { + $transient = get_transient( self::CACHE_TRANSIENT_KEY ); + $user_id = get_current_user_id(); + + if ( isset( $transient[ $user_id ] ) ) { + return $transient[ $user_id ]; + } + + return $this->set_statistic_items_for_this_user( $transient ); + } + + /** + * Set the cache for a specific user + * + * @param array|boolean $transient The current stored transient with the cached data. + * + * @return mixed + */ + private function set_statistic_items_for_this_user( $transient ) { + if ( $transient === false ) { + $transient = array(); + } + + $user_id = get_current_user_id(); + $transient[ $user_id ] = array_filter( $this->get_seo_scores_with_post_count(), array( $this, 'filter_items' ) ); + + set_transient( self::CACHE_TRANSIENT_KEY, $transient, DAY_IN_SECONDS ); + + return $transient[ $user_id ]; + } + + /** + * Set the SEO scores belonging to their SEO score result + * + * @return array + */ + private function get_seo_scores_with_post_count() { + $ranks = WPSEO_Rank::get_all_ranks(); + + return array_map( array( $this, 'map_rank_to_widget' ), $ranks ); + } + + /** + * Converts a rank to data usable in the dashboard widget + * + * @param WPSEO_Rank $rank The rank to map. + * + * @return array + */ + private function map_rank_to_widget( WPSEO_Rank $rank ) { + return array( + 'seo_rank' => $rank->get_rank(), + 'title' => $this->get_title_for_rank( $rank ), + 'class' => 'wpseo-glance-' . $rank->get_css_class(), + 'icon_class' => $rank->get_css_class(), + 'count' => $this->statistics->get_post_count( $rank ), + ); + } + + /** + * Returns a dashboard widget label to use for a certain rank + * + * @param WPSEO_Rank $rank The rank to return a label for. + * + * @return string + */ + private function get_title_for_rank( WPSEO_Rank $rank ) { + $labels = array( + WPSEO_Rank::NO_FOCUS => __( 'Posts without focus keyword', 'wordpress-seo' ), + WPSEO_Rank::BAD => __( 'Posts with bad SEO score', 'wordpress-seo' ), + WPSEO_Rank::OK => __( 'Posts with OK SEO score', 'wordpress-seo' ), + WPSEO_Rank::GOOD => __( 'Posts with good SEO score', 'wordpress-seo' ), + /* translators: %s expands to noindex */ + WPSEO_Rank::NO_INDEX => sprintf( __( 'Posts that are set to “%s”', 'wordpress-seo' ), 'noindex' ), + ); + + return $labels[ $rank->get_rank() ]; + } + + /** + * Filter items if they have a count of zero + * + * @param array $item Data array. + * + * @return bool + */ + private function filter_items( $item ) { + return 0 !== $item['count']; + } + + /** + * Returns true when the dashboard widget should be shown. + * + * @return bool + */ + private function show_widget() { + $analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + + return $analysis_seo->is_enabled() && current_user_can( 'edit_posts' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php new file mode 100644 index 0000000..f680ead --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php @@ -0,0 +1,685 @@ + +
    + +

    +
    +
    + '; + settings_fields( $option_long_name ); + } + $this->set_option( $option ); + } + + /** + * Set the option used in output for form elements + * + * @param string $option_name Option key. + */ + public function set_option( $option_name ) { + $this->option_name = $option_name; + $this->options = $this->get_option(); + } + + /** + * Retrieve options based on whether we're on multisite or not. + * + * @since 1.2.4 + * + * @return array + */ + private function get_option() { + if ( is_network_admin() ) { + return get_site_option( $this->option_name ); + } + + return get_option( $this->option_name ); + } + + /** + * Generates the footer for admin pages + * + * @param bool $submit Whether or not a submit button and form end tag should be shown. + * @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it. + */ + public function admin_footer( $submit = true, $show_sidebar = true ) { + if ( $submit ) { + submit_button(); + + echo ' + '; + } + + /** + * Apply general admin_footer hooks + */ + do_action( 'wpseo_admin_footer' ); + + /** + * Run possibly set actions to add for example an i18n box + */ + do_action( 'wpseo_admin_promo_footer' ); + + echo ' +
    '; + + if ( $show_sidebar ) { + $this->admin_sidebar(); + } + + echo '
    '; + + + if ( ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) ) { + $xdebug = ( extension_loaded( 'xdebug' ) ? true : false ); + echo ' +
    +
    + +

    ' . __( 'Debug Information', 'wordpress-seo' ) . '

    +
    +

    ' . esc_html( __( 'Current option:', 'wordpress-seo' ) ) . ' ' . esc_html( $this->option_name ) . '

    + ' . ( ( $xdebug ) ? '' : '
    ' );
    +			var_dump( $this->get_option() );
    +			echo '
    +					' . ( ( $xdebug ) ? '' : '
    ' ) . ' +
    +
    +
    '; + } + + echo ' +
    '; + } + + /** + * Generates the sidebar for admin pages. + */ + public function admin_sidebar() { + + // No banners in Premium. + if ( class_exists( 'WPSEO_Product_Premium' ) ) { + $license_manager = new Yoast_Plugin_License_Manager( new WPSEO_Product_Premium() ); + if ( $license_manager->license_is_valid() ) { + return; + } + } + + $sidebar_renderer = new WPSEO_Admin_Banner_Sidebar_Renderer( new WPSEO_Admin_Banner_Spot_Renderer() ); + + $banner_renderer = new WPSEO_Admin_Banner_Renderer; + $banner_renderer->set_base_path( plugins_url( 'images/banner/', WPSEO_FILE ) ); + + $sidebar = new WPSEO_Admin_Banner_Sidebar( sprintf( '%1s recommendations', 'Yoast' ), $banner_renderer ); + $sidebar->initialize( new WPSEO_Features() ); + + echo $sidebar_renderer->render( $sidebar ); + + } + + /** + * Output a label element + * + * @param string $text Label text string. + * @param array $attr HTML attributes set. + */ + public function label( $text, $attr ) { + $attr = wp_parse_args( $attr, array( + 'class' => 'checkbox', + 'close' => true, + 'for' => '', + ) + ); + echo "'; + } + } + + /** + * Output a legend element. + * + * @param string $text Legend text string. + * @param array $attr HTML attributes set. + */ + public function legend( $text, $attr ) { + $attr = wp_parse_args( $attr, array( + 'id' => '', + 'class' => '', + ) + ); + $id = ( '' === $attr['id'] ) ? '' : ' id="' . esc_attr( $attr['id'] ) . '"'; + echo '' . $text . ''; + } + + /** + * Create a Checkbox input field. + * + * @param string $var The variable within the option to create the checkbox for. + * @param string $label The label to show for the variable. + * @param bool $label_left Whether the label should be left (true) or right (false). + */ + public function checkbox( $var, $label, $label_left = false ) { + if ( ! isset( $this->options[ $var ] ) ) { + $this->options[ $var ] = false; + } + + if ( $this->options[ $var ] === true ) { + $this->options[ $var ] = 'on'; + } + + $class = ''; + if ( $label_left !== false ) { + if ( ! empty( $label_left ) ) { + $label_left .= ':'; + } + $this->label( $label_left, array( 'for' => $var ) ); + } + else { + $class = 'double'; + } + + echo 'options[ $var ], 'on', false ), '/>'; + + if ( ! empty( $label ) ) { + $this->label( $label, array( 'for' => $var ) ); + } + + echo '
    '; + } + + /** + * Create a light switch input field. + * + * @param string $var The variable within the option to create the checkbox for. + * @param string $label The label to show for the variable. + * @param array $buttons Array of two labels for the buttons (defaults Off/On). + * @param boolean $reverse Reverse order of buttons (default true). + */ + public function light_switch( $var, $label, $buttons = array(), $reverse = true ) { + + if ( ! isset( $this->options[ $var ] ) ) { + $this->options[ $var ] = false; + } + + if ( $this->options[ $var ] === true ) { + $this->options[ $var ] = 'on'; + } + + $class = 'switch-light switch-candy switch-yoast-seo'; + $aria_labelledby = esc_attr( $var ) . '-label'; + + if ( $reverse ) { + $class .= ' switch-yoast-seo-reverse'; + } + + if ( empty( $buttons ) ) { + $buttons = array( __( 'Disabled', 'wordpress-seo' ), __( 'Enabled', 'wordpress-seo' ) ); + } + + list( $off_button, $on_button ) = $buttons; + + echo '
    ', + '
    '; + } + + /** + * Create a Text input field. + * + * @param string $var The variable within the option to create the text input field for. + * @param string $label The label to show for the variable. + * @param array|string $attr Extra class to add to the input field. + */ + public function textinput( $var, $label, $attr = array() ) { + if ( ! is_array( $attr ) ) { + $attr = array( + 'class' => $attr, + ); + } + $attr = wp_parse_args( $attr, array( + 'placeholder' => '', + 'class' => '', + ) ); + $val = ( isset( $this->options[ $var ] ) ) ? $this->options[ $var ] : ''; + + $this->label( $label . ':', array( 'for' => $var ) ); + echo '', '
    '; + } + + /** + * Create a textarea. + * + * @param string $var The variable within the option to create the textarea for. + * @param string $label The label to show for the variable. + * @param array $attr The CSS class to assign to the textarea. + */ + public function textarea( $var, $label, $attr = array() ) { + if ( ! is_array( $attr ) ) { + $attr = array( + 'class' => $attr, + ); + } + $attr = wp_parse_args( $attr, array( + 'cols' => '', + 'rows' => '', + 'class' => '', + ) ); + $val = ( isset( $this->options[ $var ] ) ) ? $this->options[ $var ] : ''; + + $this->label( $label . ':', array( 'for' => $var, 'class' => 'textinput' ) ); + echo '' . '
    '; + } + + /** + * Create a hidden input field. + * + * @param string $var The variable within the option to create the hidden input for. + * @param string $id The ID of the element. + */ + public function hidden( $var, $id = '' ) { + $val = ( isset( $this->options[ $var ] ) ) ? $this->options[ $var ] : ''; + if ( is_bool( $val ) ) { + $val = ( $val === true ) ? 'true' : 'false'; + } + + if ( '' === $id ) { + $id = 'hidden_' . $var; + } + + echo ''; + } + + /** + * Create a Select Box. + * + * @param string $field_name The variable within the option to create the select for. + * @param string $label The label to show for the variable. + * @param array $select_options The select options to choose from. + */ + public function select( $field_name, $label, array $select_options ) { + + if ( empty( $select_options ) ) { + return; + } + + $this->label( $label . ':', array( 'for' => $field_name, 'class' => 'select' ) ); + + $select_name = esc_attr( $this->option_name ) . '[' . esc_attr( $field_name ) . ']'; + $active_option = ( isset( $this->options[ $field_name ] ) ) ? $this->options[ $field_name ] : ''; + + $select = new Yoast_Input_Select( $field_name, $select_name, $select_options, $active_option ); + $select->add_attribute( 'class', 'select' ); + $select->output_html(); + + echo '
    '; + } + + /** + * Create a File upload field. + * + * @param string $var The variable within the option to create the file upload field for. + * @param string $label The label to show for the variable. + */ + public function file_upload( $var, $label ) { + $val = ''; + if ( isset( $this->options[ $var ] ) && is_array( $this->options[ $var ] ) ) { + $val = $this->options[ $var ]['url']; + } + + $var_esc = esc_attr( $var ); + $this->label( $label . ':', array( 'for' => $var, 'class' => 'select' ) ); + echo ''; + + // Need to save separate array items in hidden inputs, because empty file inputs type will be deleted by settings API. + if ( ! empty( $this->options[ $var ] ) ) { + $this->hidden( 'file', $this->option_name . '_file' ); + $this->hidden( 'url', $this->option_name . '_url' ); + $this->hidden( 'type', $this->option_name . '_type' ); + } + echo '
    '; + } + + /** + * Media input + * + * @param string $var Option name. + * @param string $label Label message. + */ + public function media_input( $var, $label ) { + $val = ''; + if ( isset( $this->options[ $var ] ) ) { + $val = $this->options[ $var ]; + } + + $var_esc = esc_attr( $var ); + + $this->label( $label . ':', array( 'for' => 'wpseo_' . $var, 'class' => 'select' ) ); + echo ''; + echo ''; + echo '
    '; + } + + /** + * Create a Radio input field. + * + * @param string $var The variable within the option to create the radio button for. + * @param array $values The radio options to choose from. + * @param string $legend Optional. The legend to show for the field set, if any. + * @param array $legend_attr Optional. The attributes for the legend, if any. + */ + public function radio( $var, $values, $legend = '', $legend_attr = array() ) { + if ( ! is_array( $values ) || $values === array() ) { + return; + } + if ( ! isset( $this->options[ $var ] ) ) { + $this->options[ $var ] = false; + } + + $var_esc = esc_attr( $var ); + + echo '
    '; + + if ( is_string( $legend ) && '' !== $legend ) { + + $legend_attr = wp_parse_args( $legend_attr, array( + 'id' => '', + 'class' => 'radiogroup', + ) ); + + $this->legend( $legend, $legend_attr ); + } + + foreach ( $values as $key => $value ) { + $key_esc = esc_attr( $key ); + echo 'options[ $var ], $key_esc, false ) . ' />'; + $this->label( $value, array( 'for' => $var_esc . '-' . $key_esc, 'class' => 'radio' ) ); + } + echo '
    '; + } + + + /** + * Create a toggle switch input field. + * + * @param string $var The variable within the option to create the file upload field for. + * @param array $values The radio options to choose from. + * @param string $label The label to show for the variable. + */ + public function toggle_switch( $var, $values, $label ) { + if ( ! is_array( $values ) || $values === array() ) { + return; + } + if ( ! isset( $this->options[ $var ] ) ) { + $this->options[ $var ] = false; + } + if ( $this->options[ $var ] === true ) { + $this->options[ $var ] = 'on'; + } + if ( $this->options[ $var ] === false ) { + $this->options[ $var ] = 'off'; + } + + $var_esc = esc_attr( $var ); + + echo '
    '; + echo '
    ', $label, ' +
    '; + + foreach ( $values as $key => $value ) { + $key_esc = esc_attr( $key ); + $for = $var_esc . '-' . $key_esc; + echo 'options[ $var ], $key_esc, false ) . ' />', + ''; + } + + echo '
    ' . "\n\n"; + } + + /** + * Returns two random selected service banners. + * + * @return WPSEO_Admin_Banner_Spot + */ + private function get_service_banners() { + + $service_banner_spot = new WPSEO_Admin_Banner_Spot( + __( 'Services', 'wordpress-seo' ), + sprintf( + /* translators: %1$s expands to a link start tag to the Yoast Services page, %2$s to Yoast, %3$s is the link closing tag. */ + __( 'Don\'t want to dive into SEO yourself? %1$sLet team %2$s help you!%3$s', 'wordpress-seo' ), + '', + 'Yoast', + '' + ) + ); + + $service_banner_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/hire-us/website-review/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=website-review-banner', + 'banner-website-review.png', + 261, + 190, + __( 'Order a Website Review and we will tell you what to improve to attract more visitors!', 'wordpress-seo' ) + ) + ); + + $service_banner_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/hire-us/yoast-seo-configuration/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=configuration-service-banner', + 'banner-configuration-service.png', + 261, + 190, + sprintf( + /* translators: %1$s expands to Yoast SEO Premium. */ + __( 'Let our experts set up your %1$s plugin!', 'wordpress-seo' ), + 'Yoast SEO Premium' + ) + ) + ); + + $service_banner_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/academy/course/seo-copywriting-training/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=seo-copywriting-training-banner', + 'banner-seo-copywriting-training.png', + 261, + 190, + __( 'Take the online SEO Copywriting Training course and learn how to write awesome copy that ranks!', 'wordpress-seo' ) + ) + ); + + $service_banner_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/academy/course/basic-seo-training/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=basic-seo-training-banner', + 'banner-basic-seo-training.png', + 261, + 190, + __( 'Take the online Basic SEO Training course and learn the fundamentals of SEO!', 'wordpress-seo' ) + ) + ); + + $service_banner_spot->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/academy/course/yoast-seo-wordpress-training/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=yoast-seo-plugin-training-banner', + 'banner-yoast-seo-for-wordpress-training.png', + 261, + 190, + /* translators: %1$s expands to Yoast SEO for WordPress Training, %2$s to Yoast SEO for WordPress. */ + sprintf( + __( 'Take the %s course and become a certified %2$s expert!', 'wordpress-seo' ), + 'Yoast SEO for WordPress Training', + 'Yoast SEO for WordPress' + ) + ) + ); + + return $service_banner_spot; + } + + /** + * Returns two random selected plugin banners. + * + * @return WPSEO_Admin_Banner_Spot + */ + private function get_plugin_banners() { + + $plugin_banners = new WPSEO_Admin_Banner_Spot( + __( 'Extensions', 'wordpress-seo' ), + sprintf( + /* translators: %1$s expands to Yoast SEO, %2$s to a link start tag to the Yoast plugin page, %3$s is the link closing tag. */ + __( 'Extend your %1$s plugin with our %2$sSEO plugins%3$s.', 'wordpress-seo' ), + 'Yoast SEO', + '', + '' + ) + ); + + + $plugin_banners->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=premium-seo-banner', + 'banner-premium-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast SEO Premium. */ + __( 'Buy the %1$s plugin now and get access to extra features and 24/7 support!', 'wordpress-seo' ), + 'Yoast SEO Premium' + ) + ) + ); + + if ( ! class_exists( 'wpseo_Video_Sitemap' ) ) { + $plugin_banners->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/wordpress/plugins/video-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=video-seo-banner', + 'banner-video-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast Video SEO. */ + __( 'Buy the %1$s plugin now and optimize your videos for video search results and social media!', 'wordpress-seo' ), + 'Yoast Video SEO' + ) + ) + ); + } + + if ( class_exists( 'Woocommerce' ) && ! class_exists( 'Yoast_WooCommerce_SEO' ) ) { + $plugin_banners->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=woocommerce-seo-banner', + 'banner-woocommerce-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast WooCommerce SEO. */ + __( 'Buy the %1$s plugin now and optimize your shop today to improve your product promotion!', 'wordpress-seo' ), + 'Yoast WooCommerce SEO' + ) + ) + ); + } + + if ( ! defined( 'WPSEO_LOCAL_VERSION' ) ) { + $plugin_banners->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/wordpress/plugins/local-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=local-seo-banner', + 'banner-local-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast Local SEO. */ + __( 'Buy the %1$s plugin now to improve your site’s Local SEO and ranking in Google Maps!', 'wordpress-seo' ), + 'Yoast Local SEO' + ) + ) + ); + } + + if ( ! class_exists( 'WPSEO_News' ) ) { + $plugin_banners->add_banner( + new WPSEO_Admin_Banner( + 'https://yoast.com/wordpress/plugins/news-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=news-seo-banner', + 'banner-news-seo.png', + 261, + 152, + sprintf( + /* translators: %1$s expands to Yoast News SEO. */ + __( 'Buy the %1$s plugin now and start optimizing to get your site featured in Google News!', 'wordpress-seo' ), + 'Yoast News SEO' + ) + ) + ); + } + + return $plugin_banners; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php new file mode 100644 index 0000000..7d59899 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php @@ -0,0 +1,568 @@ +retrieve_notifications_from_storage(); + + add_action( 'all_admin_notices', array( $this, 'display_notifications' ) ); + + add_action( 'wp_ajax_yoast_get_notifications', array( $this, 'ajax_get_notifications' ) ); + + add_action( 'wpseo_deactivate', array( $this, 'deactivate_hook' ) ); + add_action( 'shutdown', array( $this, 'update_storage' ) ); + } + + /** + * Singleton getter + * + * @return Yoast_Notification_Center + */ + public static function get() { + + if ( null === self::$instance ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Dismiss a notification + */ + public static function ajax_dismiss_notification() { + + $notification_center = self::get(); + + $notification_id = filter_input( INPUT_POST, 'notification' ); + if ( empty( $notification_id ) ) { + die( '-1' ); + } + + $notification = $notification_center->get_notification_by_id( $notification_id ); + if ( false === ( $notification instanceof Yoast_Notification ) ) { + + // Permit legacy. + $notification = new Yoast_Notification( '', array( + 'id' => $notification_id, + 'dismissal_key' => $notification_id, + ) ); + } + + if ( $notification_center->maybe_dismiss_notification( $notification ) ) { + die( '1' ); + } + + die( '-1' ); + } + + /** + * Check if the user has dismissed a notification + * + * @param Yoast_Notification $notification The notification to check for dismissal. + * @param null|int $user_id User ID to check on. + * + * @return bool + */ + public static function is_notification_dismissed( Yoast_Notification $notification, $user_id = null ) { + + $user_id = ( ! is_null( $user_id ) ? $user_id : get_current_user_id() ); + $dismissal_key = $notification->get_dismissal_key(); + + $current_value = get_user_meta( $user_id, $dismissal_key, $single = true ); + + return ! empty( $current_value ); + } + + /** + * Check if the nofitication is being dismissed + * + * @param string|Yoast_Notification $notification Notification to check dismissal of. + * @param string $meta_value Value to set the meta value to if dismissed. + * + * @return bool True if dismissed. + */ + public static function maybe_dismiss_notification( Yoast_Notification $notification, $meta_value = 'seen' ) { + + // Only persistent notifications are dismissible. + if ( ! $notification->is_persistent() ) { + return false; + } + + // If notification is already dismissed, we're done. + if ( self::is_notification_dismissed( $notification ) ) { + return true; + } + + $dismissal_key = $notification->get_dismissal_key(); + $notification_id = $notification->get_id(); + + $is_dismissing = ( $dismissal_key === self::get_user_input( 'notification' ) ); + if ( ! $is_dismissing ) { + $is_dismissing = ( $notification_id === self::get_user_input( 'notification' ) ); + } + + // Fallback to ?dismissal_key=1&nonce=bla when JavaScript fails. + if ( ! $is_dismissing ) { + $is_dismissing = ( '1' === self::get_user_input( $dismissal_key ) ); + } + + if ( ! $is_dismissing ) { + return false; + } + + $user_nonce = self::get_user_input( 'nonce' ); + if ( false === wp_verify_nonce( $user_nonce, $notification_id ) ) { + return false; + } + + return self::dismiss_notification( $notification, $meta_value ); + } + + /** + * Clear dismissal information for the specified Notification + * + * When a cause is resolved, the next time it is present we want to show + * the message again. + * + * @param string|Yoast_Notification $notification Notification to clear the dismissal of. + * + * @return bool + */ + public function clear_dismissal( $notification ) { + + if ( $notification instanceof Yoast_Notification ) { + $dismissal_key = $notification->get_dismissal_key(); + } + + if ( is_string( $notification ) ) { + $dismissal_key = $notification; + } + + if ( empty( $dismissal_key ) ) { + return false; + } + + // Remove notification dismissal for all users. + $deleted = delete_metadata( 'user', $user_id = 0, $dismissal_key, $meta_value = '', $delete_all = true ); + + return $deleted; + } + + /** + * Add notification to the cookie + * + * @param Yoast_Notification $notification Notification object instance. + */ + public function add_notification( Yoast_Notification $notification ) { + + // Don't add if the user can't see it. + if ( ! $notification->display_for_current_user() ) { + return; + } + + $notification_id = $notification->get_id(); + + // Empty notifications are always added. + if ( $notification_id !== '' ) { + + // If notification ID exists in notifications, don't add again. + $present_notification = $this->get_notification_by_id( $notification_id ); + if ( ! is_null( $present_notification ) ) { + $this->remove_notification( $present_notification, false ); + } + + if ( is_null( $present_notification ) ) { + $this->new[] = $notification_id; + } + } + + // Add to list. + $this->notifications[] = $notification; + } + + /** + * Get the notification by ID + * + * @param string $notification_id The ID of the notification to search for. + * + * @return null|Yoast_Notification + */ + public function get_notification_by_id( $notification_id ) { + + foreach ( $this->notifications as & $notification ) { + if ( $notification_id === $notification->get_id() ) { + return $notification; + } + } + + return null; + } + + /** + * Display the notifications + */ + public function display_notifications() { + + // Never display notifications for network admin. + if ( function_exists( 'is_network_admin' ) && is_network_admin() ) { + return; + } + + $sorted_notifications = $this->get_sorted_notifications(); + foreach ( $sorted_notifications as $notification ) { + if ( ! $notification->is_persistent() ) { + echo $notification; + $this->remove_notification( $notification ); + } + } + } + + /** + * Remove notification after it has been displayed + * + * @param Yoast_Notification $notification Notification to remove. + * @param bool $resolve Resolve as fixed. + */ + public function remove_notification( Yoast_Notification $notification, $resolve = true ) { + + $index = false; + + // Match persistent Notifications by ID, non persistent by item in the array. + if ( $notification->is_persistent() ) { + foreach ( $this->notifications as $current_index => $present_notification ) { + if ( $present_notification->get_id() === $notification->get_id() ) { + $index = $current_index; + break; + } + } + } + else { + $index = array_search( $notification, $this->notifications, true ); + } + + if ( false === $index ) { + return; + } + + if ( $notification->is_persistent() && $resolve ) { + $this->resolved++; + $this->clear_dismissal( $notification ); + } + + unset( $this->notifications[ $index ] ); + $this->notifications = array_values( $this->notifications ); + } + + /** + * Get the notification count + * + * @param bool $dismissed Count dismissed notifications. + * + * @return int Number of notifications + */ + public function get_notification_count( $dismissed = false ) { + + $notifications = $this->get_notifications(); + $notifications = array_filter( $notifications, array( $this, 'filter_persistent_notifications' ) ); + + if ( ! $dismissed ) { + $notifications = array_filter( $notifications, array( $this, 'filter_dismissed_notifications' ) ); + } + + return count( $notifications ); + } + + /** + * Get the number of notifications resolved this execution + * + * These notifications have been resolved and should be counted when active again. + * + * @return int + */ + public function get_resolved_notification_count() { + + return $this->resolved; + } + + /** + * Return the notifications sorted on type and priority + * + * @return array|Yoast_Notification[] Sorted Notifications + */ + public function get_sorted_notifications() { + + $notifications = $this->get_notifications(); + if ( empty( $notifications ) ) { + return array(); + } + + // Sort by severity, error first. + usort( $notifications, array( $this, 'sort_notifications' ) ); + + return $notifications; + } + + /** + * AJAX display notifications + */ + public function ajax_get_notifications() { + + // Display the notices. + $this->display_notifications(); + + // AJAX die. + exit; + } + + /** + * Remove storage when the plugin is deactivated + */ + public function deactivate_hook() { + + $this->clear_notifications(); + } + + /** + * Save persistent notifications to storage + * + * We need to be able to retrieve these so they can be dismissed at any time during the execution. + * + * @since 3.2 + * + * @return void + */ + public function update_storage() { + + $notifications = $this->get_notifications(); + + // No notifications to store, clear storage. + if ( empty( $notifications ) ) { + $this->remove_storage(); + + return; + } + + $notifications = array_map( array( $this, 'notification_to_array' ), $notifications ); + + // Save the notifications to the storage. + update_user_option( get_current_user_id(), self::STORAGE_KEY, $notifications ); + } + + /** + * Provide a way to verify present notifications + * + * @return array|Yoast_Notification[] Registered notifications. + */ + public function get_notifications() { + + return $this->notifications; + } + + /** + * Get newly added notifications + * + * @return array + */ + public function get_new_notifications() { + + return array_map( array( $this, 'get_notification_by_id' ), $this->new ); + } + + /** + * Get information from the User input + * + * @param string $key Key to retrieve. + * + * @return mixed value of key if set. + */ + private static function get_user_input( $key ) { + + $filter_input_type = INPUT_GET; + if ( 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { + $filter_input_type = INPUT_POST; + } + + return filter_input( $filter_input_type, $key ); + } + + /** + * Retrieve the notifications from storage + * + * @return array Yoast_Notification[] Notifications + */ + private function retrieve_notifications_from_storage() { + + $stored_notifications = get_user_option( self::STORAGE_KEY, get_current_user_id() ); + + // Check if notifications are stored. + if ( empty( $stored_notifications ) ) { + return; + } + + if ( is_array( $stored_notifications ) ) { + $notifications = array_map( array( $this, 'array_to_notification' ), $stored_notifications ); + $notifications = array_filter( $notifications, array( $this, 'filter_notification_current_user' ) ); + + $this->notifications = $notifications; + } + } + + /** + * Sort on type then priority + * + * @param Yoast_Notification $a Compare with B. + * @param Yoast_Notification $b Compare with A. + * + * @return int 1, 0 or -1 for sorting offset. + */ + private function sort_notifications( Yoast_Notification $a, Yoast_Notification $b ) { + + $a_type = $a->get_type(); + $b_type = $b->get_type(); + + if ( $a_type === $b_type ) { + return WPSEO_Utils::calc( $b->get_priority(), 'compare', $a->get_priority() ); + } + + if ( 'error' === $a_type ) { + return -1; + } + + if ( 'error' === $b_type ) { + return 1; + } + + return 0; + } + + /** + * Dismiss the notification + * + * @param Yoast_Notification $notification Notification to dismiss. + * @param string $meta_value Value to save in the dismissal. + * + * @return bool + */ + private static function dismiss_notification( Yoast_Notification $notification, $meta_value = 'seen' ) { + // Dismiss notification. + return ( false !== update_user_meta( get_current_user_id(), $notification->get_dismissal_key(), $meta_value ) ); + } + + /** + * Remove all notifications from storage + */ + private function remove_storage() { + + delete_user_option( get_current_user_id(), self::STORAGE_KEY ); + } + + /** + * Clear local stored notifications + */ + private function clear_notifications() { + + $this->notifications = array(); + } + + /** + * Filter out non-persistent notifications. + * + * @param Yoast_Notification $notification Notification to test for persistent. + * + * @since 3.2 + * + * @return bool + */ + private function filter_persistent_notifications( Yoast_Notification $notification ) { + + return $notification->is_persistent(); + } + + /** + * Filter out dismissed notifications + * + * @param Yoast_Notification $notification Notification to check. + * + * @return bool + */ + private function filter_dismissed_notifications( Yoast_Notification $notification ) { + + return ! $this->maybe_dismiss_notification( $notification ); + } + + /** + * Convert Notification to array representation + * + * @param Yoast_Notification $notification Notification to convert. + * + * @since 3.2 + * + * @return array + */ + private function notification_to_array( Yoast_Notification $notification ) { + + return $notification->to_array(); + } + + /** + * Convert stored array to Notification. + * + * @param array $notification_data Array to convert to Notification. + * + * @return Yoast_Notification + */ + private function array_to_notification( $notification_data ) { + + return new Yoast_Notification( + $notification_data['message'], + $notification_data['options'] + ); + } + + /** + * Filter notifications that should not be displayed for the current user + * + * @param Yoast_Notification $notification Notification to test. + * + * @return bool + */ + private function filter_notification_current_user( Yoast_Notification $notification ) { + return $notification->display_for_current_user(); + } + + /** + * Write the notifications to a cookie (hooked on shutdown) + * + * Function renamed to 'update_storage'. + * + * @deprecated 3.2 remove in 3.5 + */ + public function set_transient() { + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php new file mode 100644 index 0000000..ef1f7a8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php @@ -0,0 +1,303 @@ + self::UPDATED, + 'id' => '', + 'nonce' => null, + 'priority' => 0.5, + 'data_json' => array(), + 'dismissal_key' => null, + 'capabilities' => array(), + 'capability_check' => self::MATCH_ALL, + ); + + /** + * Notification class constructor. + * + * @param string $message Message string. + * @param array $options Set of options. + */ + public function __construct( $message, $options = array() ) { + $this->message = $message; + $this->options = $this->normalize_options( $options ); + } + + /** + * Retrieve notification ID string. + * + * @return string + */ + public function get_id() { + return $this->options['id']; + } + + /** + * Retrieve nonce identifier. + * + * @return null|string Nonce for this Notification. + */ + public function get_nonce() { + if ( $this->options['id'] && empty( $this->options['nonce'] ) ) { + $this->options['nonce'] = wp_create_nonce( $this->options['id'] ); + } + + return $this->options['nonce']; + } + + /** + * Make sure the nonce is up to date + */ + public function refresh_nonce() { + if ( $this->options['id'] ) { + $this->options['nonce'] = wp_create_nonce( $this->options['id'] ); + } + } + + /** + * Get the type of the notification + * + * @return string + */ + public function get_type() { + return $this->options['type']; + } + + /** + * Priority of the notification + * + * Relative to the type. + * + * @return float Returns the priority between 0 and 1. + */ + public function get_priority() { + return $this->options['priority']; + } + + /** + * Get the User Meta key to check for dismissal of notification + * + * @return string User Meta Option key that registers dismissal. + */ + public function get_dismissal_key() { + if ( empty( $this->options['dismissal_key'] ) ) { + return $this->options['id']; + } + + return $this->options['dismissal_key']; + } + + /** + * Is this Notification persistent + * + * @return bool True if persistent, False if fire and forget. + */ + public function is_persistent() { + $id = $this->get_id(); + + return ! empty( $id ); + } + + /** + * Check if the notification is relevant for the current user + * + * @return bool True if a user needs to see this Notification, False if not. + */ + public function display_for_current_user() { + // If the notification is for the current page only, always show. + if ( ! $this->is_persistent() ) { + return true; + } + + // If the current user doesn't match capabilities. + return $this->match_capabilities(); + } + + /** + * Does the current user match required capabilities + * + * @return bool + */ + public function match_capabilities() { + // Super Admin can do anything. + if ( is_multisite() && is_super_admin() ) { + return true; + } + + /** + * Filter capabilities that enable the displaying of this notification. + * + * @since 3.2 + * + * @param array $capabilities The capabilities that must be present for this Notification. + * @param Yoast_Notification $notification The notification object. + * + * @return array of capabilities or empty for no restrictions. + */ + $capabilities = apply_filters( 'wpseo_notification_capabilities', $this->options['capabilities'], $this ); + + // Should be an array. + if ( ! is_array( $capabilities ) ) { + $capabilities = (array) $capabilities; + } + + /** + * Filter capability check to enable all or any capabilities. + * + * @since 3.2 + * + * @param string $capability_check The type of check that will be used to determine if an capability is present. + * @param Yoast_Notification $notification The notification object. + * + * @return string self::MATCH_ALL or self::MATCH_ANY. + */ + $capability_check = apply_filters( 'wpseo_notification_capability_check', $this->options['capability_check'], $this ); + + if ( ! in_array( $capability_check, array( self::MATCH_ALL, self::MATCH_ANY ), true ) ) { + $capability_check = self::MATCH_ALL; + } + + if ( ! empty( $capabilities ) ) { + + $has_capabilities = array_filter( $capabilities, array( $this, 'has_capability' ) ); + + switch ( $capability_check ) { + case self::MATCH_ALL: + return $has_capabilities === $capabilities; + case self::MATCH_ANY: + return ! empty( $has_capabilities ); + } + } + + return true; + } + + /** + * Array filter function to find matched capabilities + * + * @param string $capability Capability to test. + * + * @return bool + */ + private function has_capability( $capability ) { + return current_user_can( $capability ); + } + + /** + * Return the object properties as an array + * + * @return array + */ + public function to_array() { + return array( + 'message' => $this->message, + 'options' => $this->options, + ); + } + + /** + * Adds string (view) behaviour to the Notification + * + * @return string + */ + public function __toString() { + $attributes = array(); + + // Default notification classes. + $classes = array( + 'yoast-alert', + ); + + // Maintain WordPress visualisation of alerts when they are not persistent. + if ( ! $this->is_persistent() ) { + $classes[] = 'notice'; + $classes[] = $this->get_type(); + } + + if ( ! empty( $classes ) ) { + $attributes['class'] = implode( ' ', $classes ); + } + + // Combined attribute key and value into a string. + array_walk( $attributes, array( $this, 'parse_attributes' ) ); + + // Build the output DIV. + return '
    ' . wpautop( $this->message ) . '
    ' . PHP_EOL; + } + + /** + * Get the JSON if provided + * + * @return false|string + */ + public function get_json() { + if ( empty( $this->options['data_json'] ) ) { + return ''; + } + + return wp_json_encode( $this->options['data_json'] ); + } + + /** + * Make sure we only have values that we can work with + * + * @param array $options Options to normalize. + * + * @return array + */ + private function normalize_options( $options ) { + $options = wp_parse_args( $options, $this->defaults ); + + // Should not exceed 0 or 1. + $options['priority'] = min( 1, max( 0, $options['priority'] ) ); + + // Set default capabilities when not supplied. + if ( empty( $options['capabilities'] ) || array() === $options['capabilities'] ) { + $options['capabilities'] = array( 'manage_options' ); + } + + return $options; + } + + /** + * Format HTML element attributes + * + * @param string $value Attribute value. + * @param string $key Attribute name. + */ + private function parse_attributes( & $value, $key ) { + $value = sprintf( '%s="%s"', $key, esc_attr( $value ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php b/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php new file mode 100644 index 0000000..5dde1d2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php @@ -0,0 +1,333 @@ +plugins the active plugins will be stored in this + * property + * + * @var array + */ + protected $active_plugins = array(); + + /** + * Property for holding instance of itself + * + * @var Yoast_Plugin_Conflict + */ + protected static $instance; + + /** + * For the use of singleton pattern. Create instance of itself and return his instance + * + * @param string $class_name Give the classname to initialize. If classname is false (empty) it will use it's own __CLASS__. + * + * @return Yoast_Plugin_Conflict + */ + public static function get_instance( $class_name = '' ) { + + if ( is_null( self::$instance ) ) { + if ( ! is_string( $class_name ) || $class_name === '' ) { + $class_name = __CLASS__; + } + + self::$instance = new $class_name(); + } + + return self::$instance; + } + + /** + * Setting instance, all active plugins and search for active plugins + * + * Protected constructor to prevent creating a new instance of the + * *Singleton* via the `new` operator from outside of this class. + */ + protected function __construct() { + // Set active plugins. + $this->all_active_plugins = get_option( 'active_plugins' ); + + if ( filter_input( INPUT_GET, 'action' ) === 'deactivate' ) { + $this->remove_deactivated_plugin(); + } + + // Search for active plugins. + $this->search_active_plugins(); + } + + /** + * Check if there are conflicting plugins for given $plugin_section + * + * @param string $plugin_section Type of plugin conflict (such as Open Graph or sitemap). + * + * @return bool + */ + public function check_for_conflicts( $plugin_section ) { + + static $sections_checked; + + if ( $sections_checked === null ) { + $sections_checked = array(); + } + + if ( ! in_array( $plugin_section, $sections_checked ) ) { + $sections_checked[] = $plugin_section; + $has_conflicts = ( ! empty( $this->active_plugins[ $plugin_section ] ) ); + + return $has_conflicts; + } + + return false; + } + + /** + * Getting all the conflicting plugins and return them as a string. + * + * This method will loop through all conflicting plugins to get the details of each plugin. The plugin name + * will be taken from the details to parse a comma separated string, which can be use for by example a notice + * + * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap). + * + * @return string + */ + public function get_conflicting_plugins_as_string( $plugin_section ) { + if ( ! function_exists( 'get_plugin_data' ) ) { + require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); + } + + // Getting the active plugins by given section. + $plugins = $this->active_plugins[ $plugin_section ]; + + $plugin_names = array(); + foreach ( $plugins as $plugin ) { + if ( $name = WPSEO_Utils::get_plugin_name( $plugin ) ) { + $plugin_names[] = '' . $name . ''; + } + } + unset( $plugins, $plugin ); + + if ( ! empty( $plugin_names ) ) { + return implode( ' & ', $plugin_names ); + } + } + + /** + * Checks for given $plugin_sections for conflicts + * + * @param array $plugin_sections Set of sections. + */ + public function check_plugin_conflicts( $plugin_sections ) { + foreach ( $plugin_sections as $plugin_section => $readable_plugin_section ) { + // Check for conflicting plugins and show error if there are conflicts. + if ( $this->check_for_conflicts( $plugin_section ) ) { + $this->set_error( $plugin_section, $readable_plugin_section ); + } + } + + // List of all active sections. + $sections = array_keys( $plugin_sections ); + // List of all sections. + $all_plugin_sections = array_keys( $this->plugins ); + + /* + * Get all sections that are inactive. + * These plugins need to be cleared. + * + * This happens when Sitemaps or OpenGraph implementations toggle active/disabled. + */ + $inactive_sections = array_diff( $all_plugin_sections, $sections ); + if ( ! empty( $inactive_sections ) ) { + foreach ( $inactive_sections as $section ) { + array_walk( $this->plugins[ $section ], array( $this, 'clear_error' ) ); + } + } + + // For active sections clear errors for inactive plugins. + foreach ( $sections as $section ) { + // By default clear errors for all plugins of the section. + $inactive_plugins = $this->plugins[ $section ]; + + // If there are active plugins, filter them from being cleared. + if ( isset( $this->active_plugins[ $section ] ) ) { + $inactive_plugins = array_diff( $this->plugins[ $section ], $this->active_plugins[ $section ] ); + } + + array_walk( $inactive_plugins, array( $this, 'clear_error' ) ); + } + } + + /** + * Setting an error on the screen + * + * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). + * @param string $readable_plugin_section This is the value for the translation. + */ + protected function set_error( $plugin_section, $readable_plugin_section ) { + + $notification_center = Yoast_Notification_Center::get(); + + foreach ( $this->active_plugins[ $plugin_section ] as $plugin_file ) { + + $plugin_name = WPSEO_Utils::get_plugin_name( $plugin_file ); + + $error_message = ''; + /* translators: %1$s: 'Facebook & Open Graph' plugin name(s) of possibly conflicting plugin(s), %2$s to Yoast SEO */ + $error_message .= '

    ' . sprintf( __( 'The %1$s plugin might cause issues when used in conjunction with %2$s.', 'wordpress-seo' ), '' . $plugin_name . '', 'Yoast SEO' ) . '

    '; + $error_message .= '

    ' . sprintf( $readable_plugin_section, 'Yoast SEO', $plugin_name ) . '

    '; + + /* translators: %s: 'Facebook' plugin name of possibly conflicting plugin */ + $error_message .= '' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), WPSEO_Utils::get_plugin_name( $plugin_file ) ) . ' '; + + $identifier = $this->get_notification_identifier( $plugin_file ); + + // Add the message to the notifications center. + $notification_center->add_notification( + new Yoast_Notification( + $error_message, + array( + 'type' => Yoast_Notification::ERROR, + 'id' => 'wpseo-conflict-' . $identifier, + ) + ) + ); + } + } + + /** + * Clear the notification for a plugin + * + * @param string $plugin_file Clear the optional notification for this plugin. + */ + protected function clear_error( $plugin_file ) { + $identifier = $this->get_notification_identifier( $plugin_file ); + + $notification_center = Yoast_Notification_Center::get(); + $notification = $notification_center->get_notification_by_id( 'wpseo-conflict-' . $identifier ); + + if ( $notification ) { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Loop through the $this->plugins to check if one of the plugins is active. + * + * This method will store the active plugins in $this->active_plugins. + */ + protected function search_active_plugins() { + foreach ( $this->plugins as $plugin_section => $plugins ) { + $this->check_plugins_active( $plugins, $plugin_section ); + } + } + + /** + * Loop through plugins and check if each plugin is active + * + * @param array $plugins Set of plugins. + * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). + */ + protected function check_plugins_active( $plugins, $plugin_section ) { + foreach ( $plugins as $plugin ) { + if ( $this->check_plugin_is_active( $plugin ) ) { + $this->add_active_plugin( $plugin_section, $plugin ); + } + } + } + + + /** + * Check if given plugin exists in array with all_active_plugins + * + * @param string $plugin Plugin basename string. + * + * @return bool + */ + protected function check_plugin_is_active( $plugin ) { + return in_array( $plugin, $this->all_active_plugins ); + } + + /** + * Add plugin to the list of active plugins. + * + * This method will check first if key $plugin_section exists, if not it will create an empty array + * If $plugin itself doesn't exist it will be added. + * + * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). + * @param string $plugin Plugin basename string. + */ + protected function add_active_plugin( $plugin_section, $plugin ) { + + if ( ! array_key_exists( $plugin_section, $this->active_plugins ) ) { + $this->active_plugins[ $plugin_section ] = array(); + } + + if ( ! in_array( $plugin, $this->active_plugins[ $plugin_section ] ) ) { + $this->active_plugins[ $plugin_section ][] = $plugin; + } + } + + /** + * Search in $this->plugins for the given $plugin + * + * If there is a result it will return the plugin category + * + * @param string $plugin Plugin basename string. + * + * @return int|string + */ + protected function find_plugin_category( $plugin ) { + + foreach ( $this->plugins as $plugin_section => $plugins ) { + if ( in_array( $plugin, $plugins ) ) { + return $plugin_section; + } + } + + } + + /** + * When being in the deactivation process the currently deactivated plugin has to be removed. + */ + private function remove_deactivated_plugin() { + $deactivated_plugin = filter_input( INPUT_GET, 'plugin' ); + $key_to_remove = array_search( $deactivated_plugin, $this->all_active_plugins ); + + if ( $key_to_remove !== false ) { + unset( $this->all_active_plugins[ $key_to_remove ] ); + } + } + + /** + * Get the identifier from the plugin file + * + * @param string $plugin_file Plugin file to get Identifier from. + * + * @return string + */ + private function get_notification_identifier( $plugin_file ) { + return md5( $plugin_file ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-components.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-components.php new file mode 100644 index 0000000..7c08788 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-components.php @@ -0,0 +1,69 @@ +add_component( new WPSEO_Config_Component_Connect_Google_Search_Console() ); + $this->add_component( new WPSEO_Config_Component_Mailchimp_Signup() ); + } + + /** + * Add a component + * + * @param WPSEO_Config_Component $component Component to add. + */ + public function add_component( WPSEO_Config_Component $component ) { + $this->components[] = $component; + } + + /** + * Sets the storage to use. + * + * @param WPSEO_Configuration_Storage $storage Storage to use. + */ + public function set_storage( WPSEO_Configuration_Storage $storage ) { + $this->set_adapter( $storage->get_adapter() ); + + foreach ( $this->components as $component ) { + $storage->add_field( $component->get_field() ); + } + } + + /** + * Sets the adapter to use. + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to use. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $this->adapter = $adapter; + + foreach ( $this->components as $component ) { + $adapter->add_custom_lookup( + $component->get_field()->get_identifier(), + array( + $component, + 'get_data', + ), + array( + $component, + 'set_data', + ) + ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-endpoint.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-endpoint.php new file mode 100644 index 0000000..203dfe1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-endpoint.php @@ -0,0 +1,78 @@ +service = $service; + } + + /** + * Register REST routes. + */ + public function register() { + // Register fetch config. + register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_RETRIEVE, array( + 'methods' => 'GET', + 'callback' => array( + $this->service, + 'get_configuration', + ), + 'permission_callback' => array( + $this, + 'can_retrieve_data', + ), + ) ); + + // Register save changes. + register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_STORE, array( + 'methods' => 'POST', + 'callback' => array( + $this->service, + 'set_configuration', + ), + 'permission_callback' => array( + $this, + 'can_save_data', + ), + ) ); + } + + /** + * Permission callback implementation + * + * @return bool + */ + public function can_retrieve_data() { + return current_user_can( self::CAPABILITY_RETRIEVE ); + } + + /** + * Permission callback implementation + * + * @return bool + */ + public function can_save_data() { + return current_user_can( self::CAPABILITY_STORE ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-options-adapter.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-options-adapter.php new file mode 100644 index 0000000..8e0242b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-options-adapter.php @@ -0,0 +1,194 @@ +add_lookup( $class_name, self::OPTION_TYPE_WORDPRESS, $option ); + } + + /** + * Add a lookup for a Yoast option + * + * @param string $class_name Class to bind to the lookup. + * @param string $option Option group to use. + * @param string $key Key in the option group to bind to. + * + * @throws InvalidArgumentException Thrown when invalid input is provided. + */ + public function add_yoast_lookup( $class_name, $option, $key ) { + + $test = WPSEO_Options::get_option( $option ); + if ( is_null( $test ) ) { + /* translators: %1$s resolves to the option name passed to the lookup registration */ + throw new InvalidArgumentException( sprintf( __( 'Yoast option %1$s not found.', 'wordpress-seo' ), $option ) ); + } + + $this->add_lookup( $class_name, self::OPTION_TYPE_YOAST, array( + $option, + $key, + ) ); + } + + /** + * Add a lookup for a custom implementation + * + * @param string $class_name Class to bind to the lookup. + * @param callable $callback_get Callback to retrieve data. + * @param callable $callback_set Callback to save data. + * + * @throws InvalidArgumentException Thrown when invalid input is provided. + */ + public function add_custom_lookup( $class_name, $callback_get, $callback_set ) { + + if ( ! is_callable( $callback_get ) || ! is_callable( $callback_set ) ) { + throw new InvalidArgumentException( 'Custom option must be callable.' ); + } + + $this->add_lookup( $class_name, self::OPTION_TYPE_CUSTOM, array( + $callback_get, + $callback_set, + ) ); + } + + /** + * Add a field lookup. + * + * @param string $class_name Class to add lookup for. + * @param string $type Type of lookup. + * @param string|array $option Implementation of the lookup. + * + * @throws Exception Thrown when invalid input is provided. + */ + protected function add_lookup( $class_name, $type, $option ) { + $this->lookup[ $class_name ] = array( + 'type' => $type, + 'option' => $option, + ); + } + + /** + * Get the data for the provided field + * + * @param WPSEO_Config_Field $field Field to get data for. + * + * @return mixed + */ + public function get( WPSEO_Config_Field $field ) { + $identifier = $field->get_identifier(); + + // Lookup option and retrieve value. + $type = $this->get_option_type( $identifier ); + $option = $this->get_option( $identifier ); + + switch ( $type ) { + case self::OPTION_TYPE_WORDPRESS: + return get_option( $option ); + + case self::OPTION_TYPE_YOAST: + $group = WPSEO_Options::get_option( $option[0] ); + + return $group[ $option[1] ]; + + case self::OPTION_TYPE_CUSTOM: + return call_user_func( $option[0] ); + } + + return null; + } + + /** + * Save data from a field + * + * @param WPSEO_Config_Field $field Field to use for lookup. + * @param mixed $value Value to save to the lookup of the field. + * + * @return bool + */ + public function set( WPSEO_Config_Field $field, $value ) { + $identifier = $field->get_identifier(); + + // Lookup option and retrieve value. + $type = $this->get_option_type( $identifier ); + $option = $this->get_option( $identifier ); + + switch ( $type ) { + case self::OPTION_TYPE_WORDPRESS: + return update_option( $option, $value ); + + case self::OPTION_TYPE_YOAST: + $group = WPSEO_Options::get_option( $option[0] ); + + $group[ $option[1] ] = $value; + update_option( $option[0], $group ); + + $saved = WPSEO_Options::get_option( $option[0] ); + + return $saved[ $option[1] ] === $value; + + case self::OPTION_TYPE_CUSTOM: + return call_user_func( $option[1], $value ); + } + + return false; + } + + /** + * Get the lookup type for a specific class + * + * @param string $class_name Class to get the type of. + * + * @return null|string + */ + protected function get_option_type( $class_name ) { + if ( ! isset( $this->lookup[ $class_name ] ) ) { + return null; + } + + return $this->lookup[ $class_name ]['type']; + } + + /** + * Get the option for a specific class + * + * @param string $class_name Class to get the option of. + * + * @return null|string|array + */ + protected function get_option( $class_name ) { + if ( ! isset( $this->lookup[ $class_name ] ) ) { + return null; + } + + return $this->lookup[ $class_name ]['option']; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-page.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-page.php new file mode 100644 index 0000000..92ab586 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-page.php @@ -0,0 +1,268 @@ +should_add_notification() ) { + $this->add_notification(); + } + + if ( filter_input( INPUT_GET, 'page' ) !== self::PAGE_IDENTIFIER ) { + return; + } + + // Register the page for the wizard. + add_action( 'admin_menu', array( $this, 'add_wizard_page' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); + add_action( 'admin_init', array( $this, 'render_wizard_page' ) ); + } + + /** + * Check if the configuration is finished. If so, just remove the notification. + */ + public function catch_configuration_request() { + $configuration_page = filter_input( INPUT_GET, 'configuration' ); + $page = filter_input( INPUT_GET, 'page' ); + + if ( ! ( $configuration_page === 'finished' && ( $page === WPSEO_Admin::PAGE_IDENTIFIER ) ) ) { + return; + } + + $this->remove_notification(); + $this->remove_notification_option(); + + wp_redirect( admin_url( 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ) ); + exit; + } + + + /** + * Registers the page for the wizard. + */ + public function add_wizard_page() { + add_dashboard_page( '', '', 'manage_options', self::PAGE_IDENTIFIER, '' ); + } + + /** + * Renders the wizard page and exits to prevent the wordpress UI from loading. + */ + public function render_wizard_page() { + $this->show_wizard(); + exit; + } + + /** + * Enqueues the assets needed for the wizard. + */ + public function enqueue_assets() { + wp_enqueue_media(); + + /* + * Print the `forms.css` WP stylesheet before any Yoast style, this way + * it's easier to override selectors with the same specificity later. + */ + wp_enqueue_style( 'forms' ); + $assetManager = new WPSEO_Admin_Asset_Manager(); + $assetManager->register_assets(); + $assetManager->enqueue_script( 'configuration-wizard' ); + $assetManager->enqueue_style( 'yoast-components' ); + + $config = $this->get_config(); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'configuration-wizard', 'yoastWizardConfig', $config ); + } + + /** + * Setup Wizard Header. + */ + public function show_wizard() { + $this->enqueue_assets(); + $dashboard_url = admin_url( '/admin.php?page=wpseo_dashboard' ); + ?> + + + + > + + + + + <?php + printf( + /* translators: %s expands to Yoast SEO. */ + __( '%s › Configuration Wizard', 'wordpress-seo' ), + 'Yoast SEO' + ); + ?> + tag in the Yoast Configuration wizard. + * + * Allows users to add their own scripts or styles. + * + * @since 4.0 + */ + do_action( 'wpseo_configuration_wizard_head' ); + ?> + + +
    + + + + tag in the Yoast Configuration wizard. + * + * Allows users to add their own scripts or content. + * + * @since 4.0 + */ + do_action( 'wpseo_configuration_wizard_footer' ); + + wp_print_scripts( 'yoast-seo-configuration-wizard' ); + ?> + + + get_translations(); + $service = new WPSEO_GSC_Service(); + $config = array( + 'namespace' => WPSEO_Configuration_Endpoint::REST_NAMESPACE, + 'endpoint_retrieve' => WPSEO_Configuration_Endpoint::ENDPOINT_RETRIEVE, + 'endpoint_store' => WPSEO_Configuration_Endpoint::ENDPOINT_STORE, + 'nonce' => wp_create_nonce( 'wp_rest' ), + 'root' => esc_url_raw( rest_url() ), + 'ajaxurl' => admin_url( 'admin-ajax.php' ), + 'finishUrl' => admin_url( 'admin.php?page=wpseo_dashboard&configuration=finished' ), + 'gscAuthURL' => $service->get_client()->createAuthUrl(), + 'gscProfiles' => $service->get_sites(), + 'gscNonce' => wp_create_nonce( 'wpseo-gsc-ajax-security' ), + 'translations' => $translations, + ); + + return $config; + } + + /** + * Returns the translations necessary for the configuration wizard. + * + * @returns array The translations for the configuration wizard. + */ + public function get_translations() { + $file = plugin_dir_path( WPSEO_FILE ) . 'languages/yoast-components-' . WPSEO_Utils::get_user_locale() . '.json'; + if ( file_exists( $file ) && $file = file_get_contents( $file ) ) { + return json_decode( $file, true ); + } + + return array(); + } + + /** + * Adds a notification to the notification center. + */ + private function add_notification() { + $notification_center = Yoast_Notification_Center::get(); + $notification_center->add_notification( self::get_notification() ); + } + + /** + * Removes the notification from the notification center. + */ + private function remove_notification() { + $notification_center = Yoast_Notification_Center::get(); + $notification_center->remove_notification( self::get_notification() ); + } + + /** + * Gets the notification. + * + * @return Yoast_Notification + */ + private static function get_notification() { + $message = sprintf( + __( 'Since you are new to %1$s you can configure the %2$splugin%3$s', 'wordpress-seo' ), + 'Yoast SEO', + '', + '' + ); + + $notification = new Yoast_Notification( + $message, + array( + 'type' => Yoast_Notification::WARNING, + 'id' => 'wpseo-dismiss-onboarding-notice', + 'capabilities' => 'manage_options', + 'priority' => 0.8, + ) + ); + + return $notification; + } + + /** + * When the notice should be shown. + * + * @return bool + */ + private function should_add_notification() { + $options = $this->get_options(); + + return $options['show_onboarding_notice'] === true; + } + + /** + * Remove the options that triggers the notice for the configuration wizard. + */ + private function remove_notification_option() { + $options = $this->get_options(); + + $options['show_onboarding_notice'] = false; + + update_option( 'wpseo', $options ); + } + + /** + * Returns the set options + * + * @return mixed|void + */ + private function get_options() { + return get_option( 'wpseo' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-service.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-service.php new file mode 100644 index 0000000..09d135a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-service.php @@ -0,0 +1,143 @@ +set_default_providers(); + $this->populate_configuration(); + $this->endpoint->register(); + + // @todo: check if this is really needed, since the switch happens only in the API. + if ( function_exists( 'restore_current_locale' ) ) { + restore_current_locale(); + } + } + + /** + * Set default handlers + */ + public function set_default_providers() { + $this->set_storage( new WPSEO_Configuration_Storage() ); + $this->set_options_adapter( new WPSEO_Configuration_Options_Adapter() ); + $this->set_components( new WPSEO_Configuration_Components() ); + $this->set_endpoint( new WPSEO_Configuration_Endpoint() ); + $this->set_structure( new WPSEO_Configuration_Structure() ); + } + + /** + * Set storage handler + * + * @param WPSEO_Configuration_Storage $storage Storage handler to use. + */ + public function set_storage( WPSEO_Configuration_Storage $storage ) { + $this->storage = $storage; + } + + /** + * Set endpoint handler + * + * @param WPSEO_Configuration_Endpoint $endpoint Endpoint implementation to use. + */ + public function set_endpoint( WPSEO_Configuration_Endpoint $endpoint ) { + $this->endpoint = $endpoint; + $this->endpoint->set_service( $this ); + } + + /** + * Set the options adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to use. + */ + public function set_options_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $this->adapter = $adapter; + } + + /** + * Set components provider + * + * @param WPSEO_Configuration_Components $components Component provider to use. + */ + public function set_components( WPSEO_Configuration_Components $components ) { + $this->components = $components; + } + + /** + * Set structure provider + * + * @param WPSEO_Configuration_Structure $structure Structure provider to use. + */ + public function set_structure( WPSEO_Configuration_Structure $structure ) { + $this->structure = $structure; + } + + /** + * Populate the configuration + */ + protected function populate_configuration() { + $this->storage->set_adapter( $this->adapter ); + $this->storage->add_default_fields(); + + $this->components->initialize(); + $this->components->set_storage( $this->storage ); + } + + /** + * Used by endpoint to retrieve configuration + * + * @return array List of settings. + */ + public function get_configuration() { + $fields = $this->storage->retrieve(); + $steps = $this->structure->retrieve(); + + return array( + 'fields' => $fields, + 'steps' => $steps, + ); + } + + /** + * Used by endpoint to store changes + * + * @param WP_REST_Request $request Request from the REST API. + * + * @return array List of feedback per option if saving succeeded. + */ + public function set_configuration( WP_REST_Request $request ) { + $this->populate_configuration(); + + return $this->storage->store( $request->get_json_params() ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-storage.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-storage.php new file mode 100644 index 0000000..4343544 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-storage.php @@ -0,0 +1,196 @@ +get_fields() ); + + foreach ( $fields as $field ) { + $this->add_field( $field ); + } + } + + /** + * Allow for field injections + * + * @param WPSEO_Config_Field $field Field to add to the stack. + */ + public function add_field( WPSEO_Config_Field $field ) { + $this->fields[] = $field; + + if ( isset( $this->adapter ) ) { + $field->set_adapter( $this->adapter ); + } + } + + /** + * Set the adapter to use + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to use. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $this->adapter = $adapter; + + foreach ( $this->fields as $field ) { + $field->set_adapter( $this->adapter ); + } + } + + /** + * Retrieve the current adapter + * + * @return WPSEO_Configuration_Options_Adapter + */ + public function get_adapter() { + return $this->adapter; + } + + /** + * Retrieve the registered fields + * + * @returns array List of settings. + */ + public function retrieve() { + $output = array(); + + /** @var WPSEO_Config_Field $field */ + foreach ( $this->fields as $field ) { + + $build = $field->to_array(); + + $data = $this->get_field_data( $field ); + if ( ! is_null( $data ) ) { + $build['data'] = $data; + } + + $output[ $field->get_identifier() ] = $build; + } + + return $output; + } + + /** + * Save the data + * + * @param array $data_to_store Data provided by the API which needs to be processed for saving. + * + * @return string Results + */ + public function store( $data_to_store ) { + $output = array(); + + /** @var WPSEO_Config_Field $field */ + foreach ( $this->fields as $field ) { + + $field_identifier = $field->get_identifier(); + + if ( ! array_key_exists( $field_identifier, $data_to_store ) ) { + continue; + } + + $field_data = array(); + if ( isset( $data_to_store[ $field_identifier ] ) ) { + $field_data = $data_to_store[ $field_identifier ]; + } + + $result = $this->adapter->set( $field, $field_data ); + + $build = array( + 'result' => $result, + ); + + // Set current data to object to be displayed. + $data = $this->get_field_data( $field ); + if ( ! is_null( $data ) ) { + $build['data'] = $data; + } + + $output[ $field_identifier ] = $build; + } + + return $output; + } + + /** + * Filter out null input values + * + * @param mixed $input Input to test against. + * + * @return bool + */ + protected function is_not_null( $input ) { + return ! is_null( $input ); + } + + /** + * Get data from a specific field + * + * @param WPSEO_Config_Field $field Field to get data for. + * + * @return array|mixed + */ + protected function get_field_data( WPSEO_Config_Field $field ) { + $data = $this->adapter->get( $field ); + + if ( is_array( $data ) ) { + $defaults = $field->get_data(); + + // Remove 'null' values from input. + $data = array_filter( $data, array( $this, 'is_not_null' ) ); + + // Merge defaults with data. + $data = array_merge( $defaults, $data ); + } + + if ( is_null( $data ) ) { + // Get default if no data was set. + $data = $field->get_data(); + + return $data; + } + + return $data; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-structure.php b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-structure.php new file mode 100644 index 0000000..e08598f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/class-configuration-structure.php @@ -0,0 +1,87 @@ +add_step( 'intro', __( 'Welcome!', 'wordpress-seo' ), array( + 'upsellConfigurationService', + 'mailchimpSignup', + ) ); + $this->add_step( 'environment_type', __( 'Environment', 'wordpress-seo' ), array( 'environment_type' ) ); + $this->add_step( 'siteType', __( 'Site type', 'wordpress-seo' ), array( 'siteType' ) ); + $this->add_step( 'publishingEntity', __( 'Company or person', 'wordpress-seo' ), array( + 'publishingEntity', + 'publishingEntityType', + 'publishingEntityCompanyName', + 'publishingEntityCompanyLogo', + 'publishingEntityPersonName', + ) ); + $this->add_step( 'profileUrls', __( 'Social profiles', 'wordpress-seo' ), array( + 'socialProfilesIntro', + 'profileUrlFacebook', + 'profileUrlTwitter', + 'profileUrlInstagram', + 'profileUrlLinkedIn', + 'profileUrlMySpace', + 'profileUrlPinterest', + 'profileUrlYouTube', + 'profileUrlGooglePlus', + ) ); + + $fields = array( 'postTypeVisibility' ); + + $post_type_factory = new WPSEO_Config_Factory_Post_Type(); + foreach ( $post_type_factory->get_fields() as $post_type_field ) { + $fields[] = $post_type_field->get_identifier(); + } + $this->add_step( 'postTypeVisibility', __( 'Post type visibility', 'wordpress-seo' ), $fields ); + + $this->add_step( 'multipleAuthors', __( 'Multiple authors', 'wordpress-seo' ), array( 'multipleAuthors' ) ); + $this->add_step( 'connectGoogleSearchConsole', __( 'Google Search Console', 'wordpress-seo' ), array( 'connectGoogleSearchConsole' ) ); + $this->add_step( 'titleTemplate', __( 'Title settings', 'wordpress-seo' ), array( + 'siteName', + 'separator', + ) ); + $this->add_step( 'success', __( 'Success!', 'wordpress-seo' ), array( + 'successMessage', + 'upsellSiteReview', + 'mailchimpSignup', + ) ); + } + + /** + * Add a step to the structure + * + * @param string $identifier Identifier for this step. + * @param string $title Title to display for this step. + * @param array $fields Fields to use on the step. + */ + protected function add_step( $identifier, $title, $fields ) { + $this->steps[ $identifier ] = array( + 'title' => $title, + 'fields' => $fields, + ); + } + + /** + * Retrieve the registered steps + * + * @return array + */ + public function retrieve() { + return $this->steps; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-connect-google-search-console.php b/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-connect-google-search-console.php new file mode 100644 index 0000000..bff581c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-connect-google-search-console.php @@ -0,0 +1,149 @@ +gsc_service = new WPSEO_GSC_Service( $this->get_profile() ); + } + + /** + * Set the Google Search Console service. + * + * @param WPSEO_GSC_Service $service Set service to use. + */ + public function set_gsc_service( WPSEO_GSC_Service $service ) { + $this->gsc_service = $service; + } + + /** + * Gets the component identifier. + * + * @return string + */ + public function get_identifier() { + return 'ConnectGoogleSearchConsole'; + } + + /** + * Gets the field. + * + * @return WPSEO_Config_Field + */ + public function get_field() { + return new WPSEO_Config_Field_Connect_Google_Search_Console(); + } + + /** + * Get the data for the field. + * + * @return mixed + */ + public function get_data() { + + $data = array( + 'profileList' => $this->get_profilelist(), + 'profile' => $this->get_profile(), + 'hasAccessToken' => $this->hasAccessToken(), + ); + + return $data; + } + + /** + * Save data + * + * @param array $data Data containing changes. + * + * @return mixed + */ + public function set_data( $data ) { + + $current_data = $this->get_data(); + + $this->handle_profile_change( $current_data, $data ); + + // Save profile. + $has_saved = update_option( + WPSEO_GSC::OPTION_WPSEO_GSC, + array( 'profile' => $data['profile'] ) + ); + + // Collect results to return to the configurator. + $results = array( + 'profile' => $has_saved, + ); + + return $results; + } + + /** + * Remove issues when the profile has changed + * + * @param array $current_data Saved data before changes. + * @param array $data Data after changes. + */ + protected function handle_profile_change( $current_data, $data ) { + // If the profile has been changed, remove issues. + if ( $current_data['profile'] === $data['profile'] ) { + return; + } + + $this->reload_issues(); + } + + /** + * Get the current GSC profile + * + * @return string + */ + protected function get_profile() { + return WPSEO_GSC_Settings::get_profile(); + } + + /** + * Reload GSC issues + */ + protected function reload_issues() { + WPSEO_GSC_Settings::reload_issues(); + } + + /** + * Gets a list with the profiles. + * + * @return array + */ + protected function get_profilelist() { + $profiles = array(); + $sites = $this->gsc_service->get_sites(); + foreach ( $sites as $siteKey => $siteValue ) { + $profiles[ untrailingslashit( $siteKey ) ] = untrailingslashit( $siteValue ); + } + + return $profiles; + } + + /** + * Checks if there is an access token. If so, there is a connection. + * + * @return bool + */ + private function hasAccessToken() { + return ( null !== $this->gsc_service->get_client()->getAccessToken() ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-mailchimp-signup.php b/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-mailchimp-signup.php new file mode 100644 index 0000000..a6ab920 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-mailchimp-signup.php @@ -0,0 +1,79 @@ + $this->has_mailchimp_signup(), + ); + + return $data; + } + + /** + * Save data + * + * @param array $data Data containing changes. + * + * @return mixed + */ + public function set_data( $data ) { + + $has_saved = false; + if ( ! empty( $data['hasSignup'] ) ) { + // Saves the user meta. + update_user_meta( get_current_user_id(), self::META_NAME, true ); + + $has_saved = ( $data['hasSignup'] === $this->has_mailchimp_signup() ); + } + + // Collect results to return to the configurator. + $results = array( + 'hasSignup' => $has_saved, + ); + + return $results; + } + + /** + * Checks if the user has entered his email for mailchimp already. + * + * @return bool + */ + protected function has_mailchimp_signup() { + $user_meta = get_user_meta( get_current_user_id(), self::META_NAME, true ); + + return ( ! empty( $user_meta ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/components/interface-component.php b/wp-content/plugins/wordpress-seo/admin/config-ui/components/interface-component.php new file mode 100644 index 0000000..0bae3af --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/components/interface-component.php @@ -0,0 +1,30 @@ + true ), 'objects' ); + if ( ! empty( $post_types ) ) { + foreach ( $post_types as $post_type => $post_type_object ) { + $label = $this->decode_html_entities( $post_type_object->label ); + $field = new WPSEO_Config_Field_Choice_Post_Type( $post_type, $label ); + + $this->add_custom_properties( $post_type, $field ); + + $fields[] = $field; + } + } + + self::$fields = $fields; + } + + return self::$fields; + } + + /** + * Add custom properties for specific post types + * + * @param string $post_type Post type of field that is being added. + * @param WPSEO_Config_Field $field Field that corresponds to the post type. + */ + private function add_custom_properties( $post_type, $field ) { + if ( 'attachment' === $post_type ) { + $field->set_property( 'explanation', __( 'WordPress automatically generates an URL for each media item in the library. Enabling this will allow for google to index the generated URL.', 'wordpress-seo' ) ); + } + } + + /** + * Replaces the HTML entity with it's actual symbol. + * + * Because we do not not know what consequences it will have if we convert every HTML entity, + * we will only replace the characters that we have known problems with in text's. + * + * @param string $text The text to decode. + * + * @return string String with decoded HTML entities. + */ + private function decode_html_entities( $text ) { + return str_replace( ''', '’', $text ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice-post-type.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice-post-type.php new file mode 100644 index 0000000..ce66749 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice-post-type.php @@ -0,0 +1,92 @@ +post_type = $post_type; + + /* Translators: %1$s expands to the name of the post type. The options given to the user are "visible" and "hidden" */ + $this->set_property( 'label', sprintf( __( 'The post type "%1$s" should be', 'wordpress-seo' ), $label ) ); + + $this->add_choice( 'true', __( 'Visible', 'wordpress-seo' ) ); + $this->add_choice( 'false', __( 'Hidden', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_custom_lookup( + $this->get_identifier(), + array( $this, 'get_data' ), + array( $this, 'set_data' ) + ); + } + + /** + * Get the post type of this field. + * + * @return string Post type. + */ + public function get_post_type() { + return $this->post_type; + } + + /** + * @return bool + */ + public function get_data() { + $option = WPSEO_Options::get_option( 'wpseo_xml' ); + + $key = 'post_types-' . $this->get_post_type() . '-not_in_sitemap'; + + $storedData = ! isset( $option[ $key ] ) || false === $option[ $key ]; + + if ( $storedData ) { + return 'true'; + } + + return 'false'; + } + + /** + * Set new data + * + * @param string $visible Visible (true) or hidden (false). + * + * @return bool + */ + public function set_data( $visible ) { + $post_type = $this->get_post_type(); + + $option = WPSEO_Options::get_option( 'wpseo_xml' ); + + $option[ 'post_types-' . $post_type . '-not_in_sitemap' ] = ( $visible === 'false' ); + + update_option( 'wpseo_xml', $option ); + + // Check if everything got saved properly. + $saved_option = WPSEO_Options::get_option( 'wpseo_xml' ); + + return ( ( $visible === 'false' ) && $saved_option[ 'post_types-' . $post_type . '-not_in_sitemap' ] === true ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice.php new file mode 100644 index 0000000..e9fe970 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-choice.php @@ -0,0 +1,40 @@ +properties['choices'] = array(); + } + + /** + * Add a choice to the properties + * + * @param string $value Value op the option. + * @param string $label Label to display for the value. + * @param string $screen_reader_text Optional. Screenreader text to use. + */ + public function add_choice( $value, $label, $screen_reader_text = '' ) { + $choice = array( + 'label' => $label, + ); + + if ( $screen_reader_text ) { + $choice['screenReaderText'] = $screen_reader_text; + } + + $this->properties['choices'][ $value ] = $choice; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-logo.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-logo.php new file mode 100644 index 0000000..8092d61 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-logo.php @@ -0,0 +1,28 @@ +set_property( 'label', __( 'Provide an image of the company logo', 'wordpress-seo' ) ); + + $this->set_requires( 'publishingEntityType', 'company' ); + } + + /** + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'company_logo' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-name.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-name.php new file mode 100644 index 0000000..1247dab --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-name.php @@ -0,0 +1,28 @@ +set_property( 'label', __( 'The name of the company', 'wordpress-seo' ) ); + + $this->set_requires( 'publishingEntityType', 'company' ); + } + + /** + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'company_name' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-or-person.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-or-person.php new file mode 100644 index 0000000..857bdbb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-or-person.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'This data is shown as metadata in your site. It is intended to appear in Google\'s Knowledge Graph. You can be either a company, or a person, choose either:', 'wordpress-seo' ) ); + + $this->add_choice( 'company', __( 'Company', 'wordpress-seo' ) ); + $this->add_choice( 'person', __( 'Person', 'wordpress-seo' ) ); + } + + /** + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'company_or_person' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-connect-google-search-console.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-connect-google-search-console.php new file mode 100644 index 0000000..f22910c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-connect-google-search-console.php @@ -0,0 +1,28 @@ + '', + 'profileList' => '', + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-environment.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-environment.php new file mode 100644 index 0000000..92df2f0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-environment.php @@ -0,0 +1,95 @@ +set_property( 'label', sprintf( __( 'Please specify the environment in which this site - %1$s - is running.', 'wordpress-seo' ), get_home_url() ) ); + + $this->add_choice( 'production', __( 'Production (this is a live site with real traffic)', 'wordpress-seo' ) ); + $this->add_choice( 'staging', __( 'Staging (this is a copy of a live site used for testing purposes only)', 'wordpress-seo' ) ); + $this->add_choice( 'development', __( 'Development (this site is running locally for development purposes)', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_custom_lookup( + $this->get_identifier(), + array( $this, 'get_data' ), + array( $this, 'set_data' ) + ); + } + + /** + * Gets the option that is set for this field. + * + * @return string The value for the environment_type wpseo option. + */ + public function get_data() { + $option = WPSEO_Options::get_option( 'wpseo' ); + + return $option['environment_type']; + } + + /** + * Set new data. + * + * @param string $environment_type The site's environment type. + * + * @return bool Returns whether the value is successfully set. + */ + public function set_data( $environment_type ) { + $option = WPSEO_Options::get_option( 'wpseo' ); + + if ( $option['environment_type'] !== $environment_type ) { + $option['environment_type'] = $environment_type; + update_option( 'wpseo', $option ); + if ( ! $this->set_indexation( $environment_type ) ) { + return false; + } + } + + $saved_environment_option = WPSEO_Options::get_option( 'wpseo' ); + + return ( $saved_environment_option['environment_type'] === $option['environment_type'] ); + } + + /** + * Set the WordPress Search Engine Visibility option based on the environment type. + * + * @param string $environment_type The environment the site is running in. + * + * @return bool Returns if the options is set successfully. + */ + protected function set_indexation( $environment_type ) { + $new_blog_public_value = 0; + $current_blog_public_value = get_option( 'blog_public' ); + + if ( $environment_type === 'production' ) { + $new_blog_public_value = 1; + } + + if ( $current_blog_public_value !== $new_blog_public_value ) { + update_option( 'blog_public', $new_blog_public_value ); + + return true; + } + $saved_blog_public_value = get_option( 'blog_public' ); + + return ( $saved_blog_public_value === $new_blog_public_value ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-mailchimp-signup.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-mailchimp-signup.php new file mode 100644 index 0000000..c990fa8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-mailchimp-signup.php @@ -0,0 +1,56 @@ +ID > 0 ) ? $current_user->user_email : ''; + + $this->set_property( 'title' , __( 'Newsletter signup', 'wordpress-seo' ) ); + $this->set_property( + 'label', + sprintf( + /* translators: %s expands to Yoast SEO. */ + __( 'If you would like us to keep you up-to-date regarding %s, other plugins by Yoast and major news in the world of SEO, subscribe to our newsletter:', 'wordpress-seo' ), + 'Yoast SEO' + ) + ); + + $this->set_property( 'mailchimpActionUrl', 'https://yoast.us1.list-manage.com/subscribe/post-json?u=ffa93edfe21752c921f860358&id=972f1c9122' ); + $this->set_property( 'currentUserEmail', $user_email ); + $this->set_property( 'userName', trim( $current_user->user_firstname . ' ' . $current_user->user_lastname ) ); + } + + /** + * Get the data + * + * @return array + */ + public function get_data() { + return array( + 'hasSignup' => $this->has_mailchimp_signup(), + ); + + } + + /** + * Checks if the user has entered his email for mailchimp already. + * + * @return bool + */ + protected function has_mailchimp_signup() { + $user_meta = get_user_meta( get_current_user_id(), WPSEO_Config_Component_Mailchimp_Signup::META_NAME, true ); + return ( ! empty( $user_meta ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-multiple-authors.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-multiple-authors.php new file mode 100644 index 0000000..297e33a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-multiple-authors.php @@ -0,0 +1,81 @@ +set_property( 'label', __( 'Does, or will, your site have multiple authors?', 'wordpress-seo' ) ); + + $this->add_choice( 'yes', __( 'Yes', 'wordpress-seo' ) ); + $this->add_choice( 'no', __( 'No', 'wordpress-seo' ) ); + } + + /** + * Set adapter. + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_custom_lookup( + $this->get_identifier(), + array( $this, 'get_data' ), + array( $this, 'set_data' ) + ); + } + + /** + * Get the data from the stored options. + * + * @return null|string + */ + public function get_data() { + + $option = WPSEO_Options::get_option( 'wpseo' ); + if ( isset( $option['has_multiple_authors'] ) ) { + $value = $option['has_multiple_authors']; + } + + if ( ! isset( $value ) || is_null( $value ) ) { + // If there are more than one users with level > 1 default to multiple authors. + $users = get_users( array( + 'fields' => 'IDs', + 'who' => 'authors', + ) ); + + $value = count( $users ) > 1; + } + + return ( $value ) ? 'yes' : 'no'; + } + + /** + * Set the data in the options. + * + * @param {string} $data The data to set for the field. + * + * @return bool Returns true or false for successful storing the data. + */ + public function set_data( $data ) { + $value = ( $data === 'yes' ); + + // Set multiple authors option. + $result_multiple_authors = WPSEO_Options::save_option( 'wpseo', 'has_multiple_authors', $value ); + + /* + * Set disable author archives option. When multiple authors is set to true, + * the disable author option has to be false. Because of this the $value is inversed. + */ + $result_author_archives = WPSEO_Options::save_option( 'wpseo_titles', 'disable-author', ! $value ); + + return ( $result_multiple_authors === true && $result_author_archives === true ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-person-name.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-person-name.php new file mode 100644 index 0000000..5f0cc4f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-person-name.php @@ -0,0 +1,28 @@ +set_property( 'label', __( 'The name of the person', 'wordpress-seo' ) ); + + $this->set_requires( 'publishingEntityType', 'person' ); + } + + /** + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'person_name' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-post-type-visibility.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-post-type-visibility.php new file mode 100644 index 0000000..3503fb8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-post-type-visibility.php @@ -0,0 +1,23 @@ +' . $copy . '


    '; + + $this->set_property( 'html', $html ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-facebook.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-facebook.php new file mode 100644 index 0000000..ed84a88 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-facebook.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'Facebook Page URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/www\.facebook\.com\/([^/]+)\/$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'facebook_site' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-googleplus.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-googleplus.php new file mode 100644 index 0000000..65a1a3c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-googleplus.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'Google+ URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/plus\.google\.com\/([^/]+)$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'google_plus_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-instagram.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-instagram.php new file mode 100644 index 0000000..6a33b51 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-instagram.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'Instagram URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/www\.instagram\.com\/([^/]+)\/$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'instagram_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-linkedin.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-linkedin.php new file mode 100644 index 0000000..b58c96f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-linkedin.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'LinkedIn URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/www\.linkedin\.com\/in\/([^/]+)$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'linkedin_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-myspace.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-myspace.php new file mode 100644 index 0000000..42168ed --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-myspace.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'MySpace URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/myspace\.com\/([^/]+)\/$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'myspace_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-pinterest.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-pinterest.php new file mode 100644 index 0000000..544bb64 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-pinterest.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'Pinterest URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/www\.pinterest\.com\/([^/]+)\/$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'pinterest_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-twitter.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-twitter.php new file mode 100644 index 0000000..223be1b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-twitter.php @@ -0,0 +1,28 @@ +set_property( 'label', __( 'Twitter Username', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'twitter_site' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-youtube.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-youtube.php new file mode 100644 index 0000000..5a53b81 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-youtube.php @@ -0,0 +1,29 @@ +set_property( 'label', __( 'YouTube URL', 'wordpress-seo' ) ); + $this->set_property( 'pattern', '^https:\/\/www\.youtube\.com\/([^/]+)$' ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'youtube_url' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-separator.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-separator.php new file mode 100644 index 0000000..297a6c3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-separator.php @@ -0,0 +1,43 @@ +set_property( 'label', __( 'Title Separator', 'wordpress-seo' ) ); + $this->set_property( 'explanation', __( 'Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name. Symbols are shown in the size they\'ll appear in the search results.', 'wordpress-seo' ) ); + + $this->add_choice( 'sc-dash', '-', __( 'Dash', 'wordpress-seo' ) ); + $this->add_choice( 'sc-ndash', '–', __( 'En dash', 'wordpress-seo' ) ); + $this->add_choice( 'sc-mdash', '—', __( 'Em dash', 'wordpress-seo' ) ); + $this->add_choice( 'sc-middot', '·', __( 'Middle dot', 'wordpress-seo' ) ); + $this->add_choice( 'sc-bull', '•', __( 'Bullet', 'wordpress-seo' ) ); + $this->add_choice( 'sc-star', '*', __( 'Asterisk', 'wordpress-seo' ) ); + $this->add_choice( 'sc-smstar', '⋆', __( 'Low asterisk', 'wordpress-seo' ) ); + $this->add_choice( 'sc-pipe', '|', __( 'Vertical bar', 'wordpress-seo' ) ); + $this->add_choice( 'sc-tilde', '~', __( 'Small tilde', 'wordpress-seo' ) ); + $this->add_choice( 'sc-laquo', '«', __( 'Left angle quotation mark', 'wordpress-seo' ) ); + $this->add_choice( 'sc-raquo', '»', __( 'Right angle quotation mark', 'wordpress-seo' ) ); + $this->add_choice( 'sc-lt', '<', __( 'Less than sign', 'wordpress-seo' ) ); + $this->add_choice( 'sc-gt', '>', __( 'Greater than sign', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_titles', 'separator' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-name.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-name.php new file mode 100644 index 0000000..318d9c8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-name.php @@ -0,0 +1,67 @@ +set_property( 'label', __( 'Website name', 'wordpress-seo' ) ); + $this->set_property( 'explanation', __( 'Google shows your website\'s name in the search results, if you want to change it, you can do that here.', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_custom_lookup( + $this->get_identifier(), + array( $this, 'get_data' ), + array( $this, 'set_data' ) + ); } + + /** + * Get the data from the stored options. + * + * @return null|string + */ + public function get_data() { + $option = WPSEO_Options::get_option( 'wpseo' ); + if ( ! empty( $option['website_name'] ) ) { + return $option['website_name']; + } + + return get_bloginfo( 'name' ); + } + + /** + * Set the data in the options. + * + * @param {string} $data The data to set for the field. + * + * @return bool Returns true or false for successful storing the data. + */ + public function set_data( $data ) { + $value = $data; + + $option = WPSEO_Options::get_option( 'wpseo' ); + $option['website_name'] = $value; + + update_option( 'wpseo', $option ); + + // Check if everything got saved properly. + $saved_option = WPSEO_Options::get_option( 'wpseo' ); + + return ( $saved_option['website_name'] === $option['website_name'] ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-type.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-type.php new file mode 100644 index 0000000..08f1a4e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-site-type.php @@ -0,0 +1,36 @@ +set_property( 'label', sprintf( __( 'What kind of site is %1$s?', 'wordpress-seo' ), get_home_url() ) ); + + $this->add_choice( 'blog', __( 'Blog', 'wordpress-seo' ) ); + $this->add_choice( 'shop', __( 'Webshop', 'wordpress-seo' ) ); + $this->add_choice( 'news', __( 'News site', 'wordpress-seo' ) ); + $this->add_choice( 'smallBusiness', __( 'Small business site', 'wordpress-seo' ) ); + $this->add_choice( 'corporateOther', __( 'Other corporate site', 'wordpress-seo' ) ); + $this->add_choice( 'personalOther', __( 'Other personal site', 'wordpress-seo' ) ); + } + + /** + * Set adapter + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'site_type' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-social-profiles-intro.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-social-profiles-intro.php new file mode 100644 index 0000000..8403e52 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-social-profiles-intro.php @@ -0,0 +1,23 @@ +' . $intro_text . '

    '; + + $this->set_property( 'html', $html ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-success-message.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-success-message.php new file mode 100644 index 0000000..229e822 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-success-message.php @@ -0,0 +1,42 @@ +', + sprintf( + /* translators: %1$s expands to Yoast SEO. */ + __( '%1$s video tutorial', 'wordpress-seo' ), + 'Yoast SEO' + ) + ); + + $html = '

    ' . $success_message . '

    '; + $html .= '

    ' . $onpage_seo . '

    '; + $html .= '
    ' . $content_analysis_video . '
    '; + + $this->set_property( 'html', $html ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-configuration-service.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-configuration-service.php new file mode 100644 index 0000000..ae49842 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-configuration-service.php @@ -0,0 +1,38 @@ +', + '' + ); + + $html = '

    ' . $intro_text . '

    '; + $html .= '

    ' . $upsell_text . '

    '; + + + $this->set_property( 'html', $html ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-site-review.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-site-review.php new file mode 100644 index 0000000..10ca7e4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-site-review.php @@ -0,0 +1,30 @@ +', + '', + '', + '' + ); + + $html = '

    ' . $upsell_text . '

    '; + + $this->set_property( 'html', $html ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field.php b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field.php new file mode 100644 index 0000000..f4b3c2e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field.php @@ -0,0 +1,134 @@ +field = $field; + $this->component = $component; + } + + /** + * Get the identifier + * + * @return string + */ + public function get_identifier() { + return $this->field; + } + + /** + * Get the component + * + * @return string + */ + public function get_component() { + return $this->component; + } + + /** + * Set a property value + * + * @param string $name Property to set. + * @param mixed $value Value to apply. + */ + public function set_property( $name, $value ) { + $this->properties[ $name ] = $value; + } + + /** + * Get all the properties + * + * @return array + */ + public function get_properties() { + return $this->properties; + } + + /** + * Get the data + * + * @return mixed + */ + public function get_data() { + return $this->data; + } + + /** + * Array representation of this object. + * + * @return array + */ + public function to_array() { + $output = array( + 'componentName' => $this->get_component(), + ); + + $properties = $this->get_properties(); + if ( $properties ) { + $output['properties'] = $properties; + } + + $requires = $this->get_requires(); + if ( ! empty( $requires ) ) { + $output['requires'] = $requires; + } + + return $output; + } + + /** + * Set the adapter to use + * + * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. + */ + public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { + } + + /** + * Requires another field to have a certain value. + * + * @param string $field Field to check for a certain value. + * @param mixed $value Value of the field. + */ + public function set_requires( $field, $value ) { + $this->requires = array( + 'field' => $field, + 'value' => $value, + ); + } + + /** + * Get the required field settings (if present) + * + * @return array + */ + public function get_requires() { + return $this->requires; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php b/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php new file mode 100644 index 0000000..ed7a477 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php @@ -0,0 +1,99 @@ +formatter = $formatter; + } + + /** + * Returns the values + * + * @return array + */ + public function get_values() { + $defaults = $this->get_defaults(); + $values = $this->formatter->get_values(); + + return ( $values + $defaults ); + } + + /** + * Returns array with all the values always needed by a scraper object + * + * @return array + */ + private function get_defaults() { + $analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + $analysis_readability = new WPSEO_Metabox_Analysis_Readability(); + + return array( + 'search_url' => '', + 'post_edit_url' => '', + 'base_url' => '', + 'contentTab' => __( 'Readability', 'wordpress-seo' ), + 'keywordTab' => __( 'Keyword:', 'wordpress-seo' ), + 'enterFocusKeyword' => __( 'Enter your focus keyword', 'wordpress-seo' ), + 'removeKeyword' => __( 'Remove keyword', 'wordpress-seo' ), + 'locale' => WPSEO_Utils::get_user_locale(), + 'translations' => $this->get_translations(), + 'keyword_usage' => array(), + 'title_template' => '', + 'metadesc_template' => '', + 'contentAnalysisActive' => $analysis_readability->is_enabled() ? 1 : 0, + 'keywordAnalysisActive' => $analysis_seo->is_enabled() ? 1 : 0, + + /** + * Filter to determine if the markers should be enabled or not. + * + * @param bool $showMarkers Should the markers being enabled. Default = true. + */ + 'show_markers' => apply_filters( 'wpseo_enable_assessment_markers', true ), + 'publish_box' => array( + 'labels' => array( + 'content' => __( 'Readability', 'wordpress-seo' ), + 'keyword' => __( 'SEO', 'wordpress-seo' ), + ), + 'statuses' => array( + 'na' => __( 'Not available', 'wordpress-seo' ), + 'bad' => __( 'Needs improvement', 'wordpress-seo' ), + 'ok' => __( 'OK', 'wordpress-seo' ), + 'good' => __( 'Good', 'wordpress-seo' ), + ), + ), + ); + + } + + /** + * Returns Jed compatible YoastSEO.js translations. + * + * @return array + */ + private function get_translations() { + $locale = WPSEO_Utils::get_user_locale(); + + $file = plugin_dir_path( WPSEO_FILE ) . 'languages/wordpress-seo-' . $locale . '.json'; + if ( file_exists( $file ) && $file = file_get_contents( $file ) ) { + return json_decode( $file, true ); + } + + return array(); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php b/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php new file mode 100644 index 0000000..697d09c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php @@ -0,0 +1,181 @@ +post = $post; + $this->options = $options; + $this->permalink = $structure; + } + + /** + * Returns the translated values. + * + * @return array + */ + public function get_values() { + $values = array( + 'search_url' => $this->search_url(), + 'post_edit_url' => $this->edit_url(), + 'base_url' => $this->base_url_for_js(), + 'metaDescriptionDate' => '', + ); + + if ( $this->post instanceof WP_Post ) { + $values_to_set = array( + 'keyword_usage' => $this->get_focus_keyword_usage(), + 'title_template' => $this->get_title_template(), + 'metadesc_template' => $this->get_metadesc_template(), + 'metaDescriptionDate' => $this->get_metadesc_date(), + ); + + $values = ( $values_to_set + $values ); + } + + return $values; + } + + /** + * Returns the url to search for keyword for the post + * + * @return string + */ + private function search_url() { + return admin_url( 'edit.php?seo_kw_filter={keyword}' ); + } + + /** + * Returns the url to edit the taxonomy + * + * @return string + */ + private function edit_url() { + return admin_url( 'post.php?post={id}&action=edit' ); + } + + /** + * Returns a base URL for use in the JS, takes permalink structure into account + * + * @return string + */ + private function base_url_for_js() { + global $pagenow; + + // The default base is the home_url. + $base_url = home_url( '/', null ); + + if ( 'post-new.php' === $pagenow ) { + return $base_url; + } + + // If %postname% is the last tag, just strip it and use that as a base. + if ( 1 === preg_match( '#%postname%/?$#', $this->permalink ) ) { + $base_url = preg_replace( '#%postname%/?$#', '', $this->permalink ); + } + + return $base_url; + } + + /** + * Counting the number of given keyword used for other posts than given post_id + * + * @return array + */ + private function get_focus_keyword_usage() { + $keyword = WPSEO_Meta::get_value( 'focuskw', $this->post->ID ); + + return array( + $keyword => WPSEO_Meta::keyword_usage( $keyword, $this->post->ID ), + ); + } + + /** + * Retrieves the title template. + * + * @return string + */ + private function get_title_template() { + return $this->get_template( 'title' ); + } + + /** + * Retrieves the metadesc template. + * + * @return string + */ + private function get_metadesc_template() { + return $this->get_template( 'metadesc' ); + } + + /** + * Retrieves a template. + * + * @param String $template_option_name The name of the option in which the template you want to get is saved. + * + * @return string + */ + private function get_template( $template_option_name ) { + $needed_option = $template_option_name . '-' . $this->post->post_type; + + if ( isset( $this->options[ $needed_option ] ) && $this->options[ $needed_option ] !== '' ) { + return $this->options[ $needed_option ]; + } + + return ''; + } + + /** + * Determines the date to be displayed in the snippet preview + * + * @return string + */ + private function get_metadesc_date() { + $date = ''; + + if ( $this->is_show_date_enabled() ) { + $date = date_i18n( 'M j, Y', mysql2date( 'U', $this->post->post_date ) ); + } + + return $date; + } + + /** + * Returns whether or not showing the date in the snippet preview is enabled. + * + * @return bool + */ + private function is_show_date_enabled() { + $post_type = $this->post->post_type; + $key = sprintf( 'showdate-%s', $post_type ); + + return isset( $this->options[ $key ] ) && true === $this->options[ $key ]; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php b/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php new file mode 100644 index 0000000..a99839f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php @@ -0,0 +1,143 @@ +term = $term; + $this->taxonomy = $taxonomy; + $this->options = $options; + } + + /** + * Returns the translated values. + * + * @return array + */ + public function get_values() { + $values = array(); + + // Todo: a column needs to be added on the termpages to add a filter for the keyword, so this can be used in the focus kw doubles. + if ( is_object( $this->term ) && property_exists( $this->term, 'taxonomy' ) ) { + $values = array( + 'search_url' => $this->search_url(), + 'post_edit_url' => $this->edit_url(), + 'base_url' => $this->base_url_for_js(), + 'taxonomy' => $this->term->taxonomy, + 'keyword_usage' => $this->get_focus_keyword_usage(), + 'title_template' => $this->get_title_template(), + 'metadesc_template' => $this->get_metadesc_template(), + ); + } + + return $values; + } + + /** + * Returns the url to search for keyword for the taxonomy + * + * @return string + */ + private function search_url() { + return admin_url( 'edit-tags.php?taxonomy=' . $this->term->taxonomy . '&seo_kw_filter={keyword}' ); + } + + /** + * Returns the url to edit the taxonomy + * + * @return string + */ + private function edit_url() { + global $wp_version; + $script_filename = version_compare( $wp_version, '4.5', '<' ) ? 'edit-tags' : 'term'; + return admin_url( $script_filename . '.php?action=edit&taxonomy=' . $this->term->taxonomy . '&tag_ID={id}' ); + } + + /** + * Returns a base URL for use in the JS, takes permalink structure into account + * + * @return string + */ + private function base_url_for_js() { + + $base_url = home_url( '/', null ); + $options = WPSEO_Options::get_option( 'wpseo_permalinks' ); + if ( ! $options['stripcategorybase'] ) { + $base_url = trailingslashit( $base_url . $this->taxonomy->rewrite['slug'] ); + } + + return $base_url; + } + + /** + * Counting the number of given keyword used for other term than given term_id + * + * @return array + */ + private function get_focus_keyword_usage() { + $focuskw = WPSEO_Taxonomy_Meta::get_term_meta( $this->term, $this->term->taxonomy, 'focuskw' ); + + return WPSEO_Taxonomy_Meta::get_keyword_usage( $focuskw, $this->term->term_id, $this->term->taxonomy ); + } + + /** + * Retrieves the title template. + * + * @return string + */ + private function get_title_template() { + return $this->get_template( 'title' ); + } + + /** + * Retrieves the metadesc template. + * + * @return string + */ + private function get_metadesc_template() { + return $this->get_template( 'metadesc' ); + } + + /** + * Retrieves a template. + * + * @param String $template_option_name The name of the option in which the template you want to get is saved. + * + * @return string + */ + private function get_template( $template_option_name ) { + $needed_option = $template_option_name . '-tax-' . $this->term->taxonomy; + if ( isset( $this->options[ $needed_option ] ) && $this->options[ $needed_option ] !== '' ) { + return $this->options[ $needed_option ]; + } + + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/formatter/interface-metabox-formatter.php b/wp-content/plugins/wordpress-seo/admin/formatter/interface-metabox-formatter.php new file mode 100644 index 0000000..f3be154 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/formatter/interface-metabox-formatter.php @@ -0,0 +1,18 @@ +valid_nonce() ) { + $marker = new WPSEO_GSC_Marker( filter_input( INPUT_POST, 'url' ) ); + + wp_die( $marker->get_response() ); + } + + wp_die( 'false' ); + } + + /** + * Handling the request to create a new redirect from the issued URL + */ + public function ajax_create_redirect() { + if ( $this->valid_nonce() && class_exists( 'WPSEO_Redirect_Manager' ) && defined( 'WPSEO_PREMIUM_PATH' ) ) { + $redirect_manager = new WPSEO_Redirect_Manager(); + + $old_url = filter_input( INPUT_POST, 'old_url' ); + + // Creates the redirect. + $redirect = new WPSEO_Redirect( $old_url, filter_input( INPUT_POST, 'new_url' ), filter_input( INPUT_POST, 'type' ) ); + + if ( $redirect_manager->create_redirect( $redirect ) ) { + if ( filter_input( INPUT_POST, 'mark_as_fixed' ) === 'true' ) { + new WPSEO_GSC_Marker( $old_url ); + } + + wp_die( 'true' ); + } + } + + wp_die( 'false' ); + } + + /** + * Handle the AJAX request and dismiss the GSC notice + */ + public function dismiss_notice() { + check_ajax_referer( 'dismiss-gsc-notice' ); + + update_user_meta( get_current_user_id(), 'wpseo_dismissed_gsc_notice', true ); + + wp_die( 'true' ); + } + + /** + * Saves the authorization code. + */ + public function save_auth_code() { + if ( ! $this->valid_nonce() ) { + wp_die( '0' ); + } + + // Validate the authorization. + $service = $this->get_service(); + $authorization_code = filter_input( INPUT_POST, 'authorization' ); + $is_authorization_valid = WPSEO_GSC_Settings::validate_authorization( $authorization_code, $service->get_client() ); + if ( ! $is_authorization_valid ) { + wp_die( '0' ); + } + + $this->get_profiles(); + } + + /** + * Clears all authorization data. + */ + public function clear_auth_code() { + if ( ! $this->valid_nonce() ) { + wp_die( '0' ); + } + + $service = $this->get_service(); + + WPSEO_GSC_Settings::clear_data( $service ); + + $this->get_profiles(); + } + + /** + * Check if posted nonce is valid and return true if it is + * + * @return mixed + */ + private function valid_nonce() { + return wp_verify_nonce( filter_input( INPUT_POST, 'ajax_nonce' ), 'wpseo-gsc-ajax-security' ); + } + + /** + * Returns an instance of the Google Search Console service. + * + * @return WPSEO_GSC_Service + */ + private function get_service() { + return new WPSEO_GSC_Service(); + } + + /** + * Prints a JSON encoded string with the current profile config. + */ + private function get_profiles() { + $component = new WPSEO_Config_Component_Connect_Google_Search_Console(); + + wp_die( wp_json_encode( $component->get_data() ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-bulk-action.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-bulk-action.php new file mode 100644 index 0000000..02a5c16 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-bulk-action.php @@ -0,0 +1,92 @@ +handle_bulk_action(); + } + } + + /** + * Handles the bulk action when there is an action posted + */ + private function handle_bulk_action() { + if ( $bulk_action = $this->determine_bulk_action() ) { + $this->run_bulk_action( $bulk_action, $this->posted_issues() ); + + wp_redirect( filter_input( INPUT_POST, '_wp_http_referer' ) ); + exit; + } + } + + /** + * Determine which bulk action is selected and return that value + * + * @return string|bool + */ + private function determine_bulk_action() { + // If posted action is the selected one above the table, return that value. + if ( ( $action = filter_input( INPUT_POST, 'action' ) ) && $action !== '-1' ) { + return $action; + } + + // If posted action is the selected one below the table, return that value. + if ( ( $action = filter_input( INPUT_POST, 'action2' ) ) && $action !== '-1' ) { + return $action; + } + + return false; + } + + /** + * Get the posted issues and return them + * + * @return array + */ + private function posted_issues() { + if ( $issues = filter_input( INPUT_POST, 'wpseo_crawl_issues', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ) ) { + return $issues; + } + + // Fallback if issues are empty. + return array(); + } + + /** + * Runs the bulk action + * + * @param string $bulk_action Action type. + * @param array $issues Set of issues to apply to. + */ + private function run_bulk_action( $bulk_action, $issues ) { + switch ( $bulk_action ) { + case 'mark_as_fixed' : + array_map( array( $this, 'action_mark_as_fixed' ), $issues ); + + break; + } + } + + /** + * Marks the issue as fixed + * + * @param string $issue Issue URL. + * + * @return string + */ + private function action_mark_as_fixed( $issue ) { + new WPSEO_GSC_Marker( $issue ); + + return $issue; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-category-filters.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-category-filters.php new file mode 100644 index 0000000..f172a81 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-category-filters.php @@ -0,0 +1,192 @@ +set_counts( $platform_counts ); + } + + // Setting the filter values. + $this->set_filter_values(); + + $this->category = $this->get_current_category(); + } + + /** + * Returns the value of the current category + * + * @return mixed|string + */ + public function get_category() { + return $this->category; + } + + /** + * Returns the current filters as an array + * + * Only return categories with more than 0 issues + * + * @return array + */ + public function as_array() { + $new_views = array(); + + foreach ( $this->category_counts as $category_name => $category ) { + $new_views[] = $this->create_view_link( $category_name, $category['count'] ); + } + + return $new_views; + } + + /** + * Getting the current view + */ + private function get_current_category() { + if ( $current_category = filter_input( INPUT_GET, 'category' ) ) { + return $current_category; + } + + // Just prevent redirect loops. + if ( ! empty( $this->category_counts ) ) { + $current_category = 'not_found'; + if ( empty( $this->category_counts[ $current_category ] ) ) { + $current_category = key( $this->category_counts ); + } + + // Just redirect to set the category. + wp_redirect( add_query_arg( 'category', $current_category ) ); + exit; + } + } + + /** + * Setting the view counts based on the saved data. The info will be used to display the category filters + * + * @param array $platform_counts Set of counts by platform. + */ + private function set_counts( array $platform_counts ) { + $this->category_counts = $this->parse_counts( $platform_counts ); + } + + /** + * Setting the values for the filter + */ + private function set_filter_values() { + $this->set_filter_value( 'access_denied', __( 'Access denied', 'wordpress-seo' ), __( 'Server requires authentication or is blocking Googlebot from accessing the site.', 'wordpress-seo' ), __( 'Show information about errors in category \'Access Denied\'', 'wordpress-seo' ) ); + $this->set_filter_value( 'faulty_redirects', __( 'Faulty redirects', 'wordpress-seo' ) ); + $this->set_filter_value( 'not_followed',__( 'Not followed', 'wordpress-seo' ) ); + $this->set_filter_value( 'not_found', __( 'Not found', 'wordpress-seo' ), __( 'URL points to a non-existent page.', 'wordpress-seo' ), __( 'Show information about errors in category \'Not Found\'', 'wordpress-seo' ) ); + $this->set_filter_value( 'other', __( 'Other', 'wordpress-seo' ), __( 'Google was unable to crawl this URL due to an undetermined issue.', 'wordpress-seo' ), __( 'Show information about errors in category \'Other\'', 'wordpress-seo' ) ); + /* Translators: %1$s: expands to 'robots.txt'. */ + $this->set_filter_value( 'roboted', __( 'Blocked', 'wordpress-seo' ), sprintf( __( 'Googlebot could access your site, but certain URLs are blocked for Googlebot in your %1$s file. This block could either be for all Googlebots or even specifically for Googlebot-mobile.', 'wordpress-seo' ), 'robots.txt' ), __( 'Show information about errors in category \'Blocked\'', 'wordpress-seo' ) ); + $this->set_filter_value( 'server_error', __( 'Server Error', 'wordpress-seo' ), __( 'Request timed out or site is blocking Google.', 'wordpress-seo' ), __( 'Show information about errors in category \'Server\'', 'wordpress-seo' ) ); + $this->set_filter_value( 'soft_404', __( 'Soft 404', 'wordpress-seo' ), __( "The target URL doesn't exist, but your server is not returning a 404 (file not found) error.", 'wordpress-seo' ), __( 'Show information about errors in category \'Soft 404\'', 'wordpress-seo' ) ); + } + + /** + * Add new filter value to the filter_values + * + * @param string $key Filter key. + * @param string $value Filter value. + * @param string $description Optional description string. + * @param string $help_button_text Optional help button text. + */ + private function set_filter_value( $key, $value, $description = '', $help_button_text = '' ) { + $this->filter_values[ $key ] = array( + 'value' => $value, + 'description' => $description, + 'help-button' => $help_button_text, + ); + } + + /** + * Creates a filter link + * + * @param string $category Issue type. + * @param integer $count Count for the type. + * + * @return string + */ + private function create_view_link( $category, $count ) { + $href = add_query_arg( array( 'category' => $category, 'paged' => 1 ) ); + + $class = 'gsc_category'; + + if ( $this->category === $category ) { + $class .= ' current'; + } + + $help_button = $help_panel = ''; + if ( $this->filter_values[ $category ]['description'] !== '' ) { + $help = new WPSEO_Admin_Help_Panel( $category, $this->filter_values[ $category ]['help-button'], $this->filter_values[ $category ]['description'], 'has-wrapper' ); + $help_button = $help->get_button_html(); + $help_panel = $help->get_panel_html(); + } + + return sprintf( + '%3$s (%5$s) %6$s %7$s', + esc_attr( $href ), + $class, + $this->filter_values[ $category ]['value'], + $category, + $count, + $help_button, + $help_panel + ); + } + + /** + * Parsing the category counts. When there are 0 issues for a specific category, just remove that one from the array + * + * @param array $category_counts Set of counts for categories. + * + * @return mixed + */ + private function parse_counts( $category_counts ) { + foreach ( $category_counts as $category_name => $category ) { + if ( $category['count'] === '0' ) { + unset( $category_counts[ $category_name ] ); + } + } + + return $category_counts; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-config.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-config.php new file mode 100644 index 0000000..9b39644 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-config.php @@ -0,0 +1,22 @@ + 'Yoast SEO', + 'client_id' => '395430892738-ushj8aced0cji2j4bkq6bda6felaigb9.apps.googleusercontent.com', + 'client_secret' => 'c2kYgOwMhk1emWxQ3NaA8wOi', + 'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob', + 'scopes' => array( 'https://www.googleapis.com/auth/webmasters' ), + ); + +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-count.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-count.php new file mode 100644 index 0000000..653433d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-count.php @@ -0,0 +1,221 @@ +service = $service; + } + + /** + * Getting the counts for given platform and return them as an array + * + * @param string $platform Platform (desktop, mobile, feature phone). + * + * @return array + */ + public function get_platform_counts( $platform ) { + $counts = $this->get_counts(); + if ( array_key_exists( $platform, $counts ) ) { + return $counts[ $platform ]; + } + + return array(); + } + + /** + * Return the fetched issues + * + * @return array + */ + public function get_issues() { + return $this->issues; + } + + /** + * Listing the issues an gives them back as fetched issues + * + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue category. + */ + public function list_issues( $platform, $category ) { + $counts = $this->get_counts(); + + if ( array_key_exists( $platform, $counts ) ) { + $counts[ $platform ] = $this->list_category_issues( $counts[ $platform ], $platform, $category ); + + // Write the new counts value. + $this->set_counts( $counts ); + } + } + + /** + * Getting the counts for given platform and category. + * + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue type. + * + * @return integer + */ + public function get_issue_count( $platform, $category ) { + $counts = $this->get_counts(); + + if ( ! empty( $counts[ $platform ][ $category ]['count'] ) ) { + return $counts[ $platform ][ $category ]['count']; + } + + return 0; + } + + /** + * Update the count of the issues + * + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue type. + * @param integer $new_count Updated count. + */ + public function update_issue_count( $platform, $category, $new_count ) { + $counts = $this->get_counts(); + + if ( ! empty( $counts[ $platform ][ $category ] ) && is_array( $counts[ $platform ][ $category ] ) ) { + $counts[ $platform ][ $category ]['count'] = $new_count; + } + + $this->set_counts( $counts ); + } + + /** + * Fetching the counts from the GSC API + */ + public function fetch_counts() { + if ( WPSEO_GSC_Settings::get_profile() && $this->get_last_fetch() <= strtotime( '-12 hours' ) ) { + // Remove the timestamp. + $this->remove_last_fetch(); + + // Getting the counts and parse them. + $counts = $this->parse_counts( $this->service->get_crawl_issue_counts() ); + + // Fetching the counts by setting an option. + $this->set_counts( $counts ); + + // Saving the current timestamp. + $this->save_last_fetch(); + } + } + + /** + * Parsing the received counts from the API and map the keys to plugin friendly values + * + * @param array $fetched_counts Set of retrieved counts. + * + * @return array + */ + private function parse_counts( array $fetched_counts ) { + $counts = array(); + foreach ( $fetched_counts as $platform_name => $categories ) { + $new_platform = WPSEO_GSC_Mapper::platform_from_api( $platform_name ); + + foreach ( $categories as $category_name => $category ) { + $new_category = WPSEO_GSC_Mapper::category_from_api( $category_name ); + $counts[ $new_platform ][ $new_category ] = $category; + } + } + + return $counts; + } + + /** + * Listing the issues for current category. + * + * @param array $counts Set of counts. + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue type. + * + * @return array + */ + private function list_category_issues( array $counts, $platform, $category ) { + // When the issues have to be fetched. + if ( array_key_exists( $category, $counts ) && $counts[ $category ]['count'] > 0 && $counts[ $category ]['last_fetch'] <= strtotime( '-12 hours' ) ) { + if ( $issues = $this->service->fetch_category_issues( WPSEO_GSC_Mapper::platform_to_api( $platform ), WPSEO_GSC_Mapper::category_to_api( $category ) ) ) { + $this->issues = $issues; + } + + // Be sure the total count is correct. + $counts[ $category ]['count'] = count( $this->issues ); + + // Set last fetch. + $counts[ $category ]['last_fetch'] = time(); + } + + return $counts; + } + + /** + * Getting the counts from the options + * + * @return array + */ + private function get_counts() { + return get_option( self::OPTION_CI_COUNTS, array() ); + } + + /** + * Fetching the counts from the service and store them in an option + * + * @param array $counts Set of counts. + */ + private function set_counts( array $counts ) { + update_option( self::OPTION_CI_COUNTS, $counts ); + } + + /** + * Store the timestamp of when crawl errors were saved the last time. + */ + private function save_last_fetch() { + add_option( self::OPTION_CI_LAST_FETCH, time(), '', 'no' ); + } + + /** + * Remove the last checked option + */ + private function remove_last_fetch() { + delete_option( self::OPTION_CI_LAST_FETCH ); + } + + /** + * Get the timestamp of when the crawl errors were last saved + * + * @return int + */ + private function get_last_fetch() { + return get_option( self::OPTION_CI_LAST_FETCH, 0 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issue.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issue.php new file mode 100644 index 0000000..b6ea06d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issue.php @@ -0,0 +1,89 @@ +url = $url; + $this->first_detected = $first_detected; + $this->last_crawled = $last_crawled; + $this->response_code = $response_code; + } + + /** + * Put the class properties in array + * + * @return array + */ + public function to_array() { + return array( + 'url' => $this->url, + 'first_detected' => $this->to_date_format( $this->first_detected ), + 'first_detected_raw' => $this->to_timestamp( $this->first_detected ), + 'last_crawled' => $this->to_date_format( $this->last_crawled ), + 'last_crawled_raw' => $this->to_timestamp( $this->last_crawled ), + 'response_code' => $this->response_code, + ); + } + + /** + * Converting the date to a date format + * + * @param DateTime $date_to_convert Date instance. + * @param string $format Format string. + * + * @return string + */ + private function to_date_format( DateTime $date_to_convert, $format = '' ) { + + if ( empty( $format ) ) { + $format = get_option( 'date_format' ); + } + + return date_i18n( $format, $date_to_convert->format( 'U' ) ); + } + + /** + * Converting the date to a timestamp + * + * @param DateTime $date_to_convert Date object instance. + * + * @return string + */ + private function to_timestamp( DateTime $date_to_convert ) { + return $date_to_convert->format( 'U' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issues.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issues.php new file mode 100644 index 0000000..40a3d4e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issues.php @@ -0,0 +1,175 @@ +option_name = strtolower( 'wpseo-gsc-issues-' . $platform . '-' . $category ); + $this->issues = $this->get_issues(); + + if ( ! empty( $fetched_issues ) && is_array( $fetched_issues ) ) { + $this->save_fetched_issues( $fetched_issues ); + } + } + /** + * Getting the issues from the options. + * + * @return array + */ + public function get_issues() { + return get_option( $this->option_name, array() ); + } + + /** + * Deleting the issue from the issues + * + * @param string $url URL to delete issues for. + * + * @return bool + */ + public function delete_issue( $url ) { + $target_issue = $this->get_issue_by_url( $url ); + if ( $target_issue !== false ) { + unset( $this->issues[ $target_issue ] ); + + $this->save_issues( $this->issues ); + + return true; + } + + return false; + } + + /** + * Fetching the issues for current category and compare them with the already existing issues. + * + * @param array $fetched_issues Set of retrieved issues. + */ + private function save_fetched_issues( array $fetched_issues ) { + $this->set_current_issues(); + + $crawl_issues = $this->get_issues(); + + // Walk through the issues to do the comparison. + foreach ( $fetched_issues as $issue ) { + $this->issue_compare( $crawl_issues, $issue ); + } + + $this->save_issues( $crawl_issues ); + + // Refresh the value of $this->issues. + $this->issues = $this->get_issues(); + } + + /** + * Comparing the issue with the list of current existing issues + * + * @param array $crawl_issues Set of issues by reference. + * @param stdClass $issue Issue object to check against the list. + */ + private function issue_compare( &$crawl_issues, $issue ) { + $issue->pageUrl = WPSEO_Utils::format_url( (string) $issue->pageUrl ); + + if ( ! in_array( $issue->pageUrl, $this->current_issues ) ) { + array_push( + $crawl_issues, + $this->get_issue( $this->create_issue( $issue ) ) + ); + } + } + + /** + * The fetched issue from the API will be parsed as an WPSEO_Crawl_Issue object. After initializing the issue as an + * object, the object will be returned + * + * @param stdClass $issue Issue data object. + * + * @return WPSEO_GSC_Issue + */ + private function create_issue( $issue ) { + return new WPSEO_GSC_Issue( + $issue->pageUrl, + new DateTime( (string) $issue->first_detected ), + new DateTime( (string) $issue->last_crawled ), + (string) ( ! empty( $issue->responseCode ) ) ? $issue->responseCode : null + ); + } + + /** + * Returns the crawl issue as an array. + * + * @param WPSEO_GSC_Issue $crawl_issue Issue object instance. + * + * @return array() + */ + private function get_issue( WPSEO_GSC_Issue $crawl_issue ) { + return $crawl_issue->to_array(); + } + + /** + * Saving the issues to the options. The target option is base on current platform and category. + * + * @param array $issues Set of issues. + */ + private function save_issues( array $issues ) { + update_option( $this->option_name, $issues, false ); + } + + /** + * Getting the issues from the options and get only the URL out of it. This is because there will be a comparison + * with the issues from the API. + */ + private function set_current_issues() { + if ( ! empty( $this->issues ) ) { + $this->current_issues = wp_list_pluck( $this->issues, 'url' ); + } + } + + /** + * Search in the issues for the given $url + * + * @param string $url Issue URL to search for. + * + * @return int|string + */ + private function get_issue_by_url( $url ) { + foreach ( $this->issues as $key => $issue ) { + if ( $url === $issue['url'] ) { + return $key; + } + } + + return false; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-mapper.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-mapper.php new file mode 100644 index 0000000..afaa104 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-mapper.php @@ -0,0 +1,112 @@ + 'web', + 'mobile' => 'mobile', + 'smartphone_only' => 'smartphoneOnly', + 'settings' => 'settings', // This one is basicly not a platform, but a tab. + ); + + /** + * The categories which can be mapped + * + * @var array + */ + private static $categories = array( + 'access_denied' => 'authPermissions', + 'faulty_redirects' => 'manyToOneRedirect', + 'not_followed' => 'notFollowed', + 'not_found' => 'notFound', + 'other' => 'other', + 'roboted' => 'roboted', + 'server_error' => 'serverError', + 'soft_404' => 'soft404', + ); + + /** + * If there is no platform, just get the first key out of the array and redirect to it. + * + * @param string $platform Platform (desktop, mobile, feature phone). + * + * @return mixed + */ + public static function get_current_platform( $platform ) { + if ( $current_platform = filter_input( INPUT_GET, $platform ) ) { + return $current_platform; + } + + wp_redirect( add_query_arg( $platform, key( self::$platforms ) ) ); + exit; + } + + /** + * Mapping the platform + * + * @param string $platform Platform (desktop, mobile, feature phone). + * + * @return mixed + */ + public static function platform_to_api( $platform ) { + if ( ! empty( $platform ) && array_key_exists( $platform, self::$platforms ) ) { + return self::$platforms[ $platform ]; + } + } + + /** + * Mapping the given platform by value and return its key + * + * @param string $platform Platform (desktop, mobile, feature phone). + * + * @return string + */ + public static function platform_from_api( $platform ) { + if ( ! empty( $platform ) && $platform = array_search( $platform, self::$platforms ) ) { + return $platform; + } + + return $platform; + } + + /** + * Mapping the given category by searching for its key. + * + * @param string $category Issue type. + * + * @return mixed + */ + public static function category_to_api( $category ) { + if ( ! empty( $category ) && array_key_exists( $category, self::$categories ) ) { + return self::$categories[ $category ]; + } + + return $category; + } + + /** + * Mapping the given category by value and return its key + * + * @param string $category Issue type. + * + * @return string + */ + public static function category_from_api( $category ) { + if ( ! empty( $category ) && $category = array_search( $category, self::$categories ) ) { + return $category; + } + + return $category; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-marker.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-marker.php new file mode 100644 index 0000000..f8ae147 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-marker.php @@ -0,0 +1,143 @@ +url = $url; + $this->result = $this->get_result(); + } + + /** + * Getting the response for the AJAX request + * + * @return string + */ + public function get_response() { + return $this->result; + } + + /** + * Setting the result, this method will check if current + * + * @return string + */ + private function get_result() { + if ( $this->can_be_marked_as_fixed() ) { + $service = new WPSEO_GSC_Service( WPSEO_GSC_Settings::get_profile() ); + + if ( $this->set_crawl_issues() && $this->send_mark_as_fixed( $service ) && $this->delete_crawl_issue() ) { + $this->update_issue_count( $service ); + + return 'true'; + } + } + + return 'false'; + } + + /** + * Check if request is valid by verifying the posted nonce and return the URL if this one is set + * + * @return bool|string + */ + private function can_be_marked_as_fixed() { + if ( $this->url !== '' ) { + return $this->url; + } + + return false; + } + + /** + * Storing the data belonging to the current issue, this data is needed in the 'mark as fixed' flow + * + * @return bool + */ + private function set_crawl_issues() { + $this->platform = filter_input( INPUT_POST, 'platform' ); + $this->category = filter_input( INPUT_POST, 'category' ); + if ( $this->platform && $this->category ) { + $this->crawl_issues = new WPSEO_GSC_Issues( $this->platform, $this->category ); + + return true; + } + + return false; + } + + /** + * Sending a request to the Google Search Console API to let them know we marked an issue as fixed. + * + * @param WPSEO_GSC_Service $service Service object instance. + * + * @return bool + */ + private function send_mark_as_fixed( WPSEO_GSC_Service $service ) { + return $service->mark_as_fixed( $this->url, $this->platform, $this->category ); + } + + /** + * Delete the crawl issue from the database + * + * @return bool + */ + private function delete_crawl_issue() { + return $this->crawl_issues->delete_issue( $this->url ); + } + + /** + * Getting the counts for current platform - category combination and update the score of it. + * + * @param WPSEO_GSC_Service $service Service object instance. + */ + private function update_issue_count( WPSEO_GSC_Service $service ) { + $counts = new WPSEO_GSC_Count( $service ); + + // Get the issues. + $total_issues = $counts->get_issue_count( $this->platform, $this->category ); + + // Lower the current count with 1. + $total_issues = ( $total_issues - 1 ); + + // And update the count. + $counts->update_issue_count( $this->platform, $this->category, $total_issues ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-platform-tabs.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-platform-tabs.php new file mode 100644 index 0000000..30a988e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-platform-tabs.php @@ -0,0 +1,94 @@ +platform_tabs(); + } + + /** + * Getting the current_tab + * + * @return string + */ + public function current_tab() { + return $this->current_tab; + } + + /** + * Loops through the array with all the platforms and convert it into an array + * + * @return string + */ + private function platform_tabs() { + $tabs = array( 'settings' => __( 'Settings', 'wordpress-seo' ) ); + + $platforms = array( + 'web' => __( 'Desktop', 'wordpress-seo' ), + 'smartphone_only' => __( 'Smartphone', 'wordpress-seo' ), + 'mobile' => __( 'Feature phone', 'wordpress-seo' ), + ); + + if ( WPSEO_GSC_Settings::get_profile() !== '' ) { + $tabs = array_merge( $platforms, $tabs ); + } + + $admin_link = admin_url( 'admin.php?page=wpseo_search_console&tab=' ); + + $this->set_current_tab( $tabs ); + + $return = ''; + + foreach ( $tabs as $platform_target => $platform_value ) { + $return .= $this->platform_tab( $platform_target, $platform_value, $admin_link ); + } + + return $return; + } + + /** + * Setting the current tab + * + * @param array $platforms Set of platforms (desktop, mobile, feature phone). + */ + private function set_current_tab( array $platforms ) { + $this->current_tab = key( $platforms ); + if ( $current_platform = filter_input( INPUT_GET, 'tab' ) ) { + $this->current_tab = $current_platform; + } + } + + /** + * Parses the tab + * + * @param string $platform_target Platform (desktop, mobile, feature phone). + * @param string $platform_value Link anchor. + * @param string $admin_link Link URL admin base. + * + * @return string + */ + private function platform_tab( $platform_target, $platform_value, $admin_link ) { + $active = ''; + if ( $this->current_tab === $platform_target ) { + $active = ' nav-tab-active'; + } + + return '' . $platform_value . ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-service.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-service.php new file mode 100644 index 0000000..57e3897 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-service.php @@ -0,0 +1,192 @@ +profile = $profile; + + $this->set_client(); + } + + /** + * Returns the client + * + * @return Yoast_Api_Google_Client + */ + public function get_client() { + return $this->client; + } + + /** + * Removes the option and calls the clients clear_data method to clear that one as well + */ + public function clear_data() { + // Clear client data. + $this->client->clear_data(); + } + + /** + * Get all sites that are registered in the GSC panel + * + * @return array + */ + public function get_sites() { + $sites = array(); + + $response_json = $this->client->do_request( 'sites', true ); + + // Do list sites request. + if ( ! empty( $response_json->siteEntry ) ) { + foreach ( $response_json->siteEntry as $entry ) { + $sites[ str_ireplace( 'sites/', '', (string) $entry->siteUrl ) ] = (string) $entry->siteUrl; + } + + // Sorting the retrieved sites. + asort( $sites ); + } + + return $sites; + } + + /** + * Get crawl issues + * + * @return array + */ + public function get_crawl_issue_counts() { + // Setup crawl error list. + $crawl_error_counts = $this->get_crawl_error_counts( $this->profile ); + + $return = array(); + if ( ! empty( $crawl_error_counts->countPerTypes ) ) { + foreach ( $crawl_error_counts->countPerTypes as $category ) { + $return[ $category->platform ][ $category->category ] = array( + 'count' => $category->entries[0]->count, + 'last_fetch' => null, + ); + } + } + + return $return; + } + + /** + * Sending request to mark issue as fixed + * + * @param string $url Issue URL. + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue type. + * + * @return bool + */ + public function mark_as_fixed( $url, $platform, $category ) { + $response = $this->client->do_request( 'sites/' . urlencode( $this->profile ) . '/urlCrawlErrorsSamples/' . urlencode( ltrim( $url, '/' ) ) . '?category=' . WPSEO_GSC_Mapper::category_to_api( $category ) . '&platform=' . WPSEO_GSC_Mapper::platform_to_api( $platform ) . '', false, 'DELETE' ); + return ( $response->getResponseHttpCode() === 204 ); + } + + /** + * Fetching the issues from the GSC API + * + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Issue type. + * + * @return mixed + */ + public function fetch_category_issues( $platform, $category ) { + $issues = $this->client->do_request( + 'sites/' . urlencode( $this->profile ) . '/urlCrawlErrorsSamples?category=' . $category . '&platform=' . $platform, + true + ); + + if ( ! empty( $issues->urlCrawlErrorSample ) ) { + return $issues->urlCrawlErrorSample; + } + } + + /** + * Setting the GSC client + */ + private function set_client() { + try { + new Yoast_Api_Libs( '2.0' ); + } + catch ( Exception $exception ) { + if ( $exception->getMessage() === 'required_version' ) { + $this->incompatible_api_libs( + __( 'Yoast plugins share some code between them to make your site faster. As a result of that, we need all Yoast plugins to be up to date. We\'ve detected this isn\'t the case, so please update the Yoast plugins that aren\'t up to date yet.', 'wordpress-seo' ) + ); + } + } + + if ( class_exists( 'Yoast_Api_Google_Client' ) === false ) { + $this->incompatible_api_libs( + /* translators: %1$s expands to Yoast SEO, %2$s expands to Google Analytics by Yoast */ + sprintf( + __( + '%1$s detected you’re using a version of %2$s which is not compatible with %1$s. Please update %2$s to the latest version to use this feature.', + 'wordpress-seo' + ), + 'Yoast SEO', + 'Google Analytics by Yoast' + ) + ); + + wp_redirect( admin_url( 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ) ); + exit; + } + + $this->client = new Yoast_Api_Google_Client( WPSEO_GSC_Config::$gsc, 'wpseo-gsc', 'https://www.googleapis.com/webmasters/v3/' ); + } + + /** + * Adding notice that the api libs has the wrong version + * + * @param string $notice Message string. + */ + private function incompatible_api_libs( $notice ) { + Yoast_Notification_Center::get()->add_notification( + new Yoast_Notification( $notice, array( 'type' => Yoast_Notification::ERROR ) ) + ); + } + + /** + * Getting the crawl error counts + * + * @param string $profile Profile name string. + * + * @return object|bool + */ + private function get_crawl_error_counts( $profile ) { + $crawl_error_counts = $this->client->do_request( + 'sites/' . urlencode( $profile ) . '/urlCrawlErrorsCounts/query', + true + ); + + if ( ! empty( $crawl_error_counts ) ) { + return $crawl_error_counts; + } + + return false; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-settings.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-settings.php new file mode 100644 index 0000000..1a3f343 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-settings.php @@ -0,0 +1,102 @@ +clear_data(); + } + + /** + * Reloading all the issues + */ + public static function reload_issues() { + // Remove issue and issue counts. + self::remove(); + } + + /** + * When authorization is successful return true, otherwise false + * + * @param string $authorization_code Code to validate. + * @param Yoast_Api_Google_Client $client Client object instance. + * + * @return bool + */ + public static function validate_authorization( $authorization_code, Yoast_Api_Google_Client $client ) { + return ( $authorization_code !== '' && $client->authenticate_client( $authorization_code ) ); + } + + /** + * Get the GSC profile + * + * @return string + */ + public static function get_profile() { + // Get option. + $option = get_option( WPSEO_GSC::OPTION_WPSEO_GSC, array( 'profile' => '' ) ); + + // Set the profile. + $profile = ''; + if ( ! empty( $option['profile'] ) ) { + $profile = $option['profile']; + } + + // Return the profile. + return trim( $profile, '/' ); + } + + /** + * Removes the issue counts and all the issues from the options + */ + private static function remove() { + // Remove the issue counts from the options. + self::remove_issue_counts(); + + // Removing all issues from the database. + self::remove_issues(); + } + + /** + * Remove the issue counts + */ + private static function remove_issue_counts() { + // Remove the options which are holding the counts. + delete_option( WPSEO_GSC_Count::OPTION_CI_COUNTS ); + delete_option( WPSEO_GSC_Count::OPTION_CI_LAST_FETCH ); + } + + /** + * Delete the issues and their meta data from the database + */ + private static function remove_issues() { + global $wpdb; + + // Remove local crawl issues by running a delete query. + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wpseo-gsc-issues-%'" ); + } + + /** + * Removes the options for GSC + */ + private static function remove_gsc_option() { + delete_option( WPSEO_GSC::OPTION_WPSEO_GSC ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-table.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-table.php new file mode 100644 index 0000000..01ae5c2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-table.php @@ -0,0 +1,385 @@ + 300, + 'no_premium' => 140, + 'already_exists' => 160, + ); + + /** + * Search Console table class constructor (subclasses list table). + * + * @param string $platform Platform (desktop, mobile, feature phone). + * @param string $category Type of the issues. + * @param array $items Set of the issues to display. + */ + public function __construct( $platform, $category, array $items ) { + parent::__construct(); + + // Adding the thickbox. + add_thickbox(); + + // Set search string. + if ( ( $search_string = filter_input( INPUT_GET, 's' ) ) != '' ) { + $this->search_string = $search_string; + } + + $this->current_view = $category; + + // Set the crawl issue source. + $this->show_fields( $platform ); + + $this->items = $items; + } + + /** + * Getting the screen id from this table + * + * @return string + */ + public function get_screen_id() { + return $this->screen->id; + } + + /** + * Setup the table variables, fetch the items from the database, search, sort and format the items. + */ + public function prepare_items() { + // Get variables needed for pagination. + $this->per_page = $this->get_items_per_page( 'errors_per_page', $this->per_page ); + $this->current_page = intval( ( $paged = filter_input( INPUT_GET, 'paged' ) ) ? $paged : 1 ); + + $this->setup_columns(); + $this->views(); + $this->parse_items(); + } + + /** + * Set the table columns + * + * @return array + */ + public function get_columns() { + $columns = array( + 'cb' => '', + 'url' => __( 'URL', 'wordpress-seo' ), + 'last_crawled' => __( 'Last crawled', 'wordpress-seo' ), + 'first_detected' => __( 'First detected', 'wordpress-seo' ), + 'response_code' => __( 'Response code', 'wordpress-seo' ), + ); + + return $columns; + } + + /** + * Return the columns that are sortable + * + * @return array + */ + protected function get_sortable_columns() { + $sortable_columns = array( + 'url' => array( 'url', false ), + 'last_crawled' => array( 'last_crawled', false ), + 'first_detected' => array( 'first_detected', false ), + 'response_code' => array( 'response_code', false ), + ); + + return $sortable_columns; + } + + /** + * Return available bulk actions + * + * @return array + */ + protected function get_bulk_actions() { + return array( + 'mark_as_fixed' => __( 'Mark as fixed', 'wordpress-seo' ), + ); + } + + /** + * Default method to display a column + * + * @param array $item Data array. + * @param string $column_name Column name key. + * + * @return mixed + */ + protected function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Checkbox column + * + * @param array $item Item data array. + * + * @return string + */ + protected function column_cb( $item ) { + return sprintf( + '', $item['url'] + ); + } + + /** + * Formatting the output of the column last crawled into a dateformat + * + * @param array $item Item data array. + * + * @return string + */ + protected function column_last_crawled( $item ) { + return date_i18n( get_option( 'date_format' ), strtotime( $item['last_crawled'] ) ); + } + + /** + * Formatting the output of the column first detected into a dateformat + * + * @param array $item Item data array. + * + * @return string + */ + protected function column_first_detected( $item ) { + return date_i18n( get_option( 'date_format' ), strtotime( $item['first_detected'] ) ); + } + + /** + * URL column + * + * @param array $item Item data array. + * + * @return string + */ + protected function column_url( $item ) { + $actions = array(); + + if ( $this->can_create_redirect() ) { + /** + * Modal box + */ + $modal_height = $this->modal_box( $item['url'] ); + + $actions['create_redirect'] = '' . __( 'Create redirect', 'wordpress-seo' ) . ''; + } + + $actions['view'] = '' . __( 'View', 'wordpress-seo' ) . ''; + $actions['markasfixed'] = '' . __( 'Mark as fixed', 'wordpress-seo' ) . ''; + + return sprintf( + '%1$s %2$s', + $item['url'], + $this->row_actions( $actions ) + ); + } + + /** + * Running the setup of the columns + */ + private function setup_columns() { + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); + } + + /** + * Check if the current category allow creating redirects + * + * @return bool + */ + private function can_create_redirect() { + return in_array( $this->current_view, array( 'soft_404', 'not_found', 'access_denied' ) ); + } + + /** + * Setting the table navigation + * + * @param int $total_items Total number of items. + * @param int $posts_per_page Number of items per page. + */ + private function set_pagination( $total_items, $posts_per_page ) { + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'total_pages' => ceil( ( $total_items / $posts_per_page ) ), + 'per_page' => $posts_per_page, + ) ); + } + + /** + * Setting the items + */ + private function parse_items() { + if ( is_array( $this->items ) && count( $this->items ) > 0 ) { + if ( ! empty( $this->search_string ) ) { + $this->do_search(); + } + + $this->set_pagination( count( $this->items ), $this->per_page ); + + $this->sort_items(); + $this->paginate_items(); + } + } + + /** + * Search through the items + */ + private function do_search() { + $results = array(); + + foreach ( $this->items as $item ) { + foreach ( $item as $value ) { + if ( stristr( $value, $this->search_string ) !== false ) { + $results[] = $item; + continue; + } + } + } + + $this->items = $results; + } + + /** + * Running the pagination + */ + private function paginate_items() { + // Setting the starting point. If starting point is below 1, overwrite it with value 0, otherwise it will be sliced of at the back. + $slice_start = ( $this->current_page - 1 ); + if ( $slice_start < 0 ) { + $slice_start = 0; + } + + // Apply 'pagination'. + $this->items = array_slice( $this->items, ( $slice_start * $this->per_page ), $this->per_page ); + } + + /** + * Sort the items by callback + */ + private function sort_items() { + // Sort the results. + usort( $this->items, array( $this, 'do_reorder' ) ); + } + + /** + * Doing the sorting of the issues + * + * @param array $a First data set for comparison. + * @param array $b Second data set for comparison. + * + * @return int + */ + private function do_reorder( $a, $b ) { + // If no sort, default to title. + $orderby = ( $orderby = filter_input( INPUT_GET, 'orderby' ) ) ? $orderby : 'url'; + + // If no order, default to asc. + $order = ( $order = filter_input( INPUT_GET, 'order' ) ) ? $order : 'asc'; + + // When there is a raw field of it, sort by this field. + if ( array_key_exists( $orderby . '_raw', $a ) && array_key_exists( $orderby . '_raw', $b ) ) { + $orderby = $orderby . '_raw'; + } + + // Determine sort order. + $result = strcmp( $a[ $orderby ], $b[ $orderby ] ); + + // Send final sort direction to usort. + return ( $order === 'asc' ) ? $result : ( - $result ); + } + + /** + * Modal box + * + * @param string $url URL string. + * + * @return string + */ + private function modal_box( $url ) { + $current_redirect = false; + $view_type = $this->modal_box_type( $url, $current_redirect ); + + require WPSEO_PATH . '/admin/google_search_console/views/gsc-create-redirect.php'; + + return $view_type; + } + + /** + * Determine which model box type should be rendered + * + * @param string $url URL string. + * @param string $current_redirect Current redirect by reference. + * + * @return string + */ + private function modal_box_type( $url, &$current_redirect ) { + if ( defined( 'WPSEO_PREMIUM_FILE' ) && class_exists( 'WPSEO_Redirect_Manager' ) ) { + static $redirect_manager; + + if ( ! $redirect_manager ) { + $redirect_manager = new WPSEO_Redirect_Manager(); + } + + if ( $current_redirect = $redirect_manager->get_redirect( $url ) ) { + return 'already_exists'; + } + + return 'create'; + } + + return 'no_premium'; + } + + + /** + * Showing the hidden fields used by the AJAX requests + * + * @param string $platform Platform (desktop, mobile, feature phone). + */ + private function show_fields( $platform ) { + echo ""; + echo ""; + echo ""; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php new file mode 100644 index 0000000..b3979f5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php @@ -0,0 +1,310 @@ +set_hooks(); + $this->set_dependencies(); + $this->request_handler(); + } + + add_action( 'admin_init', array( $this, 'register_gsc_notification' ) ); + add_action( 'admin_init', array( $this, 'register_settings' ) ); + } + + /** + * If the Google Search Console has no credentials, add a notification for the user to give him a heads up. This message is dismissable. + */ + public function register_gsc_notification() { + + $notification = $this->get_profile_notification(); + $notification_center = Yoast_Notification_Center::get(); + + if ( WPSEO_GSC_Settings::get_profile() === '' ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Builds the notification used when GSC is not connected to a profile + * + * @return Yoast_Notification + */ + private function get_profile_notification() { + return new Yoast_Notification( + sprintf( + __( 'Don\'t miss your crawl errors: %1$sconnect with Google Search Console here%2$s.', 'wordpress-seo' ), + '', + '' + ), + array( + 'type' => Yoast_Notification::WARNING, + 'id' => 'wpseo-dismiss-gsc', + 'capabilities' => 'manage_options', + ) + ); + } + + /** + * Be sure the settings will be registered, so data can be stored + */ + public function register_settings() { + register_setting( 'yoast_wpseo_gsc_options', self::OPTION_WPSEO_GSC ); + } + + /** + * Function that outputs the redirect page + */ + public function display() { + require_once WPSEO_PATH . '/admin/google_search_console/views/gsc-display.php'; + } + + /** + * Display the table + */ + public function display_table() { + // The list table. + $list_table = new WPSEO_GSC_Table( $this->platform, $this->category, $this->issue_fetch->get_issues() ); + + // Adding filter to display the category filters. + add_filter( 'views_' . $list_table->get_screen_id(), array( $this->category_filter, 'as_array' ) ); + + // Preparing and displaying the table. + $list_table->prepare_items(); + $list_table->search_box( __( 'Search', 'wordpress-seo' ), 'wpseo-crawl-issues-search' ); + $list_table->display(); + } + + /** + * Load the admin redirects scripts + */ + public function page_scripts() { + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_script( 'admin-gsc' ); + $asset_manager->enqueue_style( 'metabox-css' ); + add_screen_option( 'per_page', array( + 'label' => __( 'Crawl errors per page', 'wordpress-seo' ), + 'default' => 50, + 'option' => 'errors_per_page', + ) ); + } + + /** + * Set the screen options + * + * @param string $status Status string. + * @param string $option Option key. + * @param string $value Value to return. + * + * @return mixed + */ + public function set_screen_option( $status, $option, $value ) { + if ( 'errors_per_page' == $option ) { + return $value; + } + } + + /** + * Setting the hooks to be load on page request + */ + private function set_hooks() { + add_action( 'admin_enqueue_scripts', array( $this, 'page_scripts' ) ); + add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 11, 3 ); + } + + /** + * Handles the POST and GET requests + */ + private function request_handler() { + + // List the table search post to a get. + $this->list_table_search_post_to_get(); + + // Catch the authorization code POST. + $this->catch_authentication_post(); + + // Is there a reset post than we will remove the posts and data. + if ( filter_input( INPUT_GET, 'gsc_reset' ) ) { + // Clear the google data. + WPSEO_GSC_Settings::clear_data( $this->service ); + + // Adding notification to the notification center. + /* Translators: %1$s: expands to Google Search Console. */ + $this->add_notification( sprintf( __( 'The %1$s data has been removed. You will have to reauthenticate if you want to retrieve the data again.', 'wordpress-seo' ), 'Google Search Console' ), Yoast_Notification::UPDATED ); + + // Directly output the notifications. + wp_redirect( remove_query_arg( 'gsc_reset' ) ); + exit; + } + + // Reloads al the issues. + if ( wp_verify_nonce( filter_input( INPUT_POST, 'reload-crawl-issues-nonce' ), 'reload-crawl-issues' ) && filter_input( INPUT_POST, 'reload-crawl-issues' ) ) { + // Reloading all the issues. + WPSEO_GSC_Settings::reload_issues(); + + // Adding the notification. + $this->add_notification( __( 'The issues have been successfully reloaded!', 'wordpress-seo' ), Yoast_Notification::UPDATED ); + + // Directly output the notifications. + Yoast_Notification_Center::get()->display_notifications(); + } + + // Catch bulk action request. + new WPSEO_GSC_Bulk_Action(); + } + + /** + * Catch the redirects search post and redirect it to a search get + */ + private function list_table_search_post_to_get() { + $search_string = filter_input( INPUT_POST, 's' ); + + if ( $search_string === null ) { + return; + } + + // When there is nothing being search and there is no search param in the url, break this method. + if ( $search_string === '' && filter_input( INPUT_GET, 's' ) === null ) { + return; + } + + $url = ( $search_string !== '' ) ? add_query_arg( 's', $search_string ) : remove_query_arg( 's' ); + + // Do the redirect. + wp_redirect( $url ); + exit; + + } + + /** + * Catch the authentication post + */ + private function catch_authentication_post() { + $gsc_values = filter_input( INPUT_POST, 'gsc', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); + // Catch the authorization code POST. + if ( ! empty( $gsc_values['authorization_code'] ) && wp_verify_nonce( $gsc_values['gsc_nonce'], 'wpseo-gsc_nonce' ) ) { + if ( ! WPSEO_GSC_Settings::validate_authorization( trim( $gsc_values['authorization_code'] ), $this->service->get_client() ) ) { + $this->add_notification( __( 'Incorrect Google Authorization Code.', 'wordpress-seo' ), Yoast_Notification::ERROR ); + } + + // Redirect user to prevent a post resubmission which causes an oauth error. + wp_redirect( admin_url( 'admin.php' ) . '?page=' . esc_attr( filter_input( INPUT_GET, 'page' ) ) . '&tab=settings' ); + exit; + } + } + + /** + * Adding notification to the yoast notification center + * + * @param string $message Message string. + * @param string $type Message type. + */ + private function add_notification( $message, $type ) { + Yoast_Notification_Center::get()->add_notification( + new Yoast_Notification( $message, array( 'type' => $type ) ) + ); + } + + /** + * Setting dependencies which will be used one this page + */ + private function set_dependencies() { + // Setting the service object. + $this->service = new WPSEO_GSC_Service( WPSEO_GSC_Settings::get_profile() ); + + // Setting the platform. + $this->platform = WPSEO_GSC_Mapper::get_current_platform( 'tab' ); + + // Loading the issue counter. + $issue_count = new WPSEO_GSC_Count( $this->service ); + $issue_count->fetch_counts(); + + // Loading the category filters. + $this->category_filter = new WPSEO_GSC_Category_Filters( $issue_count->get_platform_counts( $this->platform ) ); + + // Setting the current category. + $this->category = $this->category_filter->get_category(); + + // Listing the issues. + $issue_count->list_issues( $this->platform, $this->category ); + + // Fetching the issues. + $this->issue_fetch = new WPSEO_GSC_Issues( $this->platform, $this->category, $issue_count->get_issues() ); + } + + /** + * Setting the tab help on top of the screen + */ + public function set_help() { + $screen = get_current_screen(); + + $screen->add_help_tab( + array( + 'id' => 'basic-help', + 'title' => __( 'Issue categories', 'wordpress-seo' ), + 'content' => '

    ' . __( 'Desktop', 'wordpress-seo' ) . '
    ' . __( 'Errors that occurred when your site was crawled by Googlebot.', 'wordpress-seo' ) . '

    ' + . '

    ' . __( 'Smartphone', 'wordpress-seo' ) . '
    ' . __( 'Errors that occurred only when your site was crawled by Googlebot-Mobile (errors didn\'t appear for desktop).', 'wordpress-seo' ) . '

    ' + . '

    ' . __( 'Feature phone', 'wordpress-seo' ) . '
    ' . __( 'Errors that only occurred when your site was crawled by Googlebot for feature phones (errors didn\'t appear for desktop).', 'wordpress-seo' ) . '

    ', + ) + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-create-redirect.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-create-redirect.php new file mode 100644 index 0000000..393711a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-create-redirect.php @@ -0,0 +1,76 @@ + + diff --git a/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-display.php b/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-display.php new file mode 100644 index 0000000..31cbd5d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/google_search_console/views/gsc-display.php @@ -0,0 +1,124 @@ +admin_header( false, 'wpseo-gsc', false, 'yoast_wpseo_gsc_options' ); + +if ( defined( 'WP_DEBUG' ) && WP_DEBUG && WPSEO_GSC_Settings::get_profile() !== '' ) { ?> +
    + ' /> + +
    + + + + +service->get_client()->getAccessToken() ) { + $video_url = 'https://yoa.st/screencast-search-console'; +} +else { + $video_url = 'https://yoa.st/screencast-connect-search-console'; +} + +$tab = new WPSEO_Option_Tab( 'GSC', __( 'Google Search Console' ), array( 'video_url' => $video_url ) ); +$GSCHelpCenter = new WPSEO_Help_Center( 'google-search-console', $tab ); +$GSCHelpCenter->output_help_center(); + +switch ( $platform_tabs->current_tab() ) { + case 'settings' : + // Check if there is an access token. + if ( null === $this->service->get_client()->getAccessToken() ) { + // Print auth screen. + echo '

    '; + /* Translators: %1$s: expands to Yoast SEO, %2$s expands to Google Search Console. */ + echo sprintf( __( 'To allow %1$s to fetch your %2$s information, please enter your Google Authorization Code. Clicking the button below will open a new window.', 'wordpress-seo' ), 'Yoast SEO', 'Google Search Console' ); + echo "

    \n"; + echo ''; + echo "\n"; + + echo '

    ' . __( 'Enter your Google Authorization Code and press the Authenticate button.', 'wordpress-seo' ) . "

    \n"; + echo "
    \n"; + echo ""; + echo ""; + echo ""; + echo "
    \n"; + } + else { + $reset_button = '' . __( 'Reauthenticate with Google ', 'wordpress-seo' ) . ''; + echo '

    ', __( 'Current profile', 'wordpress-seo' ), '

    '; + if ( ($profile = WPSEO_GSC_Settings::get_profile() ) !== '' ) { + echo '

    '; + echo $profile; + echo '

    '; + + echo '

    '; + echo $reset_button; + echo '

    '; + + } + else { + echo "
    "; + + settings_fields( 'yoast_wpseo_gsc_options' ); + Yoast_Form::get_instance()->set_option( 'wpseo-gsc' ); + + echo '

    '; + if ( $profiles = $this->service->get_sites() ) { + $show_save = true; + echo Yoast_Form::get_instance()->select( 'profile', __( 'Profile', 'wordpress-seo' ), $profiles ); + } + else { + $show_save = false; + echo __( 'There were no profiles found', 'wordpress-seo' ); + } + echo '

    '; + + echo '

    '; + + if ( $show_save ) { + echo ' ' . __( 'or', 'wordpress-seo' ) , ' '; + } + echo $reset_button; + echo '

    '; + echo '
    '; + } + } + break; + + default : + $form_action_url = add_query_arg( 'page', esc_attr( filter_input( INPUT_GET, 'page' ) ) ); + + get_current_screen()->set_screen_reader_content( array( + // There are no views links in this screen, so no need for the views heading. + 'heading_views' => null, + 'heading_pagination' => __( 'Crawl issues list navigation', 'wordpress-seo' ), + 'heading_list' => __( 'Crawl issues list', 'wordpress-seo' ), + ) ); + + // Open
    . + echo "\n"; + + // AJAX nonce. + echo "\n"; + + $this->display_table(); + + // Close . + echo "
    \n"; + + break; +} +?> +
    +admin_footer( false ); diff --git a/wp-content/plugins/wordpress-seo/admin/import/class-import-aioseo-hooks.php b/wp-content/plugins/wordpress-seo/admin/import/class-import-aioseo-hooks.php new file mode 100644 index 0000000..739eccf --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/import/class-import-aioseo-hooks.php @@ -0,0 +1,39 @@ + wp_create_nonce( 'wpseo-import' ) ), admin_url( 'admin.php?page=wpseo_tools&tool=import-export&import=1&importaioseo=1#top#import-seo' ) ); + echo '

    ', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %simport its settings%s?', 'wordpress-seo' ), sprintf( '', esc_url( $url ) ), '' ), '

    '; + } + + /** + * Throw a notice to inform the user that the plugin has been deactivated + * + * @since 3.0 + */ + public function show_deactivate_notice() { + echo '

    ', esc_html__( 'All-In-One-SEO has been deactivated', 'wordpress-seo' ), '

    '; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/import/class-import-hooks.php b/wp-content/plugins/wordpress-seo/admin/import/class-import-hooks.php new file mode 100644 index 0000000..7c59f32 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/import/class-import-hooks.php @@ -0,0 +1,89 @@ +is_active() ) { + $this->show_import_message(); + $this->show_deactivate_message(); + } + } + + /** + * Handle deactivation & import of the data data + * + * @since 3.0 + */ + public function show_import_message() { + if ( filter_input( INPUT_GET, 'tool' ) !== 'import-export' ) { + add_action( 'admin_notices', array( $this, 'show_import_settings_notice' ) ); + } + } + + /** + * Handle deactivation of the plugin + * + * @since 3.0 + */ + public function show_deactivate_message() { + if ( filter_input( INPUT_GET, $this->deactivation_listener ) === '1' ) { + // Deactivate AIO. + deactivate_plugins( $this->plugin_file ); + + // Show notice that aioseo has been deactivated. + add_action( 'admin_notices', array( $this, 'show_deactivate_notice' ) ); + + // Clean up the referrer url for later use. + if ( isset( $_SERVER['REQUEST_URI'] ) ) { + $_SERVER['REQUEST_URI'] = remove_query_arg( array( $this->deactivation_listener ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ); + } + } + } + + /** + * Check if the plugin is active. + * + * @return bool + */ + protected function is_active() { + return is_plugin_active( $this->plugin_file ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/import/class-import-wpseo-hooks.php b/wp-content/plugins/wordpress-seo/admin/import/class-import-wpseo-hooks.php new file mode 100644 index 0000000..a37ba99 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/import/class-import-wpseo-hooks.php @@ -0,0 +1,39 @@ + wp_create_nonce( 'wpseo-import' ) ), admin_url( 'admin.php?page=wpseo_tools&tool=import-export&import=1&importwpseo=1#top#import-seo' ) ); + echo '

    ', sprintf( esc_html__( 'The plugin wpSEO has been detected. Do you want to %simport its settings%s?', 'wordpress-seo' ), sprintf( '', esc_url( $url ) ), '' ), '

    '; + } + + /** + * Throw a notice to inform the user wpSEO has been deactivated + * + * @since 3.0 + */ + public function show_deactivate_notice() { + echo '

    ', esc_html__( 'wpSEO has been deactivated', 'wordpress-seo' ), '

    '; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/index.php b/wp-content/plugins/wordpress-seo/admin/index.php new file mode 100644 index 0000000..e94d9a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/index.php @@ -0,0 +1,4 @@ + +
  • + +
  • + + Yoast SEO Premium', + 'yoast.com' ); + $premium_popup = new WPSEO_Premium_Popup( 'add-keyword', 'h1', $popup_title, $popup_content ); + echo $premium_popup->get_premium_message(); + + return ob_get_clean(); + } + + /** + * Returns an empty string because this tab has no content + * + * @return string + */ + public function content() { + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-addon-section.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-addon-section.php new file mode 100644 index 0000000..3f783c9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-addon-section.php @@ -0,0 +1,37 @@ + +
    +
    +
      + +
    +
    + +
    + is_globally_enabled() && $this->is_user_enabled(); + } + + /** + * Whether or not this analysis is enabled by the user. + * + * @return bool Whether or not this analysis is enabled by the user. + */ + public function is_user_enabled() { + return ! get_the_author_meta( 'wpseo_content_analysis_disable', get_current_user_id() ); + } + + /** + * Whether or not this analysis is enabled globally. + * + * @return bool Whether or not this analysis is enabled globally. + */ + public function is_globally_enabled() { + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + + return (bool) $options['content-analysis-active']; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-seo.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-seo.php new file mode 100644 index 0000000..45b91ca --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-seo.php @@ -0,0 +1,39 @@ +is_globally_enabled() && $this->is_user_enabled(); + } + + /** + * Whether or not this analysis is enabled by the user. + * + * @return bool Whether or not this analysis is enabled by the user. + */ + public function is_user_enabled() { + return ! get_the_author_meta( 'wpseo_keyword_analysis_disable', get_current_user_id() ); + } + + /** + * Whether or not this analysis is enabled globally. + * + * @return bool Whether or not this analysis is enabled globally. + */ + public function is_globally_enabled() { + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + + return (bool) $options['keyword-analysis-active']; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php new file mode 100644 index 0000000..1c2bdb9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php @@ -0,0 +1,64 @@ +special_styles(); + /** @var WPSEO_Admin_Asset $inside_editor */ + $inside_editor = $styles['inside-editor']; + + $url = $inside_editor->get_url( WPSEO_Admin_Asset::TYPE_CSS, WPSEO_FILE ); + + if ( '' === $css_files ) { + $css_files = $url; + } + else { + $css_files .= ',' . $url; + } + + return $css_files; + } + + /** + * Adds a custom element to the tinyMCE editor that we need for marking the content. + * + * @param array $tinymce_config The tinyMCE config as configured by WordPress. + * + * @return array The new tinyMCE config with our added custom elements. + */ + public function add_custom_element( $tinymce_config ) { + if ( ! empty( $tinymce_config['custom_elements'] ) ) { + $custom_elements = $tinymce_config['custom_elements']; + + $custom_elements .= ',' . '~yoastmark'; + } + else { + $custom_elements = '~yoastmark'; + } + + $tinymce_config['custom_elements'] = $custom_elements; + + return $tinymce_config; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-form-tab.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-form-tab.php new file mode 100644 index 0000000..0578379 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-form-tab.php @@ -0,0 +1,115 @@ + '', + 'link_class' => '', + 'link_title' => '', + 'link_aria_label' => '', + 'single' => false, + ); + $options = array_merge( $default_options, $options ); + + $this->name = $name; + $this->content = $content; + $this->link_content = $link_content; + $this->tab_class = $options['tab_class']; + $this->link_class = $options['link_class']; + $this->link_title = $options['link_title']; + $this->link_aria_label = $options['link_aria_label']; + $this->single = $options['single']; + } + + /** + * Returns the html for the tab link. + * + * @return string + */ + public function link() { + + $html = '
  • %6$s
  • '; + + if ( $this->single ) { + $html = '
  • %6$s
  • '; + } + + return sprintf( + $html, + esc_attr( $this->name ), + ( '' !== $this->tab_class ) ? ' ' . esc_attr( $this->tab_class ) : '', + ( '' !== $this->link_class ) ? ' ' . esc_attr( $this->link_class ) : '', + ( '' !== $this->link_title ) ? ' title="' . esc_attr( $this->link_title ) . '"' : '', + ( '' !== $this->link_aria_label ) ? ' aria-label="' . esc_attr( $this->link_aria_label ) . '"' : '', + $this->link_content + ); + } + + /** + * Returns the html for the tab content. + * + * @return string + */ + public function content() { + return sprintf( + '
    %2$s
    ', + esc_attr( $this->name ), + $this->content + ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-tab-section.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-tab-section.php new file mode 100644 index 0000000..e49e97a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-tab-section.php @@ -0,0 +1,140 @@ + '', + 'link_class' => '', + 'link_aria_label' => '', + ); + $options = array_merge( $default_options, $options ); + + $this->name = $name; + foreach ( $tabs as $tab ) { + $this->add_tab( $tab ); + } + $this->link_content = $link_content; + $this->link_title = $options['link_title']; + $this->link_class = $options['link_class']; + $this->link_aria_label = $options['link_aria_label']; + } + + /** + * Outputs the section link if any tab has been added. + */ + public function display_link() { + if ( $this->has_tabs() ) { + printf( + '
  • %5$s
  • ', + esc_attr( $this->name ), + esc_attr( $this->link_class ), + ( '' !== $this->link_title ) ? ' title="' . esc_attr( $this->link_title ) . '"' : '', + ( '' !== $this->link_aria_label ) ? ' aria-label="' . esc_attr( $this->link_aria_label ) . '"' : '', + $this->link_content + ); + } + } + + /** + * Outputs the section content if any tab has been added. + */ + public function display_content() { + if ( $this->has_tabs() ) { + $html = '
    '; + $html .= '
    '; + $html .= '
      %2$s
    %3$s'; + $html .= '
    '; + + printf( $html, esc_attr( $this->name ), $this->tab_links(), $this->tab_content() ); + } + } + + /** + * Add a `WPSEO_Metabox_Tab` object to the tabs. + * + * @param WPSEO_Metabox_Tab $tab Tab to add. + */ + public function add_tab( WPSEO_Metabox_Tab $tab ) { + $this->tabs[] = $tab; + } + + /** + * Checks if any tabs have been added to the section. + * + * @return bool + */ + protected function has_tabs() { + return ! empty( $this->tabs ); + } + + /** + * Concatenates all tabs' links into one html string. + * + * @return string + */ + private function tab_links() { + $links = ''; + foreach ( $this->tabs as $tab ) { + $links .= $tab->link(); + } + return $links; + } + + /** + * Concatenates all tabs' content into one html string. + * + * @return string + */ + private function tab_content() { + $content = ''; + foreach ( $this->tabs as $tab ) { + $content .= $tab->content(); + } + return $content; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php new file mode 100644 index 0000000..7ab67c2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php @@ -0,0 +1,1682 @@ +options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_social' ) ); + + // Check if one of the social settings is checked in the options, if so, initialize the social_admin object. + if ( $this->options['opengraph'] === true || $this->options['twitter'] === true ) { + $this->social_admin = new WPSEO_Social_Admin( $this->options ); + } + + $this->editor = new WPSEO_Metabox_Editor(); + $this->editor->register_hooks(); + + $this->analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + $this->analysis_readability = new WPSEO_Metabox_Analysis_Readability(); + } + + /** + * Translate text strings for use in the meta box + * + * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to + * the main meta box definition array in the class WPSEO_Meta() as well!!!! + */ + public static function translate_meta_boxes() { + self::$meta_fields['general']['snippetpreview']['title'] = __( 'Snippet editor', 'wordpress-seo' ); + self::$meta_fields['general']['snippetpreview']['help'] = sprintf( __( 'This is a rendering of what this post might look like in Google\'s search results. %sLearn more about the Snippet Preview%s.', 'wordpress-seo' ), '', '' ); + self::$meta_fields['general']['snippetpreview']['help-button'] = __( 'Show information about the snippet editor', 'wordpress-seo' ); + + self::$meta_fields['general']['pageanalysis']['title'] = __( 'Analysis', 'wordpress-seo' ); + self::$meta_fields['general']['pageanalysis']['help'] = sprintf( __( 'This is the content analysis, a collection of content checks that analyze the content of your page. %sLearn more about the Content Analysis Tool%s.', 'wordpress-seo' ), '', '' ); + self::$meta_fields['general']['pageanalysis']['help-button'] = __( 'Show information about the content analysis', 'wordpress-seo' ); + + self::$meta_fields['general']['focuskw_text_input']['title'] = __( 'Focus keyword', 'wordpress-seo' ); + self::$meta_fields['general']['focuskw_text_input']['label'] = __( 'Enter a focus keyword', 'wordpress-seo' ); + self::$meta_fields['general']['focuskw_text_input']['help'] = sprintf( __( 'Pick the main keyword or keyphrase that this post/page is about. %sLearn more about the Focus Keyword%s.', 'wordpress-seo' ), '', '' ); + self::$meta_fields['general']['focuskw_text_input']['help-button'] = __( 'Show information about the focus keyword', 'wordpress-seo' ); + + self::$meta_fields['general']['title']['title'] = __( 'SEO title', 'wordpress-seo' ); + + self::$meta_fields['general']['metadesc']['title'] = __( 'Meta description', 'wordpress-seo' ); + + self::$meta_fields['general']['metakeywords']['title'] = __( 'Meta keywords', 'wordpress-seo' ); + self::$meta_fields['general']['metakeywords']['label'] = __( 'Enter the meta keywords', 'wordpress-seo' ); + self::$meta_fields['general']['metakeywords']['description'] = __( 'If you type something above it will override your %smeta keywords template%s.', 'wordpress-seo' ); + + + self::$meta_fields['advanced']['meta-robots-noindex']['title'] = __( 'Meta robots index', 'wordpress-seo' ); + if ( '0' == get_option( 'blog_public' ) ) { + self::$meta_fields['advanced']['meta-robots-noindex']['description'] = '

    ' . __( 'Warning: even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won\'t have an effect.', 'wordpress-seo' ) . '

    '; + } + self::$meta_fields['advanced']['meta-robots-noindex']['options']['0'] = __( 'Default for this post type, currently: %s', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-noindex']['options']['2'] = 'index'; + self::$meta_fields['advanced']['meta-robots-noindex']['options']['1'] = 'noindex'; + + self::$meta_fields['advanced']['meta-robots-nofollow']['title'] = __( 'Meta robots follow', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-nofollow']['options']['0'] = 'follow'; + self::$meta_fields['advanced']['meta-robots-nofollow']['options']['1'] = 'nofollow'; + + self::$meta_fields['advanced']['meta-robots-adv']['title'] = __( 'Meta robots advanced', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['description'] = __( 'Advanced meta robots settings for this page.', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['-'] = __( 'Site-wide default: %s', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['none'] = __( 'None', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['noodp'] = __( 'NO ODP', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['noimageindex'] = __( 'No Image Index', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['noarchive'] = __( 'No Archive', 'wordpress-seo' ); + self::$meta_fields['advanced']['meta-robots-adv']['options']['nosnippet'] = __( 'No Snippet', 'wordpress-seo' ); + + self::$meta_fields['advanced']['bctitle']['title'] = __( 'Breadcrumbs Title', 'wordpress-seo' ); + self::$meta_fields['advanced']['bctitle']['description'] = __( 'Title to use for this page in breadcrumb paths', 'wordpress-seo' ); + + self::$meta_fields['advanced']['canonical']['title'] = __( 'Canonical URL', 'wordpress-seo' ); + self::$meta_fields['advanced']['canonical']['description'] = sprintf( __( 'The canonical URL that this page should point to, leave empty to default to permalink. %sCross domain canonical%s supported too.', 'wordpress-seo' ), '', '' ); + + self::$meta_fields['advanced']['redirect']['title'] = __( '301 Redirect', 'wordpress-seo' ); + self::$meta_fields['advanced']['redirect']['description'] = __( 'The URL that this page should redirect to.', 'wordpress-seo' ); + + do_action( 'wpseo_tab_translate' ); + } + + /** + * Test whether the metabox should be hidden either by choice of the admin or because + * the post type is not a public post type + * + * @since 1.5.0 + * + * @param string $post_type (optional) The post type to test, defaults to the current post post_type. + * + * @return bool Whether or not the meta box (and associated columns etc) should be hidden + */ + function is_metabox_hidden( $post_type = null ) { + if ( ! isset( $post_type ) && ( isset( $GLOBALS['post'] ) && ( is_object( $GLOBALS['post'] ) && isset( $GLOBALS['post']->post_type ) ) ) ) { + $post_type = $GLOBALS['post']->post_type; + } + + if ( isset( $post_type ) ) { + // Don't make static as post_types may still be added during the run. + $cpts = get_post_types( array( 'public' => true ), 'names' ); + $options = get_option( 'wpseo_titles' ); + + return ( ( isset( $options[ 'hideeditbox-' . $post_type ] ) && $options[ 'hideeditbox-' . $post_type ] === true ) || in_array( $post_type, $cpts ) === false ); + } + return false; + } + + /** + * Sets up all the functionality related to the prominence of the page analysis functionality. + */ + public function setup_page_analysis() { + if ( apply_filters( 'wpseo_use_page_analysis', true ) === true ) { + add_action( 'post_submitbox_start', array( $this, 'publish_box' ) ); + } + } + + /** + * Outputs the page analysis score in the Publish Box. + */ + public function publish_box() { + if ( $this->is_metabox_hidden() === true ) { + return; + } + + $post = $this->get_metabox_post(); + if ( self::get_value( 'meta-robots-noindex', $post->ID ) === '1' ) { + $score_label = 'noindex'; + $title = __( 'Post is set to noindex.', 'wordpress-seo' ); + $score_title = $title; + } + else { + $score = self::get_value( 'linkdex', $post->ID ); + if ( $score === '' ) { + $score_label = 'na'; + $title = __( 'No focus keyword set.', 'wordpress-seo' ); + } + else { + $score_label = WPSEO_Utils::translate_score( $score ); + } + + $score_title = WPSEO_Utils::translate_score( $score, false ); + if ( ! isset( $title ) ) { + $title = $score_title; + } + } + } + + /** + * Adds the Yoast SEO meta box to the edit boxes in the edit post, page, + * attachment, and custom post types pages. + */ + public function add_meta_box() { + $post_types = get_post_types( array( 'public' => true ) ); + + if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $post_type ) { + if ( $this->is_metabox_hidden( $post_type ) === false ) { + $product_title = 'Yoast SEO'; + if ( file_exists( WPSEO_PATH . 'premium/' ) ) { + $product_title .= ' Premium'; + } + + if ( null !== get_current_screen() ) { + $screen_id = get_current_screen()->id; + add_filter( "postbox_classes_{$screen_id}_wpseo_meta", array( $this, 'wpseo_metabox_class' ) ); + } + + add_meta_box( 'wpseo_meta', $product_title, array( + $this, + 'meta_box', + ), $post_type, 'normal', apply_filters( 'wpseo_metabox_prio', 'high' ) ); + } + } + } + } + + /** + * Adds CSS classes to the meta box. + * + * @param array $classes An array of postbox CSS classes. + * + * @return array + */ + public function wpseo_metabox_class( $classes ) { + $classes[] = 'yoast wpseo-metabox'; + return $classes; + } + + /** + * Pass variables to js for use with the post-scraper + * + * @return array + */ + public function localize_post_scraper_script() { + $post = $this->get_metabox_post(); + $permalink = ''; + + if ( is_object( $post ) ) { + $permalink = get_sample_permalink( $post->ID ); + $permalink = $permalink[0]; + } + + $post_formatter = new WPSEO_Metabox_Formatter( + new WPSEO_Post_Metabox_Formatter( $post, WPSEO_Options::get_option( 'wpseo_titles' ), $permalink ) + ); + + return $post_formatter->get_values(); + } + + /** + * Pass some variables to js for replacing variables. + */ + public function localize_replace_vars_script() { + return array( + 'no_parent_text' => __( '(no parent)', 'wordpress-seo' ), + 'replace_vars' => $this->get_replace_vars(), + 'scope' => $this->determine_scope(), + ); + } + + /** + * Determines the scope based on the post type. + * This can be used by the replacevar plugin to determine if a replacement needs to be executed. + * + * @return string String decribing the current scope. + */ + private function determine_scope() { + $post_type = get_post_type( $this->get_metabox_post() ); + + if ( $post_type === 'page' ) { + return 'page'; + } + + return 'post'; + } + + /** + * Pass some variables to js for the edit / post page overview, snippet preview, etc. + * + * @return array + */ + public function localize_shortcode_plugin_script() { + return array( + 'wpseo_filter_shortcodes_nonce' => wp_create_nonce( 'wpseo-filter-shortcodes' ), + 'wpseo_shortcode_tags' => $this->get_valid_shortcode_tags(), + ); + } + + /** + * Output a tab in the Yoast SEO Metabox + * + * @param string $id CSS ID of the tab. + * @param string $heading Heading for the tab. + * @param string $content Content of the tab. This content should be escaped. + */ + public function do_tab( $id, $heading, $content ) { + ?> +
    +

    + + +
    +
    + get_content_sections(); + + $helpcenter_tab = new WPSEO_Option_Tab( 'metabox', 'Meta box', + array( 'video_url' => 'https://yoa.st/metabox-screencast' ) ); + + $helpcenter = new WPSEO_Help_Center( 'metabox', $helpcenter_tab ); + $helpcenter->output_help_center(); + + if ( ! defined( 'WPSEO_PREMIUM_FILE' ) ) { + echo $this->get_buy_premium_link(); + } + + echo '
      '; + + foreach ( $content_sections as $content_section ) { + if ( $content_section->name === 'premium' ) { + continue; + } + + $content_section->display_link(); + } + + echo '
    '; + + foreach ( $content_sections as $content_section ) { + $content_section->display_content(); + } + } + + /** + * Returns the relevant metabox sections for the current view. + * + * @return WPSEO_Metabox_Section[] + */ + private function get_content_sections() { + $content_sections = array( $this->get_content_meta_section() ); + + // Check if social_admin is an instance of WPSEO_Social_Admin. + if ( $this->social_admin instanceof WPSEO_Social_Admin ) { + $content_sections[] = $this->social_admin->get_meta_section(); + } + + if ( current_user_can( 'manage_options' ) || $this->options['disableadvanced_meta'] === false ) { + $content_sections[] = $this->get_advanced_meta_section(); + } + + if ( ! defined( 'WPSEO_PREMIUM_FILE' ) ) { + $content_sections[] = $this->get_buy_premium_section(); + } + + if ( has_action( 'wpseo_tab_header' ) || has_action( 'wpseo_tab_content' ) ) { + $content_sections[] = $this->get_addons_meta_section(); + } + + return $content_sections; + } + + /** + * Returns the metabox section for the content analysis. + * + * @return WPSEO_Metabox_Section + */ + private function get_content_meta_section() { + $content = $this->get_tab_content( 'general' ); + + $tabs = array(); + + $tabs[] = new WPSEO_Metabox_Form_Tab( + 'content', + $content, + __( '', 'wordpress-seo' ), + array( + 'tab_class' => 'yoast-seo__remove-tab', + ) + ); + + $tabs[] = new Metabox_Add_Keyword_Tab(); + + return new WPSEO_Metabox_Tab_Section( + 'content', + '' . __( 'Content optimization', 'wordpress-seo' ) . '' . $this->traffic_light_svg() . '', + $tabs, + array( + 'link_aria_label' => __( 'Content optimization', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns the metabox section for the advanced settings. + * + * @return WPSEO_Metabox_Section + */ + private function get_advanced_meta_section() { + $content = $this->get_tab_content( 'advanced' ); + + $tab = new WPSEO_Metabox_Form_Tab( + 'advanced', + $content, + __( 'Advanced', 'wordpress-seo' ), + array( + 'single' => true, + ) + ); + + return new WPSEO_Metabox_Tab_Section( + 'advanced', + '' . __( 'Advanced', 'wordpress-seo' ) . '', + array( $tab ), + array( + 'link_aria_label' => __( 'Advanced', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns a link to activate the Buy Premium tab. + * + * @return string + */ + private function get_buy_premium_link() { + return sprintf( "", + 'wpseo-metabox-buy-premium', + __( 'Go Premium', 'wordpress-seo' ) + ); + } + + /** + * Returns the metabox section for the Premium section. + * + * @return WPSEO_Metabox_Section + */ + private function get_buy_premium_section() { + $content = sprintf( "
    + %s +
      +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    + + + %s + + +

    %s

    +
    ", + /* translators: %1$s expands to Yoast SEO Premium. */ + sprintf( __( 'You\'re not getting the benefits of %1$s yet. If you had %1$s, you could use its awesome features:', 'wordpress-seo' ), 'Yoast SEO Premium' ), + __( 'Redirect manager', 'wordpress-seo' ), + __( 'Create and manage redirects within your WordPress install.', 'wordpress-seo' ), + __( 'Multiple focus keywords', 'wordpress-seo' ), + __( 'Optimize a single post for up to 5 keywords.', 'wordpress-seo' ), + __( 'Social Previews', 'wordpress-seo' ), + __( 'Check what your Facebook or Twitter post will look like.', 'wordpress-seo' ), + __( 'Premium support', 'wordpress-seo' ), + __( 'Gain access to our 24/7 support team.', 'wordpress-seo' ), + 'https://yoa.st/pe-buy-premium', + /* translators: %s expands to Yoast SEO Premium. */ + sprintf( __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ), + 'https://yoa.st/pe-premium-page', + __( 'More info', 'wordpress-seo' ) + ); + + $tab = new WPSEO_Metabox_Form_Tab( + 'premium', + $content, + 'Yoast SEO Premium', + array( + 'single' => true, + ) + ); + + return new WPSEO_Metabox_Tab_Section( + 'premium', + '', + array( $tab ), + array( + 'link_aria_label' => 'Yoast SEO Premium', + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns a metabox section dedicated to hosting metabox tabs that have been added by other plugins through the + * `wpseo_tab_header` and `wpseo_tab_content` actions. + * + * @return WPSEO_Metabox_Section + */ + private function get_addons_meta_section() { + return new WPSEO_Metabox_Addon_Tab_Section( + 'addons', + '' . __( 'Add-ons', 'wordpress-seo' ) . '', + array(), + array( + 'link_aria_label' => __( 'Add-ons', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Gets the table contents for the metabox tab. + * + * @param string $tab_name Tab for which to retrieve the field definitions. + * + * @return string + */ + private function get_tab_content( $tab_name ) { + $content = ''; + foreach ( $this->get_meta_field_defs( $tab_name ) as $key => $meta_field ) { + $content .= $this->do_meta_box( $meta_field, $key ); + } + unset( $key, $meta_field ); + + return $content; + } + + /** + * Adds a line in the meta box + * + * @todo [JRF] check if $class is added appropriately everywhere + * + * @param array $meta_field_def Contains the vars based on which output is generated. + * @param string $key Internal key (without prefix). + * + * @return string + */ + function do_meta_box( $meta_field_def, $key = '' ) { + $content = ''; + $esc_form_key = esc_attr( self::$form_prefix . $key ); + $meta_value = self::get_value( $key, $this->get_metabox_post()->ID ); + + $class = ''; + if ( isset( $meta_field_def['class'] ) && $meta_field_def['class'] !== '' ) { + $class = ' ' . $meta_field_def['class']; + } + + $placeholder = ''; + if ( isset( $meta_field_def['placeholder'] ) && $meta_field_def['placeholder'] !== '' ) { + $placeholder = $meta_field_def['placeholder']; + } + + $aria_describedby = $description = ''; + if ( isset( $meta_field_def['description'] ) ) { + $aria_describedby = ' aria-describedby="' . $esc_form_key . '-desc"'; + $description = '

    ' . $meta_field_def['description'] . '

    '; + } + + switch ( $meta_field_def['type'] ) { + case 'pageanalysis': + $content .= '
    '; + $content .= '
    '; + $content .= '

    '. __( 'Analysis', 'wordpress-seo' ) .'

    '; + $content .= '
    '; + $content .= '
    '; + $content .= '
    '; + $content .= '
    '; + break; + case 'snippetpreview': + $content .= '
    '; + break; + case 'focuskeyword': + if ( $placeholder !== '' ) { + $placeholder = ' placeholder="' . esc_attr( $placeholder ) . '"'; + } + + $content .= '
    '; + $content .= '
    '; + $content .= '

    ' . esc_html( $meta_field_def['title'] ) . '

    '; + $content .= ''; + $content .= '
    '; + $content .= '
    '; + $content .= '
    '; + break; + case 'metakeywords': + $content .= '
    '; + $content .= '
    '; + $content .= '

    ' . esc_html( $meta_field_def['title'] ) . '

    '; + $content .= ''; + $content .= '
    '; + $content .= $description; + $content .= '
    '; + $content .= '
    '; + break; + case 'text': + $ac = ''; + if ( isset( $meta_field_def['autocomplete'] ) && $meta_field_def['autocomplete'] === false ) { + $ac = 'autocomplete="off" '; + } + if ( $placeholder !== '' ) { + $placeholder = ' placeholder="' . esc_attr( $placeholder ) . '"'; + } + $content .= '
    '; + break; + + case 'textarea': + $rows = 3; + if ( isset( $meta_field_def['rows'] ) && $meta_field_def['rows'] > 0 ) { + $rows = $meta_field_def['rows']; + } + $content .= ''; + break; + + case 'hidden': + $content .= '
    '; + break; + case 'select': + if ( isset( $meta_field_def['options'] ) && is_array( $meta_field_def['options'] ) && $meta_field_def['options'] !== array() ) { + $content .= ''; + } + break; + + case 'multiselect': + if ( isset( $meta_field_def['options'] ) && is_array( $meta_field_def['options'] ) && $meta_field_def['options'] !== array() ) { + + // Set $meta_value as $selected_arr. + $selected_arr = $meta_value; + + // If the multiselect field is 'meta-robots-adv' we should explode on ,. + if ( 'meta-robots-adv' === $key ) { + $selected_arr = explode( ',', $meta_value ); + } + + if ( ! is_array( $selected_arr ) ) { + $selected_arr = (array) $selected_arr; + } + + $options_count = count( $meta_field_def['options'] ); + + // This select now uses Select2. + $content .= ''; + unset( $val, $option, $selected, $selected_arr, $options_count ); + } + break; + + case 'checkbox': + $checked = checked( $meta_value, 'on', false ); + $expl = ( isset( $meta_field_def['expl'] ) ) ? esc_html( $meta_field_def['expl'] ) : ''; + $content .= '
    '; + unset( $checked, $expl ); + break; + + case 'radio': + if ( isset( $meta_field_def['options'] ) && is_array( $meta_field_def['options'] ) && $meta_field_def['options'] !== array() ) { + foreach ( $meta_field_def['options'] as $val => $option ) { + $checked = checked( $meta_value, $val, false ); + $content .= ' '; + } + unset( $val, $option, $checked ); + } + break; + + case 'upload': + $content .= ''; + $content .= ''; + break; + } + + + $html = ''; + if ( $content === '' ) { + $content = apply_filters( 'wpseo_do_meta_box_field_' . $key, $content, $meta_value, $esc_form_key, $meta_field_def, $key ); + } + + if ( $content !== '' ) { + + $label = esc_html( $meta_field_def['title'] ); + if ( in_array( $meta_field_def['type'], array( + 'radio', + 'checkbox', + ), true ) === false + ) { + $label = ''; + } + + $help_button = $help_panel = ''; + if ( isset( $meta_field_def['help'] ) && $meta_field_def['help'] !== '' ) { + $help = new WPSEO_Admin_Help_Panel( $key, $meta_field_def['help-button'], $meta_field_def['help'] ); + $help_button = $help->get_button_html(); + $help_panel = $help->get_panel_html(); + } + if ( in_array( $meta_field_def['type'], array( + 'snippetpreview', + 'pageanalysis', + 'focuskeyword', + 'metakeywords', + ), true ) + ) { + return $this->create_content_box( $content, $meta_field_def['type'], $help_button, $help_panel ); + } + + if ( $meta_field_def['type'] === 'hidden' ) { + $html = '' . $content . ''; + } + else { + $html = ' + + ' . $label . $help_button . ' + ' . $help_panel; + + $html .= $content . $description; + + $html .= ' + + '; + } + } + + return $html; + } + + /** + * Creates a sections specific row. + * + * @param string $content The content to show. + * @param string $hidden_help_name Escaped form key name. + * @param string $help_button The help button. + * @param string $help_panel The help text. + * + * @return string + */ + private function create_content_box( $content, $hidden_help_name, $help_button, $help_panel ) { + $html = ''; + $html .= $content; + $html .= '
    ' . $help_button . $help_panel . '
    '; + $html .= ''; + return $html; + } + + /** + * Save the WP SEO metadata for posts. + * + * @internal $_POST parameters are validated via sanitize_post_meta() + * + * @param int $post_id Post ID. + * + * @return bool|void Boolean false if invalid save post request + */ + function save_postdata( $post_id ) { + // Bail if this is a multisite installation and the site has been switched. + if ( is_multisite() && ms_is_switched() ) { + return false; + } + + if ( $post_id === null ) { + return false; + } + + if ( wp_is_post_revision( $post_id ) ) { + $post_id = wp_is_post_revision( $post_id ); + } + + /** + * Determine we're not accidentally updating a different post. + * We can't use filter_input here as the ID isn't available at this point, other than in the $_POST data. + */ + if ( ! isset( $_POST['ID'] ) || $post_id !== (int) $_POST['ID'] ) { + return false; + } + + clean_post_cache( $post_id ); + $post = get_post( $post_id ); + + if ( ! is_object( $post ) ) { + // Non-existent post. + return false; + } + + do_action( 'wpseo_save_compare_data', $post ); + + $meta_boxes = apply_filters( 'wpseo_save_metaboxes', array() ); + $meta_boxes = array_merge( $meta_boxes, $this->get_meta_field_defs( 'general', $post->post_type ), $this->get_meta_field_defs( 'advanced' ) ); + + foreach ( $meta_boxes as $key => $meta_box ) { + + // If analysis is disabled remove that analysis score value from the DB. + if ( $this->is_meta_value_disabled( $key ) ) { + self::delete( $key, $post_id ); + continue; + } + + $data = null; + if ( 'checkbox' === $meta_box['type'] ) { + $data = isset( $_POST[ self::$form_prefix . $key ] ) ? 'on' : 'off'; + } + else { + if ( isset( $_POST[ self::$form_prefix . $key ] ) ) { + $data = $_POST[ self::$form_prefix . $key ]; + } + } + if ( isset( $data ) ) { + self::set_value( $key, $data, $post_id ); + } + } + + do_action( 'wpseo_saved_postdata' ); + } + + /** + * Determines if the given meta value key is disabled + * + * @param string $key The key of the meta value. + * @return bool Whether the given meta value key is disabled. + */ + public function is_meta_value_disabled( $key ) { + if ( 'linkdex' === $key && ! $this->analysis_seo->is_enabled() ) { + return true; + } + + if ( 'content_score' === $key && ! $this->analysis_readability->is_enabled() ) { + return true; + } + + return false; + } + + /** + * Enqueues all the needed JS and CSS. + * + * @todo [JRF => whomever] create css/metabox-mp6.css file and add it to the below allowed colors array when done + */ + public function enqueue() { + global $pagenow; + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + + $is_editor = self::is_post_overview( $pagenow ) || self::is_post_edit( $pagenow ); + + /* Filter 'wpseo_always_register_metaboxes_on_admin' documented in wpseo-main.php */ + if ( ( ! $is_editor && apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) === false ) || $this->is_metabox_hidden() === true + ) { + return; + } + + if ( self::is_post_overview( $pagenow ) ) { + $asset_manager->enqueue_style( 'edit-page' ); + } + else { + + if ( 0 != get_queried_object_id() ) { + wp_enqueue_media( array( 'post' => get_queried_object_id() ) ); // Enqueue files needed for upload functionality. + } + + $asset_manager->enqueue_style( 'metabox-css' ); + $asset_manager->enqueue_style( 'scoring' ); + $asset_manager->enqueue_style( 'snippet' ); + $asset_manager->enqueue_style( 'select2' ); + $asset_manager->enqueue_style( 'kb-search' ); + + $asset_manager->enqueue_script( 'metabox' ); + $asset_manager->enqueue_script( 'admin-media' ); + + $asset_manager->enqueue_script( 'post-scraper' ); + $asset_manager->enqueue_script( 'replacevar-plugin' ); + $asset_manager->enqueue_script( 'shortcode-plugin' ); + + wp_enqueue_script( 'jquery-ui-autocomplete' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', $this->localize_media_script() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'post-scraper', 'wpseoPostScraperL10n', $this->localize_post_scraper_script() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'shortcode-plugin', 'wpseoShortcodePluginL10n', $this->localize_shortcode_plugin_script() ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) ); + + if ( post_type_supports( get_post_type(), 'thumbnail' ) ) { + $asset_manager->enqueue_style( 'featured-image' ); + + $asset_manager->enqueue_script( 'featured-image' ); + + $featured_image_l10 = array( 'featured_image_notice' => __( 'The featured image should be at least 200x200 pixels to be picked up by Facebook and other social media sites.', 'wordpress-seo' ) ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoFeaturedImageL10n', $featured_image_l10 ); + } + } + } + + /** + * Pass some variables to js for upload module. + * + * @return array + */ + public function localize_media_script() { + return array( + 'choose_image' => __( 'Use Image', 'wordpress-seo' ), + ); + } + + /** + * Returns post in metabox context + * + * @returns WP_Post|array + */ + protected function get_metabox_post() { + if ( $post = filter_input( INPUT_GET, 'post' ) ) { + $post_id = (int) WPSEO_Utils::validate_int( $post ); + + return get_post( $post_id ); + } + + + if ( isset( $GLOBALS['post'] ) ) { + return $GLOBALS['post']; + } + + return array(); + } + + + + /** + * Returns an array with shortcode tags for all registered shortcodes. + * + * @return array + */ + private function get_valid_shortcode_tags() { + $shortcode_tags = array(); + + foreach ( $GLOBALS['shortcode_tags'] as $tag => $description ) { + array_push( $shortcode_tags, $tag ); + } + + return $shortcode_tags; + } + + /** + * Prepares the replace vars for localization. + * + * @return array replace vars + */ + private function get_replace_vars() { + $post = $this->get_metabox_post(); + + $cached_replacement_vars = array(); + + $vars_to_cache = array( + 'date', + 'id', + 'sitename', + 'sitedesc', + 'sep', + 'page', + 'currenttime', + 'currentdate', + 'currentday', + 'currentmonth', + 'currentyear', + ); + + foreach ( $vars_to_cache as $var ) { + $cached_replacement_vars[ $var ] = wpseo_replace_vars( '%%' . $var . '%%', $post ); + } + + // Merge custom replace variables with the WordPress ones. + return array_merge( $cached_replacement_vars, $this->get_custom_replace_vars( $post ) ); + } + + /** + * Gets the custom replace variables for custom taxonomies and fields. + * + * @param WP_Post $post The post to check for custom taxonomies and fields. + * + * @return array Array containing all the replacement variables. + */ + private function get_custom_replace_vars( $post ) { + return array( + 'custom_fields' => $this->get_custom_fields_replace_vars( $post ), + 'custom_taxonomies' => $this->get_custom_taxonomies_replace_vars( $post ), + ); + } + + /** + * Gets the custom replace variables for custom taxonomies. + * + * @param WP_Post $post The post to check for custom taxonomies. + * + * @return array Array containing all the replacement variables. + */ + private function get_custom_taxonomies_replace_vars( $post ) { + $taxonomies = get_object_taxonomies( $post, 'objects' ); + $custom_replace_vars = array(); + + foreach ( $taxonomies as $taxonomy_name => $taxonomy ) { + + if ( is_string( $taxonomy ) ) { // If attachment, see https://core.trac.wordpress.org/ticket/37368 . + $taxonomy_name = $taxonomy; + $taxonomy = get_taxonomy( $taxonomy_name ); + } + + if ( $taxonomy->_builtin && $taxonomy->public ) { + continue; + } + + $custom_replace_vars[ $taxonomy_name ] = array( + 'name' => $taxonomy->name, + 'description' => $taxonomy->description, + ); + } + + return $custom_replace_vars; + } + + /** + * Gets the custom replace variables for custom fields. + * + * @param WP_Post $post The post to check for custom fields. + * + * @return array Array containing all the replacement variables. + */ + private function get_custom_fields_replace_vars( $post ) { + $custom_replace_vars = array(); + + // If no post object is passed, return the empty custom_replace_vars array. + if ( ! is_object( $post ) ) { + return $custom_replace_vars; + } + + $custom_fields = get_post_custom( $post->ID ); + + foreach ( $custom_fields as $custom_field_name => $custom_field ) { + if ( substr( $custom_field_name, 0, 1 ) === '_' ) { + continue; + } + + $custom_replace_vars[ $custom_field_name ] = $custom_field[0]; + } + + return $custom_replace_vars; + } + + + /** + * Return the SVG for the traffic light in the metabox. + */ + public function traffic_light_svg() { + return << + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SVG; + + } + + /** + * Generic tab. + */ + public function template_generic_tab() { + // This template belongs to the post scraper so don't echo it if it isn't enqueued. + if ( ! wp_script_is( WPSEO_Admin_Asset_Manager::PREFIX . 'post-scraper' ) ) { + return; + } + + echo ''; + } + + /** + * Keyword tab for enabling analysis of multiple keywords. + */ + public function template_keyword_tab() { + // This template belongs to the post scraper so don't echo it if it isn't enqueued. + if ( ! wp_script_is( WPSEO_Admin_Asset_Manager::PREFIX . 'post-scraper' ) ) { + return; + } + + echo ''; + } + + /** + * @param string $page The page to check for the post overview page. + * + * @return bool Whether or not the given page is the post overview page. + */ + public static function is_post_overview( $page ) { + return 'edit.php' === $page; + } + + /** + * @param string $page The page to check for the post edit page. + * + * @return bool Whether or not the given page is the post edit page. + */ + public static function is_post_edit( $page ) { + return 'post.php' === $page + || 'post-new.php' === $page; + } + + /********************** DEPRECATED METHODS **********************/ + + /** + * Adds the Yoast SEO box + * + * @deprecated 1.4.24 + * @deprecated use WPSEO_Metabox::add_meta_box() + * @see WPSEO_Meta::add_meta_box() + */ + public function add_custom_box() { + _deprecated_function( __METHOD__, 'WPSEO 1.4.24', 'WPSEO_Metabox::add_meta_box()' ); + $this->add_meta_box(); + } + + /** + * Retrieve the meta boxes for the given post type. + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Meta::get_meta_field_defs() + * @see WPSEO_Meta::get_meta_field_defs() + * + * @param string $post_type The post type for which to get the meta fields. + * + * @return array + */ + public function get_meta_boxes( $post_type = 'post' ) { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Meta::get_meta_field_defs()' ); + + return $this->get_meta_field_defs( 'general', $post_type ); + } + + /** + * Pass some variables to js + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Meta::localize_script() + * @see WPSEO_Meta::localize_script() + */ + public function script() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Meta::localize_script()' ); + + return $this->localize_script(); + } + + /** + * @deprecated 3.0 Removed, use javascript functions instead + * + * @param string $string Deprecated. + * + * @return string + */ + public function strtolower_utf8( $string ) { + _deprecated_function( 'WPSEO_Metabox::strtolower_utf8', 'WPSEO 3.0', 'use javascript instead' ); + + return $string; + } + + /** + * @deprecated 3.0 Removed. + * + * @return array + */ + public function localize_script() { + _deprecated_function( 'WPSEO_Metabox::localize_script', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 Removed, use javascript functions instead. + * + * @return string + */ + public function snippet() { + _deprecated_function( 'WPSEO_Metabox::snippet', 'WPSEO 3.0', 'use javascript instead' ); + + return ''; + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::posts_filter_dropdown instead. + */ + public function posts_filter_dropdown() { + _deprecated_function( 'WPSEO_Metabox::posts_filter_dropdown', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::posts_filter_dropdown' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + $meta_columns->posts_filter_dropdown(); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::column_heading instead. + * + * @param array $columns Already existing columns. + * + * @return array + */ + public function column_heading( $columns ) { + _deprecated_function( 'WPSEO_Metabox::column_heading', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::column_heading' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + return $meta_columns->column_heading( $columns ); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::column_content instead. + * + * @param string $column_name Column to display the content for. + * @param int $post_id Post to display the column content for. + */ + public function column_content( $column_name, $post_id ) { + _deprecated_function( 'WPSEO_Metabox::column_content', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::column_content' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + $meta_columns->column_content( $column_name, $post_id ); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::column_sort instead. + * + * @param array $columns appended with their orderby variable. + * + * @return array + */ + public function column_sort( $columns ) { + _deprecated_function( 'WPSEO_Metabox::column_sort', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::column_sort' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + return $meta_columns->column_sort( $columns ); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::column_sort_orderby instead. + * + * @param array $vars Query variables. + * + * @return array + */ + public function column_sort_orderby( $vars ) { + _deprecated_function( 'WPSEO_Metabox::column_sort_orderby', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::column_sort_orderby' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + return $meta_columns->column_sort_orderby( $vars ); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::column_hidden instead. + * + * @param array|false $result The hidden columns. + * @param string $option The option name used to set which columns should be hidden. + * @param WP_User $user The User. + * + * @return array|false $result + */ + public function column_hidden( $result, $option, $user ) { + _deprecated_function( 'WPSEO_Metabox::column_hidden', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::column_hidden' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + return $meta_columns->column_hidden( $result, $option, $user ); + } + + /** + * @deprecated 3.0 Use WPSEO_Meta_Columns::seo_score_posts_where instead. + * + * @param string $where Where clause. + * + * @return string + */ + public function seo_score_posts_where( $where ) { + _deprecated_function( 'WPSEO_Metabox::seo_score_posts_where', 'WPSEO 3.0', 'WPSEO_Metabox_Columns::seo_score_posts_where' ); + + /** @var WPSEO_Meta_Columns $meta_columns */ + $meta_columns = $GLOBALS['wpseo_meta_columns']; + return $meta_columns->seo_score_posts_where( $where ); + } + + /** + * @deprecated 3.0 Removed. + * + * @param int $post_id Post to retrieve the title for. + * + * @return string + */ + public function page_title( $post_id ) { + _deprecated_function( 'WPSEO_Metabox::page_title', 'WPSEO 3.0' ); + + return ''; + } + + /** + * @deprecated 3.0 + * + * @param array $array Array to sort, array is returned sorted. + * @param string $key Key to sort array by. + */ + public function aasort( &$array, $key ) { + _deprecated_function( 'WPSEO_Metabox::aasort', 'WPSEO 3.0' ); + + } + + /** + * @deprecated 3.0 + * + * @param object $post Post to output the page analysis results for. + * + * @return string + */ + public function linkdex_output( $post ) { + _deprecated_function( 'WPSEO_Metabox::linkdex_output', 'WPSEO 3.0' ); + + return ''; + + } + + /** + * @deprecated 3.0 + * + * @param object $post Post to calculate the results for. + * + * @return array|WP_Error + */ + public function calculate_results( $post ) { + _deprecated_function( 'WPSEO_Metabox::calculate_results', 'WPSEO 3.0' ); + + return array(); + + } + + /** + * @deprecated 3.0 + * + * @param WP_Post $post Post object instance. + * + * @return array + */ + public function get_sample_permalink( $post ) { + _deprecated_function( 'WPSEO_Metabox::get_sample_permalink', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 + * + * @param array $results The results array used to store results. + * @param int $scoreValue The score value. + * @param string $scoreMessage The score message. + * @param string $scoreLabel The label of the score to use in the results array. + * @param string $rawScore The raw score, to be used by other filters. + */ + public function save_score_result( &$results, $scoreValue, $scoreMessage, $scoreLabel, $rawScore = null ) { + + _deprecated_function( 'WPSEO_Metabox::save_score_result', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param string $inputString String to clean up. + * @param bool $removeOptionalCharacters Whether or not to do a cleanup of optional chars too. + * + * @return string + */ + public function strip_separators_and_fold( $inputString, $removeOptionalCharacters ) { + _deprecated_function( 'WPSEO_Metabox::strip_separators_and_f', 'WPSEO 3.0' ); + + return ''; + } + + /** + * @deprecated 3.0 + * + * @param array $job Job data array. + * @param array $results Results set by reference. + */ + public function check_double_focus_keyword( $job, &$results ) { + _deprecated_function( 'WPSEO_Metabox::check_double_focus_key', 'WPSEO 3.0' ); + + } + + /** + * @deprecated 3.0 + * + * @param string $keyword The keyword to check for stopwords. + * @param array $results The results array. + */ + public function score_keyword( $keyword, &$results ) { + _deprecated_function( 'WPSEO_Metabox::score_keyword', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param array $job The job array holding both the keyword and the URLs. + * @param array $results The results array. + */ + public function score_url( $job, &$results ) { + _deprecated_function( 'WPSEO_Metabox::score_url', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param array $job The job array holding both the keyword versions. + * @param array $results The results array. + */ + public function score_title( $job, &$results ) { + _deprecated_function( 'WPSEO_Metabox::score_title', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param array $job The job array holding both the keyword versions. + * @param array $results The results array. + * @param array $anchor_texts The array holding all anchors in the document. + * @param array $count The number of anchors in the document, grouped by type. + */ + public function score_anchor_texts( $job, &$results, $anchor_texts, $count ) { + _deprecated_function( 'WPSEO_Metabox::score_anchor_texts', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param object $xpath An XPATH object of the current document. + * + * @return array + */ + public function get_anchor_texts( &$xpath ) { + _deprecated_function( 'WPSEO_Metabox::get_anchor_texts', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 + * + * @param object $xpath An XPATH object of the current document. + * + * @return array + */ + public function get_anchor_count( &$xpath ) { + _deprecated_function( 'WPSEO_Metabox::get_anchor_count', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 + * + * @param array $job The job array holding both the keyword versions. + * @param array $results The results array. + * @param array $imgs The array with images alt texts. + */ + public function score_images_alt_text( $job, &$results, $imgs ) { + _deprecated_function( 'WPSEO_Metabox::score_images_alt_text', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param int $post_id The post to find images in. + * @param string $body The post content to find images in. + * @param array $imgs The array holding the image information. + * + * @return array The updated images array. + */ + public function get_images_alt_text( $post_id, $body, $imgs ) { + _deprecated_function( 'WPSEO_Metabox::get_images_alt_text', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 + * + * @param array $job The array holding the keywords. + * @param array $results The results array. + * @param array $headings The headings found in the document. + */ + public function score_headings( $job, &$results, $headings ) { + _deprecated_function( 'WPSEO_Metabox::score_headings', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param string $postcontent Post content to find headings in. + * + * @return array Array of heading texts. + */ + public function get_headings( $postcontent ) { + _deprecated_function( 'WPSEO_Metabox::get_headings', 'WPSEO 3.0' ); + + return array(); + } + + /** + * @deprecated 3.0 + * + * @param array $job The array holding the keywords. + * @param array $results The results array. + * @param string $description The meta description. + * @param int $maxlength The maximum length of the meta description. + */ + public function score_description( $job, &$results, $description, $maxlength = 155 ) { + _deprecated_function( 'WPSEO_Metabox::score_description', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param array $job The array holding the keywords. + * @param array $results The results array. + * @param string $body The body. + * @param string $firstp The first paragraph. + */ + public function score_body( $job, &$results, $body, $firstp ) { + _deprecated_function( 'WPSEO_Metabox::score_body', 'WPSEO 3.0' ); + } + + /** + * @deprecated 3.0 + * + * @param object $post The post object. + * + * @return string The post content. + */ + public function get_body( $post ) { + _deprecated_function( 'WPSEO_Metabox::get_body', 'WPSEO 3.0' ); + + return ''; + } + + /** + * @deprecated 3.0 + * + * @param string $body The post content to retrieve the first paragraph from. + * + * @return string + */ + public function get_first_paragraph( $body ) { + _deprecated_function( 'WPSEO_Metabox::get_first_paragraph', 'WPSEO 3.0' ); + + return ''; + } + + /** + * @deprecated 3.2 + * + * Retrieves the title template. + * + * @param object $post metabox post. + * + * @return string + */ + public static function get_title_template( $post ) { + _deprecated_function( 'WPSEO_Metabox::get_title_template', 'WPSEO 3.2', 'WPSEO_Post_Scraper::get_title_template' ); + + return ''; + } + + /** + * @deprecated 3.2 + * + * Retrieves the metadesc template. + * + * @param object $post metabox post. + * + * @return string + */ + public static function get_metadesc_template( $post ) { + _deprecated_function( 'WPSEO_Metabox::get_metadesc_template', 'WPSEO 3.2', 'WPSEO_Post_Scraper::get_metadesc_template' ); + return ''; + } + + /** + * @deprecated 3.2 + * Retrieve a post date when post is published, or return current date when it's not. + * + * @param WP_Post $post The post for which to retrieve the post date. + * + * @return string + */ + public function get_post_date( $post ) { + _deprecated_function( 'WPSEO_Metabox::get_post_date', 'WPSEO 3.2', 'WPSEO_Post_Scraper::get_post_date' ); + _deprecated_function( 'WPSEO_Metabox::get_post_date', 'WPSEO 3.2', 'WPSEO_Post_Scraper::get_post_date' ); + + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-analysis.php b/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-analysis.php new file mode 100644 index 0000000..1006078 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-analysis.php @@ -0,0 +1,31 @@ +onpage_option = $this->get_option(); + } + + /** + * Getting the status from the option. + * + * @return string + */ + public function get_status() { + if ( array_key_exists( self::STATUS, $this->onpage_option ) ) { + return $this->onpage_option[ self::STATUS ]; + } + + return self::CANNOT_FETCH; + } + + /** + * Saving the status to the options. + * + * @param string $status The status to save. + */ + public function set_status( $status ) { + $this->onpage_option[ self::STATUS ] = $status; + } + + /** + * Saving the last fetch timestamp to the options. + * + * @param integer $timestamp Timestamp with the new value. + */ + public function set_last_fetch( $timestamp ) { + $this->onpage_option[ self::LAST_FETCH ] = $timestamp; + } + + /** + * Check if the last fetch is within the time of 60 minutes + * + * @return bool + */ + public function should_be_fetched() { + return ( ( time() - $this->onpage_option[ self::LAST_FETCH ] ) > self::FETCH_LIMIT ); + } + + /** + * Saving the option with the current data + */ + public function save_option() { + update_option( self::OPTION_NAME, $this->onpage_option ); + } + + /** + * Returns the value of the onpage_enabled status + * + * @return bool + */ + public function is_enabled() { + $options = get_option( 'wpseo' ); + + return ! empty( $options['onpage_indexability'] ); + } + + /** + * Getting the option with the OnPage.org data + * + * @return array + */ + private function get_option() { + return get_option( self::OPTION_NAME, array( self::STATUS => self::NOT_FETCHED, self::LAST_FETCH => 0 ) ); + } + + /** + * @deprecated 3.0.2 + * + * Returns the indexable status of the website. + * + * @return bool + */ + public function is_indexable() { + _deprecated_function( 'WPSEO_OnPage_Option::is_indexable', 'WPSEO 3.0.2' ); + + return self::IS_INDEXABLE === $this->get_status(); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage-request.php b/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage-request.php new file mode 100644 index 0000000..3d6ba8e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage-request.php @@ -0,0 +1,76 @@ + $target_url, + 'wp_version' => $GLOBALS['wp_version'], + 'yseo_version' => WPSEO_VERSION, + ), $parameters ); + + $url = add_query_arg( $parameters, $this->onpage_endpoint ); + + $response = wp_remote_get( $url ); + $response_code = wp_remote_retrieve_response_code( $response ); + + // When the request is successful, the response code will be 200. + if ( $response_code === 200 ) { + $response_body = wp_remote_retrieve_body( $response ); + + return json_decode( $response_body, true ); + } + } + + /** + * Sending a request to OnPage to check if the $home_url is indexable + * + * @param string $target_url The URL that will be send to the API. + * @param array $parameters Array of extra parameters to send to OnPage. + * + * @return array + */ + public function do_request( $target_url, $parameters = array() ) { + $json_body = $this->get_remote( $target_url, $parameters ); + + // OnPage.org recognized a redirect, fetch the data of that URL by calling this method with the value from OnPage.org. + if ( ! empty( $json_body['passes_juice_to'] ) ) { + return $this->do_request( $json_body['passes_juice_to'], $parameters ); + } + + return $json_body; + } + + /** + * Returns the fetched response + * + * @deprecated 3.1.2 + * @return array + */ + public function get_response() { + _deprecated_function( 'WPSEO_OnPage_Request::get_response', 'WPSEO 3.1.2', 'WPSEO_OnPage_Request::do_request' ); + + return array(); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php b/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php new file mode 100644 index 0000000..dcbc965 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php @@ -0,0 +1,230 @@ +onpage_option = new WPSEO_OnPage_Option(); + + if ( $this->onpage_option->is_enabled() ) { + $this->set_hooks(); + $this->catch_redo_listener(); + } + } + } + + /** + * The hooks to run on plugin activation + */ + public function activate_hooks() { + $this->set_cron(); + } + + /** + * Adding a weekly schedule to the schedules array + * + * @param array $schedules Array with schedules. + * + * @return array + */ + public function add_weekly_schedule( array $schedules ) { + $schedules['weekly'] = array( 'interval' => WEEK_IN_SECONDS, 'display' => __( 'Once Weekly' ) ); + + return $schedules; + } + + /** + * Fetching the data from onpage. + * + * @return bool + */ + public function fetch_from_onpage() { + if ( $this->onpage_option->should_be_fetched() && false !== ( $new_status = $this->request_indexability() ) ) { + + // Updates the timestamp in the option. + $this->onpage_option->set_last_fetch( time() ); + + // The currently indexability status. + $old_status = $this->onpage_option->get_status(); + + // Saving the new status. + $this->onpage_option->set_status( $new_status ); + + // Saving the option. + $this->onpage_option->save_option(); + + // Check if the status has been changed. + if ( $old_status !== $new_status && $new_status !== WPSEO_OnPage_Option::CANNOT_FETCH ) { + $this->notify_admins(); + } + + return true; + } + + return false; + } + + /** + * Show a notice when the website is not indexable + */ + public function show_notice() { + + $notification = $this->get_indexability_notification(); + $notification_center = Yoast_Notification_Center::get(); + + if ( $this->should_show_notice() ) { + $notification_center->add_notification( $notification ); + } + else { + $notification_center->remove_notification( $notification ); + } + } + + /** + * Builds the indexability notification + * + * @return Yoast_Notification + */ + private function get_indexability_notification() { + $notice = sprintf( + /* translators: 1: opens a link to a related knowledge base article. 2: closes the link */ + __( '%1$sYour homepage cannot be indexed by search engines%2$s. This is very bad for SEO and should be fixed.', 'wordpress-seo' ), + '', + '' + ); + + return new Yoast_Notification( + $notice, + array( + 'type' => Yoast_Notification::ERROR, + 'id' => 'wpseo-dismiss-onpageorg', + 'capabilities' => 'manage_options', + ) + ); + } + + /** + * Send a request to OnPage.org to get the indexability + * + * @return int(0)|int(1)|false + */ + protected function request_indexability() { + $parameters = array(); + if ( $this->wordfence_protection_enabled() ) { + $parameters['wf_strict'] = 1; + } + + $request = new WPSEO_OnPage_Request(); + $response = $request->do_request( get_option( 'home' ), $parameters ); + + if ( isset( $response['is_indexable'] ) ) { + return (int) $response['is_indexable']; + } + + return WPSEO_OnPage_Option::CANNOT_FETCH; + } + + /** + * Should the notice being given? + * + * @return bool + */ + protected function should_show_notice() { + // If development mode is on or the blog is not public, just don't show this notice. + if ( WPSEO_Utils::is_development_mode() || ( '0' === get_option( 'blog_public' ) ) ) { + return false; + } + + return $this->onpage_option->get_status() === WPSEO_OnPage_Option::IS_NOT_INDEXABLE; + } + + /** + * Notify the admins + */ + protected function notify_admins() { + /* + * Let's start showing the notices to all admins by removing the hide-notice meta data for each admin resulting + * in popping up the notice again. + */ + delete_metadata( 'user', 0, WPSEO_OnPage::USER_META_KEY, '', true ); + } + + /** + * Setting up the hooks. + */ + private function set_hooks() { + // Schedule cronjob when it doesn't exists on activation. + register_activation_hook( WPSEO_FILE, array( $this, 'activate_hooks' ) ); + + // Add weekly schedule to the cron job schedules. + add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) ); + + // Adding admin notice if necessary. + add_filter( 'admin_init', array( $this, 'show_notice' ) ); + + // Setting the action for the OnPage fetch. + add_action( 'wpseo_onpage_fetch', array( $this, 'fetch_from_onpage' ) ); + } + + /** + * Setting the cronjob to get the new indexibility status. + */ + private function set_cron() { + if ( ! wp_next_scheduled( 'wpseo_onpage_fetch' ) ) { + wp_schedule_event( time(), 'weekly', 'wpseo_onpage_fetch' ); + } + } + + /** + * Redo the fetch request for onpage + */ + private function catch_redo_listener() { + if ( filter_input( INPUT_GET, 'wpseo-redo-onpage' ) === '1' ) { + $this->is_manual_request = true; + + add_action( 'admin_init', array( $this, 'fetch_from_onpage' ) ); + } + } + + /** + * Checks if WordFence protects the site against 'fake' Google crawlers. + * + * @return boolean + */ + private function wordfence_protection_enabled() { + if ( ! class_exists( 'wfConfig' ) ) { + return false; + } + + if ( ! method_exists( 'wfConfig', 'get' ) ) { + return false; + } + + return (bool) wfConfig::get( 'blockFakeBots' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/pages/advanced.php b/wp-content/plugins/wordpress-seo/admin/pages/advanced.php new file mode 100644 index 0000000..26898e0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/advanced.php @@ -0,0 +1,61 @@ +add_tab( + new WPSEO_Option_Tab( + 'breadcrumbs', + __( 'Breadcrumbs', 'wordpress-seo' ), + array( + 'video_url' => 'https://yoa.st/screencast-breadcrumbs', + 'opt_group' => 'wpseo_internallinks', + ) + ) +); +$tabs->add_tab( + new WPSEO_Option_Tab( + 'permalinks', + __( 'Permalinks', 'wordpress-seo' ), + array( + 'video_url' => 'https://yoa.st/screencast-permalinks', + 'opt_group' => 'wpseo_permalinks', + ) + ) +); +$tabs->add_tab( + new WPSEO_Option_Tab( + 'rss', + __( 'RSS', 'wordpress-seo' ), + array( + 'video_url' => 'https://yoa.st/screencast-rss', + 'opt_group' => 'wpseo_rss', + ) + ) +); + +$active_tab = $tabs->get_active_tab(); +Yoast_Form::get_instance()->admin_header( true, $active_tab->get_opt_group() ); + +echo ''; + +$help_center = new WPSEO_Help_Center( 'advanced', $active_tab ); +$help_center->output_help_center(); + +require_once WPSEO_PATH . 'admin/views/tabs/advanced/' . $active_tab->get_name() . '.php'; + +Yoast_Form::get_instance()->admin_footer(); diff --git a/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php b/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php new file mode 100644 index 0000000..cf6cbe0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php @@ -0,0 +1,72 @@ +admin_header( true, 'wpseo' ); + +do_action( 'wpseo_all_admin_notices' ); + +if ( is_array( $options['blocking_files'] ) && count( $options['blocking_files'] ) > 0 ) { + + $xml_sitemap_options = WPSEO_Options::get_option( 'wpseo_xml' ); + if ( $xml_sitemap_options['enablexmlsitemap'] ) { + + echo '

    '; + printf( + /* translators: %1$s expands to Yoast SEO */ + _n( 'The following file is blocking your XML sitemaps from working properly. Either delete it (this can be done with the "Fix it" button) or disable %1$s XML sitemaps.', 'The following files are blocking your XML sitemaps from working properly. Either delete them (this can be done with the "Fix it" button) or disable %1$s XML sitemaps.', count( $options['blocking_files'] ), 'wordpress-seo' ), + 'Yoast SEO' + ); + foreach ( $options['blocking_files'] as $file ) { + echo '
    ', '', esc_html( $file ), ''; + } + unset( $file ); + echo '
    '; + echo '

    '; + } +} + +$tabs = new WPSEO_Option_Tabs( 'dashboard' ); +$tabs->add_tab( new WPSEO_Option_Tab( 'dashboard', __( 'Dashboard', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-notification-center' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'general', __( 'General', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-general' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'features', __( 'Features', 'wordpress-seo' ) ) ); +$knowledge_graph_label = ( 'company' === $options['company_or_person'] ) ? __( 'Company Info', 'wordpress-seo' ) : __( 'Your Info', 'wordpress-seo' ); +$tabs->add_tab( new WPSEO_Option_Tab( 'knowledge-graph', __( $knowledge_graph_label, 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-knowledge-graph' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'webmaster-tools', __( 'Webmaster Tools', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-general-search-console' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'security', __( 'Security', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-security' ) ) ); + +do_action( 'wpseo_settings_tabs_dashboard', $tabs ); + +$tabs->display( $yform, $options ); + +do_action( 'wpseo_dashboard' ); + +$yform->admin_footer(); diff --git a/wp-content/plugins/wordpress-seo/admin/pages/licenses.php b/wp-content/plugins/wordpress-seo/admin/pages/licenses.php new file mode 100644 index 0000000..26b688e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/licenses.php @@ -0,0 +1,239 @@ + (object) array( + 'url' => 'https://yoast.com/wordpress/plugins/seo-premium/', + 'title' => 'Yoast SEO Premium', + /* translators: %1$s expands to Yoast SEO */ + 'desc' => sprintf( __( 'The premium version of %1$s with more features & support.', 'wordpress-seo' ), 'Yoast SEO' ), + 'installed' => false, + 'image' => plugins_url( 'images/extensions-premium-ribbon.png', WPSEO_FILE ), + 'benefits' => array(), + ), + 'video-seo' => (object) array( + 'url' => 'https://yoast.com/wordpress/plugins/video-seo/', + 'title' => 'Video SEO', + 'desc' => __( 'Optimize your videos to show them off in search results and get more clicks!', 'wordpress-seo' ), + 'installed' => false, + 'image' => plugins_url( 'images/extensions-video.png', WPSEO_FILE ), + 'benefits' => array( + __( 'Show your videos in Google Videos', 'wordpress-seo' ), + __( 'Enhance the experience of sharing posts with videos', 'wordpress-seo' ), + __( 'Make videos responsive through enabling fitvids.js', 'wordpress-seo' ), + ), + ), + 'news-seo' => (object) array( + 'url' => 'https://yoast.com/wordpress/plugins/news-seo/', + 'title' => 'News SEO', + 'desc' => __( 'Are you in Google News? Increase your traffic from Google News by optimizing for it!', 'wordpress-seo' ), + 'installed' => false, + 'image' => plugins_url( 'images/extensions-news.png', WPSEO_FILE ), + 'benefits' => array( + __( 'Optimize your site for Google News', 'wordpress-seo' ), + __( 'Immediately pings Google on the publication of a new post', 'wordpress-seo' ), + __( 'Creates XML News Sitemaps', 'wordpress-seo' ), + ), + ), + 'local-seo' => (object) array( + 'url' => 'https://yoast.com/wordpress/plugins/local-seo/', + 'title' => 'Local SEO', + 'desc' => __( 'Rank better locally and in Google Maps, without breaking a sweat!', 'wordpress-seo' ), + 'installed' => false, + 'image' => plugins_url( 'images/extensions-local.png', WPSEO_FILE ), + 'benefits' => array( + __( 'Get found by potential clients', 'wordpress-seo' ), + __( 'Easily insert Google Maps, a store locator, opening hours and more', 'wordpress-seo' ), + __( 'Improve the usability of your contact page', 'wordpress-seo' ), + ), + ), + 'woocommerce-seo' => (object) array( + 'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/', + 'title' => 'Yoast WooCommerce SEO', + /* translators: %1$s expands to Yoast SEO */ + 'desc' => sprintf( __( 'Seamlessly integrate WooCommerce with %1$s and get extra features!', 'wordpress-seo' ), 'Yoast SEO' ), + 'installed' => false, + 'image' => plugins_url( 'images/extensions-woo.png', WPSEO_FILE ), + 'benefits' => array( + /* %1$s expands to Pinterest */ + sprintf( __( 'Improve sharing on Pinterest', 'wordpress-seo' ) ), + + /* %1$s expands to Yoast, %2$s expands to WooCommerce */ + sprintf( __( 'Use %1$s breadcrumbs instead of %2$s ones', 'wordpress-seo' ), 'Yoast', 'WooCommerce' ), + + /* %1$s expands to Yoast SEO, %2$s expands to WooCommerce */ + sprintf( __( 'A seamless integration between %1$s and %2$s', 'wordpress-seo' ), 'Yoast SEO', 'WooCommerce' ), + ), + 'buy_button' => 'WooCommerce SEO', + ), +); + +if ( class_exists( 'WPSEO_Premium' ) ) { + $extensions['seo-premium']->installed = true; +} +if ( class_exists( 'wpseo_Video_Sitemap' ) ) { + $extensions['video-seo']->installed = true; +} +if ( class_exists( 'WPSEO_News' ) ) { + $extensions['news-seo']->installed = true; +} +if ( defined( 'WPSEO_LOCAL_VERSION' ) ) { + $extensions['local-seo']->installed = true; +} +if ( ! class_exists( 'Woocommerce' ) ) { + unset( $extensions['woocommerce-seo'] ); +} +elseif ( class_exists( 'Yoast_WooCommerce_SEO' ) ) { + $extensions['woocommerce-seo']->installed = true; +} + +$utm_buy = '#utm_source=wordpress-seo-config&utm_medium=button-buy&utm_campaign=extension-page-banners'; +$utm_info = '#utm_source=wordpress-seo-config&utm_medium=button-info&utm_campaign=extension-page-banners'; + +?> + +
    + +

    + + + +
    +
    +
    + url; + ?> +

    ' . $extension->title . '' ); + ?>

    + +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    + + installed ) : ?> +
    + + title ); + ?> + + + ', + '', + $extension->title + ); + ?> + +

    +
    + + + +
    +

    ' . $yoast_seo_extensions . ''; + + /* translators: %1$s expands to Yoast SEO extensions */ + printf( __( '%1$s to optimize your site even further', 'wordpress-seo' ), $yoast_seo_extensions ); + ?>

    + + + + $extension ) : ?> + url; ?> + +
    + +

    title ); ?>

    + +
      + benefits as $benefit ) : ?> +
    • + +
    + + + installed ) : ?> +
    + + + buy_button ) ? $extension->buy_button : $extension->title; ?> + + + + + + ', + '', + $extension->title + ); + ?> +
    + +
    +
    + +
    +

    ', __( 'This is where you would enter the license keys for one of our premium plugins, should you activate one.', 'wordpress-seo' ), '

    '; + } + else { + do_action( 'wpseo_licenses_forms' ); + } + ?> +
    +
    + + diff --git a/wp-content/plugins/wordpress-seo/admin/pages/metas.php b/wp-content/plugins/wordpress-seo/admin/pages/metas.php new file mode 100644 index 0000000..5d474cb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/metas.php @@ -0,0 +1,63 @@ +admin_header( true, 'wpseo_titles' ); + +$tabs = new WPSEO_Option_Tabs( 'metas' ); +$tabs->add_tab( new WPSEO_Option_Tab( 'general', __( 'General', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'home', __( 'Homepage', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas-homepage' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'post-types', __( 'Post Types', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas-post-types' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'taxonomies', __( 'Taxonomies', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas-taxonomies' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'archives', __( 'Archives', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas-archives' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'other', __( 'Other', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-metas-other' ) ) ); +$tabs->display( $yform, $options ); + +$yform->admin_footer(); + +/** + * Add help tabs + * + * @param array $tabs Current help center tabs. + * + * @return array + */ +function yoast_add_meta_options_help_center_tabs( $tabs ) { + $tabs[] = new WPSEO_Help_Center_Item( + 'basic-help', + __( 'Template explanation', 'wordpress-seo' ), + array( + 'content' => '

    ' . sprintf( __( 'The title & metas settings for %1$s are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo' ), 'Yoast SEO' ) . '

    ' . '

    ' . __( 'Note that not all variables can be used in every template.', 'wordpress-seo' ) . '

    ', + ) + ); + + $tabs[] = new WPSEO_Help_Center_Item( + 'title-vars', + __( 'Basic Variables', 'wordpress-seo' ), + array( + 'content' => '

    ' . __( 'Basic Variables', 'wordpress-seo' ) . '

    ' . WPSEO_Replace_Vars::get_basic_help_texts(), + ) + ); + + $tabs[] = new WPSEO_Help_Center_Item( + 'title-vars-advanced', + __( 'Advanced Variables', 'wordpress-seo' ), + array( + 'content' => '

    ' . __( 'Advanced Variables', 'wordpress-seo' ) . '

    ' . WPSEO_Replace_Vars::get_advanced_help_texts(), + ) + ); + + return $tabs; +} diff --git a/wp-content/plugins/wordpress-seo/admin/pages/network.php b/wp-content/plugins/wordpress-seo/admin/pages/network.php new file mode 100644 index 0000000..5377190 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/network.php @@ -0,0 +1,149 @@ +blogname ) ), 'updated' ); + } + else { + add_settings_error( 'wpseo_ms', 'settings_updated', sprintf( __( 'Blog %s not found.', 'wordpress-seo' ), esc_html( $restoreblog ) ), 'error' ); + } + unset( $restoreblog, $blog ); + } +} + +/* Set up selectbox dropdowns for smaller networks (usability) */ +$use_dropdown = true; +if ( get_blog_count() > 100 ) { + $use_dropdown = false; +} +else { + + if ( function_exists( 'get_sites' ) ) { // WP 4.6+. + $sites = array_map( 'get_object_vars', get_sites( array( 'deleted' => 0 ) ) ); + } + else { + $sites = wp_get_sites( array( 'deleted' => 0 ) ); + } + + if ( is_array( $sites ) && $sites !== array() ) { + $dropdown_input = array( + '-' => __( 'None', 'wordpress-seo' ), + ); + + foreach ( $sites as $site ) { + $dropdown_input[ $site['blog_id'] ] = $site['blog_id'] . ': ' . $site['domain']; + + $blog_states = array(); + if ( $site['public'] === '1' ) { + $blog_states[] = __( 'public', 'wordpress-seo' ); + } + if ( $site['archived'] === '1' ) { + $blog_states[] = __( 'archived', 'wordpress-seo' ); + } + if ( $site['mature'] === '1' ) { + $blog_states[] = __( 'mature', 'wordpress-seo' ); + } + if ( $site['spam'] === '1' ) { + $blog_states[] = __( 'spam', 'wordpress-seo' ); + } + if ( $blog_states !== array() ) { + $dropdown_input[ $site['blog_id'] ] .= ' [' . implode( ', ', $blog_states ) . ']'; + } + } + unset( $site, $blog_states ); + } + else { + $use_dropdown = false; + } + unset( $sites ); +} + +$yform->admin_header( false, 'wpseo_ms' ); + +echo '

    ', __( 'MultiSite Settings', 'wordpress-seo' ), '

    '; +echo '
    '; +wp_nonce_field( 'wpseo-network-settings', '_wpnonce', true, true ); + +/* @internal Important: Make sure the options added to the array here are in line with the options set in the WPSEO_Option_MS::$allowed_access_options property */ +$yform->select( + 'access', + /* translators: %1$s expands to Yoast SEO */ + sprintf( __( 'Who should have access to the %1$s settings', 'wordpress-seo' ), 'Yoast SEO' ), + array( + 'admin' => __( 'Site Admins (default)', 'wordpress-seo' ), + 'superadmin' => __( 'Super Admins only', 'wordpress-seo' ), + ), + 'wpseo_ms' +); + +if ( $use_dropdown === true ) { + $yform->select( + 'defaultblog', + __( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ), + $dropdown_input, + 'wpseo_ms' + ); + echo '

    ' . __( 'Choose the site whose settings you want to use as default for all sites that are added to your network. If you choose \'None\', the normal plugin defaults will be used.', 'wordpress-seo' ) . '

    '; +} +else { + $yform->textinput( 'defaultblog', __( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ), 'wpseo_ms' ); + echo '

    ' . sprintf( __( 'Enter the %sSite ID%s for the site whose settings you want to use as default for all sites that are added to your network. Leave empty for none (i.e. the normal plugin defaults will be used).', 'wordpress-seo' ), '', '' ) . '

    '; +} + echo '

    ' . __( 'Take note:', 'wordpress-seo' ) . ' ' . __( 'Privacy sensitive (FB admins and such), theme specific (title rewrite) and a few very site specific settings will not be imported to new blogs.', 'wordpress-seo' ) . '

    '; + + +echo ''; +echo '
    '; + +echo '

    ' . __( 'Restore site to default settings', 'wordpress-seo' ) . '

    '; +echo '
    '; +wp_nonce_field( 'wpseo-network-restore', '_wpnonce', true, true ); +echo '

    ' . __( 'Using this form you can reset a site to the default SEO settings.', 'wordpress-seo' ) . '

    '; + +if ( $use_dropdown === true ) { + unset( $dropdown_input['-'] ); + $yform->select( + 'restoreblog', + __( 'Site ID', 'wordpress-seo' ), + $dropdown_input, + 'wpseo_ms' + ); +} +else { + $yform->textinput( 'restoreblog', __( 'Blog ID', 'wordpress-seo' ), 'wpseo_ms' ); +} + +echo ''; +echo '
    '; + +$yform->admin_footer( false ); diff --git a/wp-content/plugins/wordpress-seo/admin/pages/social.php b/wp-content/plugins/wordpress-seo/admin/pages/social.php new file mode 100644 index 0000000..0890d45 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/social.php @@ -0,0 +1,23 @@ +admin_header( true, 'wpseo_social' ); + +$tabs = new WPSEO_Option_Tabs( 'social' ); +$tabs->add_tab( new WPSEO_Option_Tab( 'accounts', __( 'Accounts', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-social-accounts' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'facebook', __( 'Facebook', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-social-facebook' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'twitterbox', __( 'Twitter', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-social-twitter' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'pinterest', __( 'Pinterest', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-social-pinterest' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'google', __( 'Google+', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-social-google' ) ) ); +$tabs->display( $yform ); + +$yform->admin_footer(); diff --git a/wp-content/plugins/wordpress-seo/admin/pages/tools.php b/wp-content/plugins/wordpress-seo/admin/pages/tools.php new file mode 100644 index 0000000..dd71799 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/tools.php @@ -0,0 +1,88 @@ +admin_header( false ); + +if ( '' === $tool_page ) { + + $tools = array( + 'bulk-editor' => array( + 'title' => __( 'Bulk editor', 'wordpress-seo' ), + 'desc' => __( 'This tool allows you to quickly change titles and descriptions of your posts and pages without having to go into the editor for each page.', 'wordpress-seo' ), + ), + 'import-export' => array( + 'title' => __( 'Import and Export', 'wordpress-seo' ), + 'desc' => __( 'Import settings from other SEO plugins and export your settings for re-use on (another) blog.', 'wordpress-seo' ), + ), + ); + if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) { + $tools['file-editor'] = array( + 'title' => __( 'File editor', 'wordpress-seo' ), + 'desc' => __( 'This tool allows you to quickly change important files for your SEO, like your robots.txt and, if you have one, your .htaccess file.', 'wordpress-seo' ), + ); + } + + /* + Temporary disabled. See: https://github.com/Yoast/wordpress-seo/issues/4532 + + $tools['recalculate'] = array( + 'href' => '#TB_inline?width=300&height=150&inlineId=wpseo_recalculate', + 'attr' => "id='wpseo_recalculate_link' class='thickbox'", + 'title' => __( 'Recalculate SEO scores', 'wordpress-seo' ), + 'desc' => __( 'Recalculate SEO scores for all pieces of content with a focus keyword.', 'wordpress-seo' ), + ); + + if ( filter_input( INPUT_GET, 'recalculate' ) === '1' ) { + $tools['recalculate']['attr'] .= "data-open='open'"; + } + */ + + /* translators: %1$s expands to Yoast SEO */ + echo '

    ', sprintf( __( '%1$s comes with some very powerful built-in tools:', 'wordpress-seo' ), 'Yoast SEO' ), '

    '; + + asort( $tools ); + + echo '
      '; + + $admin_url = admin_url( 'admin.php?page=wpseo_tools' ); + + foreach ( $tools as $slug => $tool ) { + $href = ( ! empty( $tool['href'] ) ) ? $admin_url . $tool['href'] : add_query_arg( array( 'tool' => $slug ) , $admin_url ); + $attr = ( ! empty( $tool['attr'] ) ) ? $tool['attr'] : ''; + + echo '
    • '; + echo '', esc_html( $tool['title'] ), '
      '; + echo $tool['desc']; + echo '
    • '; + } + echo '
    '; + + echo ''; + +} +else { + echo '', __( '« Back to Tools page', 'wordpress-seo' ), ''; + + $tool_pages = array( 'bulk-editor', 'import-export' ); + + if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) { + $tool_pages[] = 'file-editor'; + } + + if ( in_array( $tool_page, $tool_pages ) ) { + require_once WPSEO_PATH . 'admin/views/tool-' . $tool_page . '.php'; + } +} + +$yform->admin_footer( false ); diff --git a/wp-content/plugins/wordpress-seo/admin/pages/xml-sitemaps.php b/wp-content/plugins/wordpress-seo/admin/pages/xml-sitemaps.php new file mode 100644 index 0000000..192f8e5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/pages/xml-sitemaps.php @@ -0,0 +1,52 @@ + whomever] check for other sitemap plugins which may conflict ? + * @todo - [JRF => whomever] check for existance of .xls rewrite rule in .htaccess from + * google-sitemaps-plugin/generator and remove as it will cause errors for our sitemaps + * (or inform the user and disallow enabling of sitemaps ) + * @todo - [JRF => whomever] check if anything along these lines is already being done + */ + + +if ( ! defined( 'WPSEO_VERSION' ) ) { + header( 'Status: 403 Forbidden' ); + header( 'HTTP/1.1 403 Forbidden' ); + exit(); +} + +$yform = Yoast_Form::get_instance(); +$yform->admin_header( true, 'wpseo_xml' ); + +$options = get_option( 'wpseo_xml' ); + +echo '
    '; +$yform->light_switch( 'enablexmlsitemap', __( 'XML sitemap functionality', 'wordpress-seo' ) ); + +$tabs = new WPSEO_Option_Tabs( 'sitemaps' ); +$tabs->add_tab( new WPSEO_Option_Tab( 'general', __( 'General', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps' ) ) ); + +$title_options = WPSEO_Options::get_option( 'wpseo_titles' ); + +if ( empty( $title_options['disable-author'] ) ) { + $tabs->add_tab( new WPSEO_Option_Tab( 'user-sitemap', __( 'User sitemap', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-user-sitemap' ) ) ); +} + +$tabs->add_tab( new WPSEO_Option_Tab( 'post-types', __( 'Post Types', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-post-types' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'exclude-post', __( 'Excluded Posts', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-exclude-post' ) ) ); +$tabs->add_tab( new WPSEO_Option_Tab( 'taxonomies', __( 'Taxonomies', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-taxonomies' ) ) ); + +echo '
    '; +$tabs->display( $yform, $options ); +echo '
    '; + + +/** + * Fires at the end of XML Sitemaps configuration form. + */ +do_action( 'wpseo_xmlsitemaps_config' ); + +$yform->admin_footer(); diff --git a/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-posts.php b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-posts.php new file mode 100644 index 0000000..bf7b072 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-posts.php @@ -0,0 +1,149 @@ +save_score( $score ); + } + } + + /** + * Save the score. + * + * @param array $score The score to save. + */ + protected function save_score( array $score ) { + WPSEO_Meta::set_value( 'linkdex', $score['score'], $score['item_id'] ); + } + + /** + * Get the posts from the database by doing a WP_Query. + * + * @param integer $paged The page. + * + * @return string + */ + protected function get_items( $paged ) { + $items_per_page = max( 1, $this->items_per_page ); + $post_query = new WP_Query( + array( + 'post_type' => 'any', + 'meta_key' => '_yoast_wpseo_focuskw', + 'posts_per_page' => $items_per_page, + 'paged' => $paged, + ) + ); + + return $post_query->get_posts(); + } + + /** + * Map the posts to a response array + * + * @param WP_Post $item The post for which to build the analyzer data. + * + * @return array + */ + protected function item_to_response( $item ) { + $focus_keyword = WPSEO_Meta::get_value( 'focuskw', $item->ID ); + + $content = $item->post_content; + + // Check if there's a featured image. + $content .= $this->add_featured_image( $item ); + + /** + * Filter the post content for use in the SEO score recalculation. + * + * @param string $content Content of the post. Modify to reflect front-end content. + * @param WP_Post $item The Post object the content comes from. + */ + $content = apply_filters( 'wpseo_post_content_for_recalculation', $content, $item ); + + // Apply shortcodes. + $content = do_shortcode( $content ); + + return array( + 'post_id' => $item->ID, + 'text' => $content, + 'keyword' => $focus_keyword, + 'url' => urldecode( $item->post_name ), + 'pageTitle' => apply_filters( 'wpseo_title', wpseo_replace_vars( $this->get_title( $item->ID, $item->post_type ), $item ) ), + 'meta' => apply_filters( 'wpseo_metadesc', wpseo_replace_vars( $this->get_meta_description( $item->ID, $item->post_type ), $item ) ), + 'keyword_usage' => array( + $focus_keyword => WPSEO_Meta::keyword_usage( $focus_keyword, $item->ID ), + ), + ); + } + + /** + * Get the title for given post + * + * @param integer $post_id The ID of the post for which to get the title. + * @param string $post_type The post type. + * + * @return mixed|string + */ + private function get_title( $post_id, $post_type ) { + $title = WPSEO_Meta::get_value( 'title', $post_id ); + if ( '' !== $title ) { + return $title; + } + + $default_from_options = $this->default_from_options( 'title-tax', $post_type ); + if ( false !== $default_from_options ) { + return str_replace( ' %%page%% ', ' ', $default_from_options ); + } + + return '%%title%%'; + } + + /** + * Get the meta description for given post + * + * @param integer $post_id The ID of the post for which to get the meta description. + * @param string $post_type The post type. + * + * @return bool|string + */ + private function get_meta_description( $post_id, $post_type ) { + $meta_description = WPSEO_Meta::get_value( 'metadesc', $post_id ); + if ( '' !== $meta_description ) { + return $meta_description; + } + + $default_from_options = $this->default_from_options( 'metadesc', $post_type ); + if ( false !== $default_from_options ) { + return $default_from_options; + } + + return ''; + } + + /** + * Retrieves the associated featured image if there is one present. + * + * @param WP_Post $item The post item to check for a featured image. + * + * @return string The image string. + */ + private function add_featured_image( $item ) { + if ( ! has_post_thumbnail( $item->ID ) ) { + return ''; + } + + return ' ' . get_the_post_thumbnail( $item->ID ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-terms.php b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-terms.php new file mode 100644 index 0000000..6f3111e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-terms.php @@ -0,0 +1,149 @@ +items_per_page ); + + return get_terms( + get_taxonomies(), + array( + 'hide_empty' => false, + 'number' => $items_per_page, + 'offset' => $items_per_page * abs( $paged - 1 ), + ) + ); + } + + /** + * Convert the given term into a analyzable object. + * + * @param mixed $item The term for which to build the analyzer data. + * + * @return array + */ + protected function item_to_response( $item ) { + $focus_keyword = $this->get_focus_keyword( $item ); + $title = str_replace( ' %%page%% ', ' ', $this->get_title( $item ) ); + $meta = $this->get_meta_description( $item ); + + $description = $item->description; + + /** + * Filter the term description for recalculation. + * + * @param string $description Content of the term. Modify to reflect front-end content. + * @oaram WP_Term $item The term the description comes from. + */ + $description = apply_filters( 'wpseo_term_description_for_recalculation', $description, $item ); + + return array( + 'term_id' => $item->term_id, + 'taxonomy' => $item->taxonomy, + 'text' => $description, + 'keyword' => $focus_keyword, + 'url' => urldecode( $item->slug ), + 'pageTitle' => apply_filters( 'wpseo_title', wpseo_replace_vars( $title, $item, array( 'page' ) ) ), + 'meta' => apply_filters( 'wpseo_metadesc', wpseo_replace_vars( $meta, $item ) ), + 'keyword_usage' => array( + $focus_keyword => WPSEO_Taxonomy_Meta::get_keyword_usage( $focus_keyword, $item->term_id, $item->taxonomy ), + ), + ); + } + + /** + * Gets the focus keyword for the term + * + * @param stdClass|WP_Term $term Term to determine the keyword for. + * + * @return bool|string + */ + private function get_focus_keyword( $term ) { + $focus_keyword = WPSEO_Taxonomy_Meta::get_term_meta( 'focuskw', $term->term_id, $term->taxonomy ); + if ( ! empty( $focus_keyword ) ) { + return $focus_keyword; + } + + return $term->name; + } + + /** + * Get the title for given term + * + * @param stdClass|WP_Term $term The term object. + * + * @return mixed|string + */ + private function get_title( $term ) { + $title = WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $term->taxonomy, 'title' ); + if ( '' !== $title ) { + return $title; + } + + $default_from_options = $this->default_from_options( 'title-tax', $term->taxonomy ); + if ( false !== $default_from_options ) { + return $default_from_options; + } + + return '%%title%%'; + } + + /** + * Get the meta description for given post + * + * @param stdClass|WP_Term $term The term object. + * + * @return bool|string + */ + private function get_meta_description( $term ) { + $meta_description = WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $term->taxonomy, 'desc' ); + if ( '' !== $meta_description ) { + return $meta_description; + } + + $default_from_options = $this->default_from_options( 'metadesc-tax', $term->taxonomy ); + if ( false !== $default_from_options ) { + return $default_from_options; + } + + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate.php b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate.php new file mode 100644 index 0000000..372d2c0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate.php @@ -0,0 +1,107 @@ +options = WPSEO_Options::get_all(); + + $items = $this->get_items( $paged ); + + $return['items'] = $this->parse_items( $items ); + $return['total_items'] = count( $items ); + + if ( $return['total_items'] >= $this->items_per_page ) { + $return['next_page'] = ( $paged + 1 ); + } + + return $return; + } + + /** + * Parse the posts|terms with the value we need + * + * @param array $items The items to parse. + * + * @return array + */ + protected function parse_items( array $items ) { + $return = array(); + foreach ( $items as $item ) { + $response = $this->item_to_response( $item ); + if ( ! empty( $response ) ) { + $return[] = $response; + } + } + + return $return; + } + + /** + * Get default from the options for given field + * + * @param string $field The field for which to get the default options. + * @param string $suffix The post type. + * + * @return bool|string + */ + protected function default_from_options( $field, $suffix ) { + $target_option_field = $field . '-' . $suffix; + if ( ! empty( $this->options[ $target_option_field ] ) ) { + return $this->options[ $target_option_field ]; + } + + return false; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php new file mode 100644 index 0000000..60540f6 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php @@ -0,0 +1,249 @@ +taxonomy = $this->get_taxonomy(); + + if ( ! empty( $this->taxonomy ) ) { + add_filter( 'manage_edit-' . $this->taxonomy . '_columns', array( $this, 'add_columns' ) ); + add_filter( 'manage_' . $this->taxonomy . '_custom_column', array( $this, 'parse_column' ), 10, 3 ); + } + + $this->analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + $this->analysis_readability = new WPSEO_Metabox_Analysis_Readability(); + } + + /** + * Adds an SEO score column to the terms table, right after the description column. + * + * @param array $columns Current set columns. + * + * @return array + */ + public function add_columns( array $columns ) { + + if ( $this->is_metabox_hidden() === true ) { + return $columns; + } + + $new_columns = array(); + + foreach ( $columns as $column_name => $column_value ) { + $new_columns[ $column_name ] = $column_value; + + if ( $column_name === 'description' && $this->analysis_seo->is_enabled() ) { + $new_columns['wpseo_score'] = __( 'SEO', 'wordpress-seo' ); + } + + if ( $column_name === 'description' && $this->analysis_readability->is_enabled() ) { + $new_columns['wpseo_score_readability'] = __( 'Readability', 'wordpress-seo' ); + } + } + + return $new_columns; + } + + /** + * Parses the column. + * + * @param string $content The current content of the column. + * @param string $column_name The name of the column. + * @param integer $term_id ID of requested taxonomy. + * + * @return string + */ + public function parse_column( $content, $column_name, $term_id ) { + + switch ( $column_name ) { + case 'wpseo_score': + return $this->get_score_value( $term_id ); + + break; + + case 'wpseo_score_readability': + return $this->get_score_readability_value( $term_id ); + break; + } + + return $content; + } + + + /** + * Returns the posted/get taxonomy value if it is set. + * + * @return string|null + */ + private function get_taxonomy() { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX === true ) { + return FILTER_INPUT( INPUT_POST, 'taxonomy' ); + } + + return FILTER_INPUT( INPUT_GET, 'taxonomy' ); + } + + /** + * Parses the value for the score column. + * + * @param integer $term_id ID of requested term. + * + * @return string + */ + private function get_score_value( $term_id ) { + $term = get_term( $term_id, $this->taxonomy ); + + // When the term isn't indexable. + if ( ! $this->is_indexable( $term ) ) { + return $this->create_score_icon( + new WPSEO_Rank( WPSEO_Rank::NO_INDEX ), + __( 'Term is set to noindex.', 'wordpress-seo' ) + ); + } + + // When there is a focus key word. + if ( $focus_keyword = $this->get_focus_keyword( $term ) ) { + $score = (int) WPSEO_Taxonomy_Meta::get_term_meta( $term_id, $this->taxonomy, 'linkdex' ); + $rank = WPSEO_Rank::from_numeric_score( $score ); + + return $this->create_score_icon( $rank, $rank->get_label() ); + } + + // Default icon. + return $this->create_score_icon( + new WPSEO_Rank( WPSEO_Rank::NO_FOCUS ), + __( 'Focus keyword not set.', 'wordpress-seo' ) + ); + } + + /** + * Parses the value for the readability score column. + * + * @param int $term_id ID of the requested term. + * + * @return string The HTML for the readability score indicator. + */ + private function get_score_readability_value( $term_id ) { + $score = (int) WPSEO_Taxonomy_Meta::get_term_meta( $term_id, $this->taxonomy, 'content_score' ); + $rank = WPSEO_Rank::from_numeric_score( $score ); + + return $this->create_score_icon( $rank ); + } + + /** + * Creates an icon by the given values. + * + * @param WPSEO_Rank $rank The ranking object. + * @param string $title Optional. The title to show. Defaults to the rank label. + * + * @return string The HTML for a score icon. + */ + private function create_score_icon( WPSEO_Rank $rank, $title = '' ) { + if ( empty( $title ) ) { + $title = $rank->get_label(); + } + + return '' . $title . ''; + } + + /** + * Check if the taxonomy is indexable. + * + * @param mixed $term The current term. + * + * @return bool + */ + private function is_indexable( $term ) { + static $options; + + // Saving the options once, because it's static. + if ( $options === null ) { + $options = WPSEO_Options::get_all(); + } + + // When the no_index value is not empty and not default, check if its value is index. + $no_index = WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $this->taxonomy, 'noindex' ); + if ( ! empty( $no_index ) && $no_index !== 'default' ) { + return ( $no_index === 'index' ); + } + + // Check if the default for taxonomy is empty (this will be index). + $no_index_key = 'noindex-tax-' . $term->taxonomy; + if ( is_object( $term ) && ( isset( $options[ $no_index_key ] ) ) ) { + return ( empty( $options[ $no_index_key ] ) ); + } + + return true; + } + + /** + * Returns the focus keyword if this is set, otherwise it will give the term name. + * + * @param stdClass|WP_Term $term The current term. + * + * @return string + */ + private function get_focus_keyword( $term ) { + if ( $focus_keyword = WPSEO_Taxonomy_Meta::get_term_meta( 'focuskw', $term->term_id, $term->taxonomy ) ) { + return $focus_keyword; + } + + return $term->name; + } + + /** + * Checks if a taxonomy is being added via a POST method. If not, it defaults to a GET request. + * + * @return int + */ + private function get_taxonomy_input_type() { + + if ( ! empty( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) { + return INPUT_POST; + } + + return INPUT_GET; + } + + /** + * Test whether the metabox should be hidden either by choice of the admin + * + * @since 3.1 + * + * @param string $taxonomy (optional) The post type to test, defaults to the current post post_type. + * + * @return bool Whether or not the meta box (and associated columns etc) should be hidden + */ + private function is_metabox_hidden( $taxonomy = null ) { + $get_taxonomy_type = filter_input( $this->get_taxonomy_input_type(), 'taxonomy' ); + + if ( ! isset( $taxonomy ) && $get_taxonomy_type ) { + $taxonomy = sanitize_text_field( $get_taxonomy_type ); + } + + if ( isset( $taxonomy ) ) { + // Don't make static as taxonomies may still be added during the run. + $custom_taxonomies = get_taxonomies( array( 'public' => true ), 'names' ); + $options = get_option( 'wpseo_titles' ); + + return ( ( isset( $options[ 'hideeditbox-tax-' . $taxonomy ] ) && $options[ 'hideeditbox-tax-' . $taxonomy ] === true ) || in_array( $taxonomy, $custom_taxonomies ) === false ); + } + + return false; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-content-fields.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-content-fields.php new file mode 100644 index 0000000..7b2ed02 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-content-fields.php @@ -0,0 +1,73 @@ + $this->get_field_config( + __( 'Snippet editor', 'wordpress-seo' ), + '', + 'snippetpreview', + array( + 'help-button' => __( 'Show information about the snippet editor', 'wordpress-seo' ), + 'help' => sprintf( __( 'This is a rendering of what this post might look like in Google\'s search results. %sLearn more about the Snippet Preview%s.', 'wordpress-seo' ), '', '' ), + ) + ), + 'focuskw' => $this->get_field_config( + __( 'Focus keyword', 'wordpress-seo' ), + '', + 'focuskeyword', + array( + 'help-button' => __( 'Show information about the focus keyword', 'wordpress-seo' ), + 'help' => sprintf( __( 'Pick the main keyword or keyphrase that this post/page is about. %sLearn more about the Focus Keyword%s.', 'wordpress-seo' ), '', '' ), + ) + ), + 'analysis' => $this->get_field_config( + __( 'Analysis', 'wordpress-seo' ), + '', + 'pageanalysis', + array( + 'help-button' => __( 'Show information about the content analysis', 'wordpress-seo' ), + 'help' => sprintf( __( 'This is the content analysis, a collection of content checks that analyze the content of your page. %sLearn more about the Content Analysis Tool%s.', 'wordpress-seo' ), '', '' ), + ) + ), + 'title' => $this->get_field_config( + '', + '', + 'hidden', + '' + ), + 'desc' => $this->get_field_config( + '', + '', + 'hidden', + '' + ), + 'linkdex' => $this->get_field_config( + '', + '', + 'hidden', + '' + ), + 'content_score' => $this->get_field_config( + '', + '', + 'hidden', + '' + ), + ); + + return $this->filter_hidden_fields( $fields ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php new file mode 100644 index 0000000..0e07097 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php @@ -0,0 +1,230 @@ +tax_meta = WPSEO_Taxonomy_Meta::get_term_meta( (int) $term->term_id, $term->taxonomy ); + } + + /** + * Displaying the form fields + * + * @param array $fields Array with the fields that will be displayed. + */ + public function html( array $fields ) { + $content = ''; + foreach ( $fields as $field_name => $field_configuration ) { + $content .= $this->form_row( 'wpseo_' . $field_name, $field_configuration ); + } + return $content; + } + + /** + * Create a row in the form table. + * + * @param string $field_name Variable the row controls. + * @param array $field_configuration Array with the field configuration. + */ + private function form_row( $field_name, array $field_configuration ) { + $esc_field_name = esc_attr( $field_name ); + + $options = (array) $field_configuration['options']; + + if ( ! empty( $field_configuration['description'] ) ) { + $options['description'] = $field_configuration['description']; + } + + $label = $this->get_label( $field_configuration['label'], $esc_field_name ); + $field = $this->get_field( $field_configuration['type'], $esc_field_name, $this->get_field_value( $field_name ), $options ); + $help_content = isset( $field_configuration['options']['help'] ) ? $field_configuration['options']['help'] : ''; + $help_button_text = isset( $field_configuration['options']['help-button'] ) ? $field_configuration['options']['help-button'] : ''; + $help = new WPSEO_Admin_Help_Panel( $field_name, $help_button_text, $help_content ); + + if ( in_array( $field_configuration['type'], array( 'focuskeyword', 'pageanalysis', 'snippetpreview' ) ) ) { + return $this->parse_section_row( $field, $field_configuration['type'], $help ); + } + + return $this->parse_row( $label, $help, $field ); + } + + /** + * Generates the html for the given field config. + * + * @param string $field_type The fieldtype, e.g: text, checkbox, etc. + * @param string $field_name The name of the field. + * @param string $field_value The value of the field. + * @param array $options Array with additional options. + * + * @return string + */ + private function get_field( $field_type, $field_name, $field_value, array $options ) { + + $class = $this->get_class( $options ); + $field = $description = $aria_describedby = ''; + + if ( ! empty( $options['description'] ) ) { + $aria_describedby = ' aria-describedby="' . $field_name . '-desc"'; + $description = '

    ' . $options['description'] . '

    '; + } + + switch ( $field_type ) { + case 'div' : + $field .= '
    '; + break; + + case 'snippetpreview': + $field .= '
    '; + break; + case 'pageanalysis' : + $field .= '
    '; + $field .= '
    '; + $field .= '

    ' . __( 'Analysis', 'wordpress-seo' ) .'

    '; + $field .= '
    '; + $field .= '
    '; + $field .= '
    '; + break; + case 'focuskeyword': + $field .= '
    '; + $field .= '
    '; + $field .= '

    ' . __( 'Focus keyword', 'wordpress-seo' ) . '

    '; + $field .= ''; + $field .= '
    '; + $field .= '
    '; + $field .= '
    '; + break; + case 'text' : + $field .= ''; + break; + case 'checkbox' : + $field .= ''; + break; + case 'textarea' : + $rows = 3; + if ( ! empty( $options['rows'] ) ) { + $rows = $options['rows']; + } + $field .= ''; + break; + case 'upload' : + $field .= ''; + $field .= ''; + break; + case 'select' : + if ( is_array( $options ) && $options !== array() ) { + $field .= ''; + } + break; + case 'hidden' : + $field .= ''; + break; + } + + return $field . $description; + } + + /** + * Getting the value for given field_name + * + * @param string $field_name The fieldname to get the value for. + * + * @return string + */ + private function get_field_value( $field_name ) { + if ( isset( $this->tax_meta[ $field_name ] ) && $this->tax_meta[ $field_name ] !== '' ) { + return $this->tax_meta[ $field_name ]; + } + + return ''; + } + + /** + * Getting the class attributes if $options contains a class key + * + * @param array $options The array with field options. + * + * @return string + */ + private function get_class( array $options ) { + if ( ! empty( $options['class'] ) ) { + return ' class="' . esc_attr( $options['class'] ) . '"'; + } + + return ''; + } + + /** + * Getting the label HTML + * + * @param string $label The label value. + * @param string $field_name The target field. + * + * @return string + */ + private function get_label( $label, $field_name ) { + if ( $label !== '' ) { + return ''; + } + + return ''; + } + + /** + * Returns the HTML for the row which contains label, help and the field. + * + * @param string $label The html for the label if there was a label set. + * @param WPSEO_Admin_Help_Panel $help The help panel to render in this row. + * @param string $field The html for the field. + * + * @return string + */ + private function parse_row( $label, WPSEO_Admin_Help_Panel $help, $field ) { + if ( $label !== '' || $help !== '' ) { + return '' . $label . $help->get_button_html() . '' . $help->get_panel_html() . $field . ''; + } + + return $field; + } + + /** + * Creates a sections specific row. + * + * @param string $content The content to show. + * @param string $esc_form_key Escaped form key name. + * @param WPSEO_Admin_Help_Panel $help The help button. + * + * @return string + */ + private function parse_section_row( $content, $esc_form_key, WPSEO_Admin_Help_Panel $help ) { + $html = ''; + $html .= $content; + $html .= '
    ' . $help->get_button_html() . $help->get_panel_html() . '
    '; + $html .= ''; + return $html; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php new file mode 100644 index 0000000..2fdafbd --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php @@ -0,0 +1,91 @@ +term = $term; + if ( $options !== null ) { + $this->options = $options; + } + else { + $this->options = WPSEO_Options::get_options( array( + 'wpseo_titles', + 'wpseo_internallinks', + 'wpseo_social', + ) ); + } + } + + /** + * This method should return the fields + * + * @return array + */ + abstract public function get(); + + /** + * Returns array with the field data + * + * @param string $label The label displayed before the field. + * @param string $description Description which will explain the field. + * @param string $type The field type, for example: input, select. + * @param string|array $options Optional. Array with additional options. + * @param bool $hide Should the field be hidden. + * + * @return array + */ + protected function get_field_config( $label, $description, $type = 'text', $options = '', $hide = false ) { + return array( + 'label' => $label, + 'description' => $description, + 'type' => $type, + 'options' => $options, + 'hide' => $hide, + ); + } + + /** + * Filter the hidden fields. + * + * @param array $fields Array with the form fields that has will be filtered. + * + * @return array + */ + protected function filter_hidden_fields( array $fields ) { + foreach ( $fields as $field_name => $field_options ) { + if ( ! empty( $field_options['hide'] ) ) { + unset( $fields[ $field_name ] ); + } + } + + return $fields; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php new file mode 100644 index 0000000..23de846 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php @@ -0,0 +1,410 @@ +term = $term; + $this->taxonomy = $taxonomy; + $this->taxonomy_tab_content = new WPSEO_Taxonomy_Fields_Presenter( $this->term ); + + add_action( 'admin_footer', array( $this, 'template_generic_tab' ) ); + add_action( 'admin_footer', array( $this, 'template_keyword_tab' ) ); + } + + /** + * Shows the Yoast SEO metabox for the term. + */ + public function display() { + + $content_sections = $this->get_content_sections(); + + $product_title = 'Yoast SEO'; + if ( file_exists( WPSEO_PATH . 'premium/' ) ) { + $product_title .= ' Premium'; + } + + printf( '

    %1$s

    ', $product_title ); + + echo '
    '; + + $helpcenter_tab = new WPSEO_Option_Tab( 'tax-metabox', 'Meta box', + array( 'video_url' => 'https://yoa.st/metabox-taxonomy-screencast' ) ); + + $helpcenter = new WPSEO_Help_Center( 'tax-metabox', $helpcenter_tab ); + $helpcenter->output_help_center(); + + echo '
    '; + + if ( ! defined( 'WPSEO_PREMIUM_FILE' ) ) { + echo $this->get_buy_premium_link(); + } + + echo '
      '; + + foreach ( $content_sections as $content_section ) { + if ( $content_section->name === 'premium' ) { + continue; + } + + $content_section->display_link(); + } + + echo '
    '; + + foreach ( $content_sections as $content_section ) { + $content_section->display_content(); + } + echo '
    '; + } + + /** + * Returns the relevant metabox sections for the current view. + * + * @return WPSEO_Metabox_Section[] + */ + private function get_content_sections() { + $content_sections = array( + $this->get_content_meta_section(), + $this->get_social_meta_section(), + $this->get_settings_meta_section(), + ); + + if ( ! defined( 'WPSEO_PREMIUM_FILE' ) ) { + $content_sections[] = $this->get_buy_premium_section(); + } + + return $content_sections; + } + + /** + * Returns the metabox section for the content analysis. + * + * @return WPSEO_Metabox_Section + */ + private function get_content_meta_section() { + $taxonomy_content_fields = new WPSEO_Taxonomy_Content_Fields( $this->term ); + $content = $this->taxonomy_tab_content->html( $taxonomy_content_fields->get() ); + + $tab = new WPSEO_Metabox_Form_Tab( + 'content', + $content, + __( '', 'wordpress-seo' ), + array( + 'tab_class' => 'yoast-seo__remove-tab', + ) + ); + + return new WPSEO_Metabox_Tab_Section( + 'content', + '' . __( 'Content optimization', 'wordpress-seo' ) . '' . $this->traffic_light_svg() . '', + array( $tab ), + array( + 'link_aria_label' => __( 'Content optimization', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns the metabox section for the settings. + * + * @return WPSEO_Metabox_Section + */ + private function get_settings_meta_section() { + $taxonomy_settings_fields = new WPSEO_Taxonomy_Settings_Fields( $this->term ); + $content = $this->taxonomy_tab_content->html( $taxonomy_settings_fields->get() ); + + $tab = new WPSEO_Metabox_Form_Tab( + 'settings', + $content, + __( 'Settings', 'wordpress-seo' ), + array( + 'single' => true, + ) + ); + + return new WPSEO_Metabox_Tab_Section( + 'settings', + '' . __( 'Settings', 'wordpress-seo' ) . '', + array( $tab ), + array( + 'link_aria_label' => __( 'Settings', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns the metabox section for the social settings. + * + * @return WPSEO_Metabox_Section + */ + private function get_social_meta_section() { + $options = WPSEO_Options::get_option( 'wpseo_social' ); + $taxonomy_social_fields = new WPSEO_Taxonomy_Social_Fields( $this->term ); + + $tabs = array(); + $single = true; + + if ( $options['opengraph'] === true && $options['twitter'] === true ) { + $single = null; + } + + if ( $options['opengraph'] === true ) { + $facebook_meta_fields = $taxonomy_social_fields->get_by_network( 'opengraph' ); + + $tabs[] = new WPSEO_Metabox_Form_Tab( + 'facebook', + $this->taxonomy_tab_content->html( $facebook_meta_fields ), + '' . __( 'Facebook / Open Graph metadata', 'wordpress-seo' ) . '', + array( + 'link_aria_label' => __( 'Facebook / Open Graph metadata', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-se', + 'single' => $single, + ) + ); + } + + if ( $options['twitter'] === true ) { + $twitter_meta_fields = $taxonomy_social_fields->get_by_network( 'twitter' ); + + $tabs[] = new WPSEO_Metabox_Form_Tab( + 'twitter', + $this->taxonomy_tab_content->html( $twitter_meta_fields ), + '' . __( 'Twitter metadata', 'wordpress-seo' ) . '', + array( + 'link_aria_label' => __( 'Twitter metadata', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-se', + 'single' => $single, + ) + ); + } + + return new WPSEO_Metabox_Tab_Section( + 'social', + '' . __( 'Social', 'wordpress-seo' ) . '', + $tabs, + array( + 'link_aria_label' => __( 'Social', 'wordpress-seo' ), + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Returns a link to activate the Buy Premium tab. + * + * @return string + */ + private function get_buy_premium_link() { + return sprintf( "", + 'wpseo-metabox-buy-premium', + __( 'Go Premium', 'wordpress-seo' ) + ); + } + + /** + * Returns the metabox section for the Premium section.. + * + * @return WPSEO_Metabox_Section + */ + private function get_buy_premium_section() { + $content = sprintf( "
    + %s +
      +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    • + %s - %s +
    • +
    + + + %s + + +

    %s

    +
    ", + /* translators: %1$s expands to Yoast SEO Premium. */ + sprintf( __( 'You\'re not getting the benefits of %1$s yet. If you had %1$s, you could use its awesome features:', 'wordpress-seo' ), 'Yoast SEO Premium' ), + __( 'Redirect manager', 'wordpress-seo' ), + __( 'Create and manage redirects within your WordPress install.', 'wordpress-seo' ), + __( 'Multiple focus keywords', 'wordpress-seo' ), + __( 'Optimize a single post for up to 5 keywords.', 'wordpress-seo' ), + __( 'Social Previews', 'wordpress-seo' ), + __( 'Check what your Facebook or Twitter post will look like.', 'wordpress-seo' ), + __( 'Premium support', 'wordpress-seo' ), + __( 'Gain access to our 24/7 support team.', 'wordpress-seo' ), + 'https://yoa.st/pe-buy-premium', + /* translators: %s expands to Yoast SEO Premium. */ + sprintf( __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ), + 'https://yoa.st/pe-premium-page', + __( 'More info', 'wordpress-seo' ) + ); + + $tab = new WPSEO_Metabox_Form_Tab( + 'premium', + $content, + 'Yoast SEO Premium', + array( + 'single' => true, + ) + ); + + return new WPSEO_Metabox_Tab_Section( + 'premium', + '', + array( $tab ), + array( + 'link_aria_label' => 'Yoast SEO Premium', + 'link_class' => 'yoast-tooltip yoast-tooltip-e', + ) + ); + } + + /** + * Test whether we are on a public taxonomy - no metabox actions needed if we are not + * Unfortunately we have to hook most everything in before the point where all taxonomies are registered and + * we know which taxonomy is being requested, so we need to use this check in nearly every hooked in function. + * + * @since 1.5.0 + */ + private function tax_is_public() { + // Don't make static as taxonomies may still be added during the run. + $taxonomy = get_taxonomy( $this->taxonomy ); + + return $taxonomy->public; + } + + /** + * Return the SVG for the traffic light in the metabox. + */ + public function traffic_light_svg() { + return << + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SVG; + } + + /** + * Generic tab. + */ + public function template_generic_tab() { + // This template belongs to the post scraper so don't echo it if it isn't enqueued. + if ( ! wp_script_is( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper' ) ) { + return; + } + + echo ''; + } + + /** + * Keyword tab for enabling analysis of multiple keywords. + */ + public function template_keyword_tab() { + // This template belongs to the term scraper so don't echo it if it isn't enqueued. + if ( ! wp_script_is( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper' ) ) { + return; + } + + echo ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-settings-fields.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-settings-fields.php new file mode 100644 index 0000000..c83377f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-settings-fields.php @@ -0,0 +1,121 @@ +translate_meta_options(); + } + + /** + * Returns array with the fields for the general tab + * + * @return array + */ + public function get() { + $fields = array( + 'metakey' => $this->get_field_config( + __( 'Meta keywords', 'wordpress-seo' ), + esc_html__( 'Meta keywords used on the archive page for this term.', 'wordpress-seo' ), + 'text', + '', + $this->options['usemetakeywords'] !== true + ), + 'noindex' => $this->get_field_config( + esc_html__( 'Meta robots index', 'wordpress-seo' ), + esc_html__( 'This taxonomy follows the indexation rules set under Metas and Titles, you can override it here.', 'wordpress-seo' ), + 'select', + $this->get_noindex_options() + ), + 'sitemap_include' => $this->get_field_config( + esc_html__( 'Include in Sitemap?', 'wordpress-seo' ), + '', + 'select', + $this->sitemap_include_options + ), + 'bctitle' => $this->get_field_config( + __( 'Breadcrumbs Title', 'wordpress-seo' ), + esc_html__( 'The Breadcrumbs Title is used in the breadcrumbs where this taxonomy appears.', 'wordpress-seo' ), + 'text', + '', + $this->options['breadcrumbs-enable'] !== true + ), + 'canonical' => $this->get_field_config( + __( 'Canonical URL', 'wordpress-seo' ), + esc_html__( 'The canonical link is shown on the archive page for this term.', 'wordpress-seo' ) + ), + ); + + return $this->filter_hidden_fields( $fields ); + } + + /** + * Translate options text strings for use in the select fields + * + * @internal IMPORTANT: if you want to add a new string (option) somewhere, make sure you add + * that array key to the main options definition array in the class WPSEO_Taxonomy_Meta() as well!!!! + */ + private function translate_meta_options() { + $this->no_index_options = WPSEO_Taxonomy_Meta::$no_index_options; + $this->sitemap_include_options = WPSEO_Taxonomy_Meta::$sitemap_include_options; + + /* translators: %s expands to the current taxonomy index value */ + $this->no_index_options['default'] = __( 'Default for this taxonomy type, currently: %s', 'wordpress-seo' ); + $this->no_index_options['index'] = __( 'Index', 'wordpress-seo' ); + $this->no_index_options['noindex'] = __( 'Noindex', 'wordpress-seo' ); + + $this->sitemap_include_options['-'] = __( 'Auto detect', 'wordpress-seo' ); + $this->sitemap_include_options['always'] = __( 'Always include', 'wordpress-seo' ); + $this->sitemap_include_options['never'] = __( 'Never include', 'wordpress-seo' ); + } + + /** + * Getting the data for the noindex fields + * + * @return array + */ + private function get_noindex_options() { + $noindex_options['options'] = $this->no_index_options; + $noindex_options['options']['default'] = sprintf( $noindex_options['options']['default'], $this->get_robot_index() ); + + if ( get_option( 'blog_public' ) === '0' ) { + $noindex_options['description'] = '
    ' . esc_html__( 'Warning: even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won\'t have an effect.', 'wordpress-seo' ) . ''; + } + + return $noindex_options; + } + + /** + * Returns the current robot index value for the taxonomy + * + * @return string + */ + private function get_robot_index() { + $robot_index = 'index'; + $index_option = 'noindex-tax-' . $this->term->taxonomy; + if ( isset( $this->options[ $index_option ] ) && $this->options[ $index_option ] === true ) { + $robot_index = 'noindex'; + } + + return $robot_index; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-social-fields.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-social-fields.php new file mode 100644 index 0000000..4b1eeba --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-social-fields.php @@ -0,0 +1,140 @@ +networks = $this->get_social_networks(); + } + + /** + * When this method returns false, the social tab in the meta box will be hidden + * + * @return bool + */ + public function show_social() { + return ( $this->options['opengraph'] === true || $this->options['twitter'] === true ); + } + + /** + * Gets the social meta fields by social network for the taxonomy. + * + * @param string $network The social network for which to fetch the fields. + * + * @return array + */ + public function get_by_network( $network ) { + $settings = $this->networks[ $network ]; + + return array( + $settings['network'] . '-title' => $this->get_field_config( + /* translators: %s expands to the social network name */ + sprintf( __( '%s Title', 'wordpress-seo' ), $settings['label'] ), + /* translators: %1$s expands to the social network name */ + sprintf( esc_html__( 'If you don\'t want to use the title for sharing on %1$s but instead want another title there, write it here.', 'wordpress-seo' ), $settings['label'] ), + 'text', + array( 'class' => 'large-text' ) + ), + $settings['network'] . '-description' => $this->get_field_config( + /* translators: %s expands to the social network name */ + sprintf( __( '%s Description', 'wordpress-seo' ), $settings['label'] ), + /* translators: %1$s expands to the social network name */ + sprintf( esc_html__( 'If you don\'t want to use the meta description for sharing on %1$s but want another description there, write it here.', 'wordpress-seo' ), $settings['label'] ), + 'textarea' + ), + $settings['network'] . '-image' => $this->get_field_config( + /* translators: %s expands to the social network name */ + sprintf( __( '%s Image', 'wordpress-seo' ), $settings['label'] ), + /* translators: %1$s expands to the social network name */ + sprintf( esc_html__( 'If you want to use an image for sharing on %1$s, you can upload / choose an image or add the image URL here.', 'wordpress-seo' ), $settings['label'] ) . '
    ' . + /* translators: %1$s expands to the social network name, %2$s expands to the image size */ + sprintf( __( 'The recommended image size for %1$s is %2$s pixels.', 'wordpress-seo' ), $settings['label'], $settings['size'] ), + 'upload' + ), + ); + } + + /** + * Returning the fields for the social media tab + * + * @return array + */ + public function get() { + $fields = array(); + foreach ( $this->networks as $option => $settings ) { + $fields_to_push = $this->get_by_network( $option ); + + $fields = array_merge( $fields, $fields_to_push ); + } + + return $this->filter_hidden_fields( $fields ); + } + + /** + * Getting array with the social networks + * + * @return array + */ + private function get_social_networks() { + $social_networks = array( + // Source: https://developers.facebook.com/docs/sharing/best-practices#images. + 'opengraph' => $this->social_network( 'opengraph', __( 'Facebook', 'wordpress-seo' ), sprintf( + /* translators: %1$s expands to the image recommended width, %2$s to its height. */ + __( '%1$s by %2$s', 'wordpress-seo' ), '1200', '630' + ) ), + 'twitter' => $this->social_network( 'twitter', __( 'Twitter', 'wordpress-seo' ), sprintf( + /* translators: %1$s expands to the image recommended width, %2$s to its height. */ + __( '%1$s by %2$s', 'wordpress-seo' ), '1024', '512' + ) ), + ); + $social_networks = $this->filter_social_networks( $social_networks ); + + return $social_networks; + } + + /** + * Returns array with the config fields for the social network + * + * @param string $network The name of the social network. + * @param string $label The label for the social network. + * @param string $image_size The image dimensions. + * + * @return array + */ + private function social_network( $network, $label, $image_size ) { + return array( + 'network' => $network, + 'label' => $label, + 'size' => $image_size, + ); + } + + /** + * Filter the social networks which are disabled in the configuration + * + * @param array $social_networks Array with the social networks that have to be filtered. + * + * @return array + */ + private function filter_social_networks( array $social_networks ) { + foreach ( $social_networks as $social_network => $settings ) { + if ( empty( $this->options[ $social_network ] ) ) { + unset( $social_networks[ $social_network ] ); + } + } + + return $social_networks; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php new file mode 100644 index 0000000..22085ae --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php @@ -0,0 +1,390 @@ +taxonomy = $this->get_taxonomy(); + + add_action( 'edit_term', array( $this, 'update_term' ), 99, 3 ); + add_action( 'init', array( $this, 'custom_category_descriptions_allow_html' ) ); + add_action( 'admin_init', array( $this, 'admin_init' ) ); + + $this->insert_description_field_editor(); + + add_filter( 'category_description', array( $this, 'custom_category_descriptions_add_shortcode_support' ) ); + + if ( self::is_term_overview( $GLOBALS['pagenow'] ) ) { + new WPSEO_Taxonomy_Columns(); + } + $this->analysis_seo = new WPSEO_Metabox_Analysis_SEO(); + $this->analysis_readability = new WPSEO_Metabox_Analysis_Readability(); + } + + /** + * Add hooks late enough for taxonomy object to be available for checks. + */ + public function admin_init() { + + $taxonomy = get_taxonomy( $this->taxonomy ); + + if ( empty( $taxonomy ) || empty( $taxonomy->public ) || ! $this->show_metabox() ) { + return; + } + + add_action( sanitize_text_field( $this->taxonomy ) . '_edit_form', array( $this, 'term_metabox' ), 90, 1 ); + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + } + + /** + * Show the SEO inputs for term. + * + * @param stdClass|WP_Term $term Term to show the edit boxes for. + */ + public function term_metabox( $term ) { + $metabox = new WPSEO_Taxonomy_Metabox( $this->taxonomy, $term ); + $metabox->display(); + } + + /** + * Queue assets for taxonomy screens. + * + * @since 1.5.0 + */ + public function admin_enqueue_scripts() { + $pagenow = $GLOBALS['pagenow']; + + if ( ! ( self::is_term_edit( $pagenow ) || self::is_term_overview( $pagenow ) ) ) { + return; + } + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->enqueue_style( 'scoring' ); + + + $tag_id = filter_input( INPUT_GET, 'tag_ID' ); + if ( + self::is_term_edit( $pagenow ) && + ! empty( $tag_id ) // After we drop support for <4.5 this can be removed. + ) { + wp_enqueue_media(); // Enqueue files needed for upload functionality. + + $asset_manager->enqueue_style( 'metabox-css' ); + $asset_manager->enqueue_style( 'snippet' ); + $asset_manager->enqueue_style( 'scoring' ); + $asset_manager->enqueue_script( 'metabox' ); + $asset_manager->enqueue_script( 'term-scraper' ); + $asset_manager->enqueue_style( 'kb-search' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoTermScraperL10n', $this->localize_term_scraper_script() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) ); + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() ); + + $asset_manager->enqueue_script( 'admin-media' ); + + wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array( + 'choose_image' => __( 'Use Image', 'wordpress-seo' ), + ) ); + } + } + + /** + * Update the taxonomy meta data on save. + * + * @param int $term_id ID of the term to save data for. + * @param int $tt_id The taxonomy_term_id for the term. + * @param string $taxonomy The taxonomy the term belongs to. + */ + public function update_term( $term_id, $tt_id, $taxonomy ) { + /* Create post array with only our values */ + $new_meta_data = array(); + foreach ( WPSEO_Taxonomy_Meta::$defaults_per_term as $key => $default ) { + if ( $posted_value = filter_input( INPUT_POST, $key ) ) { + $new_meta_data[ $key ] = $posted_value; + } + + // If analysis is disabled remove that analysis score value from the DB. + if ( $this->is_meta_value_disabled( $key ) ) { + $new_meta_data[ $key ] = ''; + } + } + unset( $key, $default ); + + // Saving the values. + WPSEO_Taxonomy_Meta::set_values( $term_id, $taxonomy, $new_meta_data ); + } + + /** + * Determines if the given meta value key is disabled + * + * @param string $key The key of the meta value. + * @return bool Whether the given meta value key is disabled. + */ + public function is_meta_value_disabled( $key ) { + if ( 'wpseo_linkdex' === $key && ! $this->analysis_seo->is_enabled() ) { + return true; + } + + if ( 'wpseo_content_score' === $key && ! $this->analysis_readability->is_enabled() ) { + return true; + } + + return false; + } + + /** + * Allows HTML in descriptions + */ + public function custom_category_descriptions_allow_html() { + $filters = array( + 'pre_term_description', + 'pre_link_description', + 'pre_link_notes', + 'pre_user_description', + ); + + foreach ( $filters as $filter ) { + remove_filter( $filter, 'wp_filter_kses' ); + } + remove_filter( 'term_description', 'wp_kses_data' ); + } + + /** + * Output the WordPress editor. + */ + public function custom_category_description_editor() { + + if ( ! $this->show_metabox() ) { + return; + } + + wp_editor( '', 'description' ); + } + + /** + * Adds shortcode support to category descriptions. + * + * @param string $desc String to add shortcodes in. + * + * @return string + */ + public function custom_category_descriptions_add_shortcode_support( $desc ) { + // Wrap in output buffering to prevent shortcodes that echo stuff instead of return from breaking things. + ob_start(); + $desc = do_shortcode( $desc ); + ob_end_clean(); + + return $desc; + } + + /** + * Pass variables to js for use with the term-scraper + * + * @return array + */ + public function localize_term_scraper_script() { + $term_id = filter_input( INPUT_GET, 'tag_ID' ); + $term = get_term_by( 'id', $term_id, $this->get_taxonomy() ); + $taxonomy = get_taxonomy( $term->taxonomy ); + + $term_formatter = new WPSEO_Metabox_Formatter( + new WPSEO_Term_Metabox_Formatter( $taxonomy, $term, WPSEO_Options::get_option( 'wpseo_titles' ) ) + ); + + return $term_formatter->get_values(); + } + + /** + * Pass some variables to js for replacing variables. + */ + public function localize_replace_vars_script() { + return array( + 'no_parent_text' => __( '(no parent)', 'wordpress-seo' ), + 'replace_vars' => $this->get_replace_vars(), + 'scope' => $this->determine_scope(), + ); + } + + /** + * Determines the scope based on the current taxonomy. + * This can be used by the replacevar plugin to determine if a replacement needs to be executed. + * + * @return string String decribing the current scope. + */ + private function determine_scope() { + $taxonomy = $this->get_taxonomy(); + + if ( $taxonomy === 'category' ) { + return 'category'; + } + + if ( $taxonomy === 'post_tag' ) { + return 'tag'; + } + + return 'term'; + } + + /** + * @param string $page The string to check for the term overview page. + * + * @return bool + */ + public static function is_term_overview( $page ) { + return 'edit-tags.php' === $page; + } + + /** + * @param string $page The string to check for the term edit page. + * + * @return bool + */ + public static function is_term_edit( $page ) { + return 'term.php' === $page + || 'edit-tags.php' === $page; // After we drop support for <4.5 this can be removed. + } + + /** + * Retrieves a template. + * Check if metabox for current taxonomy should be displayed. + * + * @return bool + */ + private function show_metabox() { + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + $option_key = 'hideeditbox-tax-' . $this->taxonomy; + + return ( empty( $options[ $option_key ] ) ); + } + + /** + * Getting the taxonomy from the URL + * + * @return string + */ + private function get_taxonomy() { + return filter_input( INPUT_GET, 'taxonomy', FILTER_DEFAULT, array( 'options' => array( 'default' => '' ) ) ); + } + + /** + * Prepares the replace vars for localization. + * + * @return array replace vars. + */ + private function get_replace_vars() { + $term_id = filter_input( INPUT_GET, 'tag_ID' ); + $term = get_term_by( 'id', $term_id, $this->get_taxonomy() ); + $cached_replacement_vars = array(); + + $vars_to_cache = array( + 'date', + 'id', + 'sitename', + 'sitedesc', + 'sep', + 'page', + 'currenttime', + 'currentdate', + 'currentday', + 'currentmonth', + 'currentyear', + 'term_title', + 'term_description', + 'category_description', + 'tag_description', + 'searchphrase', + ); + + foreach ( $vars_to_cache as $var ) { + $cached_replacement_vars[ $var ] = wpseo_replace_vars( '%%' . $var . '%%', $term ); + } + + return $cached_replacement_vars; + } + + /** + * Adds custom category description editor. + * Needs a hook that runs before the description field. Prior to WP version 4.5 we need to use edit_form as + * term_edit_form_top was introduced in WP 4.5. This can be removed after <4.5 is no longer supported. + * + * @return {void} + */ + private function insert_description_field_editor() { + if ( version_compare( $GLOBALS['wp_version'], '4.5', '<' ) ) { + add_action( "{$this->taxonomy}_edit_form", array( $this, 'custom_category_description_editor' ) ); + return; + } + + add_action( "{$this->taxonomy}_term_edit_form_top", array( $this, 'custom_category_description_editor' ) ); + } + + /********************** DEPRECATED METHODS **********************/ + + /** + * @deprecated 3.2 + * + * Retrieves the title template. + * + * @param object $term taxonomy term. + * + * @return string + */ + public static function get_title_template( $term ) { + _deprecated_function( 'WPSEO_Taxonomy::get_title_template', 'WPSEO 3.2', 'WPSEO_Term_Scraper::get_title_template' ); + + return ''; + } + + /** + * @deprecated 3.2 + * + * Retrieves the metadesc template. + * + * @param object $term taxonomy term. + * + * @return string + */ + public static function get_metadesc_template( $term ) { + _deprecated_function( 'WPSEO_Taxonomy::get_metadesc_template', 'WPSEO 3.2', 'WPSEO_Term_Scraper::get_metadesc_template' ); + + return ''; + } + + /** + * @deprecated 3.2 + * + * Translate options text strings for use in the select fields + * + * @internal IMPORTANT: if you want to add a new string (option) somewhere, make sure you add + * that array key to the main options definition array in the class WPSEO_Taxonomy_Meta() as well!!!! + */ + public function translate_meta_options() { + _deprecated_function( 'WPSEO_Taxonomy::translate_meta_options', 'WPSEO 3.2', 'WPSEO_Taxonomy_Settings_Fields::translate_meta_options' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/about.php b/wp-content/plugins/wordpress-seo/admin/views/about.php new file mode 100644 index 0000000..d0c224a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/about.php @@ -0,0 +1,230 @@ + $dev ) { + echo '
  • '; + echo '', $dev->name, ''; + echo '', $dev->role, "
  • \n"; + } +} + +?> + +
    + +

    + +

    + ', '', 'Yoast SEO' ); + echo ' '; + printf( __( 'Want to help us develop? Read our %1$scontribution guidelines%2$s!', 'wordpress-seo' ), '', '' ); + ?> +

    + +
    + + + +
    +

    + +

    +
      + (object) array( + 'name' => 'Joost de Valk', + 'role' => __( 'Project Lead', 'wordpress-seo' ), + 'gravatar' => 'f08c3c3253bf14b5616b4db53cea6b78', + ), + 'mariekerakt' => (object) array( + 'name' => 'Marieke van de Rakt', + 'role' => __( 'Head R&D', 'wordpress-seo' ), + 'gravatar' => '1d83533e299c379140f9fcc2cb0015cb', + ), + 'irenestr' => (object) array( + 'name' => 'Irene Strikkers', + 'role' => __( 'Linguist', 'wordpress-seo' ), + 'gravatar' => '074d67179d52561e36e57e8e9ea8f8cf', + ), + ); + + wpseo_display_contributors( $people ); + ?> +
    +

    +
      + (object) array( + 'name' => 'Omar Reiss', + 'role' => __( 'CTO', 'wordpress-seo' ), + 'gravatar' => '86aaa606a1904e7e0cf9857a663c376e', + ), + 'atimmer' => (object) array( + 'name' => 'Anton Timmermans', + 'role' => __( 'Architect', 'wordpress-seo' ), + 'gravatar' => 'b3acbabfdd208ecbf950d864b86fe968', + ), + 'moorscode' => (object) array( + 'name' => 'Jip Moors', + 'role' => __( 'Architect', 'wordpress-seo' ), + 'gravatar' => '1751c5afc377ef4ec07a50791db1bc52', + ), + ); + + wpseo_display_contributors( $people ); + ?> +
    +

    +
      + (object) array( + 'name' => 'Andrea Fercia', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '074af62ea5ff218b6a6eeab89104f616', + ), + 'rarst' => (object) array( + 'name' => 'Andrey Savchenko', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => 'c445c2491f9f55409b2e4dccee357961', + ), + 'andizer' => (object) array( + 'name' => 'Andy Meerwaldt', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => 'a9b43e766915b48031eab78f9916ca8e', + ), + 'boblinthorst' => (object) array( + 'name' => 'Bob Linthorst', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '8063b1955f54681ef3a2deb21972faa1', + ), + 'CarolineGeven' => (object) array( + 'name' => 'Caroline Geven', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => 'f2596a568c3974e35f051266a63d791f', + ), + 'terw-dan' => (object) array( + 'name' => 'Danny Terwindt', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '20a04b0736e630e80ce2dbefe3f1d62f', + ), + 'diedexx' => (object) array( + 'name' => 'Diede Exterkate', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '59908788f406037240ee011388db29f8', + ), + 'irenestr2' => (object) array( + 'name' => 'Irene Strikkers', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '074d67179d52561e36e57e8e9ea8f8cf', + ), + 'jcomack' => (object) array( + 'name' => 'Jimmy Comack', + 'role' => __( 'Developer', 'wordpress-seo' ), + 'gravatar' => '41073ef9e1f3e01b03cbee75cee33bd4', + ), + ); + + wpseo_display_contributors( $people ); + ?> +
    +

    +
      + (object) array( + 'name' => 'Taco Verdonschot', + 'role' => __( 'QA & Translations Manager', 'wordpress-seo' ), + 'gravatar' => 'd2d3ecb38cacd521926979b5c678297b', + ), + 'monbauza' => (object) array( + 'name' => 'Ramon Bauza', + 'role' => __( 'Tester', 'wordpress-seo' ), + 'gravatar' => 'de09b8491ab1d927e770f7519219cfc9', + ), + 'boblinthorst2' => (object) array( + 'name' => 'Bob Linthorst', + 'role' => __( 'Tester', 'wordpress-seo' ), + 'gravatar' => '8063b1955f54681ef3a2deb21972faa1', + ), + ); + + wpseo_display_contributors( $people ); + ?> +
    + +

    +

    + + +
    + +
    +

    Yoast SEO Integrations

    +

    + Yoast SEO 3.0 brought a way for theme builders and custom field plugins to integrate with Yoast SEO. These + integrations make sure that all the data on your page is used for the content analysis. On this + page, we highlight the frameworks that have nicely working integrations. +

    + +
      +
    1. Yoast ACF + Integration - an integration built by Marcus Forsberg and Team + Yoast +
    2. +
    3. Divi Builder
    4. +
    5. Visual Composer
    6. +
    + +

    Other integrations

    +

    + We've got another integration we'd like to tell you about: +

    + +
      +
    1. Glue for Yoast SEO & + AMP - an integration between the WordPress AMP + plugin and Yoast SEO. +
    2. +
    3. + Instant Articles for WP + - Enable Instant Articles for Facebook on your WordPress site and integrates with Yoast SEO. +
    4. +
    +
    +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/class-yoast-form-fieldset.php b/wp-content/plugins/wordpress-seo/admin/views/class-yoast-form-fieldset.php new file mode 100644 index 0000000..ba77b93 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/class-yoast-form-fieldset.php @@ -0,0 +1,168 @@ + 'yoast-form-fieldset', + ); + + /** + * @var string The grouped form elements for the fieldset. + */ + private $content; + + /** + * @var array The fieldset legend HTML default attributes. + */ + private $legend_attributes = array( + 'class' => 'yoast-form-legend', + ); + + /** + * @var string A translatable string for the fieldset legend content. + */ + private $legend_content; + + /** + * Constructor. + * + * @param string $id ID for the fieldset. + * @param string $legend_content The translatable legend text. + * @param string $content The grouped form elements for the fieldset. + */ + public function __construct( $id, $legend_content, $content ) { + $this->id = $id; + $this->legend_content = $legend_content; + $this->content = $content; + } + + /** + * Render the view. + */ + public function render_view() { + /* + * Extract because we want values accessible via variables for later use + * in the view instead of accessing them as an array. + */ + extract( $this->get_parts() ); + + require( dirname( WPSEO_FILE ) . '/admin/views/form/fieldset.php' ); + } + + /** + * Start output buffering to catch the form elements to wrap in the fieldset. + */ + public function start() { + ob_start(); + } + + /** + * Return output buffering with the form elements to wrap in the fieldset. + */ + public function end() { + $this->content = ob_get_clean(); + } + + /** + * Return the rendered view. + * + * @return string + */ + public function get_html() { + ob_start(); + $this->render_view(); + return ob_get_clean(); + } + + /** + * Output the rendered view. + */ + public function html() { + echo $this->get_html(); + } + + /** + * Add attributes to the fieldset default attributes. + * + * @param array $attributes Array of attributes names and values to merge with the defaults. + */ + public function add_attributes( $attributes ) { + $this->attributes = wp_parse_args( $attributes, $this->attributes ); + } + + /** + * Add attributes to the fieldset legend default attributes. + * + * @param array $attributes Array of attributes names and values to merge with the defaults. + */ + public function legend_add_attributes( $attributes ) { + $this->legend_attributes = wp_parse_args( $attributes, $this->legend_attributes ); + } + + /** + * Visually hide the fieldset legend but keep it available to assistive technologies. + */ + public function legend_hide() { + $this->legend_attributes = wp_parse_args( + array( 'class' => 'screen-reader-text' ), + $this->legend_attributes + ); + } + + /** + * Return the set of attributes and content for the fieldset. + * + * @return array + */ + private function get_parts() { + return array( + 'id' => $this->id, + 'attributes' => $this->get_attributes_html( $this->attributes ), + 'legend_content' => $this->legend_content, + 'legend_attributes' => $this->get_attributes_html( $this->legend_attributes ), + 'content' => $this->content, + ); + } + + /** + * Return HTML formatted attributes as a string, when there are attributes set. + * + * @param array $attributes Fieldset or legend attributes. + * + * @return string A space separated list of HTML formatted attributes or empty string. + */ + private function get_attributes_html( $attributes ) { + if ( ! empty( $attributes ) ) { + array_walk( $attributes, array( $this, 'parse_attribute' ) ); + + // Use an initial space as `implode()` adds a space only between array elements. + return ' ' . implode( ' ', $attributes ); + } + + return ''; + } + + /** + * Escape and format an attribute as an HTML attribute. + * + * @param string $value The value of the attribute. + * @param string $attribute The attribute to look for. + */ + private function parse_attribute( & $value, $attribute ) { + $value = sprintf( '%s="%s"', esc_html( $attribute ), esc_attr( $value ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/class-yoast-input-select.php b/wp-content/plugins/wordpress-seo/admin/views/class-yoast-input-select.php new file mode 100644 index 0000000..f0fdd67 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/class-yoast-input-select.php @@ -0,0 +1,128 @@ +select_id = $select_id; + $this->select_name = $select_name; + $this->select_options = $select_options; + $this->selected_option = $selected_option; + } + + /** + * Print the rendered view. + */ + public function output_html() { + // Extract it, because we want each value accessible via a variable instead of accessing it as an array. + extract( $this->get_select_values() ); + + require( dirname( WPSEO_FILE ) . '/admin/views/form/select.php' ); + } + + /** + * Return the rendered view + * + * @return string + */ + public function get_html() { + ob_start(); + + $this->output_html(); + + $rendered_output = ob_get_contents(); + ob_end_clean(); + + return $rendered_output; + } + + /** + * Add an attribute to the attributes property + * + * @param string $attribute The name of the attribute to add. + * @param string $value The value of the attribute. + */ + public function add_attribute( $attribute, $value ) { + $this->select_attributes[ $attribute ] = $value; + } + + /** + * Return the set fields for the select + * + * @return array + */ + private function get_select_values() { + return array( + 'id' => $this->select_id, + 'name' => $this->select_name, + 'attributes' => $this->get_attributes(), + 'options' => $this->select_options, + 'selected' => $this->selected_option, + ); + } + + /** + * Return the attribute string, when there are attributes set. + * + * @return string + */ + private function get_attributes() { + $attributes = $this->select_attributes; + + if ( ! empty( $attributes ) ) { + array_walk( $attributes, array( $this, 'parse_attribute' ) ); + + return implode( ' ', $attributes ) . ' '; + } + + return ''; + } + + /** + * Get an attribute from the attributes. + * + * @param string $value The value of the attribute. + * @param string $attribute The attribute to look for. + */ + private function parse_attribute( & $value, $attribute ) { + $value = sprintf( '%s="%s"', esc_html( $attribute ), esc_attr( $value ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/dashboard-widget.php b/wp-content/plugins/wordpress-seo/admin/views/dashboard-widget.php new file mode 100644 index 0000000..61363d2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/dashboard-widget.php @@ -0,0 +1,105 @@ + +

    + + +
    +

    + +

    + '; + _e( 'Your homepage can be indexed by search engines.', 'wordpress-seo' ); + + break; + case WPSEO_OnPage_Option::IS_NOT_INDEXABLE : + echo ''; + printf( + /* translators: 1: opens a link to a related knowledge base article. 2: closes the link */ + __( '%1$sYour homepage cannot be indexed by search engines%2$s. This is very bad for SEO and should be fixed.', 'wordpress-seo' ), + '', + '' + ); + break; + case WPSEO_OnPage_Option::CANNOT_FETCH : + echo ''; + printf( + /* translators: %1$s opens a link to a related knowledge base article, %2$s expands to Yoast SEO, %3$s closes the link. */ + __( '%1$s%2$s has not been able to fetch your site\'s indexability status%3$s from OnPage.org', 'wordpress-seo' ), + '', + 'Yoast SEO', + '' + ); + break; + case WPSEO_OnPage_Option::NOT_FETCHED : + echo ''; + echo esc_html( sprintf( + /* translators: %s expands to Yoast SEO. */ + __( '%s has not fetched your site\'s indexability status yet from OnPage.org', 'wordpress-seo' ), + 'Yoast SEO' + ) ); + break; + endswitch; + ?> +

    + +

    + ' . __( 'Fetch the current status', 'wordpress-seo' ) . ' '; + endif; + + echo '' . __( 'Analyze entire site', 'wordpress-seo' ) . ' '; + ?> +

    +
    + + +
    > + > + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/form/select.php b/wp-content/plugins/wordpress-seo/admin/views/form/select.php new file mode 100644 index 0000000..4b42f73 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/form/select.php @@ -0,0 +1,24 @@ + + diff --git a/wp-content/plugins/wordpress-seo/admin/views/interface-yoast-form-element.php b/wp-content/plugins/wordpress-seo/admin/views/interface-yoast-form-element.php new file mode 100644 index 0000000..aeec5f0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/interface-yoast-form-element.php @@ -0,0 +1,17 @@ + + + + + + + diff --git a/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-errors.php b/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-errors.php new file mode 100644 index 0000000..77b8fab --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-errors.php @@ -0,0 +1,19 @@ +%1$s', __( 'Dismiss this item.', 'wordpress-seo' ) ); + break; + + case 'dismissed': + $button = sprintf( '', __( 'Restore this item.', 'wordpress-seo' ) ); + break; + } + + printf( '
    %4$s%5$s
    ', $notification->get_id(), $notification->get_nonce(), $notification->get_json(), $notification, $button ); + } + } +} + +if ( ! $active ) { + $dashicon = 'yes'; +} + +?> +

    ()

    + +
    + + +

    + +
    + +
    + + +
    + + +
    + +
    + +
    + + + +

    + + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-warnings.php b/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-warnings.php new file mode 100644 index 0000000..b064036 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/partial-alerts-warnings.php @@ -0,0 +1,19 @@ + + +
    +
    +
    +
    + +
    +

    + +

    + +

    +

    +
    + +
    + +

    + +

    + +

    +

    +
    +
    + +
    + +
    + +
    +
    + currentoption = 'wpseo_internallinks'; + +echo '

    ' . __( 'Breadcrumbs settings', 'wordpress-seo' ) . '

    '; + +if ( ! current_theme_supports( 'yoast-seo-breadcrumbs' ) ) { + $yform->light_switch( 'breadcrumbs-enable', __( 'Enable Breadcrumbs', 'wordpress-seo' ) ); + echo '
    '; +} +echo ' +

    +

    + ', '' ); + ?> +

    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/permalinks.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/permalinks.php new file mode 100644 index 0000000..86bfa04 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/permalinks.php @@ -0,0 +1,59 @@ +currentoption = 'wpseo_permalinks'; + +echo '

    ', __( 'Change URLs', 'wordpress-seo' ), '

    '; + +$remove_buttons = array( __( 'Keep', 'wordpress-seo' ), __( 'Remove', 'wordpress-seo' ) ); +/* translators: %s expands to /category/ */ +$yform->light_switch( + 'stripcategorybase', + sprintf( __( 'Strip the category base (usually %s) from the category URL.', 'wordpress-seo' ), '/category/' ), + $remove_buttons, + false +); + +$redirect_buttons = array( __( 'No redirect', 'wordpress-seo' ), __( 'Redirect', 'wordpress-seo' ) ); +$yform->light_switch( 'redirectattachment', __( 'Redirect attachment URLs to parent post URL.', 'wordpress-seo' ), $redirect_buttons ); +echo '

    ' . __( 'Attachments to posts are stored in the database as posts, this means they\'re accessible under their own URLs if you do not redirect them, enabling this will redirect them to the post they were attached to.', 'wordpress-seo' ) . '

    '; + +echo '

    ', __( 'Clean up permalinks', 'wordpress-seo' ), '

    '; +$yform->light_switch( 'cleanslugs', __( 'Stop words in slugs.', 'wordpress-seo' ), $remove_buttons, false ); +echo '

    ' . __( 'This helps you to create cleaner URLs by automatically removing the stopwords from them.', 'wordpress-seo' ) . '

    '; + +/* translators: %s expands to ?replytocom */ +$yform->light_switch( 'cleanreplytocom', sprintf( __( 'Remove the %s variables.', 'wordpress-seo' ), '?replytocom' ), $remove_buttons, false ); +echo '

    ' . __( 'This prevents threaded replies from working when the user has JavaScript disabled, but on a large site can mean a huge improvement in crawl efficiency for search engines when you have a lot of comments.', 'wordpress-seo' ) . '

    '; + +$options = WPSEO_Options::get_all(); +if ( substr( get_option( 'permalink_structure' ), -1 ) !== '/' && $options['trailingslash'] ) { + $yform->light_switch( 'trailingslash', __( 'Enforce a trailing slash on all category and tag URLs', 'wordpress-seo' ) ); + echo '

    ' . __( 'Note: this feature has been deprecated, as the SEO value is close to 0 these days. If you disable it you will not be able to put it back on.', 'wordpress-seo' ) . '

    '; + /* translators: %1$s expands to .html, %2$s expands to / */ + echo '

    ' . sprintf( __( 'If you choose a permalink for your posts with %1$s, or anything else but a %2$s at the end, this will force WordPress to add a trailing slash to non-post pages nonetheless.', 'wordpress-seo' ), '.html', '/' ) . '

    '; +} + +$yform->light_switch( 'cleanpermalinks', __( 'Redirect ugly URLs to clean permalinks. (Not recommended in many cases!)', 'wordpress-seo' ), $redirect_buttons ); +echo '

    ' . __( 'People make mistakes in their links towards you sometimes, or unwanted parameters are added to the end of your URLs, this allows you to redirect them all away. Please note that while this is a feature that is actively maintained, it is known to break several plugins, and should for that reason be the first feature you disable when you encounter issues after installing this plugin.', 'wordpress-seo' ) . '

    '; + +echo '
    '; +$yform->light_switch( 'cleanpermalink-googlesitesearch', __( 'Prevent cleaning out Google Site Search URLs.', 'wordpress-seo' ) ); +echo '

    ' . __( 'Google Site Search URLs look weird, and ugly, but if you\'re using Google Site Search, you probably do not want them cleaned out.', 'wordpress-seo' ) . '

    '; + +$yform->light_switch( 'cleanpermalink-googlecampaign', __( 'Prevent cleaning out Google Analytics Campaign & Google AdWords Parameters.', 'wordpress-seo' ) ); +/* translators: %s expands to ?utm_ */ +echo '

    ' . sprintf( __( 'If you use Google Analytics campaign parameters starting with %s, check this box. However, you\'re advised not to use these. Instead, use the version with a hash.', 'wordpress-seo' ), '?utm_' ) . '

    '; + +$yform->textinput( 'cleanpermalink-extravars', __( 'Other variables not to clean', 'wordpress-seo' ) ); +echo '

    ' . __( 'You might have extra variables you want to prevent from cleaning out, add them here, comma separated.', 'wordpress-seo' ) . '

    '; +echo '
    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/rss.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/rss.php new file mode 100644 index 0000000..1555efb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/advanced/rss.php @@ -0,0 +1,45 @@ +set_option( 'wpseo_rss' ); + +echo '

    ' . __( 'RSS feed settings', 'wordpress-seo' ) . '

    '; + +echo '

    ' . __( "This feature is used to automatically add content to your RSS, more specifically, it's meant to add links back to your blog and your blog posts, so dumb scrapers will automatically add these links too, helping search engines identify you as the original source of the content.", 'wordpress-seo' ) . '

    '; + +$textarea_atts = array( + 'cols' => '50', + 'rows' => '5', +); +$yform->textarea( 'rssbefore', __( 'Content to put before each post in the feed', 'wordpress-seo' ), '', $textarea_atts ); +$yform->textarea( 'rssafter', __( 'Content to put after each post in the feed', 'wordpress-seo' ), '', $textarea_atts ); +?> + +

    + + + + + + + + + + + + + + + + + +
    %%AUTHORLINK%%
    %%POSTLINK%%
    %%BLOGLINK%%
    %%BLOGDESCLINK%%
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/dashboard.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/dashboard.php new file mode 100644 index 0000000..6a2a05b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/dashboard.php @@ -0,0 +1,24 @@ + +
    + +

    +
    + +
    + +
    + +
    + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/features.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/features.php new file mode 100644 index 0000000..3365069 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/features.php @@ -0,0 +1,67 @@ + __( 'Advanced settings pages', 'wordpress-seo' ), + 'setting' => 'enable_setting_pages', + 'label' => __( 'The advanced settings include site-wide settings for your titles and meta descriptions, social metadata, sitemaps and much more.', 'wordpress-seo' ), + ), + (object) array( + 'name' => __( 'OnPage.org', 'wordpress-seo' ), + 'setting' => 'onpage_indexability', + /* translators: %1$s expands to OnPage.org */ + 'label' => sprintf( __( 'The %1$s integration checks daily if your site is still indexable by search engines and notifies you when this is not the case.', 'wordpress-seo' ), 'OnPage.org' ), + ), + (object) array( + 'name' => __( 'Admin bar menu', 'wordpress-seo' ), + 'setting' => 'enable_admin_bar_menu', + /* translators: %1$s expands to Yoast SEO*/ + 'label' => sprintf( __( 'The %1$s admin bar menu contains useful links to third-party tools for analyzing pages and makes it easy to see if you have new notifications.', 'wordpress-seo' ), 'Yoast SEO' ), + ), +); + +/** + * Filter to add feature toggles from add-ons. + * + * @param array $feature_toggles Array with feature toggle objects where each object should have a `name`, `setting` and `label` property. + */ +$feature_toggles = apply_filters( 'wpseo_feature_toggles', $feature_toggles ); + +?> +

    Features

    + + + +

    name ); ?>

    +

    + toggle_switch( + $feature->setting, + array( + 'on' => __( 'Enabled', 'wordpress-seo' ), + 'off' => __( 'Disabled', 'wordpress-seo' ), + ), + $feature->label + ); + ?> +

    +
    + + + +hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' ); +?> diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/general.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/general.php new file mode 100644 index 0000000..e7f1472 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/general.php @@ -0,0 +1,58 @@ +' . esc_html__( 'Configuration wizard', 'wordpress-seo' ) . ''; + ?> +

    + +

    +

    + +

    + +
    +' . esc_html__( 'Credits', 'wordpress-seo' ) . ''; +?> +

    + +

    + +

    + +

    +
    +' . esc_html__( 'Restore default settings', 'wordpress-seo' ) . ''; +?> +

    + +

    + +

    + +

    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/knowledge-graph.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/knowledge-graph.php new file mode 100644 index 0000000..653266a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/knowledge-graph.php @@ -0,0 +1,50 @@ +' . esc_html__( 'Website name', 'wordpress-seo' ) . ''; +?> +

    + +

    +textinput( 'website_name', __( 'Website name', 'wordpress-seo' ), array( 'placeholder' => get_bloginfo( 'name' ) ) ); +$yform->textinput( 'alternate_website_name', __( 'Alternate name', 'wordpress-seo' ) ); + +echo '

    ' . esc_html__( 'Company or person', 'wordpress-seo' ) . '

    '; +?> +

    + +

    +select( 'company_or_person', __( 'Company or person', 'wordpress-seo' ), array( + '' => __( 'Choose whether you\'re a company or person', 'wordpress-seo' ), + 'company' => __( 'Company', 'wordpress-seo' ), + 'person' => __( 'Person', 'wordpress-seo' ), +) ); +?> + +
    +

    + textinput( 'company_name', __( 'Company Name', 'wordpress-seo' ) ); + $yform->media_input( 'company_logo', __( 'Company Logo', 'wordpress-seo' ) ); + ?> +
    + +
    +

    + textinput( 'person_name', __( 'Your name', 'wordpress-seo' ) ); ?> +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/security.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/security.php new file mode 100644 index 0000000..c5dde67 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/security.php @@ -0,0 +1,22 @@ +' . esc_html__( 'Security setting', 'wordpress-seo' ) . ''; + +$yform->toggle_switch( + 'disableadvanced_meta', + array( 'off' => __( 'Enabled', 'wordpress-seo' ), 'on' => __( 'Disabled', 'wordpress-seo' ) ), + /* translators: %1$s expands to Yoast SEO */ + sprintf( __( 'Advanced part of the %1$s meta box', 'wordpress-seo' ), 'Yoast SEO' ) +); + +/* translators: %1$s expands to Yoast SEO */ +echo '

    ', sprintf( __( 'The advanced section of the %1$s meta box allows a user to noindex posts or change the canonical. These are things you might not want if you don\'t trust your authors, so by default, only administrators can do this. Enabling the advanced box allows all users to change these settings.', 'wordpress-seo' ), 'Yoast SEO' ), '

    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/site-analysis.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/site-analysis.php new file mode 100644 index 0000000..66c3dc5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/site-analysis.php @@ -0,0 +1,19 @@ + diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/webmaster-tools.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/webmaster-tools.php new file mode 100644 index 0000000..34a35f4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/webmaster-tools.php @@ -0,0 +1,17 @@ +' . esc_html__( 'Webmaster Tools verification', 'wordpress-seo' ) . ''; +printf( '

    %s

    ', __( 'You can use the boxes below to verify with the different Webmaster Tools, if your site is already verified, you can just forget about these. Enter the verify meta values for:', 'wordpress-seo' ) ); + +$yform->textinput( 'msverify', '' . __( 'Bing Webmaster Tools', 'wordpress-seo' ) . '' ); +$yform->textinput( 'googleverify', 'Google Search Console' ); +$yform->textinput( 'yandexverify', '' . __( 'Yandex Webmaster Tools', 'wordpress-seo' ) . '' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/archives.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/archives.php new file mode 100644 index 0000000..5e950f9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/archives.php @@ -0,0 +1,69 @@ +'; +/* translators: %1$s / %2$s: links to an article about duplicate content on yoast.com */ +printf( __( 'If you\'re running a one author blog, the author archive will be exactly the same as your homepage. This is what\'s called a %1$sduplicate content problem%2$s.', 'wordpress-seo' ), '', '' ); +echo ' '; +/* translators: %s expands to noindex, follow */ +printf( __( 'If this is the case on your site, you can choose to either disable it (which makes it redirect to the homepage), or to add %s to it so it doesn\'t show up in the search results.', 'wordpress-seo' ), 'noindex,follow' ); +echo ' '; +echo __( 'Note that links to archives might be still output by your theme and you would need to remove them separately.', 'wordpress-seo' ); +echo ' '; +_e( 'Date-based archives could in some cases also be seen as duplicate content.', 'wordpress-seo' ); +echo '

    '; + +echo "
    "; +echo '

    ' . esc_html__( 'Author archives settings', 'wordpress-seo' ) . '

    '; +$yform->toggle_switch( 'disable-author', array( + 'off' => __( 'Enabled', 'wordpress-seo' ), + 'on' => __( 'Disabled', 'wordpress-seo' ), +), __( 'Author archives', 'wordpress-seo' ) ); + +echo "
    "; +$yform->textinput( 'title-author-wpseo', __( 'Title template', 'wordpress-seo' ), 'template author-template' ); +$yform->textarea( 'metadesc-author-wpseo', __( 'Meta description template', 'wordpress-seo' ), array( 'class' => 'template author-template' ) ); +if ( $options['usemetakeywords'] === true ) { + $yform->textinput( 'metakey-author-wpseo', __( 'Meta keywords template', 'wordpress-seo' ) ); +} +$yform->toggle_switch( 'noindex-author-wpseo', $index_switch_values, __( 'Meta Robots', 'wordpress-seo' ) ); +echo '
    '; +echo '
    '; + +echo '
    '; + +echo "
    "; +echo '

    ' . esc_html__( 'Date archives settings', 'wordpress-seo' ) . '

    '; +$yform->toggle_switch( 'disable-date', array( + 'off' => __( 'Enabled', 'wordpress-seo' ), + 'on' => __( 'Disabled', 'wordpress-seo' ), +), __( 'Date archives', 'wordpress-seo' ) ); + +echo "
    "; +$yform->textinput( 'title-archive-wpseo', __( 'Title template', 'wordpress-seo' ), 'template date-template' ); +$yform->textarea( 'metadesc-archive-wpseo', __( 'Meta description template', 'wordpress-seo' ), array( 'class' => 'template date-template' ) ); +$yform->toggle_switch( 'noindex-archive-wpseo', $index_switch_values, __( 'Meta Robots', 'wordpress-seo' ) ); +echo '
    '; +echo '
    '; + +echo '
    '; + +echo '
    '; +echo '

    ' . esc_html__( 'Special Pages', 'wordpress-seo' ) . '

    '; +/* translators: %s expands to noindex, follow */ +echo '

    ' . sprintf( __( 'These pages will be %s by default, so they will never show up in search results.', 'wordpress-seo' ), 'noindex, follow' ) . '

    '; +echo '

    ' . __( 'Search pages', 'wordpress-seo' ) . '
    '; +$yform->textinput( 'title-search-wpseo', __( 'Title template', 'wordpress-seo' ), 'template search-template' ); +echo '

    '; +echo '

    ' . __( '404 pages', 'wordpress-seo' ) . '
    '; +$yform->textinput( 'title-404-wpseo', __( 'Title template', 'wordpress-seo' ), 'template error404-template' ); +echo '

    '; +echo '
    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general.php new file mode 100644 index 0000000..1f22a5e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general.php @@ -0,0 +1,30 @@ +light_switch( 'forcerewritetitle', __( 'Force rewrite titles', 'wordpress-seo' ) ); + echo '

    ', sprintf( __( '%1$s has auto-detected whether it needs to force rewrite the titles for your pages, if you think it\'s wrong and you know what you\'re doing, you can change the setting here.', 'wordpress-seo' ), 'Yoast SEO' ) . '

    '; +} + +echo '

    ' . esc_html__( 'Title Separator', 'wordpress-seo' ) . '

    '; + +$legend = __( 'Title separator symbol', 'wordpress-seo' ); +$legend_attr = array( 'class' => 'radiogroup screen-reader-text' ); +$yform->radio( 'separator', WPSEO_Option_Titles::get_instance()->get_separator_options(), $legend, $legend_attr ); +echo '

    ', __( 'Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name.', 'wordpress-seo' ), ' ', __( 'Symbols are shown in the size they\'ll appear in the search results.', 'wordpress-seo' ), '

    '; + +echo '

    ' . __( 'Enabled analysis', 'wordpress-seo' ) . '

    '; + +$yform->light_switch( 'content-analysis-active', __( 'Readability analysis', 'wordpress-seo' ) ); +echo '

    ', __( 'Removes the readability tab from the metabox and disables all readability-related suggestions.', 'wordpress-seo' ) . '

    '; + +$yform->light_switch( 'keyword-analysis-active', __( 'Keyword analysis', 'wordpress-seo' ) ); +echo '

    ', __( 'Removes the keyword tab from the metabox and disables all keyword-related suggestions.', 'wordpress-seo' ) . '

    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/home.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/home.php new file mode 100644 index 0000000..da6534e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/home.php @@ -0,0 +1,30 @@ +'; + echo '

    ', esc_html__( 'Homepage', 'wordpress-seo' ), '

    '; + $yform->textinput( 'title-home-wpseo', __( 'Title template', 'wordpress-seo' ), 'template homepage-template' ); + $yform->textarea( 'metadesc-home-wpseo', __( 'Meta description template', 'wordpress-seo' ), array( 'class' => 'template homepage-template' ) ); + if ( $options['usemetakeywords'] === true ) { + $yform->textinput( 'metakey-home-wpseo', __( 'Meta keywords template', 'wordpress-seo' ) ); + } + echo ''; +} +else { + echo '

    ', esc_html__( 'Homepage & Front page', 'wordpress-seo' ), '

    '; + echo '

    '; + printf( __( 'You can determine the title and description for the front page by %sediting the front page itself »%s', 'wordpress-seo' ), '', '' ); + echo '

    '; + if ( get_option( 'page_for_posts' ) > 0 ) { + echo '

    ', sprintf( __( 'You can determine the title and description for the blog page by %sediting the blog page itself »%s', 'wordpress-seo' ), '', '' ), '

    '; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/other.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/other.php new file mode 100644 index 0000000..76abe5c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/other.php @@ -0,0 +1,23 @@ +', esc_html__( 'Sitewide meta settings', 'wordpress-seo' ), ''; + +$yform->toggle_switch( 'noindex-subpages-wpseo', $index_switch_values, __( 'Subpages of archives', 'wordpress-seo' ) ); +echo '

    ', __( 'If you want to prevent /page/2/ and further of any archive to show up in the search results, set this to "noindex".', 'wordpress-seo' ), '

    '; + +$yform->light_switch( 'usemetakeywords', __( 'Use meta keywords tag?', 'wordpress-seo' ) ); +echo '

    ', __( 'I don\'t know why you\'d want to use meta keywords, but if you want to, enable this.', 'wordpress-seo' ), '

    '; + +/* translators: %s expands to noodp */ +$yform->light_switch( 'noodp', sprintf( __( 'Force %s meta robots tag sitewide', 'wordpress-seo' ), 'noodp' ) ); +/* translators: %s expands to noodp */ +echo '

    ', sprintf( __( 'Prevents search engines from using the DMOZ description in the search results for all pages on this site. Note: If you set a custom description for a page or post, it will have the %s tag regardless of this setting.', 'wordpress-seo' ), 'noodp' ), '

    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/post-types.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/post-types.php new file mode 100644 index 0000000..76aa46f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/post-types.php @@ -0,0 +1,80 @@ + true ), 'objects' ); +$index_switch_values = array( + 'off' => 'index', + 'on' => 'noindex', +); + +if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $post_type ) { + $name = $post_type->name; + echo "
    "; + echo '

    ' . esc_html( ucfirst( $post_type->labels->name ) ) . '

    '; + if ( $options['redirectattachment'] === true && $name === 'attachment' ) { + // The `inline` CSS class prevents the notice from being moved to the top via JavaScript. + echo '

    '; + /* translators: %1$s and %2$s expand to a link to the SEO Permalinks settings page. */ + echo sprintf( __( 'As you are redirecting attachment URLs to parent post URLs, these settings will currently only have an effect on unattached media items! So remember: If you change the %1$sattachment redirection setting%2$s in the future, the below settings will take effect for *all* media items.', 'wordpress-seo' ), '', '' ); + echo '

    '; + } + $yform->textinput( 'title-' . $name, __( 'Title template', 'wordpress-seo' ), 'template posttype-template' ); + $yform->textarea( 'metadesc-' . $name, __( 'Meta description template', 'wordpress-seo' ), array( 'class' => 'template posttype-template' ) ); + if ( $options['usemetakeywords'] === true ) { + $yform->textinput( 'metakey-' . $name, __( 'Meta keywords template', 'wordpress-seo' ) ); + } + $yform->toggle_switch( 'noindex-' . $name, $index_switch_values, __( 'Meta Robots', 'wordpress-seo' ) ); + $yform->toggle_switch( 'showdate-' . $name, array( + 'on' => __( 'Show', 'wordpress-seo' ), + 'off' => __( 'Hide', 'wordpress-seo' ), + ), __( 'Date in Snippet Preview', 'wordpress-seo' ) ); + $yform->toggle_switch( 'hideeditbox-' . $name, array( + 'off' => __( 'Show', 'wordpress-seo' ), + 'on' => __( 'Hide', 'wordpress-seo' ), + /* translators: %1$s expands to Yoast SEO */ + ), sprintf( __( '%1$s Meta Box', 'wordpress-seo' ), 'Yoast SEO' ) ); + echo '
    '; + /** + * Allow adding a custom checkboxes to the admin meta page - Post Types tab + * + * @api WPSEO_Admin_Pages $yform The WPSEO_Admin_Pages object + * @api String $name The post type name + */ + do_action( 'wpseo_admin_page_meta_post_types', $yform, $name ); + echo '

    '; + } + unset( $post_type ); +} +unset( $post_types ); + +$post_types = get_post_types( array( '_builtin' => false, 'has_archive' => true ), 'objects' ); +if ( is_array( $post_types ) && $post_types !== array() ) { + echo '

    ' . esc_html__( 'Custom Post Type Archives', 'wordpress-seo' ) . '

    '; + echo '

    ' . __( 'Note: instead of templates these are the actual titles and meta descriptions for these custom post type archive pages.', 'wordpress-seo' ) . '

    '; + foreach ( $post_types as $post_type ) { + $name = $post_type->name; + echo '

    ' . esc_html( ucfirst( $post_type->labels->name ) ) . '

    '; + $yform->textinput( 'title-ptarchive-' . $name, __( 'Title', 'wordpress-seo' ), 'template posttype-template' ); + $yform->textarea( 'metadesc-ptarchive-' . $name, __( 'Meta description', 'wordpress-seo' ), array( 'class' => 'template posttype-template' ) ); + if ( $options['usemetakeywords'] === true ) { + $yform->textinput( 'metakey-ptarchive-' . $name, __( 'Meta keywords', 'wordpress-seo' ) ); + } + if ( $options['breadcrumbs-enable'] === true ) { + $yform->textinput( 'bctitle-ptarchive-' . $name, __( 'Breadcrumbs title', 'wordpress-seo' ) ); + } + $yform->toggle_switch( 'noindex-ptarchive-' . $name, $index_switch_values, __( 'Meta Robots', 'wordpress-seo' ) ); + + echo '

    '; + } + unset( $post_type ); +} +unset( $post_types ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/taxonomies.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/taxonomies.php new file mode 100644 index 0000000..2c4f3c3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/metas/taxonomies.php @@ -0,0 +1,57 @@ + true ), 'objects' ); +if ( is_array( $taxonomies ) && $taxonomies !== array() ) { + foreach ( $taxonomies as $tax ) { + // Explicitly hide all the core taxonomies we never want to do stuff for. + if ( in_array( $tax->name, array( 'link_category', 'nav_menu' ) ) ) { + continue; + } + + echo '

    ' . esc_html( ucfirst( $tax->labels->name ) ) . '

    '; + if ( $tax->name === 'post_format' ) { + $yform->light_switch( + 'disable-post_format', + __( 'Format-based archives', 'wordpress-seo' ), + array( __( 'Enabled', 'wordpress-seo' ), __( 'Disabled', 'wordpress-seo' ) ), + false + ); + } + echo "
    "; + $yform->textinput( 'title-tax-' . $tax->name, __( 'Title template', 'wordpress-seo' ), 'template taxonomy-template' ); + $yform->textarea( 'metadesc-tax-' . $tax->name, __( 'Meta description template', 'wordpress-seo' ), array( 'class' => 'template taxonomy-template' ) ); + if ( $options['usemetakeywords'] === true ) { + $yform->textinput( 'metakey-tax-' . $tax->name, __( 'Meta keywords template', 'wordpress-seo' ) ); + } + $yform->toggle_switch( 'noindex-tax-' . $tax->name, $index_switch_values, __( 'Meta Robots', 'wordpress-seo' ) ); + if ( $tax->name !== 'post_format' ) { + /* translators: %1$s expands to Yoast SEO */ + $yform->toggle_switch( 'hideeditbox-tax-' . $tax->name, + array( + 'off' => __( 'Show', 'wordpress-seo' ), + 'on' => __( 'Hide', 'wordpress-seo' ), + /* translators: %1$s expands to Yoast SEO */ + ), sprintf( __( '%1$s Meta Box', 'wordpress-seo' ), 'Yoast SEO' ) ); + } + /** + * Allow adding custom checkboxes to the admin meta page - Taxonomies tab + * + * @api WPSEO_Admin_Pages $yform The WPSEO_Admin_Pages object + * @api Object $tax The taxonomy + */ + do_action( 'wpseo_admin_page_meta_taxonomies', $yform, $tax ); + echo '

    '; + echo '
    '; + } + unset( $tax ); +} +unset( $taxonomies ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/exclude-post.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/exclude-post.php new file mode 100644 index 0000000..857c626 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/exclude-post.php @@ -0,0 +1,16 @@ +' . esc_html__( 'Excluded posts settings', 'wordpress-seo' ) . ''; + +/* Translators: %1$s: expands to '1,2,99,100' */ +echo '

    ', sprintf( __( 'You can exclude posts from the sitemap by entering a comma separated string with the Post ID\'s. The format will become something like: %1$s.', 'wordpress-seo' ), '1,2,99,100' ), '

    '; +$yform->textinput( 'excluded-posts', __( 'Posts to exclude', 'wordpress-seo' ) ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/general.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/general.php new file mode 100644 index 0000000..0ed33b7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/general.php @@ -0,0 +1,38 @@ +' . esc_html__( 'Your XML Sitemap', 'wordpress-seo' ) . ''; + +if ( $options['enablexmlsitemap'] === true ) { + echo '

    '; + /* translators: %1$s opening tag of the link to the Sitemap, %2$s closing tag for the link. */ + printf( + esc_html__( 'You can find your XML Sitemap here: %1$sXML Sitemap%2$s', 'wordpress-seo' ), + '', + '' + ); + echo '
    '; + echo '
    '; + _e( 'You do not need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'wordpress-seo' ); + echo '

    '; +} +else { + echo '

    ', __( 'Save your settings to activate your XML Sitemap.', 'wordpress-seo' ), '

    '; +} + +echo '

    ' . esc_html__( 'Entries per sitemap page', 'wordpress-seo' ) . '

    '; +?> +

    + +

    + +textinput( 'entries-per-page', __( 'Max entries per sitemap', 'wordpress-seo' ) ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/post-types.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/post-types.php new file mode 100644 index 0000000..bfc611a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/post-types.php @@ -0,0 +1,40 @@ +' . esc_html__( 'Post types sitemap settings', 'wordpress-seo' ) . ''; + +$switch_values = array( + 'off' => __( 'In sitemap', 'wordpress-seo' ), + 'on' => __( 'Not in sitemap', 'wordpress-seo' ), +); + +/** + * Filter the post types to present in interface for exclusion. + * + * @param array $post_types Array of post type objects. + */ +$post_types = apply_filters( 'wpseo_sitemaps_supported_post_types', get_post_types( array( 'public' => true ), 'objects' ) ); +if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $pt ) { + $yform->toggle_switch( + 'post_types-' . $pt->name . '-not_in_sitemap', + $switch_values, + $pt->labels->name . ' (' . $pt->name . ')' + ); + /** + * Allow adding custom checkboxes to the admin sitemap page - Post Types tab + * + * @api Yoast_Form $yform The Yoast_Form object + * @api Object $pt The post type + */ + do_action( 'wpseo_admin_page_sitemap_post_types', $yform, $pt ); + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/taxonomies.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/taxonomies.php new file mode 100644 index 0000000..8068c7b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/taxonomies.php @@ -0,0 +1,41 @@ +' . esc_html__( 'Taxonomies sitemap settings', 'wordpress-seo' ) . ''; + +/** + * Filter the taxonomies to present in interface for exclusion. + * + * @param array $taxonomies Array of taxonomy objects. + */ +$taxonomies = apply_filters( 'wpseo_sitemaps_supported_taxonomies', get_taxonomies( array( 'public' => true ), 'objects' ) ); +if ( is_array( $taxonomies ) && $taxonomies !== array() ) { + foreach ( $taxonomies as $tax ) { + // Explicitly hide all the core taxonomies we never want in our sitemap. + if ( in_array( $tax->name, array( 'link_category', 'nav_menu' ) ) ) { + continue; + } + + $title_options = WPSEO_Options::get_option( 'wpseo_titles' ); + + if ( 'post_format' === $tax->name && ! empty( $title_options['disable-post_format'] ) ) { + continue; + } + + if ( isset( $tax->labels->name ) && trim( $tax->labels->name ) != '' ) { + $yform->toggle_switch( + 'taxonomies-' . $tax->name . '-not_in_sitemap', + $switch_values, + $tax->labels->name . ' (' . $tax->name . ')' + ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/user-sitemap.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/user-sitemap.php new file mode 100644 index 0000000..cf718a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/sitemaps/user-sitemap.php @@ -0,0 +1,41 @@ +' . esc_html__( 'User sitemap settings', 'wordpress-seo' ) . ''; + +$yform->toggle_switch( + 'disable_author_sitemap', + array( 'off' => __( 'Enabled', 'wordpress-seo' ), 'on' => __( 'Disabled', 'wordpress-seo' ) ), + __( 'Author / user sitemap', 'wordpress-seo' ) +); + +printf( '

    %s

    ', __( 'The user sitemap contains the author archive URLs for every user on your site.', 'wordpress-seo' ) ); + +echo '
    '; + +$switch_values = array( + 'off' => __( 'In sitemap', 'wordpress-seo' ), + 'on' => __( 'Not in sitemap', 'wordpress-seo' ), +); +$yform->toggle_switch( 'disable_author_noposts', $switch_values, __( 'Users without posts', 'wordpress-seo' ) ); + +printf( '

    %s

    ', __( 'You can choose to not include users without posts.', 'wordpress-seo' ) ); + +$roles = WPSEO_Utils::get_roles(); +unset( $roles['subscriber'] ); +if ( is_array( $roles ) && $roles !== array() ) { + echo '

    ' . esc_html__( 'Filter specific user roles', 'wordpress-seo' ) . '

    '; + foreach ( $roles as $role_key => $role_name ) { + $yform->toggle_switch( 'user_role-' . $role_key . '-not_in_sitemap', $switch_values, $role_name ); + } +} + +echo '
    '; diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/social/accounts.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/accounts.php new file mode 100644 index 0000000..728dfc5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/accounts.php @@ -0,0 +1,27 @@ +' . esc_html__( 'Your social profiles', 'wordpress-seo' ) . ''; + +echo '

    '; +_e( 'To let search engines know which social profiles are associated to this site, enter them below:', 'wordpress-seo' ); +echo '

    '; + +$yform->textinput( 'facebook_site', __( 'Facebook Page URL', 'wordpress-seo' ) ); +$yform->textinput( 'twitter_site', __( 'Twitter Username', 'wordpress-seo' ) ); +$yform->textinput( 'instagram_url', __( 'Instagram URL', 'wordpress-seo' ) ); +$yform->textinput( 'linkedin_url', __( 'LinkedIn URL', 'wordpress-seo' ) ); +$yform->textinput( 'myspace_url', __( 'MySpace URL', 'wordpress-seo' ) ); +$yform->textinput( 'pinterest_url', __( 'Pinterest URL', 'wordpress-seo' ) ); +$yform->textinput( 'youtube_url', __( 'YouTube URL', 'wordpress-seo' ) ); +$yform->textinput( 'google_plus_url', __( 'Google+ URL', 'wordpress-seo' ) ); + +do_action( 'wpseo_admin_other_section' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/social/facebook.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/facebook.php new file mode 100644 index 0000000..7fbbe61 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/facebook.php @@ -0,0 +1,54 @@ +' . esc_html__( 'Facebook settings', 'wordpress-seo' ) . ''; + +$yform->light_switch( 'opengraph', __( 'Add Open Graph meta data', 'wordpress-seo' ) ); + +?> +

    + <head> */ + printf( __( 'Add Open Graph meta data to your site\'s %s section, Facebook and other social networks use this data when your pages are shared.', 'wordpress-seo' ), '<head>' ); + ?> +

    + +' . esc_html__( 'Frontpage settings', 'wordpress-seo' ) . ''; + echo '

    ' . esc_html__( 'These are the title, description and image used in the Open Graph meta tags on the front page of your site.', 'wordpress-seo' ) . '

    '; + + $yform->media_input( 'og_frontpage_image', __( 'Image URL', 'wordpress-seo' ) ); + $yform->textinput( 'og_frontpage_title', __( 'Title', 'wordpress-seo' ) ); + $yform->textinput( 'og_frontpage_desc', __( 'Description', 'wordpress-seo' ) ); + + // Offer copying of meta description. + $meta_options = get_option( 'wpseo_titles' ); + echo ''; + echo '

    ', esc_html__( 'Copy home meta description', 'wordpress-seo' ), '

    '; + +} + +echo '

    ' . esc_html__( 'Default settings', 'wordpress-seo' ) . '

    '; + +$yform->media_input( 'og_default_image', __( 'Image URL', 'wordpress-seo' ) ); + +?> +

    + +

    + +show_form(); + +do_action( 'wpseo_admin_opengraph_section' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/social/google.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/google.php new file mode 100644 index 0000000..9008b87 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/google.php @@ -0,0 +1,18 @@ +' . esc_html__( 'Google+ settings', 'wordpress-seo' ) . ''; + +printf( '

    %s

    ', __( 'If you have a Google+ page for your business, add that URL here and link it on your Google+ page\'s about page.', 'wordpress-seo' ) ); + +$yform->textinput( 'plus-publisher', __( 'Google Publisher Page', 'wordpress-seo' ) ); + +do_action( 'wpseo_admin_googleplus_section' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/social/pinterest.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/pinterest.php new file mode 100644 index 0000000..b9cace3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/pinterest.php @@ -0,0 +1,23 @@ +' . esc_html__( 'Pinterest settings', 'wordpress-seo' ) . ''; + +printf( '

    %s

    ', __( 'Pinterest uses Open Graph metadata just like Facebook, so be sure to keep the Open Graph checkbox on the Facebook tab checked if you want to optimize your site for Pinterest.', 'wordpress-seo' ) ); +printf( '

    %s

    ', __( 'If you have already confirmed your website with Pinterest, you can skip the step below.', 'wordpress-seo' ) ); + +/* translators: %1$s / %2$s expands to a link to pinterest.com's help page. */ +$p = sprintf( __( 'To %1$sconfirm your site with Pinterest%2$s, add the meta tag here:', 'wordpress-seo' ), '', '' ); +printf( '

    %s

    ', $p ); + +$yform->textinput( 'pinterestverify', __( 'Pinterest confirmation', 'wordpress-seo' ) ); + +do_action( 'wpseo_admin_pinterest_section' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/social/twitterbox.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/twitterbox.php new file mode 100644 index 0000000..9bc06bb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/social/twitterbox.php @@ -0,0 +1,24 @@ +' . esc_html__( 'Twitter settings', 'wordpress-seo' ) . ''; + +$yform->light_switch( 'twitter', __( 'Add Twitter card meta data', 'wordpress-seo' ) ); + +/* translators: %s expands to <head> */ +$p = sprintf( __( 'Add Twitter card meta data to your site\'s %s section.', 'wordpress-seo' ), '<head>' ); +printf( '

    %s

    ', $p ); + +echo '
    '; + +$yform->select( 'twitter_card_type', __( 'The default card type to use', 'wordpress-seo' ), WPSEO_Option_Social::$twitter_card_types ); + +do_action( 'wpseo_admin_twitter_section' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/import-seo.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/import-seo.php new file mode 100644 index 0000000..403e810 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/import-seo.php @@ -0,0 +1,36 @@ + +

    + +

    ', '' ); ?>

    + +
    + checkbox( 'importheadspace', __( 'Import from HeadSpace2?', 'wordpress-seo' ) ); + $yform->checkbox( 'importaioseo', __( 'Import from All-in-One SEO?', 'wordpress-seo' ) ); + $yform->checkbox( 'importwoo', __( 'Import from WooThemes SEO framework?', 'wordpress-seo' ) ); + $yform->checkbox( 'importwpseo', __( 'Import from wpSEO', 'wordpress-seo' ) ); + + do_action( 'wpseo_import_other_plugins' ); + ?> +
    + checkbox( 'deleteolddata', __( 'Delete the old data after import? (recommended)', 'wordpress-seo' ) ); + ?> +
    + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-export.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-export.php new file mode 100644 index 0000000..a9e15c3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-export.php @@ -0,0 +1,26 @@ +

    +
    + checkbox( 'include_taxonomy_meta', __( 'Include Taxonomy Metadata', 'wordpress-seo' ) ); ?>
    + + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-import.php b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-import.php new file mode 100644 index 0000000..d4bff8d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-import.php @@ -0,0 +1,26 @@ + +

    settings.zip and clicking "Import settings"', 'wordpress-seo' ); ?>

    + +
    + + + +
    +
    + +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tool-bulk-editor.php b/wp-content/plugins/wordpress-seo/admin/views/tool-bulk-editor.php new file mode 100644 index 0000000..77a90c9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tool-bulk-editor.php @@ -0,0 +1,81 @@ +set_screen_reader_content( array( + 'heading_views' => __( 'Filter posts list' ), + 'heading_pagination' => __( 'Posts list navigation' ), + 'heading_list' => __( 'Posts list' ), +) ); + +// If type is empty, fill it with value of first tab (title). +$_GET['type'] = ( ! empty( $_GET['type'] ) ) ? $_GET['type'] : 'title'; + +if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) ); + exit; +} + +/** + * Outputs a help center. + * + * @param string $id The id for the tab. + */ +function render_help_center( $id ) { + $helpcenter_tab = new WPSEO_Option_Tab( 'bulk-' . $id, 'Bulk editor', + array( 'video_url' => 'https://yoa.st/screencast-tools-bulk-editor' ) ); + + $helpcenter = new WPSEO_Help_Center( 'bulk-editor' . $id, $helpcenter_tab ); + $helpcenter->output_help_center(); +} + +/** + * Renders a bulk editor tab. + * + * @param WPSEO_Bulk_List_Table $table The table to render. + * @param string $id The id for the tab. + */ +function get_rendered_tab( $table, $id ) { + ?> +
    + show_page(); + ?> +
    + + + +

    + +
    + + + +
    + + +
    +
    diff --git a/wp-content/plugins/wordpress-seo/admin/views/tool-file-editor.php b/wp-content/plugins/wordpress-seo/admin/views/tool-file-editor.php new file mode 100644 index 0000000..18c9731 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tool-file-editor.php @@ -0,0 +1,150 @@ +

    ', esc_html( $msg ), '

    '; +} + +if ( is_multisite() ) { + $action_url = network_admin_url( 'admin.php?page=wpseo_files' ); +} +else { + $action_url = admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); +} + +echo '

    '; +$helpcenter_tab = new WPSEO_Option_Tab( 'bulk-editor', 'Bulk editor', + array( 'video_url' => 'https://yoa.st/screencast-tools-file-editor' ) ); + +$helpcenter = new WPSEO_Help_Center( 'bulk-editor', $helpcenter_tab ); +$helpcenter->output_help_center(); + +echo '

    ', __( 'Robots.txt', 'wordpress-seo' ), '

    '; + + +if ( ! file_exists( $robots_file ) ) { + if ( is_writable( get_home_path() ) ) { + echo '
    '; + wp_nonce_field( 'wpseo_create_robots', '_wpnonce', true, true ); + echo '

    ', __( 'You don\'t have a robots.txt file, create one here:', 'wordpress-seo' ), '

    '; + echo ''; + echo '
    '; + } + else { + echo '

    ', __( 'If you had a robots.txt file and it was editable, you could edit it from here.', 'wordpress-seo' ), '

    '; + } +} +else { + $f = fopen( $robots_file, 'r' ); + + $content = ''; + if ( filesize( $robots_file ) > 0 ) { + $content = fread( $f, filesize( $robots_file ) ); + } + $robots_txt_content = esc_textarea( $content ); + + if ( ! is_writable( $robots_file ) ) { + echo '

    ', __( 'If your robots.txt were writable, you could edit it from here.', 'wordpress-seo' ), '

    '; + echo '
    '; + } + else { + echo '
    '; + wp_nonce_field( 'wpseo-robotstxt', '_wpnonce', true, true ); + echo '

    '; + echo '
    '; + echo '
    '; + echo '
    '; + } +} +if ( ( isset( $_SERVER['SERVER_SOFTWARE'] ) && stristr( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) === false ) ) { + + echo '

    ', __( '.htaccess file', 'wordpress-seo' ), '

    '; + + if ( file_exists( $ht_access_file ) ) { + $f = fopen( $ht_access_file, 'r' ); + + $contentht = ''; + if ( filesize( $ht_access_file ) > 0 ) { + $contentht = fread( $f, filesize( $ht_access_file ) ); + } + $contentht = esc_textarea( $contentht ); + + if ( ! is_writable( $ht_access_file ) ) { + echo '

    ', __( 'If your .htaccess were writable, you could edit it from here.', 'wordpress-seo' ), '

    '; + echo '
    '; + } + else { + echo '
    '; + wp_nonce_field( 'wpseo-htaccess', '_wpnonce', true, true ); + echo '

    '; + echo '
    '; + echo '
    '; + echo '
    '; + } + } + else { + echo '

    ', __( 'If you had a .htaccess file and it was editable, you could edit it from here.', 'wordpress-seo' ), '

    '; + } +} diff --git a/wp-content/plugins/wordpress-seo/admin/views/tool-import-export.php b/wp-content/plugins/wordpress-seo/admin/views/tool-import-export.php new file mode 100644 index 0000000..5356fcb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/tool-import-export.php @@ -0,0 +1,135 @@ +import_headspace(); + } + + if ( ! empty( $post_wpseo['importwpseo'] ) || filter_input( INPUT_GET, 'importwpseo' ) ) { + $import = new WPSEO_Import_WPSEO( $replace ); + } +} + +if ( isset( $_FILES['settings_import_file'] ) ) { + check_admin_referer( 'wpseo-import-file' ); + + $import = new WPSEO_Import(); +} + +/** + * Allow custom import actions. + * + * @api bool|object $import Contains info about the handled import + */ +$import = apply_filters( 'wpseo_handle_import', $import ); + +if ( $import ) { + /** + * Allow customization of import&export message + * + * @api string $msg The message. + */ + $msg = apply_filters( 'wpseo_import_message', isset( $import->msg ) ? $import->msg : '' ); + + if ( $msg != '' ) { + // Check if we've deleted old data and adjust message to match it. + if ( $replace ) { + $msg .= ' ' . __( 'The old data of the imported plugin was deleted successfully.', 'wordpress-seo' ); + } + + $status = ( $import->success ) ? 'updated' : 'error'; + + echo '

    ', $msg, '

    '; + } +} + +$tabs = array( + 'wpseo-import' => array( + 'label' => __( 'Import settings', 'wordpress-seo' ), + 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', + ), + 'wpseo-export' => array( + 'label' => __( 'Export settings', 'wordpress-seo' ), + 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', + ), + 'import-seo' => array( + 'label' => __( 'Import from other SEO plugins', 'wordpress-seo' ), + 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', + ), +); + +?> +

    + + + + $tab ) { + + printf( '
    ', $identifier ); + + if ( ! empty( $tab['screencast_video_url'] ) ) { + $tab_video_url = $tab['screencast_video_url']; + + $helpcenter_tab = new WPSEO_Option_Tab( $identifier, $tab['label'], + array( 'video_url' => $tab['screencast_video_url'] ) ); + + $helpcenter = new WPSEO_Help_Center( $identifier, $helpcenter_tab ); + $helpcenter->output_help_center(); + } + + require_once WPSEO_PATH . 'admin/views/tabs/tool/' . $identifier . '.php'; + + echo '
    '; +} + +/** + * Allow adding a custom import tab + */ +do_action( 'wpseo_import_tab_content' ); diff --git a/wp-content/plugins/wordpress-seo/admin/views/user-profile.php b/wp-content/plugins/wordpress-seo/admin/views/user-profile.php new file mode 100644 index 0000000..5ef1258 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/admin/views/user-profile.php @@ -0,0 +1,90 @@ + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + ID ) === 'on' ) ? 'checked' : ''; ?> /> + +
    + ID ) === 'on' ) ? 'checked' : ''; ?> /> + +

    + +

    +
    + ID ) === 'on' ) ? 'checked' : ''; ?> /> + +

    + +

    +
    +

    diff --git a/wp-content/plugins/wordpress-seo/css/admin-global-370.min.css b/wp-content/plugins/wordpress-seo/css/admin-global-370.min.css new file mode 100644 index 0000000..dc211ba --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/admin-global-370.min.css @@ -0,0 +1 @@ +.wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 0 -3px 2px;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 10px 0 0;font-size:14px;font-weight:700}.wpseo-premium-popup-title{margin:1em 0;font-size:1.3em}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/admin-global-370.min.rapido.css b/wp-content/plugins/wordpress-seo/css/admin-global-370.min.rapido.css new file mode 100644 index 0000000..108ea85 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/admin-global-370.min.rapido.css @@ -0,0 +1 @@ +.wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 0 -3px 2px;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 10px 0 0;font-size:14px;font-weight:700}.wpseo-premium-popup-title{margin:1em 0;font-size:1.3em}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px !important;line-height:inherit}.yoast-label-strong{font-weight:600} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/adminbar-340.min.css b/wp-content/plugins/wordpress-seo/css/adminbar-340.min.css new file mode 100644 index 0000000..4b1017a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/adminbar-340.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block!important;float:left;width:12px!important;height:12px!important;border-radius:50%!important;background-color:#999}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}.adminbar-seo-score{margin:10px 10px 0 4px!important}#wpadminbar .yoast-issue-added,#wpadminbar .yoast-issue-added:hover{position:absolute;top:32px;left:0;min-width:300px;padding:2px 8px;border-radius:0 10px 10px;color:#fff;background-color:#a4286a;box-shadow:1px 1px 1px 1px grey}#wpadminbar .yoast-issue-added{display:none}#wpadminbar .yoast-issue-counter{display:inline;padding:1px 7px 1px 6px!important;border-radius:50%;color:#fff}.yoast-issue-counter{background-color:#d54e21}#wpadminbar .yoast-logo.svg{float:left;width:26px;height:30px;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgc3R5bGU9ImZpbGw6IzgyODc4YyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxnPjxnPjxnPjxnPjxwYXRoIGQ9Ik0yMDMuNiwzOTVjNi44LTE3LjQsNi44LTM2LjYsMC01NGwtNzkuNC0yMDRoNzAuOWw0Ny43LDE0OS40bDc0LjgtMjA3LjZIMTE2LjRjLTQxLjgsMC03NiwzNC4yLTc2LDc2VjM1N2MwLDQxLjgsMzQuMiw3Niw3Niw3NkgxNzNDMTg5LDQyNC4xLDE5Ny42LDQxMC4zLDIwMy42LDM5NXoiLz48L2c+PGc+PHBhdGggZD0iTTQ3MS42LDE1NC44YzAtNDEuOC0zNC4yLTc2LTc2LTc2aC0zTDI4NS43LDM2NWMtOS42LDI2LjctMTkuNCw0OS4zLTMwLjMsNjhoMjE2LjJWMTU0Ljh6Ii8+PC9nPjwvZz48cGF0aCBzdHJva2Utd2lkdGg9IjIuOTc0IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0zMzgsMS4zbC05My4zLDI1OS4xbC00Mi4xLTEzMS45aC04OS4xbDgzLjgsMjE1LjJjNiwxNS41LDYsMzIuNSwwLDQ4Yy03LjQsMTktMTksMzcuMy01Myw0MS45bC03LjIsMXY3Nmg4LjNjODEuNywwLDExOC45LTU3LjIsMTQ5LjYtMTQyLjlMNDMxLjYsMS4zSDMzOHogTTI3OS40LDM2MmMtMzIuOSw5Mi02Ny42LDEyOC43LTEyNS43LDEzMS44di00NWMzNy41LTcuNSw1MS4zLTMxLDU5LjEtNTEuMWM3LjUtMTkuMyw3LjUtNDAuNywwLTYwbC03NS0xOTIuN2g1Mi44bDUzLjMsMTY2LjhsMTA1LjktMjk0aDU4LjFMMjc5LjQsMzYyeiIvPjwvZz48L2c+PC9zdmc+);background-repeat:no-repeat;background-position:0 6px;background-size:20px}#wpadminbar #wp-admin-bar-wpseo-licenses .ab-item{color:#f18500} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/adminbar-340.min.rapido.css b/wp-content/plugins/wordpress-seo/css/adminbar-340.min.rapido.css new file mode 100644 index 0000000..d2320bf --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/adminbar-340.min.rapido.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block !important;float:left;width:12px !important;height:12px !important;border-radius:50% !important;background-color:#999}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}.adminbar-seo-score{margin:10px 10px 0 4px !important}#wpadminbar .yoast-issue-added,#wpadminbar .yoast-issue-added:hover{position:absolute;top:32px;left:0;min-width:300px;padding:2px 8px;border-radius:0 10px 10px;color:#fff;background-color:#a4286a;box-shadow:1px 1px 1px 1px grey}#wpadminbar .yoast-issue-added{display:none}#wpadminbar .yoast-issue-counter{display:inline;padding:1px 7px 1px 6px !important;border-radius:50%;color:#fff}.yoast-issue-counter{background-color:#d54e21}#wpadminbar .yoast-logo.svg{float:left;width:26px;height:30px;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgc3R5bGU9ImZpbGw6IzgyODc4YyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxnPjxnPjxnPjxnPjxwYXRoIGQ9Ik0yMDMuNiwzOTVjNi44LTE3LjQsNi44LTM2LjYsMC01NGwtNzkuNC0yMDRoNzAuOWw0Ny43LDE0OS40bDc0LjgtMjA3LjZIMTE2LjRjLTQxLjgsMC03NiwzNC4yLTc2LDc2VjM1N2MwLDQxLjgsMzQuMiw3Niw3Niw3NkgxNzNDMTg5LDQyNC4xLDE5Ny42LDQxMC4zLDIwMy42LDM5NXoiLz48L2c+PGc+PHBhdGggZD0iTTQ3MS42LDE1NC44YzAtNDEuOC0zNC4yLTc2LTc2LTc2aC0zTDI4NS43LDM2NWMtOS42LDI2LjctMTkuNCw0OS4zLTMwLjMsNjhoMjE2LjJWMTU0Ljh6Ii8+PC9nPjwvZz48cGF0aCBzdHJva2Utd2lkdGg9IjIuOTc0IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0zMzgsMS4zbC05My4zLDI1OS4xbC00Mi4xLTEzMS45aC04OS4xbDgzLjgsMjE1LjJjNiwxNS41LDYsMzIuNSwwLDQ4Yy03LjQsMTktMTksMzcuMy01Myw0MS45bC03LjIsMXY3Nmg4LjNjODEuNywwLDExOC45LTU3LjIsMTQ5LjYtMTQyLjlMNDMxLjYsMS4zSDMzOHogTTI3OS40LDM2MmMtMzIuOSw5Mi02Ny42LDEyOC43LTEyNS43LDEzMS44di00NWMzNy41LTcuNSw1MS4zLTMxLDU5LjEtNTEuMWM3LjUtMTkuMyw3LjUtNDAuNywwLTYwbC03NS0xOTIuN2g1Mi44bDUzLjMsMTY2LjhsMTA1LjktMjk0aDU4LjFMMjc5LjQsMzYyeiIvPjwvZz48L2c+PC9zdmc+);background-repeat:no-repeat;background-position:0 6px;background-size:20px}#wpadminbar #wp-admin-bar-wpseo-licenses .ab-item{color:#f18500} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/alerts-340.min.css b/wp-content/plugins/wordpress-seo/css/alerts-340.min.css new file mode 100644 index 0000000..7d0d641 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/alerts-340.min.css @@ -0,0 +1 @@ +.yoast-alert{padding:0 12px;border-left:4px solid #fff;background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.yoast-alerts .yoast-alert-holder{margin-bottom:.8em}.yoast-alerts .yoast-alert{width:100%}.yoast-container__alert .yoast-alert{border-left-color:#dc3232}#yoast-alerts-dismissed .yoast-alert{border-left-color:#d93f69}.yoast-container__warning .yoast-alert{border-left-color:#5d237a}#yoast-warnings-dismissed .yoast-alert{border-left-color:#0075b3}.yoast-container{position:relative;max-width:1280px;margin-bottom:2em;padding:20px 20px 0;border:1px solid #bbb;background-color:#f1f1f1;box-shadow:0 2px 8px rgba(0,0,0,.1)}.yoast-alerts>h2:first-child{margin-bottom:1em}.yoast-alerts .yoast-container h3{margin:-20px -20px 0;padding:1em;border-bottom:1px solid #ccc;background-color:#dfdfdf;text-shadow:1px 1px 0 #eee;font-size:1.6em}h3 .dashicons-warning{color:#dc3232}.yoast-container .container{max-width:980px}.yoast-container .yoast-alert-holder{display:-ms-flexbox;display:flex}.dismiss .dashicons,.restore .dashicons{width:24px;height:24px;font-size:24px}.yoast-bottom-spacing{margin-bottom:20px}.yoast-alerts .button.dismiss,.yoast-alerts .button.restore{width:40px;height:40px;line-height:inherit;-ms-flex:0 0 40px;flex:0 0 40px}.yoast-alerts .button.dismiss:focus,.yoast-alerts .button.dismiss:hover,.yoast-alerts .button.restore:focus,.yoast-alerts .button.restore:hover{background:0 0}.yoast-container .separator{margin-top:1em;margin-bottom:1em;border-top:1px solid #ddd}.yoast-container .dashicons-yes{color:#77b227}.yoast-container__warning .dashicons-flag{color:#5d237a}.yoast-container-disabled{display:table-cell;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:4px;background-color:rgba(232,232,232,.7)}.yoast-no-issues{padding:1em 1em 1em 16px;color:#666} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/alerts-340.min.rapido.css b/wp-content/plugins/wordpress-seo/css/alerts-340.min.rapido.css new file mode 100644 index 0000000..ea18af4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/alerts-340.min.rapido.css @@ -0,0 +1 @@ +.yoast-alert{padding:0 12px;border-left:4px solid #fff;background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.yoast-alerts .yoast-alert-holder{margin-bottom:.8em}.yoast-alerts .yoast-alert{width:100%}.yoast-container__alert .yoast-alert{border-left-color:#dc3232}#yoast-alerts-dismissed .yoast-alert{border-left-color:#d93f69}.yoast-container__warning .yoast-alert{border-left-color:#5d237a}#yoast-warnings-dismissed .yoast-alert{border-left-color:#0075b3}.yoast-container{position:relative;max-width:1280px;margin-bottom:2em;padding:20px 20px 0;border:1px solid #bbb;background-color:#f1f1f1;box-shadow:0 2px 8px rgba(0,0,0,0.1)}.yoast-alerts>h2:first-child{margin-bottom:1em}.yoast-alerts .yoast-container h3{margin:-20px -20px 0;padding:1em;border-bottom:1px solid #ccc;background-color:#dfdfdf;text-shadow:1px 1px 0 #eee;font-size:1.6em}h3 .dashicons-warning{color:#dc3232}.yoast-container .container{max-width:980px}.yoast-container .yoast-alert-holder{display:-ms-flexbox;display:flex}.dismiss .dashicons,.restore .dashicons{width:24px;height:24px;font-size:24px}.yoast-bottom-spacing{margin-bottom:20px}.yoast-alerts .button.dismiss,.yoast-alerts .button.restore{width:40px;height:40px;line-height:inherit;-ms-flex:0 0 40px;flex:0 0 40px}.yoast-alerts .button.dismiss:focus,.yoast-alerts .button.dismiss:hover,.yoast-alerts .button.restore:focus,.yoast-alerts .button.restore:hover{background:0 0}.yoast-container .separator{margin-top:1em;margin-bottom:1em;border-top:1px solid #ddd}.yoast-container .dashicons-yes{color:#77b227}.yoast-container__warning .dashicons-flag{color:#5d237a}.yoast-container-disabled{display:table-cell;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:4px;background-color:rgba(232,232,232,0.7)}.yoast-no-issues{padding:1em 1em 1em 16px;color:#666} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dashboard-360.min.css b/wp-content/plugins/wordpress-seo/css/dashboard-360.min.css new file mode 100644 index 0000000..f08dbda --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dashboard-360.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin:3px 10px 0 3px;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}#wpseo-dashboard-overview a{text-decoration:underline}#wpseo-dashboard-overview a.button{text-decoration:none}#wpseo-dashboard-overview th{font-weight:400;text-align:left}.wpseo-dashboard-overview-scores{display:table}.wpseo-dashboard-overview-scores li{display:table-row}.wpseo-dashboard-overview-post-count,.wpseo-dashboard-overview-post-score{display:table-cell;padding:2px 0}.wpseo-dashboard-overview-post-count{padding:0 0 0 10px;text-align:right}#wpseo-dashboard-overview .onpage{margin:5px 0 0;padding:10px 0 0;border-top:1px solid #eee}#wpseo-dashboard-overview .onpage .button.landing-page{border-color:#7b1e4f #6f1b47 #6f1b47;color:#fff;background:#a4286a;box-shadow:0 1px 0 #6f1b47}#wpseo-dashboard-overview .onpage .button.landing-page:focus,#wpseo-dashboard-overview .onpage .button.landing-page:hover{border-color:#6f1b47;background:#90235d}#wpseo-dashboard-overview .onpage .button.landing-page:focus{box-shadow:0 1px 0 #7b1e4f,0 0 2px 1px #a35685}#wpseo-dashboard-overview .onpage .button.landing-page:active{border-color:#6f1b47;background:#7b1e4f;box-shadow:inset 0 2px 0 #6f1b47;vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.css new file mode 100644 index 0000000..ca5bfb8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.css @@ -0,0 +1,61 @@ +.wpseo-premium-indicator { + display: inline-block; + width: 1px; + height: 1px; +} + +#adminmenu .wpseo-premium-indicator { + margin: -2px 2px -3px 0; + color: inherit; +} + +.wpseo-premium-indicator svg { + display: none; + width: auto; + height: 100%; +} + +#TB_window .wpseo_content_wrapper p { + font-size: 14px; + font-style: normal; +} + +#TB_window .wpseo_content_wrapper label { + margin: 0 0 0 10px; + font-size: 14px; + font-weight: bold; +} + +.wpseo-premium-popup-title { + margin: 1em 0; + font-size: 1.3em; +} + +.wpseo-premium-popup-icon { + margin: 10px; +} + +.edit-tags-php .column-description img { + max-width: 100%; + height: auto; +} + +/* Select2 specific fixes for WordPress */ +.select2-search__field { + margin: 0; +} + +.select2-results__option, +.select2-selection__choice, +.select2-search--inline { + margin-bottom: 0; +} + +.select2-container .select2-search--inline .select2-search__field { + margin-top: 6px !important; + line-height: inherit; +} + +.yoast-label-strong { + font-weight: 600; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.min.css new file mode 100644 index 0000000..b616834 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/admin-global-370-rtl.min.css @@ -0,0 +1 @@ +.wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 2px -3px 0;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 0 0 10px;font-size:14px;font-weight:700}.wpseo-premium-popup-title{margin:1em 0;font-size:1.3em}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.css new file mode 100644 index 0000000..2035a7a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.css @@ -0,0 +1,74 @@ +.wpseo-score-icon { + display: inline-block !important; + float: right; + width: 12px !important; + height: 12px !important; + border-radius: 50% !important; + background-color: #999; +} + +.wpseo-score-icon.good { + background-color: #7ad03a; +} + +.wpseo-score-icon.ok { + background-color: #ee7c1b; +} + +.wpseo-score-icon.bad { + background-color: #dc3232; +} + +.wpseo-score-icon.na { + background-color: #999; +} + +.wpseo-score-icon.noindex { + background-color: #1e8cbe; +} + +.adminbar-seo-score { + margin: 10px 4px 0 10px !important; +} + +#wpadminbar .yoast-issue-added, +#wpadminbar .yoast-issue-added:hover { + position: absolute; + top: 32px; + right: 0; + min-width: 300px; + padding: 2px 8px; + border-radius: 10px 0 10px 10px; + color: white; + background-color: #a4286a; + box-shadow: -1px 1px 1px 1px grey; +} + +#wpadminbar .yoast-issue-added { + display: none; +} + +#wpadminbar .yoast-issue-counter { + display: inline; + padding: 1px 6px 1px 7px !important; + border-radius: 50%; + color: white; +} + +.yoast-issue-counter { + background-color: #d54e21; +} + +#wpadminbar .yoast-logo.svg { + float: right; + width: 26px; + height: 30px; + background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgc3R5bGU9ImZpbGw6IzgyODc4YyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxnPjxnPjxnPjxnPjxwYXRoIGQ9Ik0yMDMuNiwzOTVjNi44LTE3LjQsNi44LTM2LjYsMC01NGwtNzkuNC0yMDRoNzAuOWw0Ny43LDE0OS40bDc0LjgtMjA3LjZIMTE2LjRjLTQxLjgsMC03NiwzNC4yLTc2LDc2VjM1N2MwLDQxLjgsMzQuMiw3Niw3Niw3NkgxNzNDMTg5LDQyNC4xLDE5Ny42LDQxMC4zLDIwMy42LDM5NXoiLz48L2c+PGc+PHBhdGggZD0iTTQ3MS42LDE1NC44YzAtNDEuOC0zNC4yLTc2LTc2LTc2aC0zTDI4NS43LDM2NWMtOS42LDI2LjctMTkuNCw0OS4zLTMwLjMsNjhoMjE2LjJWMTU0Ljh6Ii8+PC9nPjwvZz48cGF0aCBzdHJva2Utd2lkdGg9IjIuOTc0IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0zMzgsMS4zbC05My4zLDI1OS4xbC00Mi4xLTEzMS45aC04OS4xbDgzLjgsMjE1LjJjNiwxNS41LDYsMzIuNSwwLDQ4Yy03LjQsMTktMTksMzcuMy01Myw0MS45bC03LjIsMXY3Nmg4LjNjODEuNywwLDExOC45LTU3LjIsMTQ5LjYtMTQyLjlMNDMxLjYsMS4zSDMzOHogTTI3OS40LDM2MmMtMzIuOSw5Mi02Ny42LDEyOC43LTEyNS43LDEzMS44di00NWMzNy41LTcuNSw1MS4zLTMxLDU5LjEtNTEuMWM3LjUtMTkuMyw3LjUtNDAuNywwLTYwbC03NS0xOTIuN2g1Mi44bDUzLjMsMTY2LjhsMTA1LjktMjk0aDU4LjFMMjc5LjQsMzYyeiIvPjwvZz48L2c+PC9zdmc+"); + background-repeat: no-repeat; + background-position: 100% 6px; + background-size: 20px; +} + +#wpadminbar #wp-admin-bar-wpseo-licenses .ab-item { + color: #f18500; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.min.css new file mode 100644 index 0000000..b15e8bd --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/adminbar-340-rtl.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block!important;float:right;width:12px!important;height:12px!important;border-radius:50%!important;background-color:#999}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}.adminbar-seo-score{margin:10px 4px 0 10px!important}#wpadminbar .yoast-issue-added,#wpadminbar .yoast-issue-added:hover{position:absolute;top:32px;right:0;min-width:300px;padding:2px 8px;border-radius:10px 0 10px 10px;color:#fff;background-color:#a4286a;box-shadow:-1px 1px 1px 1px grey}#wpadminbar .yoast-issue-added{display:none}#wpadminbar .yoast-issue-counter{display:inline;padding:1px 6px 1px 7px!important;border-radius:50%;color:#fff}.yoast-issue-counter{background-color:#d54e21}#wpadminbar .yoast-logo.svg{float:right;width:26px;height:30px;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgc3R5bGU9ImZpbGw6IzgyODc4YyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxnPjxnPjxnPjxnPjxwYXRoIGQ9Ik0yMDMuNiwzOTVjNi44LTE3LjQsNi44LTM2LjYsMC01NGwtNzkuNC0yMDRoNzAuOWw0Ny43LDE0OS40bDc0LjgtMjA3LjZIMTE2LjRjLTQxLjgsMC03NiwzNC4yLTc2LDc2VjM1N2MwLDQxLjgsMzQuMiw3Niw3Niw3NkgxNzNDMTg5LDQyNC4xLDE5Ny42LDQxMC4zLDIwMy42LDM5NXoiLz48L2c+PGc+PHBhdGggZD0iTTQ3MS42LDE1NC44YzAtNDEuOC0zNC4yLTc2LTc2LTc2aC0zTDI4NS43LDM2NWMtOS42LDI2LjctMTkuNCw0OS4zLTMwLjMsNjhoMjE2LjJWMTU0Ljh6Ii8+PC9nPjwvZz48cGF0aCBzdHJva2Utd2lkdGg9IjIuOTc0IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0zMzgsMS4zbC05My4zLDI1OS4xbC00Mi4xLTEzMS45aC04OS4xbDgzLjgsMjE1LjJjNiwxNS41LDYsMzIuNSwwLDQ4Yy03LjQsMTktMTksMzcuMy01Myw0MS45bC03LjIsMXY3Nmg4LjNjODEuNywwLDExOC45LTU3LjIsMTQ5LjYtMTQyLjlMNDMxLjYsMS4zSDMzOHogTTI3OS40LDM2MmMtMzIuOSw5Mi02Ny42LDEyOC43LTEyNS43LDEzMS44di00NWMzNy41LTcuNSw1MS4zLTMxLDU5LjEtNTEuMWM3LjUtMTkuMyw3LjUtNDAuNywwLTYwbC03NS0xOTIuN2g1Mi44bDUzLjMsMTY2LjhsMTA1LjktMjk0aDU4LjFMMjc5LjQsMzYyeiIvPjwvZz48L2c+PC9zdmc+);background-repeat:no-repeat;background-position:100% 6px;background-size:20px}#wpadminbar #wp-admin-bar-wpseo-licenses .ab-item{color:#f18500} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.css new file mode 100644 index 0000000..ebe5cb9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.css @@ -0,0 +1,125 @@ +.yoast-alert { + padding: 0 12px; + border-right: 4px solid #fff; + background: #fff; + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); +} + +.yoast-alerts .yoast-alert-holder { + margin-bottom: 0.8em; +} + +.yoast-alerts .yoast-alert { + width: 100%; +} + +.yoast-container__alert .yoast-alert { + border-right-color: #dc3232; +} + +#yoast-alerts-dismissed .yoast-alert { + border-right-color: #d93f69; +} + +.yoast-container__warning .yoast-alert { + border-right-color: #5d237a; +} + +#yoast-warnings-dismissed .yoast-alert { + border-right-color: #0075b3; +} + +.yoast-container { + position: relative; + max-width: 1280px; + margin-bottom: 2em; + padding: 20px 20px 0; + border: 1px solid #bbb; + background-color: #f1f1f1; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.yoast-alerts > h2:first-child { + margin-bottom: 1em; +} + +.yoast-alerts .yoast-container h3 { + margin: -20px -20px 0; + padding: 1em; + border-bottom: 1px solid #ccc; + background-color: #dfdfdf; + text-shadow: -1px 1px 0 #eee; + font-size: 1.6em; +} + +h3 .dashicons-warning { + color: #dc3232; +} + +.yoast-container .container { + max-width: 980px; +} + +.yoast-container .yoast-alert-holder { + display: -ms-flexbox; + display: flex; +} + +.restore .dashicons, +.dismiss .dashicons { + width: 24px; + height: 24px; + font-size: 24px; +} + +.yoast-bottom-spacing { + margin-bottom: 20px; +} + +/* These selectors need a higher specificity than .wp-core-ui .button */ +.yoast-alerts .button.restore, +.yoast-alerts .button.dismiss { + width: 40px; + height: 40px; + line-height: inherit; + + -ms-flex: 0 0 40px; + flex: 0 0 40px; +} + +.yoast-alerts .button.restore:hover, +.yoast-alerts .button.dismiss:hover, +.yoast-alerts .button.restore:focus, +.yoast-alerts .button.dismiss:focus { + background: transparent; +} + +.yoast-container .separator { + margin-top: 1em; + margin-bottom: 1em; + border-top: 1px solid #ddd; +} + +.yoast-container .dashicons-yes { + color: #77b227; +} + +.yoast-container__warning .dashicons-flag { + color: #5d237a; +} + +.yoast-container-disabled { + display: table-cell; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + border-radius: 4px; + background-color: rgba(232, 232, 232, 0.7); +} + +.yoast-no-issues { + padding: 1em 16px 1em 1em; + color: #666; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.min.css new file mode 100644 index 0000000..5fae0ba --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/alerts-340-rtl.min.css @@ -0,0 +1 @@ +.yoast-alert{padding:0 12px;border-right:4px solid #fff;background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.yoast-alerts .yoast-alert-holder{margin-bottom:.8em}.yoast-alerts .yoast-alert{width:100%}.yoast-container__alert .yoast-alert{border-right-color:#dc3232}#yoast-alerts-dismissed .yoast-alert{border-right-color:#d93f69}.yoast-container__warning .yoast-alert{border-right-color:#5d237a}#yoast-warnings-dismissed .yoast-alert{border-right-color:#0075b3}.yoast-container{position:relative;max-width:1280px;margin-bottom:2em;padding:20px 20px 0;border:1px solid #bbb;background-color:#f1f1f1;box-shadow:0 2px 8px rgba(0,0,0,.1)}.yoast-alerts>h2:first-child{margin-bottom:1em}.yoast-alerts .yoast-container h3{margin:-20px -20px 0;padding:1em;border-bottom:1px solid #ccc;background-color:#dfdfdf;text-shadow:-1px 1px 0 #eee;font-size:1.6em}h3 .dashicons-warning{color:#dc3232}.yoast-container .container{max-width:980px}.yoast-container .yoast-alert-holder{display:-ms-flexbox;display:flex}.dismiss .dashicons,.restore .dashicons{width:24px;height:24px;font-size:24px}.yoast-bottom-spacing{margin-bottom:20px}.yoast-alerts .button.dismiss,.yoast-alerts .button.restore{width:40px;height:40px;line-height:inherit;-ms-flex:0 0 40px;flex:0 0 40px}.yoast-alerts .button.dismiss:focus,.yoast-alerts .button.dismiss:hover,.yoast-alerts .button.restore:focus,.yoast-alerts .button.restore:hover{background:0 0}.yoast-container .separator{margin-top:1em;margin-bottom:1em;border-top:1px solid #ddd}.yoast-container .dashicons-yes{color:#77b227}.yoast-container__warning .dashicons-flag{color:#5d237a}.yoast-container-disabled{display:table-cell;position:absolute;top:0;left:0;bottom:0;right:0;border-radius:4px;background-color:rgba(232,232,232,.7)}.yoast-no-issues{padding:1em 16px 1em 1em;color:#666} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.css new file mode 100644 index 0000000..1160948 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.css @@ -0,0 +1,91 @@ +.wpseo-score-icon { + display: inline-block; + width: 12px; + height: 12px; + margin: 3px 3px 0 10px; + border-radius: 50%; + background: #888; + vertical-align: top; +} + +.wpseo-score-icon.good { + background-color: #7ad03a; +} + +.wpseo-score-icon.ok { + background-color: #ee7c1b; +} + +.wpseo-score-icon.bad { + background-color: #dc3232; +} + +.wpseo-score-icon.na { + background-color: #888; +} + +.wpseo-score-icon.noindex { + background-color: #1e8cbe; +} + +#wpseo-dashboard-overview a { + text-decoration: underline; +} + +#wpseo-dashboard-overview a.button { + text-decoration: none; +} + +#wpseo-dashboard-overview th { + font-weight: 400; + text-align: right; +} + +.wpseo-dashboard-overview-scores { + display: table; +} + +.wpseo-dashboard-overview-scores li { + display: table-row; +} + +.wpseo-dashboard-overview-post-score, +.wpseo-dashboard-overview-post-count { + display: table-cell; + padding: 2px 0; +} + +.wpseo-dashboard-overview-post-count { + padding: 0 10px 0 0; + text-align: left; +} + +#wpseo-dashboard-overview .onpage { + margin: 5px 0 0; + padding: 10px 0 0; + border-top: 1px solid #eee; +} + +#wpseo-dashboard-overview .onpage .button.landing-page { + border-color: #7b1e4f #6f1b47 #6f1b47; + color: #fff; + background: #a4286a; + box-shadow: 0 1px 0 #6f1b47; +} + +#wpseo-dashboard-overview .onpage .button.landing-page:hover, +#wpseo-dashboard-overview .onpage .button.landing-page:focus { + border-color: #6f1b47; + background: #90235d; +} + +#wpseo-dashboard-overview .onpage .button.landing-page:focus { + box-shadow: 0 1px 0 #7b1e4f, 0 0 2px 1px #a35685; +} + +#wpseo-dashboard-overview .onpage .button.landing-page:active { + border-color: #6f1b47; + background: #7b1e4f; + box-shadow: inset 0 2px 0 #6f1b47; + vertical-align: top; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.min.css new file mode 100644 index 0000000..1fb7847 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/dashboard-360-rtl.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin:3px 3px 0 10px;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}#wpseo-dashboard-overview a{text-decoration:underline}#wpseo-dashboard-overview a.button{text-decoration:none}#wpseo-dashboard-overview th{font-weight:400;text-align:right}.wpseo-dashboard-overview-scores{display:table}.wpseo-dashboard-overview-scores li{display:table-row}.wpseo-dashboard-overview-post-count,.wpseo-dashboard-overview-post-score{display:table-cell;padding:2px 0}.wpseo-dashboard-overview-post-count{padding:0 10px 0 0;text-align:left}#wpseo-dashboard-overview .onpage{margin:5px 0 0;padding:10px 0 0;border-top:1px solid #eee}#wpseo-dashboard-overview .onpage .button.landing-page{border-color:#7b1e4f #6f1b47 #6f1b47;color:#fff;background:#a4286a;box-shadow:0 1px 0 #6f1b47}#wpseo-dashboard-overview .onpage .button.landing-page:focus,#wpseo-dashboard-overview .onpage .button.landing-page:hover{border-color:#6f1b47;background:#90235d}#wpseo-dashboard-overview .onpage .button.landing-page:focus{box-shadow:0 1px 0 #7b1e4f,0 0 2px 1px #a35685}#wpseo-dashboard-overview .onpage .button.landing-page:active{border-color:#6f1b47;background:#7b1e4f;box-shadow:inset 0 2px 0 #6f1b47;vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.css new file mode 100644 index 0000000..c8bc25c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.css @@ -0,0 +1,42 @@ +.wpseo-score-icon { + display: inline-block; + width: 12px; + height: 12px; + margin-right: 6px; + border-radius: 50%; + background: #888; + line-height: 16px; +} + +.wpseo-score-icon.good { + background-color: #7ad03a; +} + +.wpseo-score-icon.ok { + background-color: #ee7c1b; +} + +.wpseo-score-icon.bad { + background-color: #dc3232; +} + +.wpseo-score-icon.na { + background-color: #888; +} + +.wpseo-score-icon.noindex { + background-color: #1e8cbe; +} + +th#wpseo-score { + width: 63px; +} + +@media screen and (max-width: 782px) { + .column-wpseo-title, + .column-wpseo-score, + .column-wpseo-metadesc, + .column-wpseo-focuskw { + display: none; + } +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.min.css new file mode 100644 index 0000000..d746414 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/edit-page-330-rtl.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-right:6px;border-radius:50%;background:#888;line-height:16px}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}th#wpseo-score{width:63px}@media screen and (max-width:782px){.column-wpseo-focuskw,.column-wpseo-metadesc,.column-wpseo-score,.column-wpseo-title{display:none}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.css new file mode 100644 index 0000000..80fe00e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.css @@ -0,0 +1,7 @@ +#yst_opengraph_image_warning { + padding: 1px 12px; + border: solid #dc3232; + border-width: 4px 4px 0 4px; + background-color: #fff; + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.min.css new file mode 100644 index 0000000..d2ab2fa --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/featured-image-330-rtl.min.css @@ -0,0 +1 @@ +#yst_opengraph_image_warning{padding:1px 12px;border:solid #dc3232;border-width:4px 4px 0;background-color:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.css new file mode 100644 index 0000000..914ca86 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.css @@ -0,0 +1,207 @@ +/* Dynamically set when the Help is expanded to avoid horizontal scrolling */ +#wpcontent.yoast-help-center-open { + overflow-x: hidden; +} + +.wpseo-tab-video-container { + margin-bottom: 20px; + border-bottom: 1px solid #a4286a; +} + +.wpseo-tab-video-container__handle { + width: 100%; + margin: 0; + padding: 10px; + border: none; + outline: none; + color: #a4286a; + background: none; + line-height: 19px; + text-align: right; + cursor: pointer; +} + +.wpseo-tab-video-container__handle .toggle__arrow { + text-decoration: none; +} + +.wpseo-tab-video-container__handle:hover, +.wpseo-tab-video-container__handle:focus { + text-decoration: underline; +} + +.wpseo-tab-video-container__handle .dashicons-before:before { + margin-left: 5px; +} + +.wpseotab .wpseo-tab-video-container { + margin-top: -15px; +} + +.wpseo-tab-video-slideout { + display: none; + min-height: 320px; + margin: 0 -9999px; + /* hide the container bottom border when expanded */ + margin-bottom: -1px; + padding: 2em 9999px; + background-color: #a4286a; + box-shadow: inset 0 10px 10px -5px rgba(123, 30, 80, 0.5), inset 0 -10px 10px -5px rgba(123, 30, 80, 0.5); + + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +.wpseo-tab-video-slideout .contextual-help-tabs-wrap { + padding: 0; + + flex-basis: 0; + flex-grow: 1; + -ms-flex-negative: 1; + /* do not use the shorthand syntax to avoid the unitless bug in IE 11 */ + -ms-flex-positive: 1; + -ms-flex-preferred-size: 0; + flex-shrink: 1; +} + +.wpseo-tab-video-slideout a { + color: white; +} + +.wpseo-tab-video-slideout a.button, +.wpseo-tab-video-slideout a.button-primary { + text-decoration: none; +} + +.wpseo-tab-video-slideout h1, +.wpseo-tab-video-slideout h2, +.wpseo-tab-video-slideout h3, +.wpseo-tab-video-slideout h4, +.wpseo-tab-video-slideout h5, +.wpseo-tab-video-slideout h6 { + margin-top: 0.5em; + padding-top: 0; + color: white; + font-weight: 500; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea { + float: right; + /* min-width to make two boxes always have the same min width */ + min-width: 234px; + /* max-width to make two boxes take the same space of the video above: 560px */ + max-width: 242px; + margin: 0 0 1em 12px; + padding: 15px 15px 5px; + border: 1px solid; + border-color: white; + border-radius: 30px; + border-bottom-left-radius: 0; + color: white; + background-color: #a4286a; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a, +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover, +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus { + color: white; + font-weight: 500; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3 { + margin: 0; +} + +.wpseo-tab-video-slideout .yoast-help-center-tabs { + width: 180px; + padding: 0 0 1em 1em; + color: white; + background-color: #a4286a; + + -ms-flex: 0 0 auto; + flex: 0 0 auto; +} + +.wpseo-tab-video-slideout .yoast-help-center-tabs ul { + margin: 0; +} + +.wpseo-tab-video-slideout .help-tab-content { + margin: 0; + color: white; + font-weight: 300; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--video { + /* In the settings pages is not a children of the flexbox container. */ + float: right; + margin-left: 1em; + padding-bottom: 1em; + + -ms-flex: 0 0 auto; + flex: 0 0 auto; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe { + /* remove iframe descender space */ + vertical-align: middle; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--text { + min-width: 264px; + margin: 0 auto; + + flex-basis: 0; + flex-grow: 1; + -ms-flex-negative: 1; + /* do not use the shorthand syntax to avoid the unitless bug in IE 11 */ + -ms-flex-positive: 1; + -ms-flex-preferred-size: 0; + flex-shrink: 1; + /* must be less than a text box min width */ +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child { + margin-left: 0; +} + +/* When it's inside the metabox (posts, terms, media ). */ +.postbox .wpseo-tab-video-container { + margin: -6px -12px 20px; +} + +/* When it's inside the metabox (posts, terms, media ). */ +.postbox .wpseo-tab-video-slideout { + margin: 0; + padding: 2em 12px 15px; +} + +.inside .wpseo-tab-video-slideout { + height: auto; +} + +.wpseo-help-center-item { + display: inline; +} + +.wpseo-help-center-item a { + display: block; + padding: 10px 12px; + color: white; + text-decoration: none; +} + +.wpseo-help-center-item a:hover, +.wpseo-help-center-item a:focus { + text-decoration: underline; +} + +.wpseo-help-center-item a.dashicons-before:before { + margin-left: 3px; + text-decoration: none; +} + +.wpseo-help-center-item.active a { + color: #a4286a; + background-color: white; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.min.css new file mode 100644 index 0000000..46becb8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/help-center-340-rtl.min.css @@ -0,0 +1 @@ +#wpcontent.yoast-help-center-open{overflow-x:hidden}.wpseo-tab-video-container{margin-bottom:20px;border-bottom:1px solid #a4286a}.wpseo-tab-video-container__handle{width:100%;margin:0;padding:10px;border:none;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:right;cursor:pointer}.wpseo-tab-video-container__handle .toggle__arrow{text-decoration:none}.wpseo-tab-video-container__handle:focus,.wpseo-tab-video-container__handle:hover{text-decoration:underline}.wpseo-tab-video-container__handle .dashicons-before:before{margin-left:5px}.wpseotab .wpseo-tab-video-container{margin-top:-15px}.wpseo-tab-video-slideout{display:none;min-height:320px;margin:0 -9999px -1px;padding:2em 9999px;background-color:#a4286a;box-shadow:inset 0 10px 10px -5px rgba(123,30,80,.5),inset 0 -10px 10px -5px rgba(123,30,80,.5);-ms-flex-wrap:wrap;flex-wrap:wrap}.wpseo-tab-video-slideout .contextual-help-tabs-wrap{padding:0;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout a{color:#fff}.wpseo-tab-video-slideout a.button,.wpseo-tab-video-slideout a.button-primary{text-decoration:none}.wpseo-tab-video-slideout h1,.wpseo-tab-video-slideout h2,.wpseo-tab-video-slideout h3,.wpseo-tab-video-slideout h4,.wpseo-tab-video-slideout h5,.wpseo-tab-video-slideout h6{margin-top:.5em;padding-top:0;color:#fff;font-weight:500}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea{float:right;min-width:234px;max-width:242px;margin:0 0 1em 12px;padding:15px 15px 5px;border:1px solid #fff;border-radius:30px 30px 30px 0;color:#fff;background-color:#a4286a}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3,.wpseo-tab-video-slideout .yoast-help-center-tabs ul{margin:0}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover{color:#fff;font-weight:500}.wpseo-tab-video-slideout .yoast-help-center-tabs{width:180px;padding:0 0 1em 1em;color:#fff;background-color:#a4286a;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .help-tab-content{margin:0;color:#fff;font-weight:300}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video{float:right;margin-left:1em;padding-bottom:1em;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe{vertical-align:middle}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text{min-width:264px;margin:0 auto;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child{margin-left:0}.postbox .wpseo-tab-video-container{margin:-6px -12px 20px}.postbox .wpseo-tab-video-slideout{margin:0;padding:2em 12px 15px}.inside .wpseo-tab-video-slideout{height:auto}.wpseo-help-center-item{display:inline}.wpseo-help-center-item a{display:block;padding:10px 12px;color:#fff;text-decoration:none}.wpseo-help-center-item a:focus,.wpseo-help-center-item a:hover{text-decoration:underline}.wpseo-help-center-item a.dashicons-before:before{margin-left:3px;text-decoration:none}.wpseo-help-center-item.active a{color:#a4286a;background-color:#fff} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.css new file mode 100644 index 0000000..6eea16e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.css @@ -0,0 +1,8 @@ +.yoast-text-mark { + background-color: #e1bee7; +} + +.yoast-text-mark__highlight { + color: white; + background-color: #4a148c; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.min.css new file mode 100644 index 0000000..d16fec5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/inside-editor-331-rtl.min.css @@ -0,0 +1 @@ +.yoast-text-mark{background-color:#e1bee7}.yoast-text-mark__highlight{color:#fff;background-color:#4a148c} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.css new file mode 100644 index 0000000..7c81cab --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.css @@ -0,0 +1,143 @@ +.wpseo-kb-search-search-bar { + padding-bottom: 15px; + border-bottom: 1px solid #ccc; +} + +.wpseo-kb-search-search-bar input[type="text"] { + min-width: 50%; + height: 28px; + margin-left: 3px; +} + +.wpseo-kb-search-results { + overflow: auto; + height: 500px; + margin: 0; + padding: 0; + list-style: none; +} + +.help-tab-content .wpseo-kb-search-results li { + max-width: none; + margin: 0; + list-style: none; +} + +.wpseo-kb-search-result { + display: block; + margin: 0; + padding-right: 5px; + border-bottom: 1px solid #efefef; + text-decoration: none; +} + +.wpseo-kb-search-result p { + max-width: none; + margin-top: 0; +} + +.wpseo-kb-search-result-link { + display: block; + outline: none; + text-decoration: none; + cursor: pointer; +} + +.wpseo-kb-search-result-link:hover, +.wpseo-kb-search-result-link:focus { + background-color: rgba(93, 12, 55, 0.5); + box-shadow: none; + text-decoration: underline; +} + +.wpseo-kb-search-result .wpseo-kb-search-result-title { + margin: 0; + padding: 14px 0; +} + +.wpseo-kb-search-ext-link { + float: left; +} + +.wpseo-kb-search-back-button:before { + content: "\f139"; +} + +.wpseo-kb-search-ext-link:before { + content: "\f504"; +} + +.dashicon-button:before { + display: inline-block; + font-family: "dashicons"; + font-size: 20px; + line-height: 1.35em; + vertical-align: middle; +} + +.wpseo-kb-search-navigation { + z-index: 10; + padding: 1em 0; +} + +.kb-search-content-frame { + width: 100%; + height: 543px; +} + +.kb-search-content-frame { + background: url("data:image/svg+xml;charset=utf-8,Loading article...") 100% 0 no-repeat; +} + +.wpseo-kb-loader:before, +.wpseo-kb-loader:after, +.wpseo-kb-loader { + width: 2.5em; + height: 2.5em; + border-radius: 50%; + animation: load7 1.8s infinite ease-in-out; + + animation-fill-mode: both; +} + +.wpseo-kb-loader { + position: relative; + margin: 80px auto; + font-size: 10px; + text-indent: -9999em; + -ms-transform: translateZ(0); + transform: translateZ(0); + animation-delay: -0.16s; +} + +.wpseo-kb-loader:before { + right: -3.5em; + animation-delay: -0.32s; +} + +.wpseo-kb-loader:after { + right: 3.5em; +} + +.wpseo-kb-loader:before, +.wpseo-kb-loader:after { + position: absolute; + top: 0; + content: ""; +} + +.dashicons { + text-decoration: none; +} + +@keyframes load7 { + 0%, + 80%, + 100% { + box-shadow: 0 2.5em 0 -1.3em; + } + + 40% { + box-shadow: 0 2.5em 0 0; + } +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.min.css new file mode 100644 index 0000000..b410344 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/kb-search-350-rtl.min.css @@ -0,0 +1 @@ +.wpseo-kb-search-search-bar{padding-bottom:15px;border-bottom:1px solid #ccc}.wpseo-kb-search-search-bar input[type=text]{min-width:50%;height:28px;margin-left:3px}.wpseo-kb-search-results{overflow:auto;height:500px;margin:0;padding:0;list-style:none}.help-tab-content .wpseo-kb-search-results li{max-width:none;margin:0;list-style:none}.wpseo-kb-search-result{display:block;margin:0;padding-right:5px;border-bottom:1px solid #efefef;text-decoration:none}.wpseo-kb-search-result p{max-width:none;margin-top:0}.wpseo-kb-search-result-link{display:block;outline:0;text-decoration:none;cursor:pointer}.wpseo-kb-search-result-link:focus,.wpseo-kb-search-result-link:hover{background-color:rgba(93,12,55,.5);box-shadow:none;text-decoration:underline}.wpseo-kb-search-result .wpseo-kb-search-result-title{margin:0;padding:14px 0}.wpseo-kb-search-ext-link{float:left}.wpseo-kb-search-back-button:before{content:"\f139"}.wpseo-kb-search-ext-link:before{content:"\f504"}.dashicon-button:before{display:inline-block;font-family:dashicons;font-size:20px;line-height:1.35em;vertical-align:middle}.wpseo-kb-search-navigation{z-index:10;padding:1em 0}.kb-search-content-frame{width:100%;height:543px;background:url("data:image/svg+xml;charset=utf-8,Loading article...") 100% 0 no-repeat}.wpseo-kb-loader,.wpseo-kb-loader:after,.wpseo-kb-loader:before{width:2.5em;height:2.5em;border-radius:50%;animation:load7 1.8s infinite ease-in-out;animation-fill-mode:both}.wpseo-kb-loader{position:relative;margin:80px auto;font-size:10px;text-indent:-9999em;-ms-transform:translateZ(0);transform:translateZ(0);animation-delay:-.16s}.wpseo-kb-loader:before{right:-3.5em;animation-delay:-.32s}.wpseo-kb-loader:after{right:3.5em}.wpseo-kb-loader:after,.wpseo-kb-loader:before{position:absolute;top:0;content:""}.dashicons{text-decoration:none}@keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.css new file mode 100644 index 0000000..a048388 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.css @@ -0,0 +1,1556 @@ +.yoast-section { + position: relative; + box-sizing: border-box; + width: 640px; + border: 1px solid #f7f7f7; + border-radius: 20px; + background-color: #fff; +} + +/* css for snippet */ +.snippet_container:before, +.snippet_container:after { + display: table; + content: " "; +} + +.snippet_container:after { + clear: both; +} + +.snippet-editor__container { + position: relative; + cursor: pointer; +} + +.snippet-editor__heading { + margin: 0 -20px 15px; + padding: 8px 20px; + border-bottom: 1px solid #f7f7f7; + color: #555; + font-family: "Open Sans", sans-serif; + font-size: 0.9rem; + font-weight: 300; +} + +.snippet-editor__heading-editor { + border-top: 1px solid #f7f7f7; +} + +.snippet-editor__heading-icon { + padding-right: 45px; + background-repeat: no-repeat; + /* rtlcss needs this as separate property */ + background-position: right 20px top 0.6em; + background-size: 16px; +} + +.snippet-editor__heading-icon-eye { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E"); +} + +.snippet-editor__container:hover:before { + display: block; + position: absolute; + top: -3px; + right: -22px; + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.snippet-editor__container--focus:hover:before, +.snippet-editor__container--focus:before { + display: block; + position: absolute; + top: -3px; + right: -22px; + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.snippet-editor__preview { + padding: 0 20px 15px; +} + +.snippet-editor__button { + padding: 8px 10px; + border: 1px solid #dbdbdb; + border-radius: 4px; + color: #555; + background: #f7f7f7; + font-size: 0.8rem; + cursor: pointer; +} + +.snippet-editor__edit-button { + display: block; + margin-top: 1em; + padding-right: 32px; + background: #f7f7f7 url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") no-repeat; + /* rtlcss needs this as separate property */ + background-position: right 8px top 50%; + background-size: 16px; +} + +.snippet-editor__form { + padding: 20px; +} + +.snippet-editor__label { + display: block; + position: relative; + width: 100%; + margin-top: 1em; +} + +.snippet-editor__label:first-child { + margin-top: 0; +} + +.snippet-editor__label--hover:before { + display: block; + position: absolute; + top: -3px; + top: 20px; + right: -22px; + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.snippet-editor__label--focus:before { + display: block; + position: absolute; + top: -3px; + top: 20px; + right: -22px; + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.snippet-editor__input { + display: block; + box-sizing: border-box; + width: 100%; + max-width: 100%; + margin-top: 5px; + border: 1px solid #bfbfbf; +} + +.snippet-editor__input:focus { + border: 1px solid #1074a8; + outline: none; +} + +/* Swap icons for RTL. */ +.rtl .snippet-editor__container:hover:before { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E"); +} + +.rtl .snippet-editor__container--focus:hover:before, +.rtl .snippet-editor__container--focus:before { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E"); +} + +.rtl .snippet-editor__label--hover:before { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E"); +} + +.rtl .snippet-editor__label--focus:before { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E"); +} + +.snippet-editor__meta-description { + height: 70px; +} + +.snippet-editor__submit { + margin-top: 1em; +} + +#snippet_cite { + min-width: 20px; +} + +#meta_container { + clear: both; + min-height: 20px; +} + +.snippet_container .title { + display: block; + overflow: hidden; + width: 600px; + margin: 0; + color: #1e0fbe; + font-size: 18px; + font-weight: normal; + line-height: 1.2; + white-space: nowrap; + text-decoration: none; + text-overflow: ellipsis; +} + +.snippet_container .url, +.snippet_container .desc { + font-size: 13px; + line-height: 1.4; +} + +.snippet_container .url { + display: inline-block; + float: right; + color: #006621; + font-size: 14px; + font-style: normal; + line-height: 16px; +} + +.snippet_container .down_arrow { + float: right; + margin-top: 6px; + margin-right: 5px; + border-top: 5px solid #006621; + border-left: 4px solid transparent; + border-right: 4px solid transparent; +} + +.snippet_container .desc-default { + color: #545454; +} + +.snippet_container .desc-default strong { + color: #6a6a6a; +} + +.snippet_container .desc-render { + color: #777; +} + +.snippet_container .tooLong { + color: #f00 !important; +} + +.snippet-editor__field--invalid { + color: #f00; +} + +.snippet-editor__progress { + display: block; + box-sizing: border-box; + width: 100%; + height: 8px; + margin-top: 5px; + border: none; + + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.snippet-editor__progress::-webkit-progress-bar { + height: 8px; + border: 1px solid #bfbfbf; + background-color: #f7f7f7; +} + +.snippet-editor__progress--fallback { + height: 8px; + border: 1px solid #bfbfbf; + background-color: #f7f7f7; +} + +.snippet-editor__progress-bar { + width: 0; + max-width: 100%; + height: 100%; +} + +.snippet-editor__date { + color: #808080; + font-size: 13px; + line-height: 1.4; +} + +.snippet-editor--hidden { + display: none; +} + +.snippet-editor__progress--bad[value] { + color: #dc3232; +} + +.snippet-editor__progress--bad[value]::-webkit-progress-value { + background-color: #dc3232; + transition: width 250ms; +} + +.snippet-editor__progress--bad[value]::-moz-progress-bar { + background-color: #dc3232; +} + +.snippet-editor__progress--bad[value] .snippet-editor__progress-bar { + background-color: #dc3232; +} + +.snippet-editor__progress--ok[value] { + color: #ee7c1b; +} + +.snippet-editor__progress--ok[value]::-webkit-progress-value { + background-color: #ee7c1b; + transition: width 250ms; +} + +.snippet-editor__progress--ok[value]::-moz-progress-bar { + background-color: #ee7c1b; +} + +.snippet-editor__progress--ok[value] .snippet-editor__progress-bar { + background-color: #ee7c1b; +} + +.snippet-editor__progress--good[value] { + color: #7ad03a; +} + +.snippet-editor__progress--good[value]::-webkit-progress-value { + background-color: #7ad03a; + transition: width 250ms; +} + +.snippet-editor__progress--good[value]::-moz-progress-bar { + background-color: #7ad03a; +} + +.snippet-editor__progress--good[value] .snippet-editor__progress-bar { + background-color: #7ad03a; +} + +/* css for analyzer */ +.wpseoanalysis { + padding-left: 0; +} + +.wpseo-score-text { + float: right; + width: 86%; + /* make room for score and mark icons, consider to use a better layout model */ + width: calc( 100% - 56px); +} + +/* needs higher specificity than other score icons */ +.assessment-results .wpseo-score-icon { + float: right; + width: 12px; + height: 12px; + margin: 3px 0 0 10px; + border-radius: 50%; + background: #888; +} + +.wpseo-score-icon.good { + background-color: #7ad03a; +} + +.wpseo-score-icon.ok { + background-color: #ee7c1b; +} + +.wpseo-score-icon.bad { + background-color: #dc3232; +} + +.wpseo-score-icon.na { + background-color: #999; +} + +.wpseo-score-icon.noindex { + background-color: #1e8cbe; +} + +li.score { + margin-bottom: 6px; + list-style-type: none !important; +} + +li.score:after { + display: table; + clear: both; + content: ""; +} + +.screen-reader-text { + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; + width: 1px; + height: 1px; +} + +.assessment-results { + clear: both; +} + +.assessment-results__mark.icon-eye-inactive, +.assessment-results__mark.icon-eye-active, +.assessment-results__mark.icon-eye-disabled { + float: right; + width: 28px; + height: 28px; + margin: -5px 3px 0 3px; + padding: 4px; + border: 0; + border-radius: 100%; + outline: none; + background: no-repeat center; + background-size: 16px; + cursor: pointer; +} + +.assessment-results__mark.icon-eye-inactive { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E"); +} + +.assessment-results__mark.icon-eye-active { + background-color: #a4286a; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E"); +} + +.assessment-results__mark.icon-eye-active.yoast-tooltip::before, +.assessment-results__mark.icon-eye-active.yoast-tooltip::after { + display: none; +} + +.assessment-results__mark.icon-eye-disabled { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23e6e6e6%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E"); +} + +.assessment-results__mark:focus { + border-radius: 100%; + box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); +} + +.assessment-results__mark-container { + display: inline-block; + float: left; + width: 33px; + min-height: 1px; +} + +/* loading dialog */ +.YoastSEO_msg .right, +.YoastSEO_msg .left { + display: none; +} + +@keyframes animatedBackground { + from { + background-position: 100% 0; + } + + to { + background-position: 0% 0; + } +} + +.YoastSEO_msg .bufferbar { + display: block; + width: 100%; + height: 12px; + margin: 10px 0 10px 0; + border: 1px solid #dfdfdf; + /*multiple background definitions for the sake of browsercompatibility*/ + background-image: linear-gradient(to right, #fff, #0063ff, #fff, #0063ff); + background-position: 100% 0; + background-size: 300% 100%; + animation: animatedBackground 5s linear infinite; +} + +.yoast-tooltip { + position: relative; +} + +button.yoast-tooltip { + /* IE 11 needs overflow: visible on buttons. */ + overflow: visible; +} + +.yoast-tooltip::after { + display: none; + position: absolute; + z-index: 1000000; + padding: 5px 8px; + border-radius: 3px; + opacity: 0; + color: #fff; + background: rgba(0, 0, 0, 0.8); + text-shadow: none; + font: normal normal 11px/1.5 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + text-align: center; + white-space: pre; + text-decoration: none; + letter-spacing: normal; + text-transform: none; + word-wrap: break-word; + content: attr(aria-label); + pointer-events: none; + + -webkit-font-smoothing: subpixel-antialiased; +} + +/* + * Use a data attribute as alternative source for the tooltip text. + * Add this selector as modifier of the base selector. + */ +.yoast-tooltip-alt::after { + content: attr(data-label); +} + +.yoast-tooltip::before { + display: none; + position: absolute; + z-index: 1000001; + width: 0; + height: 0; + border: 5px solid transparent; + opacity: 0; + color: rgba(0, 0, 0, 0.8); + content: "\00a0"; + pointer-events: none; +} + +@keyframes yoast-tooltip-appear { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.yoast-tooltip:hover::before, +.yoast-tooltip:hover::after, +.yoast-tooltip:active::before, +.yoast-tooltip:active::after, +.yoast-tooltip:focus::before, +.yoast-tooltip:focus::after { + display: inline-block; + text-decoration: none; + animation-name: yoast-tooltip-appear; + animation-duration: 0.1s; + animation-timing-function: ease-in; + animation-delay: 0.4s; + + animation-fill-mode: forwards; +} + +.yoast-tooltip-no-delay:hover::before, +.yoast-tooltip-no-delay:hover::after, +.yoast-tooltip-no-delay:active::before, +.yoast-tooltip-no-delay:active::after, +.yoast-tooltip-no-delay:focus::before, +.yoast-tooltip-no-delay:focus::after { + opacity: 1; + animation: none; +} + +.yoast-tooltip-multiline:hover::after, +.yoast-tooltip-multiline:active::after, +.yoast-tooltip-multiline:focus::after { + display: table-cell; +} + +.yoast-tooltip-s::after, +.yoast-tooltip-se::after, +.yoast-tooltip-sw::after { + top: 100%; + left: 50%; + margin-top: 5px; +} + +.yoast-tooltip-s::before, +.yoast-tooltip-se::before, +.yoast-tooltip-sw::before { + top: auto; + left: 50%; + bottom: -5px; + margin-left: -5px; + border-bottom-color: rgba(0, 0, 0, 0.8); +} + +.yoast-tooltip-se::after { + left: auto; + right: 50%; + margin-right: -15px; +} + +.yoast-tooltip-sw::after { + margin-left: -15px; +} + +.yoast-tooltip-n::after, +.yoast-tooltip-ne::after, +.yoast-tooltip-nw::after { + left: 50%; + bottom: 100%; + margin-bottom: 5px; +} + +.yoast-tooltip-n::before, +.yoast-tooltip-ne::before, +.yoast-tooltip-nw::before { + top: -5px; + left: 50%; + bottom: auto; + margin-left: -5px; + border-top-color: rgba(0, 0, 0, 0.8); +} + +.yoast-tooltip-ne::after { + left: auto; + right: 50%; + margin-right: -15px; +} + +.yoast-tooltip-nw::after { + margin-left: -15px; +} + +.yoast-tooltip-s::after, +.yoast-tooltip-n::after { + -ms-transform: translateX(-50%); + transform: translateX(-50%); +} + +.yoast-tooltip-w::after { + left: 100%; + bottom: 50%; + margin-left: 5px; + -ms-transform: translateY(50%); + transform: translateY(50%); +} + +.yoast-tooltip-w::before { + top: 50%; + bottom: 50%; + right: -5px; + margin-top: -5px; + border-right-color: rgba(0, 0, 0, 0.8); +} + +.yoast-tooltip-e::after { + bottom: 50%; + right: 100%; + margin-right: 5px; + -ms-transform: translateY(50%); + transform: translateY(50%); +} + +.yoast-tooltip-e::before { + top: 50%; + left: -5px; + bottom: 50%; + margin-top: -5px; + border-left-color: rgba(0, 0, 0, 0.8); +} + +.yoast-tooltip-multiline::after { + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 250px; + border-collapse: separate; + white-space: pre-line; + word-wrap: normal; + word-break: break-word; +} + +.yoast-tooltip-multiline.yoast-tooltip-s::after, +.yoast-tooltip-multiline.yoast-tooltip-n::after { + left: auto; + right: 50%; + -ms-transform: translateX(50%); + transform: translateX(50%); +} + +.yoast-tooltip-multiline.yoast-tooltip-w::after, +.yoast-tooltip-multiline.yoast-tooltip-e::after { + left: 100%; +} + +@media screen and (min-width: 0\0) { + .yoast-tooltip-multiline::after { + width: 250px; + } +} + +.yoast-tooltip-sticky::before, +.yoast-tooltip-sticky::after { + display: inline-block; +} + +.yoast-tooltip-sticky.yoast-tooltip-multiline::after { + display: table-cell; +} + +@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { + .yoast-tooltip-w::after { + margin-left: 4.5px; + } +} + +/* Dynamically set when the Help is expanded to avoid horizontal scrolling */ +#wpcontent.yoast-help-center-open { + overflow-x: hidden; +} + +.wpseo-tab-video-container { + margin-bottom: 20px; + border-bottom: 1px solid #a4286a; +} + +.wpseo-tab-video-container__handle { + width: 100%; + margin: 0; + padding: 10px; + border: none; + outline: none; + color: #a4286a; + background: none; + line-height: 19px; + text-align: right; + cursor: pointer; +} + +.wpseo-tab-video-container__handle .toggle__arrow { + text-decoration: none; +} + +.wpseo-tab-video-container__handle:hover, +.wpseo-tab-video-container__handle:focus { + text-decoration: underline; +} + +.wpseo-tab-video-container__handle .dashicons-before:before { + margin-left: 5px; +} + +.wpseotab .wpseo-tab-video-container { + margin-top: -15px; +} + +.wpseo-tab-video-slideout { + display: none; + min-height: 320px; + margin: 0 -9999px; + /* hide the container bottom border when expanded */ + margin-bottom: -1px; + padding: 2em 9999px; + background-color: #a4286a; + box-shadow: inset 0 10px 10px -5px rgba(123, 30, 80, 0.5), inset 0 -10px 10px -5px rgba(123, 30, 80, 0.5); + + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +.wpseo-tab-video-slideout .contextual-help-tabs-wrap { + padding: 0; + + flex-basis: 0; + flex-grow: 1; + -ms-flex-negative: 1; + /* do not use the shorthand syntax to avoid the unitless bug in IE 11 */ + -ms-flex-positive: 1; + -ms-flex-preferred-size: 0; + flex-shrink: 1; +} + +.wpseo-tab-video-slideout a { + color: white; +} + +.wpseo-tab-video-slideout a.button, +.wpseo-tab-video-slideout a.button-primary { + text-decoration: none; +} + +.wpseo-tab-video-slideout h1, +.wpseo-tab-video-slideout h2, +.wpseo-tab-video-slideout h3, +.wpseo-tab-video-slideout h4, +.wpseo-tab-video-slideout h5, +.wpseo-tab-video-slideout h6 { + margin-top: 0.5em; + padding-top: 0; + color: white; + font-weight: 500; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea { + float: right; + /* min-width to make two boxes always have the same min width */ + min-width: 234px; + /* max-width to make two boxes take the same space of the video above: 560px */ + max-width: 242px; + margin: 0 0 1em 12px; + padding: 15px 15px 5px; + border: 1px solid; + border-color: white; + border-radius: 30px; + border-bottom-left-radius: 0; + color: white; + background-color: #a4286a; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a, +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover, +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus { + color: white; + font-weight: 500; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3 { + margin: 0; +} + +.wpseo-tab-video-slideout .yoast-help-center-tabs { + width: 180px; + padding: 0 0 1em 1em; + color: white; + background-color: #a4286a; + + -ms-flex: 0 0 auto; + flex: 0 0 auto; +} + +.wpseo-tab-video-slideout .yoast-help-center-tabs ul { + margin: 0; +} + +.wpseo-tab-video-slideout .help-tab-content { + margin: 0; + color: white; + font-weight: 300; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--video { + /* In the settings pages is not a children of the flexbox container. */ + float: right; + margin-left: 1em; + padding-bottom: 1em; + + -ms-flex: 0 0 auto; + flex: 0 0 auto; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe { + /* remove iframe descender space */ + vertical-align: middle; +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--text { + min-width: 264px; + margin: 0 auto; + + flex-basis: 0; + flex-grow: 1; + -ms-flex-negative: 1; + /* do not use the shorthand syntax to avoid the unitless bug in IE 11 */ + -ms-flex-positive: 1; + -ms-flex-preferred-size: 0; + flex-shrink: 1; + /* must be less than a text box min width */ +} + +.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child { + margin-left: 0; +} + +/* When it's inside the metabox (posts, terms, media ). */ +.postbox .wpseo-tab-video-container { + margin: -6px -12px 20px; +} + +/* When it's inside the metabox (posts, terms, media ). */ +.postbox .wpseo-tab-video-slideout { + margin: 0; + padding: 2em 12px 15px; +} + +.inside .wpseo-tab-video-slideout { + height: auto; +} + +.wpseo-help-center-item { + display: inline; +} + +.wpseo-help-center-item a { + display: block; + padding: 10px 12px; + color: white; + text-decoration: none; +} + +.wpseo-help-center-item a:hover, +.wpseo-help-center-item a:focus { + text-decoration: underline; +} + +.wpseo-help-center-item a.dashicons-before:before { + margin-left: 3px; + text-decoration: none; +} + +.wpseo-help-center-item.active a { + color: #a4286a; + background-color: white; +} + +.yoast-section { + position: relative; + width: 640px; + padding: 0 20px 15px; + border: 1px solid #f7f7f7; + border-radius: 20px; + background-color: #fff; +} + +.yoast-section__heading { + margin: 0 -20px 15px; + padding: 8px 20px; + border-bottom: 1px solid #f7f7f7; + color: #555; + font-family: "Open Sans", sans-serif; + font-size: 0.9rem; + font-weight: 300; +} + +.yoast-section__heading-icon { + padding-right: 45px; + background-repeat: no-repeat; + background-position: right 20px top 0.6em; + background-size: 16px; +} + +.yoast-section__heading-icon-file-text-o { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20file%3D%22%23555%22%20d%3D%22M1596%20380q28%2028%2048%2076t20%2088v1152q0%2040%2D28%2068t%2D68%2028h%2D1344q%2D40%200%2D68%2D28t%2D28%2D68v%2D1600q0%2D40%2028%2D68t68%2D28h896q40%200%2088%2020t76%2048zm%2D444%2D244v376h376q%2D10%2D29%2D22%2D41l%2D313%2D313q%2D12%2D12%2D41%2D22zm384%201528v%2D1024h%2D416q%2D40%200%2D68%2D28t%2D28%2D68v%2D416h%2D768v1536h1280zm%2D1024%2D864q0%2D14%209%2D23t23%2D9h704q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64zm736%20224q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704zm0%20256q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-section *, +.yoast-section { + box-sizing: border-box; +} + +.yoast-section *:before, +.yoast-section *:after, +.yoast-section:before, +.yoast-section:after { + box-sizing: border-box; +} + +/* Hide the taxonomy metabox rich editor when it's first inserted in the form. */ +#edittag > #wp-description-wrap { + display: none; +} + +#wp-description-wrap .wp-editor-area { + border: 0; +} + +/* Give the original textarea enough height to mitigate content flash. */ +.term-description-wrap td > textarea#description { + min-height: 530px; +} + +/** + * Lines below came from metabox-tabs.css + * + * Metabox Tabs + */ +ul.wpseo-metabox-tabs { + display: none; + margin-top: 6px; + margin-bottom: 0; +} + +/* Contain floated list items and have overflow visible for the active tab */ +ul.wpseo-metabox-tabs:after { + display: table; + clear: both; + content: ""; +} + +.wpseo-metabox-tabs-div ul { + list-style: none; +} + +ul.wpseo-metabox-tabs li.active { + background-color: #fdfdfd; +} + +.wpseo-meta-section { + display: none; + width: 100%; + vertical-align: top; +} + +.wpseo-meta-section.active { + display: table-cell; +} + +.wpseo-metabox-sidebar { + display: table-cell; + width: 40px; + padding: 0 0 0 5px; + background-color: #fff; + vertical-align: top; +} + +.wpseo-metabox-sidebar li span { + margin: 3px -5px 0 0; + padding: 0 5px 0 2px; + border: 0 solid transparent; + border-right-width: 3px; + border-radius: 3px; +} +.wpseo-metabox-sidebar li span.wpseo-buy-premium { + color: #a4286a; +} +.wpseo-metabox-sidebar li span.wpseo-buy-premium:hover { + color: #832055; +} + +.wpseo-metabox-sidebar li.active span { + border-color: #333; + color: #333; +} +.wpseo-metabox-sidebar li.active span.wpseo-buy-premium { + border-color: #a4286a; + color: #a4286a; +} +.wpseo-metabox-sidebar li.active span.wpseo-buy-premium:hover { + border-color: #832055; + color: #832055; +} + +/* Floated to reset white space between list items */ +ul.wpseo-metabox-tabs li { + float: right; + margin-left: 5px; + margin-bottom: -1px; + padding: 0; + border: 1px solid #dfdfdf; + border-bottom: 0 none; +} +ul.wpseo-metabox-tabs li .wpseo-keyword { + display: inline-block; + overflow: hidden; + max-width: 8em; + max-width: 8rem; + vertical-align: top; + white-space: nowrap; + text-overflow: ellipsis; +} + +.wpseotab.active { + display: block; + overflow: auto; + padding: 0.5em 0.9em; + border: 1px solid #ddd; + background-color: #fdfdfd; +} + +.wpseo-metabox-tabs .wpseo_tablink { + display: inline-block; + padding: 5px 12px 6px 12px; + vertical-align: top; + text-decoration: none; +} + +/* Bigger right padding only for the content tab and the main keyword tabs */ +.wpseo-metabox-tabs .wpseo_content_tab a, +.wpseo-metabox-tabs .wpseo_content_tab + .wpseo_keyword_tab a { + padding-left: 12px; +} + +.wpseo-metabox-tabs .wpseo-score-icon { + margin-right: 0; +} + +#wpseo-meta-section-social .wpseo-metabox-tabs .wpseo_tablink { + padding: 5px 7px; +} + +.wpseo-metabox-tabs .wpseo_tablink .dashicons { + width: 16px; + height: 16px; + font-size: 16px; +} + +.wpseo-metabox-sidebar .dashicons { + width: 30px; + height: 30px; + font-size: 30px; +} + +.wpseo-metabox-sidebar a { + display: inline-block; + width: 35px; + height: 35px; + font-size: 20px; + line-height: 30px; + text-decoration: none; +} + +.wpseo-metabox-sidebar ul { + margin: 0; +} + +.wpseo-metabox-sidebar li { + margin-bottom: 0; + padding: 5px; +} + +.wpseo-metabox-tabs-div div.wpseo-tabs-panel { + overflow: auto; + padding: 0.5em 0.9em; + border: 1px solid; +} + +.wpseo-heading { + padding-right: 10px; +} + +#wpseo_meta .inside { + overflow: auto; + margin: 6px 0 0 0; +} + +.wpseotab { + display: none; +} + +#wpseo_meta .postbox .inside .wpseotab { + font-size: 13px !important; +} + +#wpseo_meta .wpseo-tab-video-container h2 { + margin-bottom: 20px; + padding-right: 0; + border: 0; + font-size: 1.3em; +} + +.inside .wpseotab .form-table th { + width: 140px !important; + font-size: 13px; +} + +.inside .wpseotab .form-table td { + padding-top: 20px; +} + +.inside .wpseotab .form-table label { + vertical-align: top; +} + +.inside .wpseotab .form-table td input, +.inside .wpseotab .form-table td select { + margin-top: -5px; +} + +.inside .wpseotab .form-table #yoast_wpseo_focuskw_text_input, +.inside .wpseotab .form-table #yoast_wpseo_metakeywords { + margin-top: 0; +} + +.inside .wpseotab .form-table td select[multiple] { + margin-top: 0; +} + +.wpseotab .wpseo_image_upload_button { + margin-right: 3px; +} + +.wpseotab .wpseoanalysis { + margin-top: 0; +} + +.good, +.warn, +.wrong { + font-weight: bold; +} + +.good { + color: green; +} + +.warn { + color: maroon; +} + +.wrong { + color: #dc3232; +} + +#current_seo_title span { + padding: 2px 5px; + background-color: lightyellow; +} + +#focuskwresults ul { + margin: 0; +} + +#focuskwresults p, +#focuskwresults li { + font-size: 13px; +} + +#focuskwresults li { + margin: 0 20px 0 0; + list-style-type: disc; +} + +.wpseo_hidden { + display: none; +} + +/* Linkdex analysis block */ +table.wpseoanalysis th { + padding: 15px 0 5px 0; + font-size: 14px; + text-align: right; +} + +table.wpseoanalysis th.first { + padding-top: 0; +} + +table.wpseoanalysis td { + margin: 5px 0; + font-size: 13px; + line-height: 16px; +} + +table.wpseoanalysis td.score { + width: 20px; + height: 18px; + padding-right: 10px; +} + +.wpseo_msg { + margin: 5px 0 10px 0; + padding: 0 5px; + border: 1px solid #e6db55; + background-color: lightYellow; +} + +ul.wpseo-metabox-tabs li.wpseo-tab-add-keyword { + border: none; +} + +.wpseo-tab-add-keyword .wpseo-add-keyword.button { + height: auto; + margin-top: 1px; + padding: 3px 6px; + color: #000; + background: transparent; + font-size: 14px; + line-height: 1; + vertical-align: top; + text-decoration: none; + cursor: pointer; +} + +#wpseo-add-keyword-popup-title { + margin: 1em 0; + font-size: 1.3em; +} + +/** + * Edit Snippet Button focus style. + * + * This should be abstracted and applied to all buttons. + * Or, maybe, take advantage of the `.button` CSS class in WordPress. + */ +.snippet-editor__button.snippet-editor__edit-button:focus { + border-color: #5b9dd9; + outline: none; + color: #23282d; + background-color: #fafafa; + box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); +} + +.yoast_help.yoast-help-button { + overflow: visible; + position: relative; + width: 20px; + height: 20px; + margin: 0; + padding: 0; + border: 0; + outline: none; + color: #72777c; + background: transparent; + box-shadow: none; + vertical-align: top; + /* IE 11 */ + cursor: pointer; +} + +.wpseotab .yoast_help.yoast-help-button { + float: left; +} + +.wpseotab.content .yoast_help.yoast-help-button { + margin-top: -48px; +} + +.wpseo-admin-page .yoast_help.yoast-help-button { + margin-left: 6px; +} + +.yoast_help.yoast-help-button:before { + position: absolute; + top: 0; + right: 0; + padding: 4px; + content: "\f223"; +} + +.yoast_help.yoast-help-button:hover, +.yoast_help.yoast-help-button:focus { + color: #0073aa; +} + +.yoast_help.yoast-help-button:focus:before, +.assessment-results__mark:focus { + border-radius: 100%; + box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); +} + +.yoast-help-panel { + display: none; + max-width: 30em !important; + padding: 0 0 1em; + font-weight: normal; + white-space: normal; +} + +.wpseo-admin-page .subsubsub li { + display: inline; + max-width: none; +} + +.yoast-seo-help-container { + float: right; + width: 100%; + max-width: none; +} + +.yoast-seo-help-container .yoast-help-panel { + margin: 0.5em 0 !important; +} + +.wpseo_content_wrapper p.search-box { + margin: 10px 0 5px 0; +} + +.wpseo-metabox-tabs .active a { + color: #333; +} + +#wpseotab .ui-widget-content .ui-state-hover { + border: 1px solid #dfdfdf; + color: #333; + background: #f1f1f1; +} + +/** + * Lines below came from taxonomy-meta.css + */ +.wpseo-taxonomy-form tr, +.wpseo-taxonomy-form th, +.wpseo-taxonomy-form td { + vertical-align: top; +} + +.inside .wpseotab .form-table.wpseo-taxonomy-form th { + width: 200px !important; +} + +.yst-traffic-light-container { + display: block; + height: 30px; +} + +.yst-traffic-light { + width: 19px; + height: 30px; + margin: 0 5px 0 0; +} + +.yst-traffic-light .traffic-light-color { + display: none; +} + +.yst-traffic-light.init .traffic-light-init { + display: inline; +} + +.yst-traffic-light.bad .traffic-light-red { + display: inline; +} + +.yst-traffic-light.ok .traffic-light-orange { + display: inline; +} + +.yst-traffic-light.good .traffic-light-green { + display: inline; +} + +.yst-traffic-light.na .traffic-light-empty { + display: inline; +} + +/** + * Traffic light in publish box + */ +#wpseo-score { + float: right; + margin: 0 -5px 0 5px; +} + +/** +* Content and SEO score in publish bar +*/ +.yoast-seo-score .yoast-logo.svg { + float: right; + width: 18px; + height: 18px; + margin-left: 5px; + background: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E") no-repeat; + background-size: 18px; +} + +.yoast-seo-score .yoast-logo.svg.good { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%237ad03a%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-seo-score .yoast-logo.svg.ok { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ee7c1b%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-seo-score .yoast-logo.svg.bad { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23dc3232%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-seo-score .yoast-logo.svg.na { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-seo-score .yoast-logo.svg.noindex { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231e8cbe%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.term-php .wpseo-taxonomy-metabox-postbox h2 { + margin: 0; + padding: 8px 12px; + border-bottom: 1px solid #eee; + font-size: 14px; + line-height: 1.4; +} + +.wpseo-buy-premium { + padding-left: 5px; + color: #a4286a; +} + +.wpseo-metabox-go-to::after { + position: static; + top: auto; + left: auto; + width: auto; + height: auto; + border: none; + content: " \00BB"; +} + +#wpseo-buy-premium-popup-button.button-buy-premium { + border-color: #a4286a; + color: #fff; + background: #a4286a; +} + +.wpseo-metabox-buy-premium { + position: absolute; + top: 6px; + left: 12px; + vertical-align: middle; +} + +.wpseo-metabox-premium-description { + margin-top: 0.5em; +} + +ul.wpseo-metabox-premium-advantages { + padding-right: 1.5em; + list-style: disc; +} + +.yoast-section__heading-icon-list { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M384%201408q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm0%2D512q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm%2D1408%2D928q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm0%2D512v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-section__heading-icon-key { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M832%20512q0%2D80%2D56%2D136t%2D136%2D56%2D136%2056%2D56%20136q0%2042%2019%2083%2D41%2D19%2D83%2D19%2D80%200%2D136%2056t%2D56%20136%2056%20136%20136%2056%20136%2D56%2056%2D136q0%2D42%2D19%2D83%2041%2019%2083%2019%2080%200%20136%2D56t56%2D136zm851%20704q0%2017%2D49%2066t%2D66%2049q%2D9%200%2D28%2E5%2D16t%2D36%2E5%2D33%2D38%2E5%2D40%2D24%2E5%2D26l%2D96%2096%20220%20220q28%2028%2028%2068%200%2042%2D39%2081t%2D81%2039q%2D40%200%2D68%2D28l%2D671%2D671q%2D176%20131%2D365%20131%2D163%200%2D265%2E5%2D102%2E5t%2D102%2E5%2D265%2E5q0%2D160%2095%2D313t248%2D248%20313%2D95q163%200%20265%2E5%20102%2E5t102%2E5%20265%2E5q0%20189%2D131%20365l355%20355%2096%2D96q%2D3%2D3%2D26%2D24%2E5t%2D40%2D38%2E5%2D33%2D36%2E5%2D16%2D28%2E5q0%2D17%2049%2D66t66%2D49q13%200%2023%2010%206%206%2046%2044%2E5t82%2079%2E5%2086%2E5%2086%2073%2078%2028%2E5%2041z%22%2F%3E%3C%2Fsvg%3E"); +} + +.yoast-section__heading-icon-edit { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E"); +} + +#snippet_preview { + padding: 0; +} + +.yoast-tooltip.yoast-tooltip-hidden::before, +.yoast-tooltip.yoast-tooltip-hidden::after { + display: none; +} + +/* Workaround for VoiceOver bug see issue #5857 */ +.screen-reader-text.wpseo-generic-tab-textual-score, +.screen-reader-text.wpseo-keyword-tab-textual-score { + display: block; +} + +@media screen and (max-width: 782px) { + .yoast-help-panel { + max-width: none !important; + } + #wpseo-crawl-issues-table-form .subsubsub { + float: none; + max-width: calc( 100vw - 20px); + } + #wpseo-crawl-issues-table-form .yoast-help-button { + margin-top: 3px; + } +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.min.css new file mode 100644 index 0000000..e1d9eb7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/metabox-400-rtl.min.css @@ -0,0 +1 @@ +.snippet-editor__heading,.yoast-section__heading{font-family:"Open Sans",sans-serif}#meta_container,.assessment-results,.snippet_container:after,li.score:after{clear:both}.snippet_container:after,.snippet_container:before{display:table;content:" "}.snippet-editor__container{position:relative;cursor:pointer}.snippet-editor__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-size:.9rem;font-weight:300}.snippet-editor__heading-editor{border-top:1px solid #f7f7f7}.snippet-editor__heading-icon{padding-right:45px;background-repeat:no-repeat;background-position:right 20px top .6em;background-size:16px}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before,.snippet-editor__container:hover:before{position:absolute;right:-22px;width:24px;height:24px;background-size:25px;content:"";display:block;top:-3px}.snippet-editor__heading-icon-eye{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__preview{padding:0 20px 15px}.snippet-editor__button{padding:8px 10px;border:1px solid #dbdbdb;border-radius:4px;color:#555;background:#f7f7f7;font-size:.8rem;cursor:pointer}.snippet-editor__edit-button{display:block;margin-top:1em;padding-right:32px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") right 8px top 50% no-repeat #f7f7f7;background-size:16px}.snippet-editor__form{padding:20px}.snippet-editor__label{display:block;position:relative;width:100%;margin-top:1em}.snippet-editor__label--focus:before,.snippet-editor__label--hover:before{right:-22px;width:24px;height:24px;background-size:25px;display:block;content:"";position:absolute}.snippet-editor__label:first-child{margin-top:0}.snippet-editor__label--hover:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__label--focus:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__input{display:block;box-sizing:border-box;width:100%;max-width:100%;margin-top:5px;border:1px solid #bfbfbf}.snippet-editor__input:focus{border:1px solid #1074a8;outline:0}.rtl .snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__container--focus:before,.rtl .snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--focus:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.snippet-editor__meta-description{height:70px}.snippet-editor__submit{margin-top:1em}#snippet_cite{min-width:20px}#meta_container{min-height:20px}.snippet_container .title{display:block;overflow:hidden;width:600px;margin:0;color:#1e0fbe;font-size:18px;font-weight:400;line-height:1.2;white-space:nowrap;text-decoration:none;text-overflow:ellipsis}.snippet_container .desc,.snippet_container .url{font-size:13px;line-height:1.4}.snippet_container .url{display:inline-block;float:right;color:#006621;font-size:14px;font-style:normal;line-height:16px}.snippet_container .down_arrow{float:right;margin-top:6px;margin-right:5px;border-top:5px solid #006621;border-left:4px solid transparent;border-right:4px solid transparent}.snippet_container .desc-default{color:#545454}.snippet_container .desc-default strong{color:#6a6a6a}.snippet_container .desc-render{color:#777}.snippet_container .tooLong{color:red!important}.snippet-editor__field--invalid{color:red}.snippet-editor__progress{display:block;box-sizing:border-box;width:100%;height:8px;margin-top:5px;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.assessment-results__mark.icon-eye-active.yoast-tooltip::after,.assessment-results__mark.icon-eye-active.yoast-tooltip::before,.snippet-editor--hidden{display:none}.snippet-editor__progress::-webkit-progress-bar{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress--fallback{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress-bar{width:0;max-width:100%;height:100%}.snippet-editor__date{color:grey;font-size:13px;line-height:1.4}.snippet-editor__progress--bad[value]{color:#dc3232}.snippet-editor__progress--bad[value]::-webkit-progress-value{background-color:#dc3232;transition:width 250ms}.snippet-editor__progress--bad[value]::-moz-progress-bar{background-color:#dc3232}.snippet-editor__progress--bad[value] .snippet-editor__progress-bar{background-color:#dc3232}.snippet-editor__progress--ok[value]{color:#ee7c1b}.snippet-editor__progress--ok[value]::-webkit-progress-value{background-color:#ee7c1b;transition:width 250ms}.snippet-editor__progress--ok[value]::-moz-progress-bar{background-color:#ee7c1b}.snippet-editor__progress--ok[value] .snippet-editor__progress-bar{background-color:#ee7c1b}.snippet-editor__progress--good[value]{color:#7ad03a}.snippet-editor__progress--good[value]::-webkit-progress-value{background-color:#7ad03a;transition:width 250ms}.snippet-editor__progress--good[value]::-moz-progress-bar{background-color:#7ad03a}.snippet-editor__progress--good[value] .snippet-editor__progress-bar{background-color:#7ad03a}.wpseoanalysis{padding-left:0}.wpseo-score-text{float:right;width:86%;width:calc(100% - 56px)}.assessment-results .wpseo-score-icon{float:right;width:12px;height:12px;margin:3px 0 0 10px;border-radius:50%;background:#888}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}li.score{margin-bottom:6px;list-style-type:none!important}li.score:after{display:table;content:""}.screen-reader-text{overflow:hidden;clip:rect(1px,1px,1px,1px);position:absolute!important;width:1px;height:1px}.assessment-results__mark.icon-eye-active,.assessment-results__mark.icon-eye-disabled,.assessment-results__mark.icon-eye-inactive{float:right;width:28px;height:28px;margin:-5px 3px 0;padding:4px;border:0;border-radius:100%;outline:0;background:center no-repeat;background-size:16px;cursor:pointer}.assessment-results__mark.icon-eye-inactive{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-active{background-color:#a4286a;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-disabled{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23e6e6e6%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark-container{display:inline-block;float:left;width:33px;min-height:1px}.YoastSEO_msg .left,.YoastSEO_msg .right{display:none}@keyframes animatedBackground{from{background-position:100% 0}to{background-position:0 0}}.YoastSEO_msg .bufferbar{display:block;width:100%;height:12px;margin:10px 0;border:1px solid #dfdfdf;background-image:linear-gradient(to right,#fff,#0063ff,#fff,#0063ff);background-position:100% 0;background-size:300% 100%;animation:animatedBackground 5s linear infinite}.yoast-tooltip{position:relative}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{display:none;position:absolute;z-index:1000000;padding:5px 8px;border-radius:3px;opacity:0;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);pointer-events:none;-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{display:none;position:absolute;z-index:1000001;width:0;height:0;border:5px solid transparent;opacity:0;color:rgba(0,0,0,.8);content:"\00a0";pointer-events:none}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;left:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;left:50%;bottom:-5px;margin-left:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-sw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{left:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;left:50%;bottom:auto;margin-left:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-nw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-w::after{left:100%;bottom:50%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;right:-5px;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;right:100%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;left:-5px;bottom:50%;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{left:auto;right:50%;-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{left:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-left:4.5px}}#wpcontent.yoast-help-center-open{overflow-x:hidden}.wpseo-tab-video-container{margin-bottom:20px;border-bottom:1px solid #a4286a}.wpseo-tab-video-container__handle{width:100%;margin:0;padding:10px;border:none;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:right;cursor:pointer}.wpseo-tab-video-container__handle .toggle__arrow{text-decoration:none}.wpseo-tab-video-container__handle:focus,.wpseo-tab-video-container__handle:hover{text-decoration:underline}.wpseo-tab-video-container__handle .dashicons-before:before{margin-left:5px}.wpseotab .wpseo-tab-video-container{margin-top:-15px}.wpseo-tab-video-slideout{display:none;min-height:320px;margin:0 -9999px -1px;padding:2em 9999px;background-color:#a4286a;box-shadow:inset 0 10px 10px -5px rgba(123,30,80,.5),inset 0 -10px 10px -5px rgba(123,30,80,.5);-ms-flex-wrap:wrap;flex-wrap:wrap}.wpseo-tab-video-slideout .contextual-help-tabs-wrap{padding:0;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout a{color:#fff}.wpseo-tab-video-slideout a.button,.wpseo-tab-video-slideout a.button-primary{text-decoration:none}.wpseo-tab-video-slideout h1,.wpseo-tab-video-slideout h2,.wpseo-tab-video-slideout h3,.wpseo-tab-video-slideout h4,.wpseo-tab-video-slideout h5,.wpseo-tab-video-slideout h6{margin-top:.5em;padding-top:0;color:#fff;font-weight:500}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea{float:right;min-width:234px;max-width:242px;margin:0 0 1em 12px;padding:15px 15px 5px;border:1px solid #fff;border-radius:30px 30px 30px 0;color:#fff;background-color:#a4286a}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3,.wpseo-tab-video-slideout .yoast-help-center-tabs ul{margin:0}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover{color:#fff;font-weight:500}.wpseo-tab-video-slideout .yoast-help-center-tabs{width:180px;padding:0 0 1em 1em;color:#fff;background-color:#a4286a;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .help-tab-content{margin:0;color:#fff;font-weight:300}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video{float:right;margin-left:1em;padding-bottom:1em;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe{vertical-align:middle}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text{min-width:264px;margin:0 auto;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child{margin-left:0}.postbox .wpseo-tab-video-container{margin:-6px -12px 20px}.postbox .wpseo-tab-video-slideout{margin:0;padding:2em 12px 15px}.inside .wpseo-tab-video-slideout{height:auto}.wpseo-help-center-item{display:inline}.wpseo-help-center-item a{display:block;padding:10px 12px;color:#fff;text-decoration:none}.wpseo-help-center-item a:focus,.wpseo-help-center-item a:hover{text-decoration:underline}.wpseo-help-center-item a.dashicons-before:before{margin-left:3px;text-decoration:none}.wpseo-help-center-item.active a{color:#a4286a;background-color:#fff}.yoast-section{position:relative;width:640px;padding:0 20px 15px;border:1px solid #f7f7f7;border-radius:20px;background-color:#fff}.yoast-section__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-size:.9rem;font-weight:300}.yoast-section__heading-icon{padding-right:45px;background-repeat:no-repeat;background-position:right 20px top .6em;background-size:16px}.yoast-section__heading-icon-file-text-o{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20file%3D%22%23555%22%20d%3D%22M1596%20380q28%2028%2048%2076t20%2088v1152q0%2040%2D28%2068t%2D68%2028h%2D1344q%2D40%200%2D68%2D28t%2D28%2D68v%2D1600q0%2D40%2028%2D68t68%2D28h896q40%200%2088%2020t76%2048zm%2D444%2D244v376h376q%2D10%2D29%2D22%2D41l%2D313%2D313q%2D12%2D12%2D41%2D22zm384%201528v%2D1024h%2D416q%2D40%200%2D68%2D28t%2D28%2D68v%2D416h%2D768v1536h1280zm%2D1024%2D864q0%2D14%209%2D23t23%2D9h704q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64zm736%20224q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704zm0%20256q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section,.yoast-section *,.yoast-section :after,.yoast-section :before,.yoast-section:after,.yoast-section:before{box-sizing:border-box}#edittag>#wp-description-wrap{display:none}#wp-description-wrap .wp-editor-area{border:0}.term-description-wrap td>textarea#description{min-height:530px}ul.wpseo-metabox-tabs{display:none;margin-top:6px;margin-bottom:0}ul.wpseo-metabox-tabs:after{display:table;clear:both;content:""}.wpseo-metabox-tabs-div ul{list-style:none}ul.wpseo-metabox-tabs li.active{background-color:#fdfdfd}.wpseo-meta-section{display:none;width:100%;vertical-align:top}.wpseo-meta-section.active{display:table-cell}.wpseo-metabox-sidebar{display:table-cell;width:40px;padding:0 0 0 5px;background-color:#fff;vertical-align:top}.wpseo-metabox-sidebar li span{margin:3px -5px 0 0;padding:0 5px 0 2px;border:0 solid transparent;border-right-width:3px;border-radius:3px}.wpseo-metabox-sidebar li span.wpseo-buy-premium{color:#a4286a}.wpseo-metabox-sidebar li span.wpseo-buy-premium:hover{color:#832055}.wpseo-metabox-sidebar li.active span{border-color:#333;color:#333}.wpseo-metabox-sidebar li.active span.wpseo-buy-premium{border-color:#a4286a;color:#a4286a}.wpseo-metabox-sidebar li.active span.wpseo-buy-premium:hover{border-color:#832055;color:#832055}ul.wpseo-metabox-tabs li{float:right;margin-left:5px;margin-bottom:-1px;padding:0;border:1px solid #dfdfdf;border-bottom:0 none}ul.wpseo-metabox-tabs li .wpseo-keyword{display:inline-block;overflow:hidden;max-width:8em;max-width:8rem;vertical-align:top;white-space:nowrap;text-overflow:ellipsis}.wpseotab.active{display:block;overflow:auto;padding:.5em .9em;border:1px solid #ddd;background-color:#fdfdfd}.wpseo-metabox-tabs .wpseo_tablink{display:inline-block;padding:5px 12px 6px;vertical-align:top;text-decoration:none}.wpseo-metabox-tabs .wpseo_content_tab a,.wpseo-metabox-tabs .wpseo_content_tab+.wpseo_keyword_tab a{padding-left:12px}.wpseo-metabox-tabs .wpseo-score-icon{margin-right:0}#wpseo-meta-section-social .wpseo-metabox-tabs .wpseo_tablink{padding:5px 7px}.wpseo-metabox-tabs .wpseo_tablink .dashicons{width:16px;height:16px;font-size:16px}.wpseo-metabox-sidebar .dashicons{width:30px;height:30px;font-size:30px}.wpseo-metabox-sidebar a{display:inline-block;width:35px;height:35px;font-size:20px;line-height:30px;text-decoration:none}.wpseo_hidden,.wpseotab{display:none}.wpseo-metabox-sidebar ul{margin:0}.wpseo-metabox-sidebar li{margin-bottom:0;padding:5px}.wpseo-metabox-tabs-div div.wpseo-tabs-panel{overflow:auto;padding:.5em .9em;border:1px solid}.wpseo-heading{padding-right:10px}#wpseo_meta .inside{overflow:auto;margin:6px 0 0}#wpseo_meta .postbox .inside .wpseotab{font-size:13px!important}#wpseo_meta .wpseo-tab-video-container h2{margin-bottom:20px;padding-right:0;border:0;font-size:1.3em}.inside .wpseotab .form-table th{width:140px!important;font-size:13px}.inside .wpseotab .form-table td{padding-top:20px}.inside .wpseotab .form-table label{vertical-align:top}.inside .wpseotab .form-table td input,.inside .wpseotab .form-table td select{margin-top:-5px}.inside .wpseotab .form-table #yoast_wpseo_focuskw_text_input,.inside .wpseotab .form-table #yoast_wpseo_metakeywords,.inside .wpseotab .form-table td select[multiple],.wpseotab .wpseoanalysis{margin-top:0}.wpseotab .wpseo_image_upload_button{margin-right:3px}.good,.warn,.wrong{font-weight:700}.good{color:green}.warn{color:maroon}.wrong{color:#dc3232}#current_seo_title span{padding:2px 5px;background-color:#ffffe0}#focuskwresults ul{margin:0}#focuskwresults li,#focuskwresults p{font-size:13px}#focuskwresults li{margin:0 20px 0 0;list-style-type:disc}table.wpseoanalysis th{padding:15px 0 5px;font-size:14px;text-align:right}table.wpseoanalysis th.first{padding-top:0}table.wpseoanalysis td{margin:5px 0;font-size:13px;line-height:16px}table.wpseoanalysis td.score{width:20px;height:18px;padding-right:10px}.wpseo_msg{margin:5px 0 10px;padding:0 5px;border:1px solid #e6db55;background-color:#ffffe0}ul.wpseo-metabox-tabs li.wpseo-tab-add-keyword{border:none}.wpseo-tab-add-keyword .wpseo-add-keyword.button{height:auto;margin-top:1px;padding:3px 6px;color:#000;background:0 0;font-size:14px;line-height:1;vertical-align:top;text-decoration:none;cursor:pointer}#wpseo-add-keyword-popup-title{margin:1em 0;font-size:1.3em}.snippet-editor__button.snippet-editor__edit-button:focus{border-color:#5b9dd9;outline:0;color:#23282d;background-color:#fafafa;box-shadow:0 0 3px rgba(0,115,170,.8)}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.wpseotab .yoast_help.yoast-help-button{float:left}.wpseotab.content .yoast_help.yoast-help-button{margin-top:-48px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-left:6px}.yoast_help.yoast-help-button:before{position:absolute;top:0;right:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus:before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .subsubsub li{display:inline;max-width:none}.yoast-seo-help-container{float:right;width:100%;max-width:none}.yoast-seo-help-container .yoast-help-panel{margin:.5em 0!important}.wpseo_content_wrapper p.search-box{margin:10px 0 5px}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #dfdfdf;color:#333;background:#f1f1f1}.wpseo-taxonomy-form td,.wpseo-taxonomy-form th,.wpseo-taxonomy-form tr{vertical-align:top}.inside .wpseotab .form-table.wpseo-taxonomy-form th{width:200px!important}.yst-traffic-light-container{display:block;height:30px}.yst-traffic-light{width:19px;height:30px;margin:0 5px 0 0}.yst-traffic-light .traffic-light-color{display:none}.yst-traffic-light.bad .traffic-light-red,.yst-traffic-light.good .traffic-light-green,.yst-traffic-light.init .traffic-light-init,.yst-traffic-light.na .traffic-light-empty,.yst-traffic-light.ok .traffic-light-orange{display:inline}#wpseo-score{float:right;margin:0 -5px 0 5px}.yoast-seo-score .yoast-logo.svg{float:right;width:18px;height:18px;margin-left:5px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E") no-repeat;background-size:18px}.yoast-seo-score .yoast-logo.svg.good{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%237ad03a%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.ok{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ee7c1b%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.bad{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23dc3232%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.na{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.noindex{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231e8cbe%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.term-php .wpseo-taxonomy-metabox-postbox h2{margin:0;padding:8px 12px;border-bottom:1px solid #eee;font-size:14px;line-height:1.4}.wpseo-buy-premium{padding-left:5px;color:#a4286a}.wpseo-metabox-go-to::after{position:static;top:auto;left:auto;width:auto;height:auto;border:none;content:" \00BB"}#wpseo-buy-premium-popup-button.button-buy-premium{border-color:#a4286a;color:#fff;background:#a4286a}.wpseo-metabox-buy-premium{position:absolute;top:6px;left:12px;vertical-align:middle}.wpseo-metabox-premium-description{margin-top:.5em}ul.wpseo-metabox-premium-advantages{padding-right:1.5em;list-style:disc}.yoast-section__heading-icon-list{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M384%201408q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm0%2D512q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm%2D1408%2D928q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm0%2D512v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section__heading-icon-key{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M832%20512q0%2D80%2D56%2D136t%2D136%2D56%2D136%2056%2D56%20136q0%2042%2019%2083%2D41%2D19%2D83%2D19%2D80%200%2D136%2056t%2D56%20136%2056%20136%20136%2056%20136%2D56%2056%2D136q0%2D42%2D19%2D83%2041%2019%2083%2019%2080%200%20136%2D56t56%2D136zm851%20704q0%2017%2D49%2066t%2D66%2049q%2D9%200%2D28%2E5%2D16t%2D36%2E5%2D33%2D38%2E5%2D40%2D24%2E5%2D26l%2D96%2096%20220%20220q28%2028%2028%2068%200%2042%2D39%2081t%2D81%2039q%2D40%200%2D68%2D28l%2D671%2D671q%2D176%20131%2D365%20131%2D163%200%2D265%2E5%2D102%2E5t%2D102%2E5%2D265%2E5q0%2D160%2095%2D313t248%2D248%20313%2D95q163%200%20265%2E5%20102%2E5t102%2E5%20265%2E5q0%20189%2D131%20365l355%20355%2096%2D96q%2D3%2D3%2D26%2D24%2E5t%2D40%2D38%2E5%2D33%2D36%2E5%2D16%2D28%2E5q0%2D17%2049%2D66t66%2D49q13%200%2023%2010%206%206%2046%2044%2E5t82%2079%2E5%2086%2E5%2086%2073%2078%2028%2E5%2041z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section__heading-icon-edit{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E")}#snippet_preview{padding:0}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.screen-reader-text.wpseo-generic-tab-textual-score,.screen-reader-text.wpseo-keyword-tab-textual-score{display:block}@media screen and (max-width:782px){.yoast-help-panel{max-width:none!important}#wpseo-crawl-issues-table-form .subsubsub{float:none;max-width:calc(100vw - 20px)}#wpseo-crawl-issues-table-form .yoast-help-button{margin-top:3px}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.css new file mode 100644 index 0000000..eb183eb --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.css @@ -0,0 +1,47 @@ +.wpseo-primary-term > label, +.wpseo-is-primary-term { + font-weight: bold; +} + +.wpseo-primary-term > .wpseo-make-primary-term, +.wpseo-term-unchecked > .wpseo-make-primary-term { + display: none; +} + +.wpseo-non-primary-term > .wpseo-is-primary-term, +.wpseo-term-unchecked > .wpseo-is-primary-term { + display: none; +} + +.wpseo-make-primary-term, +.wpseo-is-primary-term { + float: left; +} + +.wpseo-primary-term:before, +.wpseo-primary-term:after, +.wpseo-non-primary-term:before, +.wpseo-non-primary-term:after { + display: table; + content: ""; +} + +.wpseo-primary-term:after, +.wpseo-non-primary-term:after { + clear: both; +} + +/* It is a button, style it like a link */ +.wpseo-make-primary-term { + margin: 4px 0 0 0; + padding: 0; + border: none; + color: #0073aa; + background: none; + text-decoration: underline; + cursor: pointer; +} + +.wpseo-make-primary-term:hover { + color: #00a0d2; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.min.css new file mode 100644 index 0000000..eda6e1b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-rtl.min.css @@ -0,0 +1 @@ +.wpseo-is-primary-term,.wpseo-primary-term>label{font-weight:700}.wpseo-non-primary-term>.wpseo-is-primary-term,.wpseo-primary-term>.wpseo-make-primary-term,.wpseo-term-unchecked>.wpseo-is-primary-term,.wpseo-term-unchecked>.wpseo-make-primary-term{display:none}.wpseo-is-primary-term,.wpseo-make-primary-term{float:left}.wpseo-non-primary-term:after,.wpseo-non-primary-term:before,.wpseo-primary-term:after,.wpseo-primary-term:before{display:table;content:""}.wpseo-non-primary-term:after,.wpseo-primary-term:after{clear:both}.wpseo-make-primary-term{margin:4px 0 0;padding:0;border:none;color:#0073aa;background:0 0;text-decoration:underline;cursor:pointer}.wpseo-make-primary-term:hover{color:#00a0d2} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.css b/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.css new file mode 100644 index 0000000..76de04d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.css @@ -0,0 +1 @@ +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.rapido.css b/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.rapido.css new file mode 100644 index 0000000..e7c3490 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/select2/select2.min.rapido.css @@ -0,0 +1 @@ +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee 100%);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(to bottom,#fff 50%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF',endColorstr='#FFEEEEEE',GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc 100%);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(to bottom,#eee 50%,#ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE',endColorstr='#FFCCCCCC',GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff 0%,#eee 50%);background-image:-o-linear-gradient(top,#fff 0%,#eee 50%);background-image:linear-gradient(to bottom,#fff 0%,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF',endColorstr='#FFEEEEEE',GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff 100%);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(to bottom,#eee 50%,#fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE',endColorstr='#FFFFFFFF',GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.css new file mode 100644 index 0000000..e7f5758 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.css @@ -0,0 +1,27 @@ +#snippet_preview { + margin: -11px 0 10px; + font-family: Arial, Helvetica, sans-serif; + font-style: normal; +} + +.form-table td .snippet-editor__label { + font-size: 1rem; + line-height: 1; +} + +.form-table td textarea { + margin-top: 5px; +} + +.wp-core-ui .button.snippet-editor__submit { + margin-top: 1em; +} + +/* In the snippet editor reset the margin that throws of the layout */ +.inside .wpseotab .form-table td input.snippet-editor__input { + margin-top: 5px; +} + +input[type="text"].snippet-editor__field--invalid { + color: #dc3232; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.min.css new file mode 100644 index 0000000..88b04b8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/snippet-330-rtl.min.css @@ -0,0 +1 @@ +#snippet_preview{margin:-11px 0 10px;font-family:Arial,Helvetica,sans-serif;font-style:normal}.form-table td .snippet-editor__label{font-size:1rem;line-height:1}.form-table td textarea{margin-top:5px}.wp-core-ui .button.snippet-editor__submit{margin-top:1em}.inside .wpseotab .form-table td input.snippet-editor__input{margin-top:5px}input[type=text].snippet-editor__field--invalid{color:#dc3232} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.css new file mode 100644 index 0000000..51289f7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.css @@ -0,0 +1,5 @@ +.wpseo-taxonomy-form tr, +.wpseo-taxonomy-form th, +.wpseo-taxonomy-form td { + vertical-align: top; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.min.css new file mode 100644 index 0000000..6fd0c5c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/taxonomy-meta-rtl.min.css @@ -0,0 +1 @@ +.wpseo-taxonomy-form td,.wpseo-taxonomy-form th,.wpseo-taxonomy-form tr{vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.css new file mode 100644 index 0000000..20f4fb3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.css @@ -0,0 +1,375 @@ +@charset "UTF-8"; +/* + * Styles from the toggle switch library. + */ +/* + * CSS TOGGLE SWITCH + * + * Ionuț Colceriu - ghinda.net + * https://github.com/ghinda/css-toggle-switch + * + */ +/* Hide by default. */ +.switch-toggle a, +.switch-light span span { + display: none; +} + +/* Only target browsers with support for media queries. */ +@media only screen { + .switch-light, + .switch-toggle { + display: block; + position: relative; + padding: 0 !important; + } + + .switch-light::after, + .switch-toggle::after { + display: table; + clear: both; + content: ""; + } + + .switch-light *, + .switch-light *:before, + .switch-light *:after, + .switch-toggle *, + .switch-toggle *:before, + .switch-toggle *:after { + box-sizing: border-box; + } + + .switch-light a, + .switch-toggle a { + display: block; + transition: all 0.2s ease-out; + } + + .switch-light label, + .switch-light > span, + .switch-toggle label, + .switch-toggle > span { + line-height: 2em; + vertical-align: middle; + } + + .switch-light input { + position: absolute; + z-index: 3; + opacity: 0; + } + + .switch-light input:checked ~ span a { + left: 0; + } + +/* Inherit from label. */ + .switch-light strong { + font-weight: inherit; + } + + .switch-light > span { + position: relative; + min-height: 2em; + padding: 0; + text-align: right; + } + + .switch-light span span { + display: block; + float: right; + position: relative; + z-index: 2; + width: 50%; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + .switch-light a { + display: block; + position: absolute; + z-index: 1; + top: 0; + left: 50%; + width: 50%; + height: 100%; + padding: 0; + } + + .switch-toggle input { + position: absolute; + right: 0; + opacity: 0; + } + + .switch-toggle input + label { + display: block; + float: right; + position: relative; + z-index: 2; + margin: 0; + padding: 0 0.5em; + text-align: center; + } + + .switch-toggle a { + position: absolute; + z-index: 1; + top: 0; + right: 0; + width: 10px; + height: 100%; + padding: 0; + } + + .switch-toggle label:nth-child(2):nth-last-child(4), + .switch-toggle label:nth-child(2):nth-last-child(4) ~ label, + .switch-toggle label:nth-child(2):nth-last-child(4) ~ a { + width: 50%; + } + + .switch-toggle label:nth-child(2):nth-last-child(4) ~ input:checked:nth-child(3) + label ~ a { + right: 50%; + } + + .switch-toggle label:nth-child(2):nth-last-child(6), + .switch-toggle label:nth-child(2):nth-last-child(6) ~ label, + .switch-toggle label:nth-child(2):nth-last-child(6) ~ a { + width: 33.33%; + } + + .switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(3) + label ~ a { + right: 33.33%; + } + + .switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(5) + label ~ a { + right: 66.66%; + } + + .switch-toggle label:nth-child(2):nth-last-child(8), + .switch-toggle label:nth-child(2):nth-last-child(8) ~ label, + .switch-toggle label:nth-child(2):nth-last-child(8) ~ a { + width: 25%; + } + + .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(3) + label ~ a { + right: 25%; + } + + .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(5) + label ~ a { + right: 50%; + } + + .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(7) + label ~ a { + right: 75%; + } + + .switch-toggle label:nth-child(2):nth-last-child(10), + .switch-toggle label:nth-child(2):nth-last-child(10) ~ label, + .switch-toggle label:nth-child(2):nth-last-child(10) ~ a { + width: 20%; + } + + .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(3) + label ~ a { + right: 20%; + } + + .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(5) + label ~ a { + right: 40%; + } + + .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(7) + label ~ a { + right: 60%; + } + + .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(9) + label ~ a { + right: 80%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12), + .switch-toggle label:nth-child(2):nth-last-child(12) ~ label, + .switch-toggle label:nth-child(2):nth-last-child(12) ~ a { + width: 16.6%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(3) + label ~ a { + right: 16.6%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(5) + label ~ a { + right: 33.2%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(7) + label ~ a { + right: 49.8%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(9) + label ~ a { + right: 66.4%; + } + + .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(11) + label ~ a { + right: 83%; + } + + .switch-candy a { + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.45); + } +} + +/* + * Bugfix for older Webkit, including mobile Webkit. Adapted from + * http://css-tricks.com/webkit-sibling-bug/ + */ +@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 80em) { + .switch-light, + .switch-toggle { + -webkit-animation: webkitSiblingBugfix infinite 1s; + } +} + +/* + * Custom styles. + */ +.fieldset-switch-toggle label { + float: none; +} + +@media only screen { + .switch-light.switch-yoast-seo { + margin-bottom: 0.2em; + } + + .fieldset-switch-toggle legend, + .switch-light.switch-yoast-seo > strong { + display: block; + box-sizing: border-box; + min-width: 200px; + margin-top: 10px; + padding-left: 1em; + font-weight: bold; + line-height: 2em; + vertical-align: middle; + } + + .switch-toggle.switch-yoast-seo, + .switch-light.switch-yoast-seo > span { + width: 250px; + border: 1px solid #ccc; + border-radius: 0.5em; + background-color: #dcdcdc; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); + } + + .switch-toggle.switch-yoast-seo { + float: right; + } + + .switch-light.switch-yoast-seo > span { + /* To contain floats instead of the original overflow: hidden;. */ + display: inline-block; + /* To make the focus style fully visible. */ + overflow: visible; + } + + .switch-toggle.switch-yoast-seo a, + .switch-light.switch-yoast-seo a { + border: 1px solid #b5b5b5; + border-radius: 0.5em; + background: #a4286a; + } + + .switch-toggle.switch-yoast-seo input:focus ~ span a, + .switch-light.switch-yoast-seo input:focus ~ span a, + .switch-toggle.switch-yoast-seo input:focus + label, + .switch-light.switch-yoast-seo input:focus + label { + /* Reset focus style. */ + outline: none; + } + + .switch-toggle.switch-yoast-seo input:focus ~ a, + .switch-light.switch-yoast-seo input:focus ~ span a { + border-color: #5b9dd9 !important; + box-shadow: 0 0 2px rgba(0, 115, 170, 0.8) !important; + } + + .switch-toggle.switch-yoast-seo input:checked ~ span a, + .switch-light.switch-yoast-seo input:checked ~ span a { + border: 1px solid #b5b5b5; + background: #a4286a; + } + + .switch-light.switch-yoast-seo span span, + .switch-light.switch-yoast-seo input:checked ~ span span:first-child, + .switch-toggle.switch-yoast-seo label { + color: #333; + text-shadow: none; + font-weight: inherit; + } + + .switch-candy.switch-yoast-seo input ~ span span:first-child, + .switch-candy.switch-yoast-seo input:checked ~ span span:nth-child(2), + .switch-candy.switch-yoast-seo input:checked + label { + color: #fff; + text-shadow: none; + } + + .switch-light.switch-yoast-seo-reverse input:checked ~ span a { + right: 0; + } + + .switch-light.switch-yoast-seo-reverse a { + right: 50%; + } + + .switch-light.switch-yoast-seo-reverse span span { + float: left; + } + + .switch-toggle.switch-yoast-seo label, + label.switch-light.switch-yoast-seo { + margin-right: 0; + /* + * To help old iOS: ensure labels have cursor pointer instead of + * using the empty onclick hack. + */ + cursor: pointer; + } + + .switch-yoast-seo .switch-yoast-seo-jaws-a11y { + /* IE11 and JAWS 17.0 need this hack. */ + display: block; + overflow: hidden; + height: 1px; + margin-bottom: -1px; + } + + .switch-toggle.switch-yoast-seo label code, + .switch-light.switch-yoast-seo label code { + background-color: inherit; + vertical-align: top; + } + + .switch-container .label-text { + display: block; + margin: 0.5em 0; + font-weight: 600; + } + + .switch-container { + clear: both; + margin: 0 0 1em 0; + } + + .switch-container + .switch-container { + margin-top: 0.5em; + } + + .switch-container + p { + margin: -0.5em 0 1em 0; + } +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.min.css new file mode 100644 index 0000000..30aa795 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-390-rtl.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.switch-light span span,.switch-toggle a{display:none}@media only screen{.switch-light,.switch-toggle{display:block;position:relative;padding:0!important}.switch-light::after,.switch-toggle::after{display:table;clear:both;content:""}.switch-light *,.switch-light :after,.switch-light :before,.switch-toggle *,.switch-toggle :after,.switch-toggle :before{box-sizing:border-box}.switch-light a,.switch-toggle a{display:block;transition:all .2s ease-out}.switch-light label,.switch-light>span,.switch-toggle label,.switch-toggle>span{line-height:2em;vertical-align:middle}.switch-light input{position:absolute;z-index:3;opacity:0}.switch-light input:checked~span a{left:0}.switch-light strong{font-weight:inherit}.switch-light>span{position:relative;min-height:2em;padding:0;text-align:right}.switch-light span span{display:block;float:right;position:relative;z-index:2;width:50%;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch-light a{display:block;position:absolute;z-index:1;top:0;left:50%;width:50%;height:100%;padding:0}.switch-toggle input{position:absolute;right:0;opacity:0}.switch-toggle input+label{display:block;float:right;position:relative;z-index:2;margin:0;padding:0 .5em;text-align:center}.switch-toggle a{position:absolute;z-index:1;top:0;right:0;width:10px;height:100%;padding:0}.switch-toggle label:nth-child(2):nth-last-child(4),.switch-toggle label:nth-child(2):nth-last-child(4)~a,.switch-toggle label:nth-child(2):nth-last-child(4)~label{width:50%}.switch-toggle label:nth-child(2):nth-last-child(4)~input:checked:nth-child(3)+label~a{right:50%}.switch-toggle label:nth-child(2):nth-last-child(6),.switch-toggle label:nth-child(2):nth-last-child(6)~a,.switch-toggle label:nth-child(2):nth-last-child(6)~label{width:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(3)+label~a{right:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(5)+label~a{right:66.66%}.switch-toggle label:nth-child(2):nth-last-child(8),.switch-toggle label:nth-child(2):nth-last-child(8)~a,.switch-toggle label:nth-child(2):nth-last-child(8)~label{width:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(3)+label~a{right:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(5)+label~a{right:50%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(7)+label~a{right:75%}.switch-toggle label:nth-child(2):nth-last-child(10),.switch-toggle label:nth-child(2):nth-last-child(10)~a,.switch-toggle label:nth-child(2):nth-last-child(10)~label{width:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(3)+label~a{right:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(5)+label~a{right:40%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(7)+label~a{right:60%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(9)+label~a{right:80%}.switch-toggle label:nth-child(2):nth-last-child(12),.switch-toggle label:nth-child(2):nth-last-child(12)~a,.switch-toggle label:nth-child(2):nth-last-child(12)~label{width:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(3)+label~a{right:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(5)+label~a{right:33.2%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(7)+label~a{right:49.8%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(9)+label~a{right:66.4%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(11)+label~a{right:83%}.switch-candy a{box-shadow:0 1px 1px rgba(0,0,0,.2),inset 0 1px 1px rgba(255,255,255,.45)}}@media only screen and (-webkit-max-device-pixel-ratio:2) and (max-device-width:80em){.switch-light,.switch-toggle{-webkit-animation:webkitSiblingBugfix infinite 1s}}.fieldset-switch-toggle label{float:none}@media only screen{.switch-light.switch-yoast-seo{margin-bottom:.2em}.fieldset-switch-toggle legend,.switch-light.switch-yoast-seo>strong{display:block;box-sizing:border-box;min-width:200px;margin-top:10px;padding-left:1em;font-weight:700;line-height:2em;vertical-align:middle}.switch-light.switch-yoast-seo>span,.switch-toggle.switch-yoast-seo{width:250px;border:1px solid #ccc;border-radius:.5em;background-color:#dcdcdc;box-shadow:inset 0 2px 4px rgba(0,0,0,.15)}.switch-toggle.switch-yoast-seo{float:right}.switch-light.switch-yoast-seo>span{display:inline-block;overflow:visible}.switch-light.switch-yoast-seo a,.switch-toggle.switch-yoast-seo a{border:1px solid #b5b5b5;border-radius:.5em;background:#a4286a}.switch-light.switch-yoast-seo input:focus+label,.switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus+label,.switch-toggle.switch-yoast-seo input:focus~span a{outline:0}.switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus~a{border-color:#5b9dd9!important;box-shadow:0 0 2px rgba(0,115,170,.8)!important}.switch-light.switch-yoast-seo input:checked~span a,.switch-toggle.switch-yoast-seo input:checked~span a{border:1px solid #b5b5b5;background:#a4286a}.switch-light.switch-yoast-seo input:checked~span span:first-child,.switch-light.switch-yoast-seo span span,.switch-toggle.switch-yoast-seo label{color:#333;text-shadow:none;font-weight:inherit}.switch-candy.switch-yoast-seo input:checked+label,.switch-candy.switch-yoast-seo input:checked~span span:nth-child(2),.switch-candy.switch-yoast-seo input~span span:first-child{color:#fff;text-shadow:none}.switch-light.switch-yoast-seo-reverse input:checked~span a{right:0}.switch-light.switch-yoast-seo-reverse a{right:50%}.switch-light.switch-yoast-seo-reverse span span{float:left}.switch-toggle.switch-yoast-seo label,label.switch-light.switch-yoast-seo{margin-right:0;cursor:pointer}.switch-yoast-seo .switch-yoast-seo-jaws-a11y{display:block;overflow:hidden;height:1px;margin-bottom:-1px}.switch-light.switch-yoast-seo label code,.switch-toggle.switch-yoast-seo label code{background-color:inherit;vertical-align:top}.switch-container .label-text{display:block;margin:.5em 0;font-weight:600}.switch-container{clear:both;margin:0 0 1em}.switch-container+.switch-container{margin-top:.5em}.switch-container+p{margin:-.5em 0 1em}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.css new file mode 100644 index 0000000..718e698 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.css @@ -0,0 +1,56 @@ +.yoast-notice-dismiss:before { + display: block !important; + width: 20px; + height: 20px; + color: #b4b9be; + background: none; + font: normal 16px/1 "dashicons"; + text-align: center; + content: "\f153"; + + -webkit-font-smoothing: antialiased !important; + speak: none; +} + +.yoast-notice-dismiss { + position: absolute; + top: 0; + left: 1px; + margin: 0; + padding: 9px; + border: none; + color: #b4b9be; + background: none; + cursor: pointer; +} + +.yoast-notice-dismiss:before { + position: relative; + top: 0; + right: 0; + line-height: 20px; +} + +.yoast-notice-dismiss:hover:before, +.yoast-notice-dismiss:active:before, +.yoast-notice-dismiss:focus:before { + color: #c00; +} + +.yoast-notice-dismiss:focus { + outline: none; + color: #c00; + box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); +} + +.ie8 .yoast-notice-dismiss:focus { + outline: 1px solid #5b9dd9; +} + +.yoast-notice.is-dismissible { + position: relative; +} + +.yoast-notice-dismiss { + text-decoration: none; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.min.css new file mode 100644 index 0000000..f7d21e5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-350-rtl.min.css @@ -0,0 +1 @@ +.yoast-notice-dismiss{position:absolute;top:0;left:1px;margin:0;padding:9px;border:none;color:#b4b9be;background:0 0;cursor:pointer;text-decoration:none}.yoast-notice-dismiss:before{display:block!important;width:20px;height:20px;color:#b4b9be;background:0 0;font:400 16px/1 dashicons;text-align:center;content:"\f153";-webkit-font-smoothing:antialiased!important;speak:none;position:relative;top:0;right:0;line-height:20px}.yoast-notice-dismiss:active:before,.yoast-notice-dismiss:focus:before,.yoast-notice-dismiss:hover:before{color:#c00}.yoast-notice-dismiss:focus{outline:0;color:#c00;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .yoast-notice-dismiss:focus{outline:#5b9dd9 solid 1px}.yoast-notice.is-dismissible{position:relative} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.css new file mode 100644 index 0000000..5c881c2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.css @@ -0,0 +1,673 @@ +/* WordPress-specific styling. */ +body { + background: #f1f1f1; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + line-height: 1.375; + /* 22px based on default browser font size 16px. */ +} + +a { + outline: 0; + color: #0073aa; + transition-timing-function: ease-in-out; + transition-duration: 0.05s; + transition-property: border, background, color; +} + +a:hover, +a:active { + color: #00a0d2; +} + +a:focus { + color: #124964; + box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); +} + +.screen-reader-text { + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; + width: 1px; + height: 1px; +} + +/* css for snippet */ +.yoast-search-result-preview { + overflow: hidden; + background-color: #fff; + font-family: Arial, sans-serif; +} + +.yoast-search-result-preview__heading { + margin: 0 -20px 15px; + padding: 8px 20px; + border-bottom: 1px solid #f7f7f7; + color: #555; + font-family: "Open Sans", sans-serif; + font-size: 0.9rem; + font-weight: 300; +} + +.yoast-search-result-preview__field { + overflow: hidden; + position: relative; + width: 600px; + cursor: pointer; +} + +.yoast-search-result-preview__field:before, +.yoast-search-result-preview__field:after { + display: table; + content: " "; +} + +.yoast-search-result-preview__field:after { + clear: both; +} + +.yoast-search-result-preview__field--hover:before { + display: block; + position: absolute; + right: -3px; + width: 24px; + height: 24px; + margin-top: -3px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.yoast-search-result-preview__field--focus:before { + display: block; + position: absolute; + right: -3px; + width: 24px; + height: 24px; + margin-top: -3px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%230075b3%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.yoast-search-result-preview__title { + overflow: hidden; + margin: 0; + color: #1a0dab; + font-size: 18px; + font-weight: normal; + line-height: 1.2; + white-space: nowrap; + text-decoration: none; + text-overflow: ellipsis; +} + +.yoast-search-result-preview__url { + color: #006621; + font-size: 14px; + font-style: normal; + line-height: 16px; +} + +.yoast-search-result-preview__description, +.yoast-search-result-preview__date { + font-size: 13px; + line-height: 1.4; +} + +.yoast-search-result-preview__date { + color: #808080; +} + +.yoast-search-result-preview__description { + color: #545454; +} + +.yoast-icon, +.yoast-icon__eye { + padding-right: 45px; +} + +.yoast-icon__eye { + background: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E") no-repeat 20px center/16px 16px; +} + +.yoast-button, +.yoast-button__edit { + padding: 8px 10px; + border: 1px solid #ccc; + border-radius: 4px; + color: #555; + background: #f7f7f7; + font-size: 0.8rem; + cursor: pointer; +} + +.yoast-button__edit { + display: block; + margin-top: 1em; + padding-right: 32px; + background: #f7f7f7 url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") no-repeat 8px center/16px 16px; + background-size: 16px; +} + +.yoast-search-result-form { + overflow: hidden; + background-color: #fff; + font-family: Arial, sans-serif; +} + +.yoast-search-result-form__heading { + margin: 0 -20px 15px; + padding: 8px 20px; + border-bottom: 1px solid #f7f7f7; + color: #555; + font-family: "Open Sans", sans-serif; + font-size: 0.9rem; + font-weight: 300; +} + +.yoast-search-result-form__container--hover:before { + display: block; + position: absolute; + right: -3px; + width: 24px; + height: 24px; + margin-top: -3px; + margin-top: 15px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.yoast-search-result-form__container--focus:before { + display: block; + position: absolute; + right: -3px; + width: 24px; + height: 24px; + margin-top: -3px; + margin-top: 15px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%230075b3%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E"); + background-size: 25px; + content: ""; +} + +.yoast-search-result-form__label { + display: block; + width: 100%; + margin-top: 1em; +} + +.yoast-search-result-form__field { + box-sizing: border-box; + width: 100%; + border: 1px solid #ddd; +} + +.yoast-search-result-form__description { + display: block; + box-sizing: border-box; + width: 100%; + height: 70px; + border: 1px solid #ddd; +} + +.yoast-search-result-form__progress { + display: block; + box-sizing: border-box; + width: 100%; + height: 8px; + margin-top: 5px; + border: 0; + + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.yoast-search-result-form__progress::-webkit-progress-bar { + border: 1px solid #ddd; + background-color: #f7f7f7; +} + +.yoast-search-result-form__close-button { + margin-top: 1em; +} + +.yoast-search-result-form__progress--bad { + color: #dc3232; +} + +.yoast-search-result-form__progress--bad::-webkit-progress-value { + background-color: #dc3232; + transition: width 250ms; +} + +.yoast-search-result-form__progress--bad::-moz-progress-bar { + background-color: #dc3232; +} + +.yoast-search-result-form__progress--bad--fallback { + overflow: hidden; + max-width: 100%; + background-color: #dc3232; +} + +.yoast-search-result-form__progress--ok { + color: #ee7c1b; +} + +.yoast-search-result-form__progress--ok::-webkit-progress-value { + background-color: #ee7c1b; + transition: width 250ms; +} + +.yoast-search-result-form__progress--ok::-moz-progress-bar { + background-color: #ee7c1b; +} + +.yoast-search-result-form__progress--ok--fallback { + overflow: hidden; + max-width: 100%; + background-color: #ee7c1b; +} + +.yoast-search-result-form__progress--good { + color: #7ad03a; +} + +.yoast-search-result-form__progress--good::-webkit-progress-value { + background-color: #7ad03a; + transition: width 250ms; +} + +.yoast-search-result-form__progress--good::-moz-progress-bar { + background-color: #7ad03a; +} + +.yoast-search-result-form__progress--good--fallback { + overflow: hidden; + max-width: 100%; + background-color: #7ad03a; +} + +.yoast-search-result-editor { + position: relative; + width: 640px; + padding: 0 20px 20px; + border: 1px solid #f7f7f7; + border-radius: 20px; + background-color: #fff; + font-family: Arial, sans-serif; +} + +body { + margin: 0; + padding: 0; +} + +#container { + max-width: 1660px; + margin: 0 auto; +} + +.yoast-wizard-body { + box-sizing: border-box; + width: 80%; + margin: 1rem auto 4rem; +} + +@media screen and (max-width: 768px) { + .yoast-wizard-body { + width: auto; + margin: 0; + } +} + +.yoast-wizard__logo { + display: block; + margin: 0 auto; +} + +.yoast-wizard { + box-sizing: border-box; + width: 100%; + min-height: 20px; + padding: 3em; + background: #fff; + text-align: right; +} + +@media screen and (max-width: 768px) { + .yoast-wizard { + padding: 1em 1em 2em; + } +} + +.yoast-wizard--navigation { + width: 100%; + text-align: left; +} + +.yoast-wizard--button { + margin-top: 1em; +} + +.yoast-wizard--button__next { + margin-right: 1em; +} + +.yoast-wizard--button__next button:hover, +.yoast-wizard--button__next button:focus { + background-color: #6c2548 !important; +} + +.yoast-wizard--button__next button:hover div, +.yoast-wizard--button__next button:focus div { + background-color: transparent !important; +} + +.yoast-wizard--button__previous button:focus { + background: #ddd !important; +} + +.yoast-wizard--button__previous button:focus:active { + background: transparent !important; +} + +.yoast-wizard--button__previous button:hover > div > span, +.yoast-wizard--button__previous button:focus > div > span { + color: #000 !important; +} + +@media screen and (max-width: 768px) { + .yoast-wizard--step__active { + overflow: hidden; + width: 38px; + } + + .yoast-wizard--step__active div { + display: inline-block !important; + vertical-align: middle; + } + + .yoast-wizard--step__active div > span > span { + display: block !important; + margin-right: -7px; + padding-left: 99px !important; + } +} + +.yoast-wizard--step__active svg { + color: #5d237a; + + fill: #5d237a; +} + +.yoast-wizard--step__inactive div { + pointer-events: none; +} + +@media screen and (max-width: 768px) { + .yoast-wizard--step__inactive { + display: none !important; + } +} + +.yoast-wizard--step--container:focus { + outline: none; +} + +.yoast-wizard--step--container h1 { + margin-top: 0; + margin-bottom: 16px; + margin-bottom: 1rem; + color: #a4286a; + font-size: 2.75em; + font-weight: 300; + line-height: 3.68rem; + letter-spacing: normal; +} + +@media screen and (max-width: 768px) { + .yoast-wizard--step--container h1 { + font-size: 2em; + line-height: 1.25; + } +} + +.yoast-wizard--step--container h2 { + color: #a4286a; + font-size: 1.375em; + font-weight: 400; +} + +.yoast-wizard--stepper { + width: 100%; + margin: auto; +} + +.yoast-wizard-overlay { + position: absolute; + z-index: 10; + top: 0; + right: 0; + width: 100%; + height: 100%; + opacity: 0.2; + color: #fff; + background-color: #000; + text-align: center; +} + +.yoast-wizard-overlay-loader { + position: relative; +} + +.yoast-wizard-container { + position: relative; + min-height: 20px; + border: 1px solid #ccc; + box-shadow: rgba(0, 0, 0, 0.15) 0 3px 10px, rgba(0, 0, 0, 0.2) 0 3px 10px; + text-align: right; +} + +@media screen and (max-width: 768px) { + .yoast-wizard-container { + box-shadow: none; + } +} + +.yoast-wizard-container fieldset { + margin: 1em 0; + padding-right: 0.5em; + border: 0; +} + +.yoast-wizard-text-input { + padding-bottom: 0.5em; + font-size: 14px; +} + +.yoast-wizard-text-input-label { + display: block; + margin: 0.5em 0 0; + font-weight: bold; + cursor: pointer; +} + +.yoast-wizard-text-input [type="text"] { + box-sizing: border-box; + width: 100%; + max-width: 450px; +} + +.yoast-wizard-field-description { + font-weight: bold; +} + +.yoast-wizard input { + margin: 0.5em 0; + padding: 5px; + font-size: 14px; + line-height: 140%; +} + +.yoast-wizard label { + cursor: pointer; +} + +.yoast-wizard input[type="radio"] { + margin: 0.3em 0 0.3em 0.7em; + vertical-align: middle; +} + +.yoast-wizard-input__explanation { + margin-top: 0; + color: #555; + font-style: italic; +} + +.yoast-wizard-input-radio { + font-size: 14px; +} + +.yoast-wizard-input-radio-option label { + padding-top: 2px; +} + +.yoast-wizard-input-radio-separator { + padding: 0; +} + +.yoast-wizard-input-radio-separator input { + /* visually hide the radio buttons but keep them accessible */ + position: absolute; + right: -9999em; + width: 1px; + height: 1px; +} + +.yoast-wizard-input-radio-separator input + label { + float: right; + width: 30px !important; + margin: 0 0 5px 5px !important; + padding: 9px 6px; + border: 1px solid #ccc; + /* Don't change: these mimic Google's font and font size for titles */ + font-family: Arial, Helvetica, sans-serif !important; + font-size: 18px !important; + line-height: 24px; + text-align: center; + cursor: pointer; +} + +.yoast-wizard-input-radio-separator input:checked + label { + border: 1px solid #a4286a; + background-color: #fff; + box-shadow: inset 0 0 0 2px #a4286a; +} + +.yoast-wizard-input-radio-separator input:checked + label, +.yoast-wizard-input-radio-separator input:focus + label { + border-radius: 10px; + border-bottom-left-radius: 0; +} + +/* Responsive videos. */ +/* Other common aspect ratios: 75% = 4:3, 66.66% = 3:2, 62.5% = 8:5 */ +.yoast-video-container-max-width { + max-width: 560px; +} + +.yoast-video-container { + overflow: hidden; + position: relative; + /* 16:9 */ + height: 0; + padding-bottom: 56.25%; +} + +.yoast-video-container iframe { + position: absolute; + top: 0; + right: 0; + width: 100%; + height: 100%; +} + +.yoast-wizard-notice__error { + margin-bottom: 15px; + padding: 12px; + border-right: 4px solid #dc3232; + background: #fff; + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); +} + +@keyframes heartbeat { + 0% { + opacity: 0.4; + transform: scale(0.7); + } + + 80% { + opacity: 1; + } + + 100% { + opacity: 1; + transform: scale(0.95); + } +} + +.yoast-loader { + animation: heartbeat 1.15s infinite; + animation-timing-function: cubic-bezier(0.96, 0.02, 0.63, 0.86); + animation-direction: alternate; +} + +.yoast-wizard-return-link { + display: block; + margin: 1em 0; + /* lighter #555d66 */ + color: #646d78; + text-align: center; +} + +.yoast-wizard-mailchimp-message-error { + color: #dc3232; +} + +.yoast-wizard-mailchimp-message-success { + color: #008a00; +} + +.yoast-wizard-input { + padding-bottom: 0.5em; +} + +.yoast-wizard-input__select { + margin: 1em 0; + font-size: 14px; +} + +.yoast-wizard-image-upload-container__image { + max-width: 151px; +} + +.yoast-wizard-image-upload-container-buttons { + margin-top: 1em; +} + +.yoast-wizard-image-upload-container-buttons__remove { + margin-right: 1em; +} + +.yoast-wizard-image-upload-container-description { + display: block; +} + +.ie9 .yoast-wizard--stepper { + display: none; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.min.css new file mode 100644 index 0000000..b0afa08 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yoast-components-400-rtl.min.css @@ -0,0 +1 @@ +.yoast-wizard--step--container:focus,a{outline:0}body{background:#f1f1f1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:1.375}a{color:#0073aa;transition-timing-function:ease-in-out;transition-duration:50ms;transition-property:border,background,color}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.screen-reader-text{overflow:hidden;clip:rect(1px,1px,1px,1px);position:absolute!important;width:1px;height:1px}.yoast-search-result-preview{overflow:hidden;background-color:#fff;font-family:Arial,sans-serif}.yoast-search-result-preview__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-family:"Open Sans",sans-serif;font-size:.9rem;font-weight:300}.yoast-search-result-preview__field{overflow:hidden;position:relative;width:600px;cursor:pointer}.yoast-search-result-preview__field:after,.yoast-search-result-preview__field:before{display:table;content:" "}.yoast-search-result-preview__field--focus:before,.yoast-search-result-preview__field--hover:before{position:absolute;right:-3px;width:24px;height:24px;margin-top:-3px;background-size:25px;content:"";display:block}.yoast-search-result-preview__field:after{clear:both}.yoast-search-result-preview__field--hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.yoast-search-result-preview__field--focus:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%230075b3%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.yoast-search-result-preview__title{overflow:hidden;margin:0;color:#1a0dab;font-size:18px;font-weight:400;line-height:1.2;white-space:nowrap;text-decoration:none;text-overflow:ellipsis}.yoast-search-result-preview__url{color:#006621;font-size:14px;font-style:normal;line-height:16px}.yoast-search-result-preview__date,.yoast-search-result-preview__description{font-size:13px;line-height:1.4}.yoast-search-result-preview__date{color:grey}.yoast-search-result-preview__description{color:#545454}.yoast-icon,.yoast-icon__eye{padding-right:45px}.yoast-icon__eye{background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E") 20px center/16px 16px no-repeat}.yoast-button,.yoast-button__edit{padding:8px 10px;border:1px solid #ccc;border-radius:4px;color:#555;background:#f7f7f7;font-size:.8rem;cursor:pointer}.yoast-button__edit{display:block;margin-top:1em;padding-right:32px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") 8px center/16px 16px no-repeat #f7f7f7;background-size:16px}.yoast-search-result-form{overflow:hidden;background-color:#fff;font-family:Arial,sans-serif}.yoast-search-result-form__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-family:"Open Sans",sans-serif;font-size:.9rem;font-weight:300}.yoast-search-result-form__container--focus:before,.yoast-search-result-form__container--hover:before{position:absolute;right:-3px;width:24px;height:24px;margin-top:15px;background-size:25px;content:"";display:block}.yoast-search-result-form__container--hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.yoast-search-result-form__container--focus:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%230075b3%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.yoast-search-result-form__label{display:block;width:100%;margin-top:1em}.yoast-search-result-form__field{box-sizing:border-box;width:100%;border:1px solid #ddd}.yoast-search-result-form__description{display:block;box-sizing:border-box;width:100%;height:70px;border:1px solid #ddd}.yoast-search-result-form__progress{display:block;box-sizing:border-box;width:100%;height:8px;margin-top:5px;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.yoast-search-result-form__progress::-webkit-progress-bar{border:1px solid #ddd;background-color:#f7f7f7}.yoast-search-result-form__close-button{margin-top:1em}.yoast-search-result-form__progress--bad{color:#dc3232}.yoast-search-result-form__progress--bad::-webkit-progress-value{background-color:#dc3232;transition:width 250ms}.yoast-search-result-form__progress--bad::-moz-progress-bar{background-color:#dc3232}.yoast-search-result-form__progress--bad--fallback{overflow:hidden;max-width:100%;background-color:#dc3232}.yoast-search-result-form__progress--ok{color:#ee7c1b}.yoast-search-result-form__progress--ok::-webkit-progress-value{background-color:#ee7c1b;transition:width 250ms}.yoast-search-result-form__progress--ok::-moz-progress-bar{background-color:#ee7c1b}.yoast-search-result-form__progress--ok--fallback{overflow:hidden;max-width:100%;background-color:#ee7c1b}.yoast-search-result-form__progress--good{color:#7ad03a}.yoast-search-result-form__progress--good::-webkit-progress-value{background-color:#7ad03a;transition:width 250ms}.yoast-search-result-form__progress--good::-moz-progress-bar{background-color:#7ad03a}.yoast-search-result-form__progress--good--fallback{overflow:hidden;max-width:100%;background-color:#7ad03a}.yoast-search-result-editor{position:relative;width:640px;padding:0 20px 20px;border:1px solid #f7f7f7;border-radius:20px;background-color:#fff;font-family:Arial,sans-serif}body{margin:0;padding:0}#container{max-width:1660px;margin:0 auto}.yoast-wizard-body{box-sizing:border-box;width:80%;margin:1rem auto 4rem}@media screen and (max-width:768px){.yoast-wizard-body{width:auto;margin:0}}.yoast-wizard__logo{display:block;margin:0 auto}.yoast-wizard{box-sizing:border-box;width:100%;min-height:20px;padding:3em;background:#fff;text-align:right}.yoast-wizard--navigation{width:100%;text-align:left}.yoast-wizard--button{margin-top:1em}.yoast-wizard--button__next{margin-right:1em}.yoast-wizard--button__next button:focus,.yoast-wizard--button__next button:hover{background-color:#6c2548!important}.yoast-wizard--button__next button:focus div,.yoast-wizard--button__next button:hover div{background-color:transparent!important}.yoast-wizard--button__previous button:focus{background:#ddd!important}.yoast-wizard--button__previous button:focus:active{background:0 0!important}.yoast-wizard--button__previous button:focus>div>span,.yoast-wizard--button__previous button:hover>div>span{color:#000!important}.yoast-wizard--step__active svg{color:#5d237a;fill:#5d237a}.yoast-wizard--step__inactive div{pointer-events:none}.yoast-wizard--step--container h1{margin-top:0;margin-bottom:1rem;color:#a4286a;font-size:2.75em;font-weight:300;line-height:3.68rem;letter-spacing:normal}@media screen and (max-width:768px){.yoast-wizard{padding:1em 1em 2em}.yoast-wizard--step__active{overflow:hidden;width:38px}.yoast-wizard--step__active div{display:inline-block!important;vertical-align:middle}.yoast-wizard--step__active div>span>span{display:block!important;margin-right:-7px;padding-left:99px!important}.yoast-wizard--step__inactive{display:none!important}.yoast-wizard--step--container h1{font-size:2em;line-height:1.25}}.yoast-wizard--step--container h2{color:#a4286a;font-size:1.375em;font-weight:400}.yoast-wizard--stepper{width:100%;margin:auto}.yoast-wizard-overlay{position:absolute;z-index:10;top:0;right:0;width:100%;height:100%;opacity:.2;color:#fff;background-color:#000;text-align:center}.yoast-wizard-overlay-loader{position:relative}.yoast-wizard-container{position:relative;min-height:20px;border:1px solid #ccc;box-shadow:rgba(0,0,0,.15) 0 3px 10px,rgba(0,0,0,.2) 0 3px 10px;text-align:right}@media screen and (max-width:768px){.yoast-wizard-container{box-shadow:none}}.yoast-wizard-container fieldset{margin:1em 0;padding-right:.5em;border:0}.yoast-wizard-text-input{padding-bottom:.5em;font-size:14px}.yoast-wizard-text-input-label{display:block;margin:.5em 0 0;font-weight:700;cursor:pointer}.yoast-wizard-text-input [type=text]{box-sizing:border-box;width:100%;max-width:450px}.yoast-wizard-field-description{font-weight:700}.yoast-wizard input{margin:.5em 0;padding:5px;font-size:14px;line-height:140%}.yoast-wizard label{cursor:pointer}.yoast-wizard input[type=radio]{margin:.3em 0 .3em .7em;vertical-align:middle}.yoast-wizard-input__explanation{margin-top:0;color:#555;font-style:italic}.yoast-wizard-input-radio{font-size:14px}.yoast-wizard-input-radio-option label{padding-top:2px}.yoast-wizard-input-radio-separator{padding:0}.yoast-wizard-input-radio-separator input{position:absolute;right:-9999em;width:1px;height:1px}.yoast-wizard-input-radio-separator input+label{float:right;width:30px!important;margin:0 0 5px 5px!important;padding:9px 6px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:24px;text-align:center;cursor:pointer}.yoast-wizard-input-radio-separator input:checked+label{border:1px solid #a4286a;background-color:#fff;box-shadow:inset 0 0 0 2px #a4286a}.yoast-wizard-input-radio-separator input:checked+label,.yoast-wizard-input-radio-separator input:focus+label{border-radius:10px 10px 10px 0}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;right:0;width:100%;height:100%}.yoast-wizard-notice__error{margin-bottom:15px;padding:12px;border-right:4px solid #dc3232;background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@keyframes heartbeat{0%{opacity:.4;transform:scale(.7)}80%{opacity:1}100%{opacity:1;transform:scale(.95)}}.yoast-loader{animation:heartbeat 1.15s infinite;animation-timing-function:cubic-bezier(.96,.02,.63,.86);animation-direction:alternate}.yoast-wizard-return-link{display:block;margin:1em 0;color:#646d78;text-align:center}.yoast-wizard-mailchimp-message-error{color:#dc3232}.yoast-wizard-mailchimp-message-success{color:#008a00}.yoast-wizard-input{padding-bottom:.5em}.yoast-wizard-input__select{margin:1em 0;font-size:14px}.yoast-wizard-image-upload-container__image{max-width:151px}.yoast-wizard-image-upload-container-buttons{margin-top:1em}.yoast-wizard-image-upload-container-buttons__remove{margin-right:1em}.yoast-wizard-image-upload-container-description{display:block}.ie9 .yoast-wizard--stepper{display:none} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.css new file mode 100644 index 0000000..10451d5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.css @@ -0,0 +1,899 @@ +@charset "UTF-8"; + + +/*------------------------------------* #SETTINGS +\*------------------------------------*/ + +/** + * Pull in all the settings we require for this project. + */ +/** + * Create vendor-prefixed CSS in one go, e.g. + * + `@include vendor(border-radius, 4px);` + * + */ +.yoast-list--usp { + margin-bottom: 1em; + padding: 0; + font-family: "Open Sans", Arial, sans-serif; +} + +.yoast-list--usp li { + position: relative; + padding-right: 1.2533333333rem; + list-style: none !important; +} + +.yoast-list--usp li::before { + position: absolute; + top: 0; + right: 0; + color: #77b227; + font-family: "FontAwesome", "Open Sans", Arial, sans-serif; + content: "\f00c\0020"; +} + +.yoast h1, +.yoast h2, +.yoast h3, +.yoast h4, +.yoast h5, +.yoast h6, +.yoast .h1, +.yoast .h2, +.yoast .h3, +.yoast .h4, +.yoast .h5, +.yoast .h6 { + display: block; + margin-top: 0; + font-family: "Open Sans", Arial, sans-serif; + font-weight: 300; +} + +.yoast h1, +.yoast .h1 { + margin-bottom: 1.35rem; + font-size: 2.5em; + line-height: 3.68rem; + letter-spacing: normal; +} + +@media only screen and (min-width: 30rem) { + .yoast h1, + .yoast .h1 { + font-size: 2.75em; + } +} + +.yoast h2, +.yoast .h2 { + margin-bottom: 1.2rem; + font-size: 1.88em; + line-height: 2.5rem; +} + +.yoast h2.tight, +.yoast .h2.tight { + margin-bottom: 0.6rem; +} + +.yoast h3, +.yoast .h3 { + margin-bottom: 0.8rem; + font-size: 1.25em; + line-height: 1.88rem; +} + +.yoast h3.tight, +.yoast .h3.tight { + margin-bottom: 0.4rem; +} + +@media only screen and (min-width: 30rem) { + .yoast h3, + .yoast .h3 { + font-size: 1.375em; + } +} + +@media only screen and (min-width: 50rem) { + .yoast h3, + .yoast .h3 { + font-size: 1.5em; + } +} + +.yoast h4, +.yoast .h4, +.yoast h5, +.yoast .h5, +.yoast h6, +.yoast .h6 { + margin-bottom: 0.2rem; + font-size: 1.13em; + font-weight: 400; + line-height: 1.88rem; +} + +.yoast-button { + display: inline-block; + position: relative; + width: 100%; + padding: 0.345em 1em 0.345em 1.5em; + border: 0; + color: #dc5c04; + background-color: transparent; + background-color: #dc5c04; + font-family: "Open Sans", Arial, sans-serif; + font-size: 1.1em; + text-decoration: none; + cursor: pointer; +} + +@media only screen and (min-width: 30rem) { + .yoast-button { + width: auto; + max-height: 2.86rem; + margin-left: 1.36rem; + } + + .yoast-button::after { + position: absolute; + top: 0; + left: -1.36rem; + width: 0; + height: 0; + border-top: 1.43rem solid transparent; + border-left: 0; + border-bottom: 1.44rem solid transparent; + border-right: 1.43rem solid #dc5c04; + content: ""; + } + + .yoast-button.left { + margin-left: 0; + margin-right: 1.36rem; + } + + .yoast-button.left::after { + content: none; + } + + .yoast-button.left::before { + position: absolute; + top: 0; + right: -1.36rem; + width: 0; + height: 0; + border-top: 1.43rem solid transparent; + border-left: 1.43rem solid #dc5c04; + border-bottom: 1.44rem solid transparent; + border-right: 0; + content: ""; + } +} + +.yoast-button.alignleft { + margin: 1rem 0 0 2.5rem !important; +} + +.yoast-button .arrow { + display: none; +} + +.yoast-button + .yoast-button { + margin-top: 1em; + margin-right: 1.88rem; +} + +.yoast-button--full { + width: 100%; +} + +.yoast-button--full::after { + content: none; +} + +.yoast-button.default { + color: #fff; + background-color: #dc5c04; +} + +.yoast-button.default::after { + border-right-color: #dc5c04; +} + +.yoast-button.default::before { + border-left-color: #dc5c04; +} + +.yoast-button:hover, +.yoast-button a:focus { + color: #fff; + background-color: #f58223; + text-decoration: underline; +} + +.yoast-button:hover::after, +.yoast-button a:focus::after { + border-right-color: #f58223; +} + +.yoast-button:hover::before, +.yoast-button a:focus::before { + border-left-color: #f58223; +} + +.yoast-button.academy { + color: #fff; + background-color: #5d237a; +} + +.yoast-button.academy::after { + border-right-color: #5d237a; +} + +.yoast-button.academy::before { + border-left-color: #5d237a; +} + +@media only screen and (max-width: 20rem) { + .yoast-button.academy { + background-color: #5d237a; + } +} + +.yoast-button.academy--secondary { + color: #fff; + background-color: #a4286a; +} + +.yoast-button.academy--secondary::after { + border-right-color: #a4286a; +} + +.yoast-button.academy--secondary::before { + border-left-color: #a4286a; +} + +@media only screen and (max-width: 20rem) { + .yoast-button.academy--secondary { + background-color: #a4286a; + } +} + +.yoast-button.software { + color: #fff; + background-color: #0075b3; +} + +.yoast-button.software::after { + border-right-color: #0075b3; +} + +.yoast-button.software::before { + border-left-color: #0075b3; +} + +.yoast-button.review { + color: #fff; + background-color: #009288; +} + +.yoast-button.review::after { + border-right-color: #009288; +} + +.yoast-button.review::before { + border-left-color: #009288; +} + +.yoast-button.about { + color: #fff; + background-color: #d93f69; +} + +.yoast-button.about::after { + border-right-color: #d93f69; +} + +.yoast-button.about::before { + border-left-color: #d93f69; +} + +.yoast_academy .yoast-button { + color: #fff; + background-color: #d93f69; +} + +.yoast_academy .yoast-button::after { + border-right-color: #d93f69; +} + +.yoast_academy .yoast-button::before { + border-left-color: #d93f69; +} + +.yoast_academy .yoast-button:hover, +.yoast_academy .yoast-button a:focus { + color: #fff; + background-color: #d42a59; + text-decoration: underline; +} + +.yoast_academy .yoast-button:hover::after, +.yoast_academy .yoast-button a:focus::after { + border-right-color: #d42a59; +} + +.yoast_academy .yoast-button:hover::before, +.yoast_academy .yoast-button a:focus::before { + border-left-color: #d42a59; +} + +body .yoast-button.dimmed, +.yoast_academy .yoast-button.dimmed { + color: #646464; + background-color: #dcdcdc; +} + +body .yoast-button.dimmed::after, +.yoast_academy .yoast-button.dimmed::after { + border-right-color: #dcdcdc; +} + +body .yoast-button.dimmed::before, +.yoast_academy .yoast-button.dimmed::before { + border-left-color: #dcdcdc; +} + +body .yoast-button.dimmed:hover, +body .yoast-button.dimmed a:focus, +.yoast_academy .yoast-button.dimmed:hover, +.yoast_academy .yoast-button.dimmed a:focus { + color: #646464; + background-color: #cdcdcd; + text-decoration: underline; +} + +body .yoast-button.dimmed:hover::after, +body .yoast-button.dimmed a:focus::after, +.yoast_academy .yoast-button.dimmed:hover::after, +.yoast_academy .yoast-button.dimmed a:focus::after { + border-right-color: #cdcdcd; +} + +body .yoast-button.dimmed:hover:before, +body .yoast-button.dimmed a:focus:before, +.yoast_academy .yoast-button.dimmed:hover:before, +.yoast_academy .yoast-button.dimmed a:focus:before { + border-left-color: #cdcdcd; +} + +.yoast-button--noarrow::after { + content: none; +} + +.yoast-button--naked { + padding: 0; + border: none; + background-color: transparent; +} + +.yoast-button--naked::after { + content: none; +} + +.yoast-button i.fa { + margin: 4px 0 0 10px; + font-size: 140%; +} + +.yoast-promoblock { + border: 1px solid #e6e6e6; + /* Explicit theming */ +} + +.theme-academy .yoast-promoblock { + border-color: #5d237a; +} + +.theme-academy--secondary .yoast-promoblock { + border-color: #a4286a; +} + +.theme-software .yoast-promoblock { + border-color: #0075b3; +} + +.theme-review .yoast-promoblock { + border-color: #009288; +} + +.theme-about .yoast-promoblock { + border-color: #d93f69; +} + +.theme-home .yoast-promoblock { + border-color: #d93f69; +} + +.theme-academy.yoast-promoblock { + border-color: #5d237a; +} + +.theme-academy--secondary.yoast-promoblock { + border-color: #a4286a; +} + +.theme-software.yoast-promoblock { + border-color: #0075b3; +} + +.theme-software--secondary.yoast-promoblock { + border-color: #009288; +} + +.theme-review.yoast-promoblock { + border-color: #009288; +} + +.theme-review--secondary.yoast-promoblock { + border-color: #77b227; +} + +.theme-about.yoast-promoblock { + border-color: #d93f69; +} + +.theme-about--secondary.yoast-promoblock { + border-color: #a4286a; +} + +.link.yoast-promoblock { + border-color: #dc5c04; +} + +.link.yoast-promoblock::after { + -moz-filter: drop-shadow(1px 0 0 #dc5c04); + -ms-filter: drop-shadow(1px 0 0 #dc5c04); + -o-filter: drop-shadow(1px 0 0 #dc5c04); + filter: drop-shadow(1px 0 0 #dc5c04); +} + +.cta.yoast-promoblock { + border-color: #dc5c04; +} + +.cta.yoast-promoblock::after { + -moz-filter: drop-shadow(1px 0 0 #dc5c04); + -ms-filter: drop-shadow(1px 0 0 #dc5c04); + -o-filter: drop-shadow(1px 0 0 #dc5c04); + filter: drop-shadow(1px 0 0 #dc5c04); +} + +.yoast-promoblock { + display: block; + position: relative; + margin-bottom: 1.88rem; + padding: 20px; + border: 1px solid; + border-radius: 30px; + border-bottom-left-radius: 0; + background-color: #fff; + font-family: "Merriweather", Georgia, serif; +} + +.yoast-promoblock p { + color: #000; +} + +.yoast-promoblock p:last-of-type { + margin-bottom: 0; +} + +.yoast-promoblock i.blockicon { + position: absolute; + left: 10px; + bottom: 10px; + padding: 0 0.5em 0 0; + font-size: 2.25em; +} + +.yoast-promoblock a img { + border: 1px solid #dcdcdc; +} + +.yoast-promoblock p a { + font-weight: 600 !important; + text-decoration: underline; +} + +.yoast-promoblock form a { + font-family: "Open Sans", Arial, sans-serif; + font-weight: 400 !important; + text-decoration: none; +} + +.yoast-promoblock h4, +.yoast-promoblock .h4 { + margin-bottom: 0.7rem; +} + +.yoast-promoblock.link { + border-color: #dc5c04; +} + +.yoast-promoblock.link a, +.yoast-promoblock.link a:hover { + color: #dc5c04; +} + +.yoast-promoblock--white { + border-color: #fff !important; +} + +.yoast-promoblock.theme-academy a { + color: #5d237a !important; +} + +.yoast-promoblock.theme-academy.secondary a { + color: #a4286a !important; +} + +.yoast-promoblock.theme-software a { + color: #0075b3 !important; +} + +.yoast-promoblock.theme-review a { + color: #009288 !important; +} + +.yoast-promoblock.theme-review.secondary a { + color: #77b227 !important; +} + +.yoast-promoblock.theme-about a { + color: #d93f69 !important; +} + +.product .yoast-promoblock { + overflow: hidden; +} + +.yoast-promoblock--hometitle { + /* OLD - iOS 6-, Safari 3.1-6 */ + /* OLD - Firefox 19- (buggy but mostly works) */ + display: -ms-flexbox; + /* TWEENER - IE 10 */ + /* NEW - Chrome */ + display: flex; + max-width: 16em; + height: 11em; + margin: 16px auto 32px; + margin: 1rem auto 2rem; + border-color: #fff !important; + background-color: rgba(217, 63, 105, 0.25); + font-size: 16px; + font-size: 1rem; + line-height: 1; + + -webkit-box-pack: center; + -ms-flex-align: center; + -ms-flex-line-pack: center; + /* NEW, Spec - Opera 12.1, Firefox 20+ */ + -ms-flex-pack: justify; +} + +.old-ie .yoast-promoblock--hometitle { + text-align: justify; +} + +.old-ie .yoast-promoblock--hometitle::after { + display: inline-block; + width: 100%; + content: ""; +} + +.old-ie .yoast-promoblock--hometitle > * { + display: inline-block; + text-align: right; +} + +@media only screen and (max-width: 30rem) { + .yoast-promoblock--hometitle::after { + content: none !important; + } +} + +.yoast-promoblock--imageholder { + margin-bottom: 0; + padding: 0; +} + +.yoast-promoblock--imageholdersmall { + position: absolute; +} + +.yoast-promoblock--imageholdersmall:first-child { + right: 4rem; +} + +.yoast-promoblock--imageholdersmall:last-child { + top: 4rem; +} + +@media only screen and (max-width: 50rem) { + .yoast-promoblock h2 { + margin-bottom: 0; + } +} + +a.promoblock { + color: #000; + text-decoration: none; +} + +a.promoblock:hover { + text-decoration: none; +} + +.promoblockimage__holder { + position: relative; + width: 240px; + height: 295px; +} + +@media only screen and (min-width: 50rem) { + [class*="promoblock--icon"]::before { + position: absolute; + left: 0.47rem; + bottom: 0.47rem; + font-family: "FontAwesome", "Open Sans", Arial, sans-serif; + font-size: 2.2rem; + line-height: 1; + } + + body.theme-about [class*="promoblock--icon"]::before { + color: #d93f69; + } + + body.theme-about .promoblock a.color-cta { + color: #009288 !important; + } + + body.theme-academy [class*="promoblock--icon"]::before { + color: #5d237a; + } + + body.theme-software [class*="promoblock--icon"]::before { + color: #0075b3; + } + + .promoblock--icon-academy::before { + content: "\f19d"; + } + + .promoblock--icon-blog::before { + content: "\f1ea"; + } + + .promoblock--icon-book::before { + content: "\f02d"; + } + + .promoblock--icon-calendar::before { + content: "\f073"; + } + + .promoblock--icon-check::before { + content: "\f046"; + } + + .promoblock--icon-drupal::before { + content: "\f1a9"; + } + + .promoblock--icon-gears::before { + content: "\f085"; + } + + .promoblock--icon-pencil::before { + content: "\f040"; + } + + .promoblock--icon-plug::before { + content: "\f1e6"; + } + + .promoblock--icon-video::before { + content: "\f008"; + } + + .promoblock--icon-wordpress::before { + content: "\f19a"; + } +} + +.yoast { + color: #000; + font-family: "Open Sans",Arial,sans-serif; + font-size: 1rem; + line-height: 1.88; + letter-spacing: 0.01em; +} + +.yoast *, +.yoast *:before, +.yoast *:after { + box-sizing: border-box; +} + +.yoast-hr { + position: relative; + margin: 0; + padding-bottom: 1.88rem; + border: 0; + border-top: 1px solid #a4286a; +} + +.yoast-hr:after { + position: absolute; + z-index: 1; + top: -2px; + right: 50%; + height: 0; + border: none; + border-top: 20px solid #f1f1f1; + border-left: 40px solid transparent; + border-right: 40px solid transparent; + line-height: 0; + content: ""; + -ms-transform: translateX(50%); + transform: translateX(50%); + + -moz-filter: drop-shadow(0 1px 0 #a4286a); + -ms-filter: drop-shadow(0 1px 0 #a4286a); + -o-filter: drop-shadow(0 1px 0 #a4286a); + filter: drop-shadow(0 1px 0 #a4286a); +} + +.yoast-list--usp li:before { + width: 1em; + height: 100%; + background: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E") no-repeat; + background-position: right 0.4em; + background-size: contain; + content: ""; +} + +.yoast-button--purple { + background-color: #5d237a; +} + +.yoast-button-go-to:after { + position: static; + top: auto; + left: auto; + width: auto; + height: auto; + border: none; + content: " \00BB"; +} + +.yoast-button--installed { + color: #fff; + background-color: #77b227; + cursor: default; +} + +.yoast-button--installed:hover { + background-color: #77b227; + text-decoration: none; +} + +.yoast-promo-extensions { + display: -ms-flexbox; + display: flex; + margin-right: -50px; + + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +.yoast-promo-extensions > h2 { + width: 100%; + margin-right: 50px; +} + +.yoast-promo-extension { + max-width: 330px; + margin-right: 50px; + border-color: #a4286a; + background-color: transparent; +} + +.yoast-promo-extension:first-child { + margin-right: 0; +} + +.yoast-promo-extension img { + width: 100%; + height: auto; + margin-bottom: 0.8rem; +} + +@media screen and (max-width: 900px) { + .yoast-promo-extension img { + display: none; + } +} + +.yoast-promo-extension .yoast-button { + width: 100%; + max-height: none; +} + +.yoast-promo-extension .yoast-button--installed { + width: auto; +} + +.yoast-promo-extension h3 { + color: #a4286a; +} + +@media screen and (max-width: 900px) { + .yoast-promo-extension { + width: 100%; + max-width: none; + } +} + +.yoast-seo-premium-extension:before, +.yoast-seo-premium-extension:after { + display: table; + content: ""; +} + +.yoast-seo-premium-extension:after { + clear: both; +} + +.yoast-seo-premium-benefits__title { + font-weight: 600; +} + +.yoast-seo-premium-benefits__description:before { + content: "– "; +} + +.yoast-link--more-info { + padding-right: calc( 1em + 5px); + color: #646464; + background: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%201376v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D96v%2D512q0%2D14%2D9%2D23t%2D23%2D9h%2D320q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h96v320h%2D96q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h448q14%200%2023%2D9t9%2D23zm%2D128%2D896v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D192q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h192q14%200%2023%2D9t9%2D23zm640%20416q0%20209%2D103%20385%2E5t%2D279%2E5%20279%2E5%2D385%2E5%20103%2D385%2E5%2D103%2D279%2E5%2D279%2E5%2D103%2D385%2E5%20103%2D385%2E5%20279%2E5%2D279%2E5%20385%2E5%2D103%20385%2E5%20103%20279%2E5%20279%2E5%20103%20385%2E5z%22%2F%3E%3C%2Fsvg%3E"); + background-repeat: no-repeat; + background-position: right 0.2em; + background-size: 1em; +} + +.yoast-link--more-info:after { + content: " \00BB"; +} + +.yoast-promo-extension .yoast-link--more-info { + display: block; + margin: 1em 0 0 0; + background-position: right 0.4em; +} + +.yoast-heading-highlight { + color: #a4286a; + font-weight: 600; +} + +.yoast-money-back-guarantee { + font-size: 1.1em; + font-style: italic; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.min.css new file mode 100644 index 0000000..ced784c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-390-rtl.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.yoast-list--usp{margin-bottom:1em;padding:0;font-family:"Open Sans",Arial,sans-serif}.yoast-list--usp li{position:relative;padding-right:1.2533333333rem;list-style:none!important}.yoast-list--usp li::before{position:absolute;top:0;right:0;color:#77b227;font-family:FontAwesome,"Open Sans",Arial,sans-serif;content:"\f00c\0020"}.yoast .h1,.yoast .h2,.yoast .h3,.yoast .h4,.yoast .h5,.yoast .h6,.yoast h1,.yoast h2,.yoast h3,.yoast h4,.yoast h5,.yoast h6{display:block;margin-top:0;font-family:"Open Sans",Arial,sans-serif;font-weight:300}.yoast .h1,.yoast h1{margin-bottom:1.35rem;font-size:2.5em;line-height:3.68rem;letter-spacing:normal}@media only screen and (min-width:30rem){.yoast .h1,.yoast h1{font-size:2.75em}}.yoast .h2,.yoast h2{margin-bottom:1.2rem;font-size:1.88em;line-height:2.5rem}.yoast .h2.tight,.yoast h2.tight{margin-bottom:.6rem}.yoast .h3,.yoast h3{margin-bottom:.8rem;font-size:1.25em;line-height:1.88rem}.yoast .h3.tight,.yoast h3.tight{margin-bottom:.4rem}@media only screen and (min-width:30rem){.yoast .h3,.yoast h3{font-size:1.375em}}@media only screen and (min-width:50rem){.yoast .h3,.yoast h3{font-size:1.5em}}.yoast .h4,.yoast .h5,.yoast .h6,.yoast h4,.yoast h5,.yoast h6{margin-bottom:.2rem;font-size:1.13em;font-weight:400;line-height:1.88rem}.yoast-button{display:inline-block;position:relative;width:100%;padding:.345em 1em .345em 1.5em;border:0;color:#dc5c04;background-color:#dc5c04;font-family:"Open Sans",Arial,sans-serif;font-size:1.1em;text-decoration:none;cursor:pointer}@media only screen and (min-width:30rem){.yoast-button{width:auto;max-height:2.86rem;margin-left:1.36rem}.yoast-button.left::before,.yoast-button::after{position:absolute;top:0;width:0;height:0;border-top:1.43rem solid transparent;border-bottom:1.44rem solid transparent}.yoast-button::after{left:-1.36rem;border-left:0;border-right:1.43rem solid #dc5c04;content:""}.yoast-button.left{margin-left:0;margin-right:1.36rem}.yoast-button.left::after{content:none}.yoast-button.left::before{right:-1.36rem;border-left:1.43rem solid #dc5c04;border-right:0;content:""}}.yoast-button--full::after,.yoast-button--naked::after,.yoast-button--noarrow::after{content:none}.yoast-button.alignleft{margin:1rem 0 0 2.5rem!important}.yoast-button .arrow{display:none}.yoast-button+.yoast-button{margin-top:1em;margin-right:1.88rem}.yoast-button--full{width:100%}.yoast-button.default{color:#fff;background-color:#dc5c04}.yoast-button.default::after{border-right-color:#dc5c04}.yoast-button.default::before{border-left-color:#dc5c04}.yoast-button a:focus,.yoast-button:hover{color:#fff;background-color:#f58223;text-decoration:underline}.yoast-button a:focus::after,.yoast-button:hover::after{border-right-color:#f58223}.yoast-button a:focus::before,.yoast-button:hover::before{border-left-color:#f58223}.yoast-button.academy{color:#fff;background-color:#5d237a}.yoast-button.academy::after{border-right-color:#5d237a}.yoast-button.academy::before{border-left-color:#5d237a}@media only screen and (max-width:20rem){.yoast-button.academy{background-color:#5d237a}.yoast-button.academy--secondary{background-color:#a4286a}}.yoast-button.academy--secondary{color:#fff;background-color:#a4286a}.yoast-button.academy--secondary::after{border-right-color:#a4286a}.yoast-button.academy--secondary::before{border-left-color:#a4286a}.yoast-button.software{color:#fff;background-color:#0075b3}.yoast-button.software::after{border-right-color:#0075b3}.yoast-button.software::before{border-left-color:#0075b3}.yoast-button.review{color:#fff;background-color:#009288}.yoast-button.about,.yoast_academy .yoast-button{background-color:#d93f69;color:#fff}.yoast-button.review::after{border-right-color:#009288}.yoast-button.about::after,.yoast_academy .yoast-button::after{border-right-color:#d93f69}.yoast-button.review::before{border-left-color:#009288}.yoast-button.about::before,.yoast_academy .yoast-button::before{border-left-color:#d93f69}.yoast_academy .yoast-button a:focus,.yoast_academy .yoast-button:hover{color:#fff;background-color:#d42a59;text-decoration:underline}.yoast_academy .yoast-button a:focus::after,.yoast_academy .yoast-button:hover::after{border-right-color:#d42a59}.yoast_academy .yoast-button a:focus::before,.yoast_academy .yoast-button:hover::before{border-left-color:#d42a59}.yoast_academy .yoast-button.dimmed,body .yoast-button.dimmed{color:#646464;background-color:#dcdcdc}.yoast_academy .yoast-button.dimmed::after,body .yoast-button.dimmed::after{border-right-color:#dcdcdc}.yoast_academy .yoast-button.dimmed::before,body .yoast-button.dimmed::before{border-left-color:#dcdcdc}.yoast_academy .yoast-button.dimmed a:focus,.yoast_academy .yoast-button.dimmed:hover,body .yoast-button.dimmed a:focus,body .yoast-button.dimmed:hover{color:#646464;background-color:#cdcdcd;text-decoration:underline}.yoast_academy .yoast-button.dimmed a:focus::after,.yoast_academy .yoast-button.dimmed:hover::after,body .yoast-button.dimmed a:focus::after,body .yoast-button.dimmed:hover::after{border-right-color:#cdcdcd}.yoast_academy .yoast-button.dimmed a:focus:before,.yoast_academy .yoast-button.dimmed:hover:before,body .yoast-button.dimmed a:focus:before,body .yoast-button.dimmed:hover:before{border-left-color:#cdcdcd}.yoast-button--naked{padding:0;border:none;background-color:transparent}.yoast-button i.fa{margin:4px 0 0 10px;font-size:140%}.theme-academy .yoast-promoblock{border-color:#5d237a}.theme-academy--secondary .yoast-promoblock{border-color:#a4286a}.theme-software .yoast-promoblock{border-color:#0075b3}.theme-review .yoast-promoblock{border-color:#009288}.theme-about .yoast-promoblock,.theme-home .yoast-promoblock{border-color:#d93f69}.theme-academy.yoast-promoblock{border-color:#5d237a}.theme-academy--secondary.yoast-promoblock{border-color:#a4286a}.theme-software.yoast-promoblock{border-color:#0075b3}.theme-review.yoast-promoblock,.theme-software--secondary.yoast-promoblock{border-color:#009288}.theme-review--secondary.yoast-promoblock{border-color:#77b227}.theme-about.yoast-promoblock{border-color:#d93f69}.theme-about--secondary.yoast-promoblock{border-color:#a4286a}.cta.yoast-promoblock,.link.yoast-promoblock{border-color:#dc5c04}.link.yoast-promoblock::after{-moz-filter:drop-shadow(1px 0 0 #dc5c04);-ms-filter:drop-shadow(1px 0 0 #dc5c04);-o-filter:drop-shadow(1px 0 0 #dc5c04);filter:drop-shadow(1px 0 0 #dc5c04)}.cta.yoast-promoblock::after{-moz-filter:drop-shadow(1px 0 0 #dc5c04);-ms-filter:drop-shadow(1px 0 0 #dc5c04);-o-filter:drop-shadow(1px 0 0 #dc5c04);filter:drop-shadow(1px 0 0 #dc5c04)}.yoast-promoblock{display:block;position:relative;margin-bottom:1.88rem;padding:20px;border:1px solid;border-radius:30px 30px 30px 0;background-color:#fff;font-family:Merriweather,Georgia,serif}.yoast-promoblock p{color:#000}.yoast-promoblock p:last-of-type{margin-bottom:0}.yoast-promoblock i.blockicon{position:absolute;left:10px;bottom:10px;padding:0 .5em 0 0;font-size:2.25em}.yoast-promoblock a img{border:1px solid #dcdcdc}.yoast-promoblock p a{font-weight:600!important;text-decoration:underline}.yoast-promoblock form a,a.promoblock,a.promoblock:hover{text-decoration:none}.yoast-promoblock form a{font-family:"Open Sans",Arial,sans-serif;font-weight:400!important}.yoast-promoblock .h4,.yoast-promoblock h4{margin-bottom:.7rem}.yoast-promoblock.link{border-color:#dc5c04}.yoast-promoblock.link a,.yoast-promoblock.link a:hover{color:#dc5c04}.yoast-promoblock--white{border-color:#fff!important}.yoast-promoblock.theme-academy a{color:#5d237a!important}.yoast-promoblock.theme-academy.secondary a{color:#a4286a!important}.yoast-promoblock.theme-software a{color:#0075b3!important}.yoast-promoblock.theme-review a{color:#009288!important}.yoast-promoblock.theme-review.secondary a{color:#77b227!important}.yoast-promoblock.theme-about a{color:#d93f69!important}.product .yoast-promoblock{overflow:hidden}.yoast-promoblock--hometitle{display:-ms-flexbox;display:flex;max-width:16em;height:11em;margin:1rem auto 2rem;border-color:#fff!important;background-color:rgba(217,63,105,.25);font-size:16px;font-size:1rem;line-height:1;-webkit-box-pack:center;-ms-flex-align:center;-ms-flex-line-pack:center;-ms-flex-pack:justify}.old-ie .yoast-promoblock--hometitle{text-align:justify}.old-ie .yoast-promoblock--hometitle::after{display:inline-block;width:100%;content:""}.old-ie .yoast-promoblock--hometitle>*{display:inline-block;text-align:right}@media only screen and (max-width:30rem){.yoast-promoblock--hometitle::after{content:none!important}}.yoast-promoblock--imageholder{margin-bottom:0;padding:0}.yoast-promoblock--imageholdersmall{position:absolute}.yoast-promoblock--imageholdersmall:first-child{right:4rem}.yoast-promoblock--imageholdersmall:last-child{top:4rem}@media only screen and (max-width:50rem){.yoast-promoblock h2{margin-bottom:0}}a.promoblock{color:#000}.promoblockimage__holder{position:relative;width:240px;height:295px}@media only screen and (min-width:50rem){[class*=promoblock--icon]::before{position:absolute;left:.47rem;bottom:.47rem;font-family:FontAwesome,"Open Sans",Arial,sans-serif;font-size:2.2rem;line-height:1}body.theme-about [class*=promoblock--icon]::before{color:#d93f69}body.theme-about .promoblock a.color-cta{color:#009288!important}body.theme-academy [class*=promoblock--icon]::before{color:#5d237a}body.theme-software [class*=promoblock--icon]::before{color:#0075b3}.promoblock--icon-academy::before{content:"\f19d"}.promoblock--icon-blog::before{content:"\f1ea"}.promoblock--icon-book::before{content:"\f02d"}.promoblock--icon-calendar::before{content:"\f073"}.promoblock--icon-check::before{content:"\f046"}.promoblock--icon-drupal::before{content:"\f1a9"}.promoblock--icon-gears::before{content:"\f085"}.promoblock--icon-pencil::before{content:"\f040"}.promoblock--icon-plug::before{content:"\f1e6"}.promoblock--icon-video::before{content:"\f008"}.promoblock--icon-wordpress::before{content:"\f19a"}}.yoast{color:#000;font-family:"Open Sans",Arial,sans-serif;font-size:1rem;line-height:1.88;letter-spacing:.01em}.yoast *,.yoast :after,.yoast :before{box-sizing:border-box}.yoast-hr{position:relative;margin:0;padding-bottom:1.88rem;border:0;border-top:1px solid #a4286a}.yoast-hr:after{position:absolute;z-index:1;top:-2px;right:50%;height:0;border:none;border-top:20px solid #f1f1f1;border-left:40px solid transparent;border-right:40px solid transparent;line-height:0;content:"";-ms-transform:translateX(50%);transform:translateX(50%);-moz-filter:drop-shadow(0 1px 0 #a4286a);-ms-filter:drop-shadow(0 1px 0 #a4286a);-o-filter:drop-shadow(0 1px 0 #a4286a);filter:drop-shadow(0 1px 0 #a4286a)}.yoast-list--usp li:before{width:1em;height:100%;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E") right .4em no-repeat;background-size:contain;content:""}.yoast-button--purple{background-color:#5d237a}.yoast-button-go-to:after{position:static;top:auto;left:auto;width:auto;height:auto;border:none;content:" \00BB"}.yoast-button--installed{color:#fff;background-color:#77b227;cursor:default}.yoast-button--installed:hover{background-color:#77b227;text-decoration:none}.yoast-promo-extensions{display:-ms-flexbox;display:flex;margin-right:-50px;-ms-flex-wrap:wrap;flex-wrap:wrap}.yoast-promo-extensions>h2{width:100%;margin-right:50px}.yoast-promo-extension{max-width:330px;margin-right:50px;border-color:#a4286a;background-color:transparent}.yoast-promo-extension:first-child{margin-right:0}.yoast-promo-extension img{width:100%;height:auto;margin-bottom:.8rem}.yoast-promo-extension .yoast-button{width:100%;max-height:none}.yoast-promo-extension .yoast-button--installed{width:auto}.yoast-promo-extension h3{color:#a4286a}@media screen and (max-width:900px){.yoast-promo-extension img{display:none}.yoast-promo-extension{width:100%;max-width:none}}.yoast-seo-premium-extension:after,.yoast-seo-premium-extension:before{display:table;content:""}.yoast-seo-premium-extension:after{clear:both}.yoast-seo-premium-benefits__title{font-weight:600}.yoast-seo-premium-benefits__description:before{content:"– "}.yoast-link--more-info{padding-right:calc(1em + 5px);color:#646464;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%201376v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D96v%2D512q0%2D14%2D9%2D23t%2D23%2D9h%2D320q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h96v320h%2D96q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h448q14%200%2023%2D9t9%2D23zm%2D128%2D896v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D192q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h192q14%200%2023%2D9t9%2D23zm640%20416q0%20209%2D103%20385%2E5t%2D279%2E5%20279%2E5%2D385%2E5%20103%2D385%2E5%2D103%2D279%2E5%2D279%2E5%2D103%2D385%2E5%20103%2D385%2E5%20279%2E5%2D279%2E5%20385%2E5%2D103%20385%2E5%20103%20279%2E5%20279%2E5%20103%20385%2E5z%22%2F%3E%3C%2Fsvg%3E") right .2em no-repeat;background-size:1em}.yoast-link--more-info:after{content:" \00BB"}.yoast-promo-extension .yoast-link--more-info{display:block;margin:1em 0 0;background-position:right .4em}.yoast-heading-highlight{color:#a4286a;font-weight:600}.yoast-money-back-guarantee{font-size:1.1em;font-style:italic} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.css new file mode 100644 index 0000000..571e8d6 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.css @@ -0,0 +1,537 @@ +h4 { + clear: both; + margin: 1.2em 0 0.5em 0; +} + +p.desc { + margin: 6px 0 10px 0; + padding: 0 25px 8px 0; +} + +p.desc.label { + margin: 0 0 20px; + padding: 0 200px 10px 0; +} + +tr.yst_row { + margin: 5px 0 0 0; + padding: 5px 0 0 0; +} + +tr.yst_row.even { + background-color: #f6f6f6; +} + +div.yoastbox ul { + margin-right: 20px; +} + +.postbox { + margin: 10px 0 0 10px; +} + +label { + float: right; + margin-right: 6px; +} + +.yoast-inline-label { + float: none; + margin: 0; +} + +label.radio { + float: none; + margin-left: 20px; +} + +input.textinput, +textarea, +select { + width: 400px; +} + +input.checkbox + label.checkbox { + width: auto; +} + +input.textinput, +textarea.textinput, +select.select { + float: right; + margin: 0 0 15px 3px; + padding: 5px; +} + +textarea.textinput { + padding: 3px 6px; +} + +select.select { + padding: 3px; +} + +input.checkbox, +input.checkbox.double { + float: right; + margin: 6px 0 6px 10px; +} + +.textinput.metadesc { + height: 50px; +} + +textarea.import { + width: 500px; + height: 100px; +} + +label.textinput, +label.select, +label.checkbox { + width: 200px; + margin: 5px 0 5px 0; + background-color: transparent; +} + +.wpseo-gsc-reload-crawl-issues-form { + position: relative; + top: 9px; +} + +.wp-core-ui .button.wpseo-gsc-save-profile { + margin-right: 200px; +} + +table.wpseo th { + text-align: right; +} + +.wpseo_content_wrapper { + display: table; + width: 100%; +} + +.wpseo_content_wrapper p, +.wpseo_content_wrapper li { + max-width: 600px; +} + +.wpseo_content_wrapper .notice p { + max-width: none; +} + +/* Notices below Settings pages tabs. */ +#wpseo-tabs + .notice { + margin-top: 1.5em; +} + +.wpseo_content_cell { + display: table-cell; + height: 500px; + margin: 0; + padding: 0; + vertical-align: top; +} + +.wpseo-remove-ads { + margin-top: 0; + padding: 12px; + border: 1px solid #0075b3; + border-radius: 20px; + border-bottom-left-radius: 0; + background-color: #fff; +} + +#wpseo_content_top { + min-width: 800px; +} + +.wpseo-variable-warning-element { + border: 1px solid #c62d2d !important; +} + +.wpseo-variable-warning { + clear: both; + margin: 5px 0 0 0; + padding: 5px; + color: #c62d2d; +} + +.wpseo-variable-warning code { + color: #b02828; +} + +.wpseo-variable-warning a { + color: #c62d2d; +} + +.wpseo_content_wrapper h3 { + margin: 1em 0 0.5em 0; +} + +.wpseo_content_wrapper h1.wpseo-redirect-url-title { + margin: 1em 0 0.5em 0; + font-size: 1.3em; +} + +#sidebar-container { + width: 261px; + padding: 0 20px 0 0; +} + +@media (max-width: 1020px) { + #wpseo_content_top { + margin-right: 0; + padding-right: 0; + } +} + +.wpseo-admin-page .form-table tr, +.wpseo-admin-page .form-table th, +.wpseo-admin-page .form-table td { + vertical-align: top; +} + +.postbox form { + line-height: 150%; +} + +div.yoastbox ul li { + list-style: square; +} + +.text { + width: 250px; +} + +div.yoastbox .button:hover, +div.yoastbox .button-primary:hover { + text-decoration: none; +} + +/*.button, .button-primary {*/ +/*margin-top: 10px;*/ +/*}*/ +table.yoast_help, +table.yoast_help th, +table.yoast_help td { + border: 1px solid #ddd; + border-collapse: collapse; + color: #444; + font-size: 12px; +} + +table.yoast_help th, +table.yoast_help td { + padding: 5px 10px; + text-align: right; + vertical-align: text-top; +} + +table.yoast_help tr { + background-color: #f1f1f1; +} + +table.yoast_help tr:nth-child(2n) { + background-color: #fbfbfe; +} + +table.yoast_help tr:hover { + background-color: #ddd; +} + +.correct { + padding: 5px; + color: white; + background-color: green; +} + +.wrong { + padding: 5px; + color: white; + background-color: #dc3232; +} + +.wrong code { + padding: 3px 8px; + color: #000; +} + +.yoast-notice-blocking-files code { + color: #000; + line-height: 2; +} + +.yoast-notice-blocking-files .button { + margin: 0.5em 0; +} + +.wpseo_content_wrapper .yoast-blocking-files-error p { + max-width: none; +} + +.button.fixit { + float: left; + margin: 0 5px; +} + +.button.checkit { + float: left; + margin: 0 5px; + padding: 5px 8px; +} + +.fb-buttons .button-primary, +.fb-buttons .button { + margin-left: 8px; +} + +.postbox#donate { + border: 2px green; +} + +.wpseotab { + display: none; + margin-top: 15px; +} + +.wpseotab.active { + display: block; +} + +.wpseotab p.expl { + margin-right: 6px; +} + +.wpseotab p.expl strong { + font-size: 115%; +} + +#sidebar .yoastbox { + margin: 0 0 10px 0; + padding: 10px 15px; + border: 1px solid #ccc; + border-radius: 25px 5px; +} + +#sidebar .yoastbox h2 { + font-size: 16px; +} + +#sidebar .promo { + color: #000; +} + +#donate.yoastbox, +#sitereview.yoastbox { + border-color: green; + background-color: #cfc; +} + +h2 { + margin-bottom: 20px; +} + +h2 code { + font-size: 23px; +} + +#pointer-primary { + margin: 0 0 0 5px; +} + +#wpseo-debug-info { + clear: both; +} + +#wpseo-debug-info .hndle { + cursor: auto; +} + +#wpseo-debug-info .wpseo-debug-heading { + font-size: 1em; +} + +#wpseo-debug-info .wpseo-debug { + display: inline-block; + padding-right: 20px; + color: #c00; +} + +input.wpseo-new-title, +textarea.wpseo-new-metadesc { + width: 100%; + max-width: 100%; +} + +.wpseotab .extension { + float: right; + box-sizing: border-box; + width: 300px; + height: 230px; + margin: 10px 0 10px 20px; + border: 1px solid #ccc; +} + +.wpseotab .extension p { + margin: 0; + padding: 10px; +} + +.wpseotab .extension h3 { + box-sizing: border-box; + height: 110px; + margin: 0; + padding: 20px 120px 0 10px; + border-bottom: 1px solid #ccc; + background: #fff no-repeat right 10px; + background-size: 130px 100px; +} + +.wpseotab .extension a { + text-decoration: none; +} + +.wpseotab .extension button.installed { + border-color: #00a000; + background-color: #00a000; + cursor: default; +} + +#separator { + margin: 1.5em 0 1em; +} + +#separator input.radio { + /* visually hide the radio buttons but keep them accessible */ + position: absolute; + right: -9999em; + width: 1px; + height: 1px; +} + +#separator input.radio + label { + float: right; + width: 30px !important; + margin: 0 0 0 5px !important; + padding: 9px 6px; + border: 1px solid #ccc; + /* Don't change: these mimic Google's font and font size for titles */ + font-family: Arial, Helvetica, sans-serif !important; + font-size: 18px !important; + line-height: 24px; + text-align: center; + cursor: pointer; +} + +#separator input.radio:checked + label { + border: 1px solid #a4286a; + background-color: #fff; + box-shadow: inset 0 0 0 2px #a4286a; +} + +#separator input.radio:focus + label { + border-radius: 10px; + border-bottom-left-radius: 0; +} + +.svg-container { + text-align: center; +} + +.svg-container .dashicons { + width: 200px; + height: 100px; + font-size: 100px; +} + +body.toplevel_page_wpseo_dashboard .wp-badge { + border: none; + background: url(../images/Yoast_SEO_Icon.svg); + background-size: 150px 160px; + box-shadow: none; +} + +.nav-tab .dashicons { + width: 18px; + height: 18px; + font-size: 18px; + line-height: 24px; +} + +.nav-tab .pinteresticon { + width: 12px; + height: 24px; + margin-left: 2px; + background-image: url(../images/pinterest-23x30.png); + background-repeat: no-repeat; + background-position: center center; + background-size: contain; +} + +#wpseo_progressbar { + height: 25px; + border: 1px solid #006691; +} + +#wpseo_progressbar .ui-progressbar-value { + height: 25px; + background: #006691; +} + +.wpseo-add-fb-admin-form-wrap .notice span { + margin-right: 10px; +} + +.archives-titles-metas-content { + padding-top: 1em; +} + +@media screen and (max-width: 782px) { + .wpseo-gsc-reload-crawl-issues-form { + top: 0; + margin: 1em 0; + } + + .wpseo-gsc-reload-crawl-issues-form .alignright { + float: none; + } +} + +@media screen and (max-width: 600px) { + .wpseo-gsc-reload-crawl-issues-form { + margin-bottom: 0; + } +} + +.yoast-sidebar__title { + box-sizing: border-box; + width: 100%; + margin: 46px 0 20px; + padding: 10px; + border: none; + border-bottom: 1px solid #a4286a; + outline: none; + color: #a4286a; + background: none; + line-height: 19px; + text-align: right; +} + +.yoast-sidebar__spot { + padding: 10px 0; + border-bottom: 1px solid #ddd; +} + +.yoast-sidebar__spot a { + color: #a4286a; +} + +.wpseo-banner__link { + display: inline-block; +} + +.wpseo-banner__image { + vertical-align: top; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.min.css new file mode 100644 index 0000000..628e60d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-400-rtl.min.css @@ -0,0 +1 @@ +#wpseo-debug-info,h4{clear:both}.wpseotab .extension a,div.yoastbox .button-primary:hover,div.yoastbox .button:hover{text-decoration:none}h4{margin:1.2em 0 .5em}p.desc{margin:6px 0 10px;padding:0 25px 8px 0}p.desc.label{margin:0 0 20px;padding:0 200px 10px 0}tr.yst_row{margin:5px 0 0;padding:5px 0 0}tr.yst_row.even{background-color:#f6f6f6}div.yoastbox ul{margin-right:20px}.postbox{margin:10px 0 0 10px}label{float:right;margin-right:6px}.yoast-inline-label{float:none;margin:0}label.radio{float:none;margin-left:20px}input.textinput,select,textarea{width:400px}input.checkbox+label.checkbox{width:auto}input.textinput,select.select,textarea.textinput{float:right;margin:0 0 15px 3px;padding:5px}textarea.textinput{padding:3px 6px}select.select{padding:3px}input.checkbox,input.checkbox.double{float:right;margin:6px 0 6px 10px}.textinput.metadesc{height:50px}textarea.import{width:500px;height:100px}label.checkbox,label.select,label.textinput{width:200px;margin:5px 0;background-color:transparent}.wpseo-gsc-reload-crawl-issues-form{position:relative;top:9px}.wp-core-ui .button.wpseo-gsc-save-profile{margin-right:200px}table.wpseo th{text-align:right}.wpseo_content_wrapper{display:table;width:100%}.wpseo_content_wrapper li,.wpseo_content_wrapper p{max-width:600px}.wpseo_content_wrapper .notice p,.wpseo_content_wrapper .yoast-blocking-files-error p{max-width:none}#wpseo-tabs+.notice{margin-top:1.5em}.wpseo_content_cell{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.wpseo-remove-ads{margin-top:0;padding:12px;border:1px solid #0075b3;border-radius:20px 20px 20px 0;background-color:#fff}#wpseo_content_top{min-width:800px}.wpseo-variable-warning-element{border:1px solid #c62d2d!important}.wpseo-variable-warning{clear:both;margin:5px 0 0;padding:5px;color:#c62d2d}.wpseo-variable-warning code{color:#b02828}.wpseo-variable-warning a{color:#c62d2d}.wpseo_content_wrapper h3{margin:1em 0 .5em}.wpseo_content_wrapper h1.wpseo-redirect-url-title{margin:1em 0 .5em;font-size:1.3em}#sidebar-container{width:261px;padding:0 20px 0 0}@media (max-width:1020px){#wpseo_content_top{margin-right:0;padding-right:0}}.wpseo-admin-page .form-table td,.wpseo-admin-page .form-table th,.wpseo-admin-page .form-table tr{vertical-align:top}.postbox form{line-height:150%}div.yoastbox ul li{list-style:square}.text{width:250px}table.yoast_help,table.yoast_help td,table.yoast_help th{border:1px solid #ddd;border-collapse:collapse;color:#444;font-size:12px}table.yoast_help td,table.yoast_help th{padding:5px 10px;text-align:right;vertical-align:text-top}.correct,.wrong{padding:5px;color:#fff}table.yoast_help tr{background-color:#f1f1f1}table.yoast_help tr:nth-child(2n){background-color:#fbfbfe}table.yoast_help tr:hover{background-color:#ddd}.correct{background-color:green}.wrong{background-color:#dc3232}.wrong code{padding:3px 8px;color:#000}.yoast-notice-blocking-files code{color:#000;line-height:2}.yoast-notice-blocking-files .button{margin:.5em 0}.button.checkit,.button.fixit{float:left;margin:0 5px}.button.checkit{padding:5px 8px}.fb-buttons .button,.fb-buttons .button-primary{margin-left:8px}.postbox#donate{border:2px green}.wpseotab{display:none;margin-top:15px}.wpseotab.active{display:block}.wpseotab p.expl{margin-right:6px}.wpseotab p.expl strong{font-size:115%}#sidebar .yoastbox{margin:0 0 10px;padding:10px 15px;border:1px solid #ccc;border-radius:25px 5px}#sidebar .yoastbox h2{font-size:16px}#sidebar .promo{color:#000}#donate.yoastbox,#sitereview.yoastbox{border-color:green;background-color:#cfc}h2{margin-bottom:20px}h2 code{font-size:23px}#pointer-primary{margin:0 0 0 5px}#wpseo-debug-info .hndle{cursor:auto}#wpseo-debug-info .wpseo-debug-heading{font-size:1em}#wpseo-debug-info .wpseo-debug{display:inline-block;padding-right:20px;color:#c00}input.wpseo-new-title,textarea.wpseo-new-metadesc{width:100%;max-width:100%}.wpseotab .extension{float:right;box-sizing:border-box;width:300px;height:230px;margin:10px 0 10px 20px;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 120px 0 10px;border-bottom:1px solid #ccc;background:right 10px no-repeat #fff;background-size:130px 100px}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}#separator{margin:1.5em 0 1em}#separator input.radio{position:absolute;right:-9999em;width:1px;height:1px}#separator input.radio+label{float:right;width:30px!important;margin:0 0 0 5px!important;padding:9px 6px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:24px;text-align:center;cursor:pointer}#separator input.radio:checked+label{border:1px solid #a4286a;background-color:#fff;box-shadow:inset 0 0 0 2px #a4286a}#separator input.radio:focus+label{border-radius:10px 10px 10px 0}.svg-container{text-align:center}.svg-container .dashicons{width:200px;height:100px;font-size:100px}body.toplevel_page_wpseo_dashboard .wp-badge{border:none;background:url(../images/Yoast_SEO_Icon.svg);background-size:150px 160px;box-shadow:none}.nav-tab .dashicons{width:18px;height:18px;font-size:18px;line-height:24px}.nav-tab .pinteresticon{width:12px;height:24px;margin-left:2px;background-image:url(../images/pinterest-23x30.png);background-repeat:no-repeat;background-position:center center;background-size:contain}#wpseo_progressbar{height:25px;border:1px solid #006691}#wpseo_progressbar .ui-progressbar-value{height:25px;background:#006691}.wpseo-add-fb-admin-form-wrap .notice span{margin-right:10px}.archives-titles-metas-content{padding-top:1em}@media screen and (max-width:782px){.wpseo-gsc-reload-crawl-issues-form{top:0;margin:1em 0}.wpseo-gsc-reload-crawl-issues-form .alignright{float:none}}@media screen and (max-width:600px){.wpseo-gsc-reload-crawl-issues-form{margin-bottom:0}}.yoast-sidebar__title{box-sizing:border-box;width:100%;margin:46px 0 20px;padding:10px;border:none;border-bottom:1px solid #a4286a;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:right}.yoast-sidebar__spot{padding:10px 0;border-bottom:1px solid #ddd}.yoast-sidebar__spot a{color:#a4286a}.wpseo-banner__link{display:inline-block}.wpseo-banner__image{vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.css b/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.css new file mode 100644 index 0000000..965ea2b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.css @@ -0,0 +1,39 @@ +.wpseo-score-icon { + display: inline-block; + width: 12px; + height: 12px; + margin: 3px 3px 0 10px; + border-radius: 50%; + background: #888; + vertical-align: top; +} + +.wpseo-score-icon.good { + background-color: #7ad03a; +} + +.wpseo-score-icon.ok { + background-color: #ee7c1b; +} + +.wpseo-score-icon.bad { + background-color: #dc3232; +} + +.wpseo-score-icon.na { + background-color: #888; +} + +.wpseo-score-icon.noindex { + background-color: #1e8cbe; +} + +.wpseo-score-title { + font-weight: 600; +} + +#taxonomy_overall { + position: absolute; + top: 0; + margin-right: 87.5%; +} diff --git a/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.min.css b/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.min.css new file mode 100644 index 0000000..01c4325 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-390-rtl.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin:3px 3px 0 10px;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}.wpseo-score-title{font-weight:600}#taxonomy_overall{position:absolute;top:0;margin-right:87.5%} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/edit-page-330.min.css b/wp-content/plugins/wordpress-seo/css/edit-page-330.min.css new file mode 100644 index 0000000..4dfc1bd --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/edit-page-330.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-left:6px;border-radius:50%;background:#888;line-height:16px}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}th#wpseo-score{width:63px}@media screen and (max-width:782px){.column-wpseo-focuskw,.column-wpseo-metadesc,.column-wpseo-score,.column-wpseo-title{display:none}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/featured-image-330.min.css b/wp-content/plugins/wordpress-seo/css/featured-image-330.min.css new file mode 100644 index 0000000..d2ab2fa --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/featured-image-330.min.css @@ -0,0 +1 @@ +#yst_opengraph_image_warning{padding:1px 12px;border:solid #dc3232;border-width:4px 4px 0;background-color:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/help-center-340.min.css b/wp-content/plugins/wordpress-seo/css/help-center-340.min.css new file mode 100644 index 0000000..f7e567f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/help-center-340.min.css @@ -0,0 +1 @@ +#wpcontent.yoast-help-center-open{overflow-x:hidden}.wpseo-tab-video-container{margin-bottom:20px;border-bottom:1px solid #a4286a}.wpseo-tab-video-container__handle{width:100%;margin:0;padding:10px;border:none;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:left;cursor:pointer}.wpseo-tab-video-container__handle .toggle__arrow{text-decoration:none}.wpseo-tab-video-container__handle:focus,.wpseo-tab-video-container__handle:hover{text-decoration:underline}.wpseo-tab-video-container__handle .dashicons-before:before{margin-right:5px}.wpseotab .wpseo-tab-video-container{margin-top:-15px}.wpseo-tab-video-slideout{display:none;min-height:320px;margin:0 -9999px -1px;padding:2em 9999px;background-color:#a4286a;box-shadow:inset 0 10px 10px -5px rgba(123,30,80,.5),inset 0 -10px 10px -5px rgba(123,30,80,.5);-ms-flex-wrap:wrap;flex-wrap:wrap}.wpseo-tab-video-slideout .contextual-help-tabs-wrap{padding:0;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout a{color:#fff}.wpseo-tab-video-slideout a.button,.wpseo-tab-video-slideout a.button-primary{text-decoration:none}.wpseo-tab-video-slideout h1,.wpseo-tab-video-slideout h2,.wpseo-tab-video-slideout h3,.wpseo-tab-video-slideout h4,.wpseo-tab-video-slideout h5,.wpseo-tab-video-slideout h6{margin-top:.5em;padding-top:0;color:#fff;font-weight:500}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea{float:left;min-width:234px;max-width:242px;margin:0 12px 1em 0;padding:15px 15px 5px;border:1px solid #fff;border-radius:30px 30px 0;color:#fff;background-color:#a4286a}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3,.wpseo-tab-video-slideout .yoast-help-center-tabs ul{margin:0}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover{color:#fff;font-weight:500}.wpseo-tab-video-slideout .yoast-help-center-tabs{width:180px;padding:0 1em 1em 0;color:#fff;background-color:#a4286a;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .help-tab-content{margin:0;color:#fff;font-weight:300}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video{float:left;margin-right:1em;padding-bottom:1em;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe{vertical-align:middle}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text{min-width:264px;margin:0 auto;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child{margin-right:0}.postbox .wpseo-tab-video-container{margin:-6px -12px 20px}.postbox .wpseo-tab-video-slideout{margin:0;padding:2em 12px 15px}.inside .wpseo-tab-video-slideout{height:auto}.wpseo-help-center-item{display:inline}.wpseo-help-center-item a{display:block;padding:10px 12px;color:#fff;text-decoration:none}.wpseo-help-center-item a:focus,.wpseo-help-center-item a:hover{text-decoration:underline}.wpseo-help-center-item a.dashicons-before:before{margin-right:3px;text-decoration:none}.wpseo-help-center-item.active a{color:#a4286a;background-color:#fff} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/help-center-340.min.rapido.css b/wp-content/plugins/wordpress-seo/css/help-center-340.min.rapido.css new file mode 100644 index 0000000..843901a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/help-center-340.min.rapido.css @@ -0,0 +1 @@ +#wpcontent.yoast-help-center-open{overflow-x:hidden}.wpseo-tab-video-container{margin-bottom:20px;border-bottom:1px solid #a4286a}.wpseo-tab-video-container__handle{width:100%;margin:0;padding:10px;border:none;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:left;cursor:pointer}.wpseo-tab-video-container__handle .toggle__arrow{text-decoration:none}.wpseo-tab-video-container__handle:focus,.wpseo-tab-video-container__handle:hover{text-decoration:underline}.wpseo-tab-video-container__handle .dashicons-before:before{margin-right:5px}.wpseotab .wpseo-tab-video-container{margin-top:-15px}.wpseo-tab-video-slideout{display:none;min-height:320px;margin:0 -9999px -1px;padding:2em 9999px;background-color:#a4286a;box-shadow:inset 0 10px 10px -5px rgba(123,30,80,0.5),inset 0 -10px 10px -5px rgba(123,30,80,0.5);-ms-flex-wrap:wrap;flex-wrap:wrap}.wpseo-tab-video-slideout .contextual-help-tabs-wrap{padding:0;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout a{color:#fff}.wpseo-tab-video-slideout a.button,.wpseo-tab-video-slideout a.button-primary{text-decoration:none}.wpseo-tab-video-slideout h1,.wpseo-tab-video-slideout h2,.wpseo-tab-video-slideout h3,.wpseo-tab-video-slideout h4,.wpseo-tab-video-slideout h5,.wpseo-tab-video-slideout h6{margin-top:.5em;padding-top:0;color:#fff;font-weight:500}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea{float:left;min-width:234px;max-width:242px;margin:0 12px 1em 0;padding:15px 15px 5px;border:1px solid #fff;border-radius:30px 30px 0;color:#fff;background-color:#a4286a}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3,.wpseo-tab-video-slideout .yoast-help-center-tabs ul{margin:0}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover{color:#fff;font-weight:500}.wpseo-tab-video-slideout .yoast-help-center-tabs{width:180px;padding:0 1em 1em 0;color:#fff;background-color:#a4286a;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .help-tab-content{margin:0;color:#fff;font-weight:300}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video{float:left;margin-right:1em;padding-bottom:1em;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe{vertical-align:middle}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text{min-width:264px;margin:0 auto;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child{margin-right:0}.postbox .wpseo-tab-video-container{margin:-6px -12px 20px}.postbox .wpseo-tab-video-slideout{margin:0;padding:2em 12px 15px}.inside .wpseo-tab-video-slideout{height:auto}.wpseo-help-center-item{display:inline}.wpseo-help-center-item a{display:block;padding:10px 12px;color:#fff;text-decoration:none}.wpseo-help-center-item a:focus,.wpseo-help-center-item a:hover{text-decoration:underline}.wpseo-help-center-item a.dashicons-before:before{margin-right:3px;text-decoration:none}.wpseo-help-center-item.active a{color:#a4286a;background-color:#fff} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/inside-editor-331.min.css b/wp-content/plugins/wordpress-seo/css/inside-editor-331.min.css new file mode 100644 index 0000000..d16fec5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/inside-editor-331.min.css @@ -0,0 +1 @@ +.yoast-text-mark{background-color:#e1bee7}.yoast-text-mark__highlight{color:#fff;background-color:#4a148c} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/kb-search-350.min.css b/wp-content/plugins/wordpress-seo/css/kb-search-350.min.css new file mode 100644 index 0000000..35cffe6 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/kb-search-350.min.css @@ -0,0 +1 @@ +.wpseo-kb-search-search-bar{padding-bottom:15px;border-bottom:1px solid #ccc}.wpseo-kb-search-search-bar input[type=text]{min-width:50%;height:28px;margin-right:3px}.wpseo-kb-search-results{overflow:auto;height:500px;margin:0;padding:0;list-style:none}.help-tab-content .wpseo-kb-search-results li{max-width:none;margin:0;list-style:none}.wpseo-kb-search-result{display:block;margin:0;padding-left:5px;border-bottom:1px solid #efefef;text-decoration:none}.wpseo-kb-search-result p{max-width:none;margin-top:0}.wpseo-kb-search-result-link{display:block;outline:0;text-decoration:none;cursor:pointer}.wpseo-kb-search-result-link:focus,.wpseo-kb-search-result-link:hover{background-color:rgba(93,12,55,.5);box-shadow:none;text-decoration:underline}.wpseo-kb-search-result .wpseo-kb-search-result-title{margin:0;padding:14px 0}.wpseo-kb-search-ext-link{float:right}.wpseo-kb-search-back-button:before{content:"\f141"}.wpseo-kb-search-ext-link:before{content:"\f504"}.dashicon-button:before{display:inline-block;font-family:dashicons;font-size:20px;line-height:1.35em;vertical-align:middle}.wpseo-kb-search-navigation{z-index:10;padding:1em 0}.kb-search-content-frame{width:100%;height:543px;background:url("data:image/svg+xml;charset=utf-8,Loading article...") no-repeat}.wpseo-kb-loader,.wpseo-kb-loader:after,.wpseo-kb-loader:before{width:2.5em;height:2.5em;border-radius:50%;animation:load7 1.8s infinite ease-in-out;animation-fill-mode:both}.wpseo-kb-loader{position:relative;margin:80px auto;font-size:10px;text-indent:-9999em;-ms-transform:translateZ(0);transform:translateZ(0);animation-delay:-.16s}.wpseo-kb-loader:before{left:-3.5em;animation-delay:-.32s}.wpseo-kb-loader:after{left:3.5em}.wpseo-kb-loader:after,.wpseo-kb-loader:before{position:absolute;top:0;content:""}.dashicons{text-decoration:none}@keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/kb-search-350.min.rapido.css b/wp-content/plugins/wordpress-seo/css/kb-search-350.min.rapido.css new file mode 100644 index 0000000..73d98c9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/kb-search-350.min.rapido.css @@ -0,0 +1 @@ +.wpseo-kb-search-search-bar{padding-bottom:15px;border-bottom:1px solid #ccc}.wpseo-kb-search-search-bar input[type=text]{min-width:50%;height:28px;margin-right:3px}.wpseo-kb-search-results{overflow:auto;height:500px;margin:0;padding:0;list-style:none}.help-tab-content .wpseo-kb-search-results li{max-width:none;margin:0;list-style:none}.wpseo-kb-search-result{display:block;margin:0;padding-left:5px;border-bottom:1px solid #efefef;text-decoration:none}.wpseo-kb-search-result p{max-width:none;margin-top:0}.wpseo-kb-search-result-link{display:block;outline:0;text-decoration:none;cursor:pointer}.wpseo-kb-search-result-link:focus,.wpseo-kb-search-result-link:hover{background-color:rgba(93,12,55,0.5);box-shadow:none;text-decoration:underline}.wpseo-kb-search-result .wpseo-kb-search-result-title{margin:0;padding:14px 0}.wpseo-kb-search-ext-link{float:right}.wpseo-kb-search-back-button:before{content:"\f141"}.wpseo-kb-search-ext-link:before{content:"\f504"}.dashicon-button:before{display:inline-block;font-family:dashicons;font-size:20px;line-height:1.35em;vertical-align:middle}.wpseo-kb-search-navigation{z-index:10;padding:1em 0}.kb-search-content-frame{width:100%;height:543px;background:url("data:image/svg+xml;charset=utf-8,Loading article...") no-repeat}.wpseo-kb-loader,.wpseo-kb-loader:after,.wpseo-kb-loader:before{width:2.5em;height:2.5em;border-radius:50%;animation:load7 1.8s infinite ease-in-out;animation-fill-mode:both}.wpseo-kb-loader{position:relative;margin:80px auto;font-size:10px;text-indent:-9999em;-ms-transform:translateZ(0);transform:translateZ(0);animation-delay:-0.16s}.wpseo-kb-loader:before{left:-3.5em;animation-delay:-0.32s}.wpseo-kb-loader:after{left:3.5em}.wpseo-kb-loader:after,.wpseo-kb-loader:before{position:absolute;top:0;content:""}.dashicons{text-decoration:none}@keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em} 40%{box-shadow:0 2.5em 0 0}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/metabox-400.min.css b/wp-content/plugins/wordpress-seo/css/metabox-400.min.css new file mode 100644 index 0000000..3cecb93 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/metabox-400.min.css @@ -0,0 +1 @@ +.snippet-editor__heading,.yoast-section__heading{font-family:"Open Sans",sans-serif}#meta_container,.assessment-results,.snippet_container:after,li.score:after{clear:both}.snippet_container:after,.snippet_container:before{display:table;content:" "}.snippet-editor__container{position:relative;cursor:pointer}.snippet-editor__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-size:.9rem;font-weight:300}.snippet-editor__heading-editor{border-top:1px solid #f7f7f7}.snippet-editor__heading-icon{padding-left:45px;background-repeat:no-repeat;background-position:left 20px top .6em;background-size:16px}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before,.snippet-editor__container:hover:before{position:absolute;left:-22px;width:24px;height:24px;background-size:25px;content:"";display:block;top:-3px}.snippet-editor__heading-icon-eye{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__preview{padding:0 20px 15px}.snippet-editor__button{padding:8px 10px;border:1px solid #dbdbdb;border-radius:4px;color:#555;background:#f7f7f7;font-size:.8rem;cursor:pointer}.snippet-editor__edit-button{display:block;margin-top:1em;padding-left:32px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") left 8px top 50% no-repeat #f7f7f7;background-size:16px}.snippet-editor__form{padding:20px}.snippet-editor__label{display:block;position:relative;width:100%;margin-top:1em}.snippet-editor__label--focus:before,.snippet-editor__label--hover:before{left:-22px;width:24px;height:24px;background-size:25px;display:block;content:"";position:absolute}.snippet-editor__label:first-child{margin-top:0}.snippet-editor__label--hover:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__label--focus:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__input{display:block;box-sizing:border-box;width:100%;max-width:100%;margin-top:5px;border:1px solid #bfbfbf}.snippet-editor__input:focus{border:1px solid #1074a8;outline:0}.rtl .snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__container--focus:before,.rtl .snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--focus:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.snippet-editor__meta-description{height:70px}.snippet-editor__submit{margin-top:1em}#snippet_cite{min-width:20px}#meta_container{min-height:20px}.snippet_container .title{display:block;overflow:hidden;width:600px;margin:0;color:#1e0fbe;font-size:18px;font-weight:400;line-height:1.2;white-space:nowrap;text-decoration:none;text-overflow:ellipsis}.snippet_container .desc,.snippet_container .url{font-size:13px;line-height:1.4}.snippet_container .url{display:inline-block;float:left;color:#006621;font-size:14px;font-style:normal;line-height:16px}.snippet_container .down_arrow{float:left;margin-top:6px;margin-left:5px;border-top:5px solid #006621;border-right:4px solid transparent;border-left:4px solid transparent}.snippet_container .desc-default{color:#545454}.snippet_container .desc-default strong{color:#6a6a6a}.snippet_container .desc-render{color:#777}.snippet_container .tooLong{color:red!important}.snippet-editor__field--invalid{color:red}.snippet-editor__progress{display:block;box-sizing:border-box;width:100%;height:8px;margin-top:5px;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.assessment-results__mark.icon-eye-active.yoast-tooltip::after,.assessment-results__mark.icon-eye-active.yoast-tooltip::before,.snippet-editor--hidden{display:none}.snippet-editor__progress::-webkit-progress-bar{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress--fallback{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress-bar{width:0;max-width:100%;height:100%}.snippet-editor__date{color:grey;font-size:13px;line-height:1.4}.snippet-editor__progress--bad[value]{color:#dc3232}.snippet-editor__progress--bad[value]::-webkit-progress-value{background-color:#dc3232;transition:width 250ms}.snippet-editor__progress--bad[value]::-moz-progress-bar{background-color:#dc3232}.snippet-editor__progress--bad[value] .snippet-editor__progress-bar{background-color:#dc3232}.snippet-editor__progress--ok[value]{color:#ee7c1b}.snippet-editor__progress--ok[value]::-webkit-progress-value{background-color:#ee7c1b;transition:width 250ms}.snippet-editor__progress--ok[value]::-moz-progress-bar{background-color:#ee7c1b}.snippet-editor__progress--ok[value] .snippet-editor__progress-bar{background-color:#ee7c1b}.snippet-editor__progress--good[value]{color:#7ad03a}.snippet-editor__progress--good[value]::-webkit-progress-value{background-color:#7ad03a;transition:width 250ms}.snippet-editor__progress--good[value]::-moz-progress-bar{background-color:#7ad03a}.snippet-editor__progress--good[value] .snippet-editor__progress-bar{background-color:#7ad03a}.wpseoanalysis{padding-right:0}.wpseo-score-text{float:left;width:86%;width:calc(100% - 56px)}.assessment-results .wpseo-score-icon{float:left;width:12px;height:12px;margin:3px 10px 0 0;border-radius:50%;background:#888}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}li.score{margin-bottom:6px;list-style-type:none!important}li.score:after{display:table;content:""}.screen-reader-text{overflow:hidden;clip:rect(1px,1px,1px,1px);position:absolute!important;width:1px;height:1px}.assessment-results__mark.icon-eye-active,.assessment-results__mark.icon-eye-disabled,.assessment-results__mark.icon-eye-inactive{float:left;width:28px;height:28px;margin:-5px 3px 0;padding:4px;border:0;border-radius:100%;outline:0;background:center no-repeat;background-size:16px;cursor:pointer}.assessment-results__mark.icon-eye-inactive{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-active{background-color:#a4286a;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-disabled{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23e6e6e6%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark-container{display:inline-block;float:right;width:33px;min-height:1px}.YoastSEO_msg .left,.YoastSEO_msg .right{display:none}@keyframes animatedBackground{from{background-position:0 0}to{background-position:100% 0}}.YoastSEO_msg .bufferbar{display:block;width:100%;height:12px;margin:10px 0;border:1px solid #dfdfdf;background-image:linear-gradient(to left,#fff,#0063ff,#fff,#0063ff);background-position:0 0;background-size:300% 100%;animation:animatedBackground 5s linear infinite}.yoast-tooltip{position:relative}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{display:none;position:absolute;z-index:1000000;padding:5px 8px;border-radius:3px;opacity:0;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);pointer-events:none;-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{display:none;position:absolute;z-index:1000001;width:0;height:0;border:5px solid transparent;opacity:0;color:rgba(0,0,0,.8);content:"\00a0";pointer-events:none}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;right:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-sw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{right:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-nw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-w::after{right:100%;bottom:50%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;left:100%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{right:auto;left:50%;-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{right:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-right:4.5px}}#wpcontent.yoast-help-center-open{overflow-x:hidden}.wpseo-tab-video-container{margin-bottom:20px;border-bottom:1px solid #a4286a}.wpseo-tab-video-container__handle{width:100%;margin:0;padding:10px;border:none;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:left;cursor:pointer}.wpseo-tab-video-container__handle .toggle__arrow{text-decoration:none}.wpseo-tab-video-container__handle:focus,.wpseo-tab-video-container__handle:hover{text-decoration:underline}.wpseo-tab-video-container__handle .dashicons-before:before{margin-right:5px}.wpseotab .wpseo-tab-video-container{margin-top:-15px}.wpseo-tab-video-slideout{display:none;min-height:320px;margin:0 -9999px -1px;padding:2em 9999px;background-color:#a4286a;box-shadow:inset 0 10px 10px -5px rgba(123,30,80,.5),inset 0 -10px 10px -5px rgba(123,30,80,.5);-ms-flex-wrap:wrap;flex-wrap:wrap}.wpseo-tab-video-slideout .contextual-help-tabs-wrap{padding:0;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout a{color:#fff}.wpseo-tab-video-slideout a.button,.wpseo-tab-video-slideout a.button-primary{text-decoration:none}.wpseo-tab-video-slideout h1,.wpseo-tab-video-slideout h2,.wpseo-tab-video-slideout h3,.wpseo-tab-video-slideout h4,.wpseo-tab-video-slideout h5,.wpseo-tab-video-slideout h6{margin-top:.5em;padding-top:0;color:#fff;font-weight:500}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea{float:left;min-width:234px;max-width:242px;margin:0 12px 1em 0;padding:15px 15px 5px;border:1px solid #fff;border-radius:30px 30px 0;color:#fff;background-color:#a4286a}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea h3,.wpseo-tab-video-slideout .yoast-help-center-tabs ul{margin:0}.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:focus,.wpseo-tab-video-slideout .wpseo-tab-video__panel__textarea a:hover{color:#fff;font-weight:500}.wpseo-tab-video-slideout .yoast-help-center-tabs{width:180px;padding:0 1em 1em 0;color:#fff;background-color:#a4286a;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .help-tab-content{margin:0;color:#fff;font-weight:300}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video{float:left;margin-right:1em;padding-bottom:1em;-ms-flex:0 0 auto;flex:0 0 auto}.wpseo-tab-video-slideout .wpseo-tab-video__panel--video iframe{vertical-align:middle}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text{min-width:264px;margin:0 auto;flex-basis:0;flex-grow:1;-ms-flex-negative:1;-ms-flex-positive:1;-ms-flex-preferred-size:0;flex-shrink:1}.wpseo-tab-video-slideout .wpseo-tab-video__panel--text div:last-child{margin-right:0}.postbox .wpseo-tab-video-container{margin:-6px -12px 20px}.postbox .wpseo-tab-video-slideout{margin:0;padding:2em 12px 15px}.inside .wpseo-tab-video-slideout{height:auto}.wpseo-help-center-item{display:inline}.wpseo-help-center-item a{display:block;padding:10px 12px;color:#fff;text-decoration:none}.wpseo-help-center-item a:focus,.wpseo-help-center-item a:hover{text-decoration:underline}.wpseo-help-center-item a.dashicons-before:before{margin-right:3px;text-decoration:none}.wpseo-help-center-item.active a{color:#a4286a;background-color:#fff}.yoast-section{position:relative;width:640px;padding:0 20px 15px;border:1px solid #f7f7f7;border-radius:20px;background-color:#fff}.yoast-section__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-size:.9rem;font-weight:300}.yoast-section__heading-icon{padding-left:45px;background-repeat:no-repeat;background-position:left 20px top .6em;background-size:16px}.yoast-section__heading-icon-file-text-o{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20file%3D%22%23555%22%20d%3D%22M1596%20380q28%2028%2048%2076t20%2088v1152q0%2040%2D28%2068t%2D68%2028h%2D1344q%2D40%200%2D68%2D28t%2D28%2D68v%2D1600q0%2D40%2028%2D68t68%2D28h896q40%200%2088%2020t76%2048zm%2D444%2D244v376h376q%2D10%2D29%2D22%2D41l%2D313%2D313q%2D12%2D12%2D41%2D22zm384%201528v%2D1024h%2D416q%2D40%200%2D68%2D28t%2D28%2D68v%2D416h%2D768v1536h1280zm%2D1024%2D864q0%2D14%209%2D23t23%2D9h704q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64zm736%20224q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704zm0%20256q14%200%2023%209t9%2023v64q0%2014%2D9%2023t%2D23%209h%2D704q%2D14%200%2D23%2D9t%2D9%2D23v%2D64q0%2D14%209%2D23t23%2D9h704z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section,.yoast-section *,.yoast-section :after,.yoast-section :before,.yoast-section:after,.yoast-section:before{box-sizing:border-box}#edittag>#wp-description-wrap{display:none}#wp-description-wrap .wp-editor-area{border:0}.term-description-wrap td>textarea#description{min-height:530px}ul.wpseo-metabox-tabs{display:none;margin-top:6px;margin-bottom:0}ul.wpseo-metabox-tabs:after{display:table;clear:both;content:""}.wpseo-metabox-tabs-div ul{list-style:none}ul.wpseo-metabox-tabs li.active{background-color:#fdfdfd}.wpseo-meta-section{display:none;width:100%;vertical-align:top}.wpseo-meta-section.active{display:table-cell}.wpseo-metabox-sidebar{display:table-cell;width:40px;padding:0 5px 0 0;background-color:#fff;vertical-align:top}.wpseo-metabox-sidebar li span{margin:3px 0 0 -5px;padding:0 2px 0 5px;border:0 solid transparent;border-left-width:3px;border-radius:3px}.wpseo-metabox-sidebar li span.wpseo-buy-premium{color:#a4286a}.wpseo-metabox-sidebar li span.wpseo-buy-premium:hover{color:#832055}.wpseo-metabox-sidebar li.active span{border-color:#333;color:#333}.wpseo-metabox-sidebar li.active span.wpseo-buy-premium{border-color:#a4286a;color:#a4286a}.wpseo-metabox-sidebar li.active span.wpseo-buy-premium:hover{border-color:#832055;color:#832055}ul.wpseo-metabox-tabs li{float:left;margin-right:5px;margin-bottom:-1px;padding:0;border:1px solid #dfdfdf;border-bottom:0 none}ul.wpseo-metabox-tabs li .wpseo-keyword{display:inline-block;overflow:hidden;max-width:8em;max-width:8rem;vertical-align:top;white-space:nowrap;text-overflow:ellipsis}.wpseotab.active{display:block;overflow:auto;padding:.5em .9em;border:1px solid #ddd;background-color:#fdfdfd}.wpseo-metabox-tabs .wpseo_tablink{display:inline-block;padding:5px 12px 6px;vertical-align:top;text-decoration:none}.wpseo-metabox-tabs .wpseo_content_tab a,.wpseo-metabox-tabs .wpseo_content_tab+.wpseo_keyword_tab a{padding-right:12px}.wpseo-metabox-tabs .wpseo-score-icon{margin-left:0}#wpseo-meta-section-social .wpseo-metabox-tabs .wpseo_tablink{padding:5px 7px}.wpseo-metabox-tabs .wpseo_tablink .dashicons{width:16px;height:16px;font-size:16px}.wpseo-metabox-sidebar .dashicons{width:30px;height:30px;font-size:30px}.wpseo-metabox-sidebar a{display:inline-block;width:35px;height:35px;font-size:20px;line-height:30px;text-decoration:none}.wpseo_hidden,.wpseotab{display:none}.wpseo-metabox-sidebar ul{margin:0}.wpseo-metabox-sidebar li{margin-bottom:0;padding:5px}.wpseo-metabox-tabs-div div.wpseo-tabs-panel{overflow:auto;padding:.5em .9em;border:1px solid}.wpseo-heading{padding-left:10px}#wpseo_meta .inside{overflow:auto;margin:6px 0 0}#wpseo_meta .postbox .inside .wpseotab{font-size:13px!important}#wpseo_meta .wpseo-tab-video-container h2{margin-bottom:20px;padding-left:0;border:0;font-size:1.3em}.inside .wpseotab .form-table th{width:140px!important;font-size:13px}.inside .wpseotab .form-table td{padding-top:20px}.inside .wpseotab .form-table label{vertical-align:top}.inside .wpseotab .form-table td input,.inside .wpseotab .form-table td select{margin-top:-5px}.inside .wpseotab .form-table #yoast_wpseo_focuskw_text_input,.inside .wpseotab .form-table #yoast_wpseo_metakeywords,.inside .wpseotab .form-table td select[multiple],.wpseotab .wpseoanalysis{margin-top:0}.wpseotab .wpseo_image_upload_button{margin-left:3px}.good,.warn,.wrong{font-weight:700}.good{color:green}.warn{color:maroon}.wrong{color:#dc3232}#current_seo_title span{padding:2px 5px;background-color:#ffffe0}#focuskwresults ul{margin:0}#focuskwresults li,#focuskwresults p{font-size:13px}#focuskwresults li{margin:0 0 0 20px;list-style-type:disc}table.wpseoanalysis th{padding:15px 0 5px;font-size:14px;text-align:left}table.wpseoanalysis th.first{padding-top:0}table.wpseoanalysis td{margin:5px 0;font-size:13px;line-height:16px}table.wpseoanalysis td.score{width:20px;height:18px;padding-left:10px}.wpseo_msg{margin:5px 0 10px;padding:0 5px;border:1px solid #e6db55;background-color:#ffffe0}ul.wpseo-metabox-tabs li.wpseo-tab-add-keyword{border:none}.wpseo-tab-add-keyword .wpseo-add-keyword.button{height:auto;margin-top:1px;padding:3px 6px;color:#000;background:0 0;font-size:14px;line-height:1;vertical-align:top;text-decoration:none;cursor:pointer}#wpseo-add-keyword-popup-title{margin:1em 0;font-size:1.3em}.snippet-editor__button.snippet-editor__edit-button:focus{border-color:#5b9dd9;outline:0;color:#23282d;background-color:#fafafa;box-shadow:0 0 3px rgba(0,115,170,.8)}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.wpseotab .yoast_help.yoast-help-button{float:right}.wpseotab.content .yoast_help.yoast-help-button{margin-top:-48px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-right:6px}.yoast_help.yoast-help-button:before{position:absolute;top:0;left:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus:before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .subsubsub li{display:inline;max-width:none}.yoast-seo-help-container{float:left;width:100%;max-width:none}.yoast-seo-help-container .yoast-help-panel{margin:.5em 0!important}.wpseo_content_wrapper p.search-box{margin:10px 0 5px}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #dfdfdf;color:#333;background:#f1f1f1}.wpseo-taxonomy-form td,.wpseo-taxonomy-form th,.wpseo-taxonomy-form tr{vertical-align:top}.inside .wpseotab .form-table.wpseo-taxonomy-form th{width:200px!important}.yst-traffic-light-container{display:block;height:30px}.yst-traffic-light{width:19px;height:30px;margin:0 0 0 5px}.yst-traffic-light .traffic-light-color{display:none}.yst-traffic-light.bad .traffic-light-red,.yst-traffic-light.good .traffic-light-green,.yst-traffic-light.init .traffic-light-init,.yst-traffic-light.na .traffic-light-empty,.yst-traffic-light.ok .traffic-light-orange{display:inline}#wpseo-score{float:left;margin:0 5px 0 -5px}.yoast-seo-score .yoast-logo.svg{float:left;width:18px;height:18px;margin-right:5px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E") no-repeat;background-size:18px}.yoast-seo-score .yoast-logo.svg.good{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%237ad03a%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.ok{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ee7c1b%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.bad{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23dc3232%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.na{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-seo-score .yoast-logo.svg.noindex{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231e8cbe%22%20d%3D%22M403%20218h691l%2D26%2072h%2D665q%2D110%200%2D188%2E5%2079t%2D78%2E5%20189v771q0%2095%2060%2E5%20169%2E5t153%2E5%2093%2E5q23%205%2098%205v72h%2D45q%2D140%200%2D239%2E5%2D100t%2D99%2E5%2D240v%2D771q0%2D140%2099%2E5%2D240t239%2E5%2D100zm851%2D218h247l%2D482%201294q%2D23%2061%2D40%2E5%20103%2E5t%2D45%2098%2D54%2093%2E5%2D64%2E5%2078%2E5%2D79%2E5%2065%2D95%2E5%2041%2D116%2018%2E5v%2D195q163%2D26%20220%2D182%2020%2D52%2020%2D105%200%2D54%2D20%2D106l%2D285%2D733h228l187%20585zm474%20558v1111h%2D795q37%2D55%2045%2D73h678v%2D1038q0%2D85%2D49%2E5%2D155t%2D129%2E5%2D99l25%2D67q101%2034%20163%2E5%20123%2E5t62%2E5%20197%2E5z%22%2F%3E%3C%2Fsvg%3E")}.term-php .wpseo-taxonomy-metabox-postbox h2{margin:0;padding:8px 12px;border-bottom:1px solid #eee;font-size:14px;line-height:1.4}.wpseo-buy-premium{padding-right:5px;color:#a4286a}.wpseo-metabox-go-to::after{position:static;top:auto;right:auto;width:auto;height:auto;border:none;content:" \00BB"}#wpseo-buy-premium-popup-button.button-buy-premium{border-color:#a4286a;color:#fff;background:#a4286a}.wpseo-metabox-buy-premium{position:absolute;top:6px;right:12px;vertical-align:middle}.wpseo-metabox-premium-description{margin-top:.5em}ul.wpseo-metabox-premium-advantages{padding-left:1.5em;list-style:disc}.yoast-section__heading-icon-list{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M384%201408q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm0%2D512q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm%2D1408%2D928q0%2080%2D56%20136t%2D136%2056%2D136%2D56%2D56%2D136%2056%2D136%20136%2D56%20136%2056%2056%20136zm1408%20416v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5zm0%2D512v192q0%2013%2D9%2E5%2022%2E5t%2D22%2E5%209%2E5h%2D1216q%2D13%200%2D22%2E5%2D9%2E5t%2D9%2E5%2D22%2E5v%2D192q0%2D13%209%2E5%2D22%2E5t22%2E5%2D9%2E5h1216q13%200%2022%2E5%209%2E5t9%2E5%2022%2E5z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section__heading-icon-key{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M832%20512q0%2D80%2D56%2D136t%2D136%2D56%2D136%2056%2D56%20136q0%2042%2019%2083%2D41%2D19%2D83%2D19%2D80%200%2D136%2056t%2D56%20136%2056%20136%20136%2056%20136%2D56%2056%2D136q0%2D42%2D19%2D83%2041%2019%2083%2019%2080%200%20136%2D56t56%2D136zm851%20704q0%2017%2D49%2066t%2D66%2049q%2D9%200%2D28%2E5%2D16t%2D36%2E5%2D33%2D38%2E5%2D40%2D24%2E5%2D26l%2D96%2096%20220%20220q28%2028%2028%2068%200%2042%2D39%2081t%2D81%2039q%2D40%200%2D68%2D28l%2D671%2D671q%2D176%20131%2D365%20131%2D163%200%2D265%2E5%2D102%2E5t%2D102%2E5%2D265%2E5q0%2D160%2095%2D313t248%2D248%20313%2D95q163%200%20265%2E5%20102%2E5t102%2E5%20265%2E5q0%20189%2D131%20365l355%20355%2096%2D96q%2D3%2D3%2D26%2D24%2E5t%2D40%2D38%2E5%2D33%2D36%2E5%2D16%2D28%2E5q0%2D17%2049%2D66t66%2D49q13%200%2023%2010%206%206%2046%2044%2E5t82%2079%2E5%2086%2E5%2086%2073%2078%2028%2E5%2041z%22%2F%3E%3C%2Fsvg%3E")}.yoast-section__heading-icon-edit{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E")}#snippet_preview{padding:0}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.screen-reader-text.wpseo-generic-tab-textual-score,.screen-reader-text.wpseo-keyword-tab-textual-score{display:block}@media screen and (max-width:782px){.yoast-help-panel{max-width:none!important}#wpseo-crawl-issues-table-form .subsubsub{float:none;max-width:calc(100vw - 20px)}#wpseo-crawl-issues-table-form .yoast-help-button{margin-top:3px}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/metabox-400.min.rapido.css b/wp-content/plugins/wordpress-seo/css/metabox-400.min.rapido.css new file mode 100644 index 0000000..3c5d0a9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/metabox-400.min.rapido.css @@ -0,0 +1 @@ +.snippet-editor__heading,.yoast-section__heading{font-family:"Open Sans",sans-serif}#meta_container,.assessment-results,.snippet_container:after,li.score:after{clear:both}.snippet_container:after,.snippet_container:before{display:table;content:" "}.snippet-editor__container{position:relative;cursor:pointer}.snippet-editor__heading{margin:0 -20px 15px;padding:8px 20px;border-bottom:1px solid #f7f7f7;color:#555;font-size:.9rem;font-weight:300}.snippet-editor__heading-editor{border-top:1px solid #f7f7f7}.snippet-editor__heading-icon{padding-left:45px;background-repeat:no-repeat;background-position:left 20px top .6em;background-size:16px}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before,.snippet-editor__container:hover:before{position:absolute;left:-22px;width:24px;height:24px;background-size:25px;content:"";display:block;top:-3px}.snippet-editor__heading-icon-eye{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__container--focus:before,.snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__preview{padding:0 20px 15px}.snippet-editor__button{padding:8px 10px;border:1px solid #dbdbdb;border-radius:4px;color:#555;background:#f7f7f7;font-size:.8rem;cursor:pointer}.snippet-editor__edit-button{display:block;margin-top:1em;padding-left:32px;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M491%201536l91%2D91%2D235%2D235%2D91%2091v107h128v128h107zm523%2D928q0%2D22%2D22%2D22%2D10%200%2D17%207l%2D542%20542q%2D7%207%2D7%2017%200%2022%2022%2022%2010%200%2017%2D7l542%2D542q7%2D7%207%2D17zm%2D54%2D192l416%20416%2D832%20832h%2D416v%2D416zm683%2096q0%2053%2D37%2090l%2D166%20166%2D416%2D416%20166%2D165q36%2D38%2090%2D38%2053%200%2091%2038l235%20234q37%2039%2037%2091z%22%20%2F%3E%3C%2Fsvg%3E") left 8px top 50% no-repeat #f7f7f7;background-size:16px}.snippet-editor__form{padding:20px}.snippet-editor__label{display:block;position:relative;width:100%;margin-top:1em}.snippet-editor__label--focus:before,.snippet-editor__label--hover:before{left:-22px;width:24px;height:24px;background-size:25px;display:block;content:"";position:absolute}.snippet-editor__label:first-child{margin-top:0}.snippet-editor__label--hover:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__label--focus:before{top:-3px;top:20px;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1152%20896q0%2026%2D19%2045l%2D448%20448q%2D19%2019%2D45%2019t%2D45%2D19%2D19%2D45v%2D896q0%2D26%2019%2D45t45%2D19%2045%2019l448%20448q19%2019%2019%2045z%22%20%2F%3E%3C%2Fsvg%3E")}.snippet-editor__input{display:block;box-sizing:border-box;width:100%;max-width:100%;margin-top:5px;border:1px solid #bfbfbf}.snippet-editor__input:focus{border:1px solid #1074a8;outline:0}.rtl .snippet-editor__container:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__container--focus:before,.rtl .snippet-editor__container--focus:hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--hover:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23bfbfbf%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.rtl .snippet-editor__label--focus:before{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%231074a8%22%20d%3D%22M1216%20448v896q0%2026%2D19%2045t%2D45%2019%2D45%2D19l%2D448%2D448q%2D19%2D19%2D19%2D45t19%2D45l448%2D448q19%2D19%2045%2D19t45%2019%2019%2045z%22%2F%3E%3C%2Fsvg%3E")}.snippet-editor__meta-description{height:70px}.snippet-editor__submit{margin-top:1em}#snippet_cite{min-width:20px}#meta_container{min-height:20px}.snippet_container .title{display:block;overflow:hidden;width:600px;margin:0;color:#1e0fbe;font-size:18px;font-weight:400;line-height:1.2;white-space:nowrap;text-decoration:none;text-overflow:ellipsis}.snippet_container .desc,.snippet_container .url{font-size:13px;line-height:1.4}.snippet_container .url{display:inline-block;float:left;color:#006621;font-size:14px;font-style:normal;line-height:16px}.snippet_container .down_arrow{float:left;margin-top:6px;margin-left:5px;border-top:5px solid #006621;border-right:4px solid transparent;border-left:4px solid transparent}.snippet_container .desc-default{color:#545454}.snippet_container .desc-default strong{color:#6a6a6a}.snippet_container .desc-render{color:#777}.snippet_container .tooLong{color:red !important}.snippet-editor__field--invalid{color:red}.snippet-editor__progress{display:block;box-sizing:border-box;width:100%;height:8px;margin-top:5px;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.assessment-results__mark.icon-eye-active.yoast-tooltip::after,.assessment-results__mark.icon-eye-active.yoast-tooltip::before,.snippet-editor--hidden{display:none}.snippet-editor__progress::-webkit-progress-bar{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress--fallback{height:8px;border:1px solid #bfbfbf;background-color:#f7f7f7}.snippet-editor__progress-bar{width:0;max-width:100%;height:100%}.snippet-editor__date{color:grey;font-size:13px;line-height:1.4}.snippet-editor__progress--bad[value]{color:#dc3232}.snippet-editor__progress--bad[value]::-webkit-progress-value{background-color:#dc3232;transition:width 250ms}.snippet-editor__progress--bad[value]::-moz-progress-bar{background-color:#dc3232}.snippet-editor__progress--bad[value] .snippet-editor__progress-bar{background-color:#dc3232}.snippet-editor__progress--ok[value]{color:#ee7c1b}.snippet-editor__progress--ok[value]::-webkit-progress-value{background-color:#ee7c1b;transition:width 250ms}.snippet-editor__progress--ok[value]::-moz-progress-bar{background-color:#ee7c1b}.snippet-editor__progress--ok[value] .snippet-editor__progress-bar{background-color:#ee7c1b}.snippet-editor__progress--good[value]{color:#7ad03a}.snippet-editor__progress--good[value]::-webkit-progress-value{background-color:#7ad03a;transition:width 250ms}.snippet-editor__progress--good[value]::-moz-progress-bar{background-color:#7ad03a}.snippet-editor__progress--good[value] .snippet-editor__progress-bar{background-color:#7ad03a}.wpseoanalysis{padding-right:0}.wpseo-score-text{float:left;width:86%;width:calc(44%)}.assessment-results .wpseo-score-icon{float:left;width:12px;height:12px;margin:3px 10px 0 0;border-radius:50%;background:#888}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}li.score{margin-bottom:6px;list-style-type:none !important}li.score:after{display:table;content:""}.screen-reader-text{overflow:hidden;clip:rect(1px,1px,1px,1px);position:absolute !important;width:1px;height:1px}.assessment-results__mark.icon-eye-active,.assessment-results__mark.icon-eye-disabled,.assessment-results__mark.icon-eye-inactive{float:left;width:28px;height:28px;margin:-5px 3px 0;padding:4px;border:0;border-radius:100%;outline:0;background:center no-repeat;background-size:16px;cursor:pointer}.assessment-results__mark.icon-eye-inactive{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-active{background-color:#a4286a;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark.icon-eye-disabled{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23e6e6e6%22%20d%3D%22M1664%20960q%2D152%2D236%2D381%2D353%2061%20104%2061%20225%200%20185%2D131%2E5%20316%2E5t%2D316%2E5%20131%2E5%2D316%2E5%2D131%2E5%2D131%2E5%2D316%2E5q0%2D121%2061%2D225%2D229%20117%2D381%20353%20133%20205%20333%2E5%20326%2E5t434%2E5%20121%2E5%20434%2E5%2D121%2E5%20333%2E5%2D326%2E5zm%2D720%2D384q0%2D20%2D14%2D34t%2D34%2D14q%2D125%200%2D214%2E5%2089%2E5t%2D89%2E5%20214%2E5q0%2020%2014%2034t34%2014%2034%2D14%2014%2D34q0%2D86%2061%2D147t147%2D61q20%200%2034%2D14t14%2D34zm848%20384q0%2034%2D20%2069%2D140%20230%2D376%2E5%20368%2E5t%2D499%2E5%20138%2E5%2D499%2E5%2D139%2D376%2E5%2D368q%2D20%2D35%2D20%2D69t20%2D69q140%2D229%20376%2E5%2D368t499%2E5%2D139%20499%2E5%20139%20376%2E5%20368q20%2035%2020%2069z%22%20%2F%3E%3C%2Fsvg%3E")}.assessment-results__mark-container{display:inline-block;float:right;width:33px;min-height:1px}.YoastSEO_msg .left,.YoastSEO_msg .right{display:none}@keyframes animatedBackground{from{background-position:0 0} to{background-position:100% 0}}.YoastSEO_msg .bufferbar{display:block;width:100%;height:12px;margin:10px 0;border:1px solid #dfdfdf;background-image:linear-gradient(to left,#fff,#0063ff,#fff,#0063ff);background-position:0 0;background-size:300% 100%;animation:animatedBackground 5s linear infinite}.yoast-tooltip{position:relative}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{display:none;position:absolute;z-index:1000000;padding:5px 8px;border-radius:3px;opacity:0;color:#fff;background:rgba(0,0,0,0.8);text-shadow:none;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);pointer-events:none;-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{display:none;position:absolute;z-index:1000001;width:0;height:0;border:5px solid transparent;opacity:0;color:rgba(0,0,0,0.8);content:"\00a0";pointer-events:none}@keyframes yoast-tooltip-appear{from{opacity:0} to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;right:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,0.8)}.yoast-tooltip-se::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-sw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{right:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,0.8)}.yoast-tooltip-ne::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-nw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-w::after{right:100%;bottom:50%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,0.8)}.yoast-tooltip-e::after{bottom:50%;left:100%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,0.8)}.yoast-tooltip-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{right:auto;left:50%;-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{right:100%} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/metabox-primary-category.min.css b/wp-content/plugins/wordpress-seo/css/metabox-primary-category.min.css new file mode 100644 index 0000000..d92f61e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/metabox-primary-category.min.css @@ -0,0 +1 @@ +.wpseo-is-primary-term,.wpseo-primary-term>label{font-weight:700}.wpseo-non-primary-term>.wpseo-is-primary-term,.wpseo-primary-term>.wpseo-make-primary-term,.wpseo-term-unchecked>.wpseo-is-primary-term,.wpseo-term-unchecked>.wpseo-make-primary-term{display:none}.wpseo-is-primary-term,.wpseo-make-primary-term{float:right}.wpseo-non-primary-term:after,.wpseo-non-primary-term:before,.wpseo-primary-term:after,.wpseo-primary-term:before{display:table;content:""}.wpseo-non-primary-term:after,.wpseo-primary-term:after{clear:both}.wpseo-make-primary-term{margin:4px 0 0;padding:0;border:none;color:#0073aa;background:0 0;text-decoration:underline;cursor:pointer}.wpseo-make-primary-term:hover{color:#00a0d2} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/snippet-330.min.css b/wp-content/plugins/wordpress-seo/css/snippet-330.min.css new file mode 100644 index 0000000..88b04b8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/snippet-330.min.css @@ -0,0 +1 @@ +#snippet_preview{margin:-11px 0 10px;font-family:Arial,Helvetica,sans-serif;font-style:normal}.form-table td .snippet-editor__label{font-size:1rem;line-height:1}.form-table td textarea{margin-top:5px}.wp-core-ui .button.snippet-editor__submit{margin-top:1em}.inside .wpseotab .form-table td input.snippet-editor__input{margin-top:5px}input[type=text].snippet-editor__field--invalid{color:#dc3232} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/taxonomy-meta.min.css b/wp-content/plugins/wordpress-seo/css/taxonomy-meta.min.css new file mode 100644 index 0000000..6fd0c5c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/taxonomy-meta.min.css @@ -0,0 +1 @@ +.wpseo-taxonomy-form td,.wpseo-taxonomy-form th,.wpseo-taxonomy-form tr{vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.css b/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.css new file mode 100644 index 0000000..33293ce --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.switch-light span span,.switch-toggle a{display:none}@media only screen{.switch-light,.switch-toggle{display:block;position:relative;padding:0!important}.switch-light::after,.switch-toggle::after{display:table;clear:both;content:""}.switch-light *,.switch-light :after,.switch-light :before,.switch-toggle *,.switch-toggle :after,.switch-toggle :before{box-sizing:border-box}.switch-light a,.switch-toggle a{display:block;transition:all .2s ease-out}.switch-light label,.switch-light>span,.switch-toggle label,.switch-toggle>span{line-height:2em;vertical-align:middle}.switch-light input{position:absolute;z-index:3;opacity:0}.switch-light input:checked~span a{right:0}.switch-light strong{font-weight:inherit}.switch-light>span{position:relative;min-height:2em;padding:0;text-align:left}.switch-light span span{display:block;float:left;position:relative;z-index:2;width:50%;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch-light a{display:block;position:absolute;z-index:1;top:0;right:50%;width:50%;height:100%;padding:0}.switch-toggle input{position:absolute;left:0;opacity:0}.switch-toggle input+label{display:block;float:left;position:relative;z-index:2;margin:0;padding:0 .5em;text-align:center}.switch-toggle a{position:absolute;z-index:1;top:0;left:0;width:10px;height:100%;padding:0}.switch-toggle label:nth-child(2):nth-last-child(4),.switch-toggle label:nth-child(2):nth-last-child(4)~a,.switch-toggle label:nth-child(2):nth-last-child(4)~label{width:50%}.switch-toggle label:nth-child(2):nth-last-child(4)~input:checked:nth-child(3)+label~a{left:50%}.switch-toggle label:nth-child(2):nth-last-child(6),.switch-toggle label:nth-child(2):nth-last-child(6)~a,.switch-toggle label:nth-child(2):nth-last-child(6)~label{width:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(3)+label~a{left:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(5)+label~a{left:66.66%}.switch-toggle label:nth-child(2):nth-last-child(8),.switch-toggle label:nth-child(2):nth-last-child(8)~a,.switch-toggle label:nth-child(2):nth-last-child(8)~label{width:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(3)+label~a{left:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(5)+label~a{left:50%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(7)+label~a{left:75%}.switch-toggle label:nth-child(2):nth-last-child(10),.switch-toggle label:nth-child(2):nth-last-child(10)~a,.switch-toggle label:nth-child(2):nth-last-child(10)~label{width:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(3)+label~a{left:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(5)+label~a{left:40%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(7)+label~a{left:60%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(9)+label~a{left:80%}.switch-toggle label:nth-child(2):nth-last-child(12),.switch-toggle label:nth-child(2):nth-last-child(12)~a,.switch-toggle label:nth-child(2):nth-last-child(12)~label{width:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(3)+label~a{left:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(5)+label~a{left:33.2%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(7)+label~a{left:49.8%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(9)+label~a{left:66.4%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(11)+label~a{left:83%}.switch-candy a{box-shadow:0 1px 1px rgba(0,0,0,.2),inset 0 1px 1px rgba(255,255,255,.45)}}@media only screen and (-webkit-max-device-pixel-ratio:2) and (max-device-width:80em){.switch-light,.switch-toggle{-webkit-animation:webkitSiblingBugfix infinite 1s}}.fieldset-switch-toggle label{float:none}@media only screen{.switch-light.switch-yoast-seo{margin-bottom:.2em}.fieldset-switch-toggle legend,.switch-light.switch-yoast-seo>strong{display:block;box-sizing:border-box;min-width:200px;margin-top:10px;padding-right:1em;font-weight:700;line-height:2em;vertical-align:middle}.switch-light.switch-yoast-seo>span,.switch-toggle.switch-yoast-seo{width:250px;border:1px solid #ccc;border-radius:.5em;background-color:#dcdcdc;box-shadow:inset 0 2px 4px rgba(0,0,0,.15)}.switch-toggle.switch-yoast-seo{float:left}.switch-light.switch-yoast-seo>span{display:inline-block;overflow:visible}.switch-light.switch-yoast-seo a,.switch-toggle.switch-yoast-seo a{border:1px solid #b5b5b5;border-radius:.5em;background:#a4286a}.switch-light.switch-yoast-seo input:focus+label,.switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus+label,.switch-toggle.switch-yoast-seo input:focus~span a{outline:0}.switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus~a{border-color:#5b9dd9!important;box-shadow:0 0 2px rgba(0,115,170,.8)!important}.switch-light.switch-yoast-seo input:checked~span a,.switch-toggle.switch-yoast-seo input:checked~span a{border:1px solid #b5b5b5;background:#a4286a}.switch-light.switch-yoast-seo input:checked~span span:first-child,.switch-light.switch-yoast-seo span span,.switch-toggle.switch-yoast-seo label{color:#333;text-shadow:none;font-weight:inherit}.switch-candy.switch-yoast-seo input:checked+label,.switch-candy.switch-yoast-seo input:checked~span span:nth-child(2),.switch-candy.switch-yoast-seo input~span span:first-child{color:#fff;text-shadow:none}.switch-light.switch-yoast-seo-reverse input:checked~span a{left:0}.switch-light.switch-yoast-seo-reverse a{left:50%}.switch-light.switch-yoast-seo-reverse span span{float:right}.switch-toggle.switch-yoast-seo label,label.switch-light.switch-yoast-seo{margin-left:0;cursor:pointer}.switch-yoast-seo .switch-yoast-seo-jaws-a11y{display:block;overflow:hidden;height:1px;margin-bottom:-1px}.switch-light.switch-yoast-seo label code,.switch-toggle.switch-yoast-seo label code{background-color:inherit;vertical-align:top}.switch-container .label-text{display:block;margin:.5em 0;font-weight:600}.switch-container{clear:both;margin:0 0 1em}.switch-container+.switch-container{margin-top:.5em}.switch-container+p{margin:-.5em 0 1em}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.rapido.css b/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.rapido.css new file mode 100644 index 0000000..ff1e65f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/toggle-switch-390.min.rapido.css @@ -0,0 +1 @@ +@charset "UTF-8";.switch-light span span,.switch-toggle a{display:none}@media only screen{.switch-light,.switch-toggle{display:block;position:relative;padding:0 !important} .switch-light::after,.switch-toggle::after{display:table;clear:both;content:""} .switch-light *,.switch-light :after,.switch-light :before,.switch-toggle *,.switch-toggle :after,.switch-toggle :before{box-sizing:border-box} .switch-light a,.switch-toggle a{display:block;transition:all .2s ease-out} .switch-light label,.switch-light>span,.switch-toggle label,.switch-toggle>span{line-height:2em;vertical-align:middle} .switch-light input{position:absolute;z-index:3;opacity:0} .switch-light input:checked~span a{right:0} .switch-light strong{font-weight:inherit} .switch-light>span{position:relative;min-height:2em;padding:0;text-align:left} .switch-light span span{display:block;float:left;position:relative;z-index:2;width:50%;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} .switch-light a{display:block;position:absolute;z-index:1;top:0;right:50%;width:50%;height:100%;padding:0} .switch-toggle input{position:absolute;left:0;opacity:0} .switch-toggle input+label{display:block;float:left;position:relative;z-index:2;margin:0;padding:0 .5em;text-align:center} .switch-toggle a{position:absolute;z-index:1;top:0;left:0;width:10px;height:100%;padding:0} .switch-toggle label:nth-child(2):nth-last-child(4),.switch-toggle label:nth-child(2):nth-last-child(4)~a,.switch-toggle label:nth-child(2):nth-last-child(4)~label{width:50%} .switch-toggle label:nth-child(2):nth-last-child(4)~input:checked:nth-child(3)+label~a{left:50%} .switch-toggle label:nth-child(2):nth-last-child(6),.switch-toggle label:nth-child(2):nth-last-child(6)~a,.switch-toggle label:nth-child(2):nth-last-child(6)~label{width:33.33%} .switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(3)+label~a{left:33.33%} .switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(5)+label~a{left:66.66%} .switch-toggle label:nth-child(2):nth-last-child(8),.switch-toggle label:nth-child(2):nth-last-child(8)~a,.switch-toggle label:nth-child(2):nth-last-child(8)~label{width:25%} .switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(3)+label~a{left:25%} .switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(5)+label~a{left:50%} .switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(7)+label~a{left:75%} .switch-toggle label:nth-child(2):nth-last-child(10),.switch-toggle label:nth-child(2):nth-last-child(10)~a,.switch-toggle label:nth-child(2):nth-last-child(10)~label{width:20%} .switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(3)+label~a{left:20%} .switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(5)+label~a{left:40%} .switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(7)+label~a{left:60%} .switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(9)+label~a{left:80%} .switch-toggle label:nth-child(2):nth-last-child(12),.switch-toggle label:nth-child(2):nth-last-child(12)~a,.switch-toggle label:nth-child(2):nth-last-child(12)~label{width:16.6%} .switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(3)+label~a{left:16.6%} .switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(5)+label~a{left:33.2%} .switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(7)+label~a{left:49.8%} .switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(9)+label~a{left:66.4%} .switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(11)+label~a{left:83%} .switch-candy a{box-shadow:0 1px 1px rgba(0,0,0,0.2),inset 0 1px 1px rgba(255,255,255,0.45)}}@media only screen and (-webkit-max-device-pixel-ratio:2) and (max-device-width:80em){.switch-light,.switch-toggle{-webkit-animation:webkitSiblingBugfix infinite 1s}}.fieldset-switch-toggle label{float:none}@media only screen{.switch-light.switch-yoast-seo{margin-bottom:.2em} .fieldset-switch-toggle legend,.switch-light.switch-yoast-seo>strong{display:block;box-sizing:border-box;min-width:200px;margin-top:10px;padding-right:1em;font-weight:700;line-height:2em;vertical-align:middle} .switch-light.switch-yoast-seo>span,.switch-toggle.switch-yoast-seo{width:250px;border:1px solid #ccc;border-radius:.5em;background-color:#dcdcdc;box-shadow:inset 0 2px 4px rgba(0,0,0,0.15)} .switch-toggle.switch-yoast-seo{float:left} .switch-light.switch-yoast-seo>span{display:inline-block;overflow:visible} .switch-light.switch-yoast-seo a,.switch-toggle.switch-yoast-seo a{border:1px solid #b5b5b5;border-radius:.5em;background:#a4286a} .switch-light.switch-yoast-seo input:focus+label,.switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus+label,.switch-toggle.switch-yoast-seo input:focus~span a{outline:0} .switch-light.switch-yoast-seo input:focus~span a,.switch-toggle.switch-yoast-seo input:focus~a{border-color:#5b9dd9 !important;box-shadow:0 0 2px rgba(0,115,170,0.8) !important} .switch-light.switch-yoast-seo input:checked~span a,.switch-toggle.switch-yoast-seo input:checked~span a{border:1px solid #b5b5b5;background:#a4286a} .switch-light.switch-yoast-seo input:checked~span span:first-child,.switch-light.switch-yoast-seo span span,.switch-toggle.switch-yoast-seo label{color:#333;text-shadow:none;font-weight:inherit} .switch-candy.switch-yoast-seo input:checked+label,.switch-candy.switch-yoast-seo input:checked~span span:nth-child(2),.switch-candy.switch-yoast-seo input~span span:first-child{color:#fff;text-shadow:none} .switch-light.switch-yoast-seo-reverse input:checked~span a{left:0} .switch-light.switch-yoast-seo-reverse a{left:50%} .switch-light.switch-yoast-seo-reverse span span{float:right} .switch-toggle.switch-yoast-seo label,label.switch-light.switch-yoast-seo{margin-left:0;cursor:pointer} .switch-yoast-seo .switch-yoast-seo-jaws-a11y{display:block;overflow:hidden;height:1px;margin-bottom:-1px} .switch-light.switch-yoast-seo label code,.switch-toggle.switch-yoast-seo label code{background-color:inherit;vertical-align:top} .switch-container .label-text{display:block;margin:.5em 0;font-weight:600} .switch-container{clear:both;margin:0 0 1em} .switch-container+.switch-container{margin-top:.5em} .switch-container+p{margin:-0.5em 0 1em}} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.css b/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.css new file mode 100644 index 0000000..f90fda1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.css @@ -0,0 +1 @@ +.yoast-notice-dismiss{position:absolute;top:0;right:1px;margin:0;padding:9px;border:none;color:#b4b9be;background:0 0;cursor:pointer;text-decoration:none}.yoast-notice-dismiss:before{display:block!important;width:20px;height:20px;color:#b4b9be;background:0 0;font:400 16px/1 dashicons;text-align:center;content:"\f153";-webkit-font-smoothing:antialiased!important;speak:none;position:relative;top:0;left:0;line-height:20px}.yoast-notice-dismiss:active:before,.yoast-notice-dismiss:focus:before,.yoast-notice-dismiss:hover:before{color:#c00}.yoast-notice-dismiss:focus{outline:0;color:#c00;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .yoast-notice-dismiss:focus{outline:#5b9dd9 solid 1px}.yoast-notice.is-dismissible{position:relative} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.rapido.css b/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.rapido.css new file mode 100644 index 0000000..8d6e5a8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/wpseo-dismissible-350.min.rapido.css @@ -0,0 +1 @@ +.yoast-notice-dismiss{position:absolute;top:0;right:1px;margin:0;padding:9px;border:none;color:#b4b9be;background:0 0;cursor:pointer;text-decoration:none}.yoast-notice-dismiss:before{display:block !important;width:20px;height:20px;color:#b4b9be;background:0 0;font:400 16px/1 dashicons;text-align:center;content:"\f153";-webkit-font-smoothing:antialiased !important;speak:none;position:relative;top:0;left:0;line-height:20px}.yoast-notice-dismiss:active:before,.yoast-notice-dismiss:focus:before,.yoast-notice-dismiss:hover:before{color:#c00}.yoast-notice-dismiss:focus{outline:0;color:#c00;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8)}.ie8 .yoast-notice-dismiss:focus{outline:#5b9dd9 solid 1px}.yoast-notice.is-dismissible{position:relative} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php b/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php new file mode 100644 index 0000000..354466a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php @@ -0,0 +1,173 @@ +'; +?> + + + + + + XML Sitemap + + + + +
    +

    XML Sitemap

    +

    + Generated by Yoast SEO, this is an XML Sitemap, meant for consumption by search engines.
    + You can find more information about XML sitemaps on sitemaps.org. +

    + +

    + This XML Sitemap Index file contains sitemaps. +

    + + + + + + + + + + + + + + + + + + +
    SitemapLast Modified
    + + + +
    +
    + +

    + This XML Sitemap contains URLs. +

    +

    ↑ Sitemap Index

    + + + + + + + + + + + + + + + + + + + +
    URLImagesLast Mod.
    + + + + + + + + + + +
    +
    +
    + + + + + +
    +
    div>span,.yoast-wizard--button__previous button:hover>div>span{color:#000!important}.yoast-wizard--step__active svg{color:#5d237a;fill:#5d237a}.yoast-wizard--step__inactive div{pointer-events:none}.yoast-wizard--step--container h1{margin-top:0;margin-bottom:1rem;color:#a4286a;font-size:2.75em;font-weight:300;line-height:3.68rem;letter-spacing:normal}@media screen and (max-width:768px){.yoast-wizard{padding:1em 1em 2em}.yoast-wizard--step__active{overflow:hidden;width:38px}.yoast-wizard--step__active div{display:inline-block!important;vertical-align:middle}.yoast-wizard--step__active div>span>span{display:block!important;margin-left:-7px;padding-right:99px!important}.yoast-wizard--step__inactive{display:none!important}.yoast-wizard--step--container h1{font-size:2em;line-height:1.25}}.yoast-wizard--step--container h2{color:#a4286a;font-size:1.375em;font-weight:400}.yoast-wizard--stepper{width:100%;margin:auto}.yoast-wizard-overlay{position:absolute;z-index:10;top:0;left:0;width:100%;height:100%;opacity:.2;color:#fff;background-color:#000;text-align:center}.yoast-wizard-overlay-loader{position:relative}.yoast-wizard-container{position:relative;min-height:20px;border:1px solid #ccc;box-shadow:rgba(0,0,0,.15) 0 3px 10px,rgba(0,0,0,.2) 0 3px 10px;text-align:left}@media screen and (max-width:768px){.yoast-wizard-container{box-shadow:none}}.yoast-wizard-container fieldset{margin:1em 0;padding-left:.5em;border:0}.yoast-wizard-text-input{padding-bottom:.5em;font-size:14px}.yoast-wizard-text-input-label{display:block;margin:.5em 0 0;font-weight:700;cursor:pointer}.yoast-wizard-text-input [type=text]{box-sizing:border-box;width:100%;max-width:450px}.yoast-wizard-field-description{font-weight:700}.yoast-wizard input{margin:.5em 0;padding:5px;font-size:14px;line-height:140%}.yoast-wizard label{cursor:pointer}.yoast-wizard input[type=radio]{margin:.3em .7em .3em 0;vertical-align:middle}.yoast-wizard-input__explanation{margin-top:0;color:#555;font-style:italic}.yoast-wizard-input-radio{font-size:14px}.yoast-wizard-input-radio-option label{padding-top:2px}.yoast-wizard-input-radio-separator{padding:0}.yoast-wizard-input-radio-separator input{position:absolute;left:-9999em;width:1px;height:1px}.yoast-wizard-input-radio-separator input+label{float:left;width:30px!important;margin:0 5px 5px 0!important;padding:9px 6px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:24px;text-align:center;cursor:pointer}.yoast-wizard-input-radio-separator input:checked+label{border:1px solid #a4286a;background-color:#fff;box-shadow:inset 0 0 0 2px #a4286a}.yoast-wizard-input-radio-separator input:checked+label,.yoast-wizard-input-radio-separator input:focus+label{border-radius:10px 10px 0}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%}.yoast-wizard-notice__error{margin-bottom:15px;padding:12px;border-left:4px solid #dc3232;background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@keyframes heartbeat{0%{opacity:.4;transform:scale(.7)}80%{opacity:1}100%{opacity:1;transform:scale(.95)}}.yoast-loader{animation:heartbeat 1.15s infinite;animation-timing-function:cubic-bezier(.96,.02,.63,.86);animation-direction:alternate}.yoast-wizard-return-link{display:block;margin:1em 0;color:#646d78;text-align:center}.yoast-wizard-mailchimp-message-error{color:#dc3232}.yoast-wizard-mailchimp-message-success{color:#008a00}.yoast-wizard-input{padding-bottom:.5em}.yoast-wizard-input__select{margin:1em 0;font-size:14px}.yoast-wizard-image-upload-container__image{max-width:151px}.yoast-wizard-image-upload-container-buttons{margin-top:1em}.yoast-wizard-image-upload-container-buttons__remove{margin-left:1em}.yoast-wizard-image-upload-container-description{display:block}.ie9 .yoast-wizard--stepper{display:none} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/yoast-extensions-390.min.css b/wp-content/plugins/wordpress-seo/css/yoast-extensions-390.min.css new file mode 100644 index 0000000..cb21601 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/yoast-extensions-390.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.yoast-list--usp{margin-bottom:1em;padding:0;font-family:"Open Sans",Arial,sans-serif}.yoast-list--usp li{position:relative;padding-left:1.2533333333rem;list-style:none!important}.yoast-list--usp li::before{position:absolute;top:0;left:0;color:#77b227;font-family:FontAwesome,"Open Sans",Arial,sans-serif;content:"\f00c\0020"}.yoast .h1,.yoast .h2,.yoast .h3,.yoast .h4,.yoast .h5,.yoast .h6,.yoast h1,.yoast h2,.yoast h3,.yoast h4,.yoast h5,.yoast h6{display:block;margin-top:0;font-family:"Open Sans",Arial,sans-serif;font-weight:300}.yoast .h1,.yoast h1{margin-bottom:1.35rem;font-size:2.5em;line-height:3.68rem;letter-spacing:normal}@media only screen and (min-width:30rem){.yoast .h1,.yoast h1{font-size:2.75em}}.yoast .h2,.yoast h2{margin-bottom:1.2rem;font-size:1.88em;line-height:2.5rem}.yoast .h2.tight,.yoast h2.tight{margin-bottom:.6rem}.yoast .h3,.yoast h3{margin-bottom:.8rem;font-size:1.25em;line-height:1.88rem}.yoast .h3.tight,.yoast h3.tight{margin-bottom:.4rem}@media only screen and (min-width:30rem){.yoast .h3,.yoast h3{font-size:1.375em}}@media only screen and (min-width:50rem){.yoast .h3,.yoast h3{font-size:1.5em}}.yoast .h4,.yoast .h5,.yoast .h6,.yoast h4,.yoast h5,.yoast h6{margin-bottom:.2rem;font-size:1.13em;font-weight:400;line-height:1.88rem}.yoast-button{display:inline-block;position:relative;width:100%;padding:.345em 1.5em .345em 1em;border:0;color:#dc5c04;background-color:#dc5c04;font-family:"Open Sans",Arial,sans-serif;font-size:1.1em;text-decoration:none;cursor:pointer}@media only screen and (min-width:30rem){.yoast-button{width:auto;max-height:2.86rem;margin-right:1.36rem}.yoast-button.left::before,.yoast-button::after{position:absolute;top:0;width:0;height:0;border-top:1.43rem solid transparent;border-bottom:1.44rem solid transparent}.yoast-button::after{right:-1.36rem;border-right:0;border-left:1.43rem solid #dc5c04;content:""}.yoast-button.left{margin-right:0;margin-left:1.36rem}.yoast-button.left::after{content:none}.yoast-button.left::before{left:-1.36rem;border-right:1.43rem solid #dc5c04;border-left:0;content:""}}.yoast-button--full::after,.yoast-button--naked::after,.yoast-button--noarrow::after{content:none}.yoast-button.alignleft{margin:1rem 2.5rem 0 0!important}.yoast-button .arrow{display:none}.yoast-button+.yoast-button{margin-top:1em;margin-left:1.88rem}.yoast-button--full{width:100%}.yoast-button.default{color:#fff;background-color:#dc5c04}.yoast-button.default::after{border-left-color:#dc5c04}.yoast-button.default::before{border-right-color:#dc5c04}.yoast-button a:focus,.yoast-button:hover{color:#fff;background-color:#f58223;text-decoration:underline}.yoast-button a:focus::after,.yoast-button:hover::after{border-left-color:#f58223}.yoast-button a:focus::before,.yoast-button:hover::before{border-right-color:#f58223}.yoast-button.academy{color:#fff;background-color:#5d237a}.yoast-button.academy::after{border-left-color:#5d237a}.yoast-button.academy::before{border-right-color:#5d237a}@media only screen and (max-width:20rem){.yoast-button.academy{background-color:#5d237a}.yoast-button.academy--secondary{background-color:#a4286a}}.yoast-button.academy--secondary{color:#fff;background-color:#a4286a}.yoast-button.academy--secondary::after{border-left-color:#a4286a}.yoast-button.academy--secondary::before{border-right-color:#a4286a}.yoast-button.software{color:#fff;background-color:#0075b3}.yoast-button.software::after{border-left-color:#0075b3}.yoast-button.software::before{border-right-color:#0075b3}.yoast-button.review{color:#fff;background-color:#009288}.yoast-button.about,.yoast_academy .yoast-button{background-color:#d93f69;color:#fff}.yoast-button.review::after{border-left-color:#009288}.yoast-button.about::after,.yoast_academy .yoast-button::after{border-left-color:#d93f69}.yoast-button.review::before{border-right-color:#009288}.yoast-button.about::before,.yoast_academy .yoast-button::before{border-right-color:#d93f69}.yoast_academy .yoast-button a:focus,.yoast_academy .yoast-button:hover{color:#fff;background-color:#d42a59;text-decoration:underline}.yoast_academy .yoast-button a:focus::after,.yoast_academy .yoast-button:hover::after{border-left-color:#d42a59}.yoast_academy .yoast-button a:focus::before,.yoast_academy .yoast-button:hover::before{border-right-color:#d42a59}.yoast_academy .yoast-button.dimmed,body .yoast-button.dimmed{color:#646464;background-color:#dcdcdc}.yoast_academy .yoast-button.dimmed::after,body .yoast-button.dimmed::after{border-left-color:#dcdcdc}.yoast_academy .yoast-button.dimmed::before,body .yoast-button.dimmed::before{border-right-color:#dcdcdc}.yoast_academy .yoast-button.dimmed a:focus,.yoast_academy .yoast-button.dimmed:hover,body .yoast-button.dimmed a:focus,body .yoast-button.dimmed:hover{color:#646464;background-color:#cdcdcd;text-decoration:underline}.yoast_academy .yoast-button.dimmed a:focus::after,.yoast_academy .yoast-button.dimmed:hover::after,body .yoast-button.dimmed a:focus::after,body .yoast-button.dimmed:hover::after{border-left-color:#cdcdcd}.yoast_academy .yoast-button.dimmed a:focus:before,.yoast_academy .yoast-button.dimmed:hover:before,body .yoast-button.dimmed a:focus:before,body .yoast-button.dimmed:hover:before{border-right-color:#cdcdcd}.yoast-button--naked{padding:0;border:none;background-color:transparent}.yoast-button i.fa{margin:4px 10px 0 0;font-size:140%}.theme-academy .yoast-promoblock{border-color:#5d237a}.theme-academy--secondary .yoast-promoblock{border-color:#a4286a}.theme-software .yoast-promoblock{border-color:#0075b3}.theme-review .yoast-promoblock{border-color:#009288}.theme-about .yoast-promoblock,.theme-home .yoast-promoblock{border-color:#d93f69}.theme-academy.yoast-promoblock{border-color:#5d237a}.theme-academy--secondary.yoast-promoblock{border-color:#a4286a}.theme-software.yoast-promoblock{border-color:#0075b3}.theme-review.yoast-promoblock,.theme-software--secondary.yoast-promoblock{border-color:#009288}.theme-review--secondary.yoast-promoblock{border-color:#77b227}.theme-about.yoast-promoblock{border-color:#d93f69}.theme-about--secondary.yoast-promoblock{border-color:#a4286a}.cta.yoast-promoblock,.link.yoast-promoblock{border-color:#dc5c04}.link.yoast-promoblock::after{-moz-filter:drop-shadow(1px 0 0 #dc5c04);-ms-filter:drop-shadow(1px 0 0 #dc5c04);-o-filter:drop-shadow(1px 0 0 #dc5c04);filter:drop-shadow(1px 0 0 #dc5c04)}.cta.yoast-promoblock::after{-moz-filter:drop-shadow(1px 0 0 #dc5c04);-ms-filter:drop-shadow(1px 0 0 #dc5c04);-o-filter:drop-shadow(1px 0 0 #dc5c04);filter:drop-shadow(1px 0 0 #dc5c04)}.yoast-promoblock{display:block;position:relative;margin-bottom:1.88rem;padding:20px;border:1px solid;border-radius:30px 30px 0;background-color:#fff;font-family:Merriweather,Georgia,serif}.yoast-promoblock p{color:#000}.yoast-promoblock p:last-of-type{margin-bottom:0}.yoast-promoblock i.blockicon{position:absolute;right:10px;bottom:10px;padding:0 0 0 .5em;font-size:2.25em}.yoast-promoblock a img{border:1px solid #dcdcdc}.yoast-promoblock p a{font-weight:600!important;text-decoration:underline}.yoast-promoblock form a,a.promoblock,a.promoblock:hover{text-decoration:none}.yoast-promoblock form a{font-family:"Open Sans",Arial,sans-serif;font-weight:400!important}.yoast-promoblock .h4,.yoast-promoblock h4{margin-bottom:.7rem}.yoast-promoblock.link{border-color:#dc5c04}.yoast-promoblock.link a,.yoast-promoblock.link a:hover{color:#dc5c04}.yoast-promoblock--white{border-color:#fff!important}.yoast-promoblock.theme-academy a{color:#5d237a!important}.yoast-promoblock.theme-academy.secondary a{color:#a4286a!important}.yoast-promoblock.theme-software a{color:#0075b3!important}.yoast-promoblock.theme-review a{color:#009288!important}.yoast-promoblock.theme-review.secondary a{color:#77b227!important}.yoast-promoblock.theme-about a{color:#d93f69!important}.product .yoast-promoblock{overflow:hidden}.yoast-promoblock--hometitle{display:-ms-flexbox;display:flex;max-width:16em;height:11em;margin:1rem auto 2rem;border-color:#fff!important;background-color:rgba(217,63,105,.25);font-size:16px;font-size:1rem;line-height:1;-webkit-box-pack:center;-ms-flex-align:center;-ms-flex-line-pack:center;-ms-flex-pack:justify}.old-ie .yoast-promoblock--hometitle{text-align:justify}.old-ie .yoast-promoblock--hometitle::after{display:inline-block;width:100%;content:""}.old-ie .yoast-promoblock--hometitle>*{display:inline-block;text-align:left}@media only screen and (max-width:30rem){.yoast-promoblock--hometitle::after{content:none!important}}.yoast-promoblock--imageholder{margin-bottom:0;padding:0}.yoast-promoblock--imageholdersmall{position:absolute}.yoast-promoblock--imageholdersmall:first-child{left:4rem}.yoast-promoblock--imageholdersmall:last-child{top:4rem}@media only screen and (max-width:50rem){.yoast-promoblock h2{margin-bottom:0}}a.promoblock{color:#000}.promoblockimage__holder{position:relative;width:240px;height:295px}@media only screen and (min-width:50rem){[class*=promoblock--icon]::before{position:absolute;right:.47rem;bottom:.47rem;font-family:FontAwesome,"Open Sans",Arial,sans-serif;font-size:2.2rem;line-height:1}body.theme-about [class*=promoblock--icon]::before{color:#d93f69}body.theme-about .promoblock a.color-cta{color:#009288!important}body.theme-academy [class*=promoblock--icon]::before{color:#5d237a}body.theme-software [class*=promoblock--icon]::before{color:#0075b3}.promoblock--icon-academy::before{content:"\f19d"}.promoblock--icon-blog::before{content:"\f1ea"}.promoblock--icon-book::before{content:"\f02d"}.promoblock--icon-calendar::before{content:"\f073"}.promoblock--icon-check::before{content:"\f046"}.promoblock--icon-drupal::before{content:"\f1a9"}.promoblock--icon-gears::before{content:"\f085"}.promoblock--icon-pencil::before{content:"\f040"}.promoblock--icon-plug::before{content:"\f1e6"}.promoblock--icon-video::before{content:"\f008"}.promoblock--icon-wordpress::before{content:"\f19a"}}.yoast{color:#000;font-family:"Open Sans",Arial,sans-serif;font-size:1rem;line-height:1.88;letter-spacing:.01em}.yoast *,.yoast :after,.yoast :before{box-sizing:border-box}.yoast-hr{position:relative;margin:0;padding-bottom:1.88rem;border:0;border-top:1px solid #a4286a}.yoast-hr:after{position:absolute;z-index:1;top:-2px;left:50%;height:0;border:none;border-top:20px solid #f1f1f1;border-right:40px solid transparent;border-left:40px solid transparent;line-height:0;content:"";-ms-transform:translateX(-50%);transform:translateX(-50%);-moz-filter:drop-shadow(0 1px 0 #a4286a);-ms-filter:drop-shadow(0 1px 0 #a4286a);-o-filter:drop-shadow(0 1px 0 #a4286a);filter:drop-shadow(0 1px 0 #a4286a)}.yoast-list--usp li:before{width:1em;height:100%;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E") left .4em no-repeat;background-size:contain;content:""}.yoast-button--purple{background-color:#5d237a}.yoast-button-go-to:after{position:static;top:auto;right:auto;width:auto;height:auto;border:none;content:" \00BB"}.yoast-button--installed{color:#fff;background-color:#77b227;cursor:default}.yoast-button--installed:hover{background-color:#77b227;text-decoration:none}.yoast-promo-extensions{display:-ms-flexbox;display:flex;margin-left:-50px;-ms-flex-wrap:wrap;flex-wrap:wrap}.yoast-promo-extensions>h2{width:100%;margin-left:50px}.yoast-promo-extension{max-width:330px;margin-left:50px;border-color:#a4286a;background-color:transparent}.yoast-promo-extension:first-child{margin-left:0}.yoast-promo-extension img{width:100%;height:auto;margin-bottom:.8rem}.yoast-promo-extension .yoast-button{width:100%;max-height:none}.yoast-promo-extension .yoast-button--installed{width:auto}.yoast-promo-extension h3{color:#a4286a}@media screen and (max-width:900px){.yoast-promo-extension img{display:none}.yoast-promo-extension{width:100%;max-width:none}}.yoast-seo-premium-extension:after,.yoast-seo-premium-extension:before{display:table;content:""}.yoast-seo-premium-extension:after{clear:both}.yoast-seo-premium-benefits__title{font-weight:600}.yoast-seo-premium-benefits__description:before{content:"– "}.yoast-link--more-info{padding-left:calc(1em + 5px);color:#646464;background:url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23646464%22%20d%3D%22M1152%201376v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D96v%2D512q0%2D14%2D9%2D23t%2D23%2D9h%2D320q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h96v320h%2D96q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h448q14%200%2023%2D9t9%2D23zm%2D128%2D896v%2D160q0%2D14%2D9%2D23t%2D23%2D9h%2D192q%2D14%200%2D23%209t%2D9%2023v160q0%2014%209%2023t23%209h192q14%200%2023%2D9t9%2D23zm640%20416q0%20209%2D103%20385%2E5t%2D279%2E5%20279%2E5%2D385%2E5%20103%2D385%2E5%2D103%2D279%2E5%2D279%2E5%2D103%2D385%2E5%20103%2D385%2E5%20279%2E5%2D279%2E5%20385%2E5%2D103%20385%2E5%20103%20279%2E5%20279%2E5%20103%20385%2E5z%22%2F%3E%3C%2Fsvg%3E") left .2em no-repeat;background-size:1em}.yoast-link--more-info:after{content:" \00BB"}.yoast-promo-extension .yoast-link--more-info{display:block;margin:1em 0 0;background-position:left .4em}.yoast-heading-highlight{color:#a4286a;font-weight:600}.yoast-money-back-guarantee{font-size:1.1em;font-style:italic} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.css b/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.css new file mode 100644 index 0000000..49f1dd5 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.css @@ -0,0 +1 @@ +#wpseo-debug-info,h4{clear:both}.wpseotab .extension a,div.yoastbox .button-primary:hover,div.yoastbox .button:hover{text-decoration:none}h4{margin:1.2em 0 .5em}p.desc{margin:6px 0 10px;padding:0 0 8px 25px}p.desc.label{margin:0 0 20px;padding:0 0 10px 200px}tr.yst_row{margin:5px 0 0;padding:5px 0 0}tr.yst_row.even{background-color:#f6f6f6}div.yoastbox ul{margin-left:20px}.postbox{margin:10px 10px 0 0}label{float:left;margin-left:6px}.yoast-inline-label{float:none;margin:0}label.radio{float:none;margin-right:20px}input.textinput,select,textarea{width:400px}input.checkbox+label.checkbox{width:auto}input.textinput,select.select,textarea.textinput{float:left;margin:0 3px 15px 0;padding:5px}textarea.textinput{padding:3px 6px}select.select{padding:3px}input.checkbox,input.checkbox.double{float:left;margin:6px 10px 6px 0}.textinput.metadesc{height:50px}textarea.import{width:500px;height:100px}label.checkbox,label.select,label.textinput{width:200px;margin:5px 0;background-color:transparent}.wpseo-gsc-reload-crawl-issues-form{position:relative;top:9px}.wp-core-ui .button.wpseo-gsc-save-profile{margin-left:200px}table.wpseo th{text-align:left}.wpseo_content_wrapper{display:table;width:100%}.wpseo_content_wrapper li,.wpseo_content_wrapper p{max-width:600px}.wpseo_content_wrapper .notice p,.wpseo_content_wrapper .yoast-blocking-files-error p{max-width:none}#wpseo-tabs+.notice{margin-top:1.5em}.wpseo_content_cell{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.wpseo-remove-ads{margin-top:0;padding:12px;border:1px solid #0075b3;border-radius:20px 20px 0;background-color:#fff}#wpseo_content_top{min-width:800px}.wpseo-variable-warning-element{border:1px solid #c62d2d!important}.wpseo-variable-warning{clear:both;margin:5px 0 0;padding:5px;color:#c62d2d}.wpseo-variable-warning code{color:#b02828}.wpseo-variable-warning a{color:#c62d2d}.wpseo_content_wrapper h3{margin:1em 0 .5em}.wpseo_content_wrapper h1.wpseo-redirect-url-title{margin:1em 0 .5em;font-size:1.3em}#sidebar-container{width:261px;padding:0 0 0 20px}@media (max-width:1020px){#wpseo_content_top{margin-left:0;padding-left:0}}.wpseo-admin-page .form-table td,.wpseo-admin-page .form-table th,.wpseo-admin-page .form-table tr{vertical-align:top}.postbox form{line-height:150%}div.yoastbox ul li{list-style:square}.text{width:250px}table.yoast_help,table.yoast_help td,table.yoast_help th{border:1px solid #ddd;border-collapse:collapse;color:#444;font-size:12px}table.yoast_help td,table.yoast_help th{padding:5px 10px;text-align:left;vertical-align:text-top}.correct,.wrong{padding:5px;color:#fff}table.yoast_help tr{background-color:#f1f1f1}table.yoast_help tr:nth-child(2n){background-color:#fbfbfe}table.yoast_help tr:hover{background-color:#ddd}.correct{background-color:green}.wrong{background-color:#dc3232}.wrong code{padding:3px 8px;color:#000}.yoast-notice-blocking-files code{color:#000;line-height:2}.yoast-notice-blocking-files .button{margin:.5em 0}.button.checkit,.button.fixit{float:right;margin:0 5px}.button.checkit{padding:5px 8px}.fb-buttons .button,.fb-buttons .button-primary{margin-right:8px}.postbox#donate{border:2px green}.wpseotab{display:none;margin-top:15px}.wpseotab.active{display:block}.wpseotab p.expl{margin-left:6px}.wpseotab p.expl strong{font-size:115%}#sidebar .yoastbox{margin:0 0 10px;padding:10px 15px;border:1px solid #ccc;border-radius:5px 25px}#sidebar .yoastbox h2{font-size:16px}#sidebar .promo{color:#000}#donate.yoastbox,#sitereview.yoastbox{border-color:green;background-color:#cfc}h2{margin-bottom:20px}h2 code{font-size:23px}#pointer-primary{margin:0 5px 0 0}#wpseo-debug-info .hndle{cursor:auto}#wpseo-debug-info .wpseo-debug-heading{font-size:1em}#wpseo-debug-info .wpseo-debug{display:inline-block;padding-left:20px;color:#c00}input.wpseo-new-title,textarea.wpseo-new-metadesc{width:100%;max-width:100%}.wpseotab .extension{float:left;box-sizing:border-box;width:300px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px no-repeat #fff;background-size:130px 100px}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}#separator{margin:1.5em 0 1em}#separator input.radio{position:absolute;left:-9999em;width:1px;height:1px}#separator input.radio+label{float:left;width:30px!important;margin:0 5px 0 0!important;padding:9px 6px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:24px;text-align:center;cursor:pointer}#separator input.radio:checked+label{border:1px solid #a4286a;background-color:#fff;box-shadow:inset 0 0 0 2px #a4286a}#separator input.radio:focus+label{border-radius:10px 10px 0}.svg-container{text-align:center}.svg-container .dashicons{width:200px;height:100px;font-size:100px}body.toplevel_page_wpseo_dashboard .wp-badge{border:none;background:url(../images/Yoast_SEO_Icon.svg);background-size:150px 160px;box-shadow:none}.nav-tab .dashicons{width:18px;height:18px;font-size:18px;line-height:24px}.nav-tab .pinteresticon{width:12px;height:24px;margin-right:2px;background-image:url(../images/pinterest-23x30.png);background-repeat:no-repeat;background-position:center center;background-size:contain}#wpseo_progressbar{height:25px;border:1px solid #006691}#wpseo_progressbar .ui-progressbar-value{height:25px;background:#006691}.wpseo-add-fb-admin-form-wrap .notice span{margin-left:10px}.archives-titles-metas-content{padding-top:1em}@media screen and (max-width:782px){.wpseo-gsc-reload-crawl-issues-form{top:0;margin:1em 0}.wpseo-gsc-reload-crawl-issues-form .alignright{float:none}}@media screen and (max-width:600px){.wpseo-gsc-reload-crawl-issues-form{margin-bottom:0}}.yoast-sidebar__title{box-sizing:border-box;width:100%;margin:46px 0 20px;padding:10px;border:none;border-bottom:1px solid #a4286a;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:left}.yoast-sidebar__spot{padding:10px 0;border-bottom:1px solid #ddd}.yoast-sidebar__spot a{color:#a4286a}.wpseo-banner__link{display:inline-block}.wpseo-banner__image{vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.rapido.css b/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.rapido.css new file mode 100644 index 0000000..38b5e18 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/yst_plugin_tools-400.min.rapido.css @@ -0,0 +1 @@ +#wpseo-debug-info,h4{clear:both}.wpseotab .extension a,div.yoastbox .button-primary:hover,div.yoastbox .button:hover{text-decoration:none}h4{margin:1.2em 0 .5em}p.desc{margin:6px 0 10px;padding:0 0 8px 25px}p.desc.label{margin:0 0 20px;padding:0 0 10px 200px}tr.yst_row{margin:5px 0 0;padding:5px 0 0}tr.yst_row.even{background-color:#f6f6f6}div.yoastbox ul{margin-left:20px}.postbox{margin:10px 10px 0 0}label{float:left;margin-left:6px}.yoast-inline-label{float:none;margin:0}label.radio{float:none;margin-right:20px}input.textinput,select,textarea{width:400px}input.checkbox+label.checkbox{width:auto}input.textinput,select.select,textarea.textinput{float:left;margin:0 3px 15px 0;padding:5px}textarea.textinput{padding:3px 6px}select.select{padding:3px}input.checkbox,input.checkbox.double{float:left;margin:6px 10px 6px 0}.textinput.metadesc{height:50px}textarea.import{width:500px;height:100px}label.checkbox,label.select,label.textinput{width:200px;margin:5px 0;background-color:transparent}.wpseo-gsc-reload-crawl-issues-form{position:relative;top:9px}.wp-core-ui .button.wpseo-gsc-save-profile{margin-left:200px}table.wpseo th{text-align:left}.wpseo_content_wrapper{display:table;width:100%}.wpseo_content_wrapper li,.wpseo_content_wrapper p{max-width:600px}.wpseo_content_wrapper .notice p,.wpseo_content_wrapper .yoast-blocking-files-error p{max-width:none}#wpseo-tabs+.notice{margin-top:1.5em}.wpseo_content_cell{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.wpseo-remove-ads{margin-top:0;padding:12px;border:1px solid #0075b3;border-radius:20px 20px 0;background-color:#fff}#wpseo_content_top{min-width:800px}.wpseo-variable-warning-element{border:1px solid #c62d2d !important}.wpseo-variable-warning{clear:both;margin:5px 0 0;padding:5px;color:#c62d2d}.wpseo-variable-warning code{color:#b02828}.wpseo-variable-warning a{color:#c62d2d}.wpseo_content_wrapper h3{margin:1em 0 .5em}.wpseo_content_wrapper h1.wpseo-redirect-url-title{margin:1em 0 .5em;font-size:1.3em}#sidebar-container{width:261px;padding:0 0 0 20px}@media (max-width:1020px){#wpseo_content_top{margin-left:0;padding-left:0}}.wpseo-admin-page .form-table td,.wpseo-admin-page .form-table th,.wpseo-admin-page .form-table tr{vertical-align:top}.postbox form{line-height:150%}div.yoastbox ul li{list-style:square}.text{width:250px}table.yoast_help,table.yoast_help td,table.yoast_help th{border:1px solid #ddd;border-collapse:collapse;color:#444;font-size:12px}table.yoast_help td,table.yoast_help th{padding:5px 10px;text-align:left;vertical-align:text-top}.correct,.wrong{padding:5px;color:#fff}table.yoast_help tr{background-color:#f1f1f1}table.yoast_help tr:nth-child(2n){background-color:#fbfbfe}table.yoast_help tr:hover{background-color:#ddd}.correct{background-color:green}.wrong{background-color:#dc3232}.wrong code{padding:3px 8px;color:#000}.yoast-notice-blocking-files code{color:#000;line-height:2}.yoast-notice-blocking-files .button{margin:.5em 0}.button.checkit,.button.fixit{float:right;margin:0 5px}.button.checkit{padding:5px 8px}.fb-buttons .button,.fb-buttons .button-primary{margin-right:8px}.postbox#donate{border:2px green}.wpseotab{display:none;margin-top:15px}.wpseotab.active{display:block}.wpseotab p.expl{margin-left:6px}.wpseotab p.expl strong{font-size:115%}#sidebar .yoastbox{margin:0 0 10px;padding:10px 15px;border:1px solid #ccc;border-radius:5px 25px}#sidebar .yoastbox h2{font-size:16px}#sidebar .promo{color:#000}#donate.yoastbox,#sitereview.yoastbox{border-color:green;background-color:#cfc}h2{margin-bottom:20px}h2 code{font-size:23px}#pointer-primary{margin:0 5px 0 0}#wpseo-debug-info .hndle{cursor:auto}#wpseo-debug-info .wpseo-debug-heading{font-size:1em}#wpseo-debug-info .wpseo-debug{display:inline-block;padding-left:20px;color:#c00}input.wpseo-new-title,textarea.wpseo-new-metadesc{width:100%;max-width:100%}.wpseotab .extension{float:left;box-sizing:border-box;width:300px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px no-repeat #fff;background-size:130px 100px}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}#separator{margin:1.5em 0 1em}#separator input.radio{position:absolute;left:-9999em;width:1px;height:1px}#separator input.radio+label{float:left;width:30px !important;margin:0 5px 0 0 !important;padding:9px 6px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif !important;font-size:18px !important;line-height:24px;text-align:center;cursor:pointer}#separator input.radio:checked+label{border:1px solid #a4286a;background-color:#fff;box-shadow:inset 0 0 0 2px #a4286a}#separator input.radio:focus+label{border-radius:10px 10px 0}.svg-container{text-align:center}.svg-container .dashicons{width:200px;height:100px;font-size:100px}body.toplevel_page_wpseo_dashboard .wp-badge{border:none;background:url(../images/Yoast_SEO_Icon.svg);background-size:150px 160px;box-shadow:none}.nav-tab .dashicons{width:18px;height:18px;font-size:18px;line-height:24px}.nav-tab .pinteresticon{width:12px;height:24px;margin-right:2px;background-image:url(../images/pinterest-23x30.png);background-repeat:no-repeat;background-position:center center;background-size:contain}#wpseo_progressbar{height:25px;border:1px solid #006691}#wpseo_progressbar .ui-progressbar-value{height:25px;background:#006691}.wpseo-add-fb-admin-form-wrap .notice span{margin-left:10px}.archives-titles-metas-content{padding-top:1em}@media screen and (max-width:782px){.wpseo-gsc-reload-crawl-issues-form{top:0;margin:1em 0} .wpseo-gsc-reload-crawl-issues-form .alignright{float:none}}@media screen and (max-width:600px){.wpseo-gsc-reload-crawl-issues-form{margin-bottom:0}}.yoast-sidebar__title{box-sizing:border-box;width:100%;margin:46px 0 20px;padding:10px;border:none;border-bottom:1px solid #a4286a;outline:0;color:#a4286a;background:0 0;line-height:19px;text-align:left}.yoast-sidebar__spot{padding:10px 0;border-bottom:1px solid #ddd}.yoast-sidebar__spot a{color:#a4286a}.wpseo-banner__link{display:inline-block}.wpseo-banner__image{vertical-align:top} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/css/yst_seo_score-390.min.css b/wp-content/plugins/wordpress-seo/css/yst_seo_score-390.min.css new file mode 100644 index 0000000..df91e15 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/css/yst_seo_score-390.min.css @@ -0,0 +1 @@ +.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin:3px 10px 0 3px;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dc3232}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}.wpseo-score-title{font-weight:600}#taxonomy_overall{position:absolute;top:0;margin-left:87.5%} \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/deprecated/class-onpage-email-presenter.php b/wp-content/plugins/wordpress-seo/deprecated/class-onpage-email-presenter.php new file mode 100644 index 0000000..599a920 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/deprecated/class-onpage-email-presenter.php @@ -0,0 +1,41 @@ + '', + '1' => '', + ); + } + + /** + * @deprecated 3.0.7 + */ + public function get_message() { + _deprecated_function( 'WPSEO_OnPage_Email_Presenter', 'WPSEO 3.0.7' ); + + return ''; + } +} diff --git a/wp-content/plugins/wordpress-seo/deprecated/class-onpage-notifier.php b/wp-content/plugins/wordpress-seo/deprecated/class-onpage-notifier.php new file mode 100644 index 0000000..325d2d0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/deprecated/class-onpage-notifier.php @@ -0,0 +1,43 @@ +content + * + * @return string html for snippet preview + * + * @deprecated 3.0 Removed, use javascript instead. + */ + public function get_content() { + _deprecated_function( 'WPSEO_Snippet_Preview::get_content', 'WPSEO 3.0', 'javascript' ); + return $this->content; + } + + /** + * Sets date if available + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function set_date() { + _deprecated_function( 'WPSEO_Snippet_Preview::set_date', 'WPSEO 3.0', 'javascript' ); + } + + /** + * Retrieves a post date when post is published, or return current date when it's not. + * + * @return string + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function get_post_date() { + _deprecated_function( 'WPSEO_Snippet_Preview::get_post_date', 'WPSEO 3.0', 'javascript' ); + return ''; + } + + /** + * Generates the url that is displayed in the snippet preview. + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function set_url() { + _deprecated_function( 'WPSEO_Snippet_Preview::set_url', 'WPSEO 3.0', 'javascript' ); + } + + /** + * Sets the slug and adds it to the url if the post has been published and the post name exists. + * + * If the post is set to be the homepage the slug is also not included. + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function set_slug() { + _deprecated_function( 'WPSEO_Snippet_Preview::set_slug', 'WPSEO 3.0', 'javascript' ); + } + + /** + * Generates the html for the snippet preview and assign it to $this->content. + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function set_content() { + _deprecated_function( 'WPSEO_Snippet_Preview::set_content', 'WPSEO 3.0', 'javascript' ); + } + + /** + * Sets the html for the snippet preview through a filter + * + * @param string $content Content string. + * + * @deprecated 3.0 Removed, use javascript instead. + */ + protected function set_content_through_filter( $content ) { + _deprecated_function( 'WPSEO_Snippet_Preview::set_content_through_filter', 'WPSEO 3.0', 'javascript' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/deprecated/class-yoast-textstatistics.php b/wp-content/plugins/wordpress-seo/deprecated/class-yoast-textstatistics.php new file mode 100644 index 0000000..b882ac2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/deprecated/class-yoast-textstatistics.php @@ -0,0 +1,196 @@ +options = WPSEO_Options::get_options( array( 'wpseo_titles', 'wpseo_internallinks', 'wpseo_xml' ) ); + $this->post = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null ); + $this->show_on_front = get_option( 'show_on_front' ); + $this->page_for_posts = get_option( 'page_for_posts' ); + + $this->filter_element(); + $this->filter_separator(); + $this->filter_wrapper(); + + $this->set_crumbs(); + $this->prepare_links(); + $this->links_to_string(); + $this->wrap_breadcrumb(); + } + + /** + * Get breadcrumb string using the singleton instance of this class + * + * @param string $before Optional string to prepend. + * @param string $after Optional string to append. + * @param bool $display Echo or return flag. + * + * @return object + */ + public static function breadcrumb( $before = '', $after = '', $display = true ) { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + // Remember the last used before/after for use in case the object goes __toString(). + self::$before = $before; + self::$after = $after; + + $output = $before . self::$instance->output . $after; + + if ( $display === true ) { + echo $output; + + return true; + } + else { + return $output; + } + } + + /** + * Magic method to use in case the class would be send to string + * + * @return string + */ + public function __toString() { + return self::$before . $this->output . self::$after; + } + + + /** + * Filter: 'wpseo_breadcrumb_single_link_wrapper' - Allows developer to change or wrap each breadcrumb element + * + * @api string $element + */ + private function filter_element() { + $this->element = esc_attr( apply_filters( 'wpseo_breadcrumb_single_link_wrapper', $this->element ) ); + } + + /** + * Filter: 'wpseo_breadcrumb_separator' - Allow (theme) developer to change the Yoast SEO breadcrumb separator. + * + * @api string $breadcrumbs_sep Breadcrumbs separator + */ + private function filter_separator() { + $separator = apply_filters( 'wpseo_breadcrumb_separator', $this->options['breadcrumbs-sep'] ); + $this->separator = ' ' . $separator . ' '; + } + + /** + * Filter: 'wpseo_breadcrumb_output_wrapper' - Allow changing the HTML wrapper element for the Yoast SEO breadcrumbs output + * + * @api string $wrapper The wrapper element + */ + private function filter_wrapper() { + $wrapper = apply_filters( 'wpseo_breadcrumb_output_wrapper', $this->wrapper ); + $wrapper = tag_escape( $wrapper ); + if ( is_string( $wrapper ) && '' !== $wrapper ) { + $this->wrapper = $wrapper; + } + } + + + /** + * Get a term's parents. + * + * @param object $term Term to get the parents for. + * + * @return array + */ + private function get_term_parents( $term ) { + $tax = $term->taxonomy; + $parents = array(); + while ( $term->parent != 0 ) { + $term = get_term( $term->parent, $tax ); + $parents[] = $term; + } + + return array_reverse( $parents ); + } + + /** + * Find the deepest term in an array of term objects + * + * @param array $terms Terms set. + * + * @return object + */ + private function find_deepest_term( $terms ) { + /* + Let's find the deepest term in this array, by looping through and then + unsetting every term that is used as a parent by another one in the array. + */ + $terms_by_id = array(); + foreach ( $terms as $term ) { + $terms_by_id[ $term->term_id ] = $term; + } + foreach ( $terms as $term ) { + unset( $terms_by_id[ $term->parent ] ); + } + unset( $term ); + + /* + As we could still have two subcategories, from different parent categories, + let's pick the one with the lowest ordered ancestor. + */ + $parents_count = 0; + $term_order = 9999; // Because ASC. + reset( $terms_by_id ); + $deepest_term = current( $terms_by_id ); + foreach ( $terms_by_id as $term ) { + $parents = $this->get_term_parents( $term ); + + if ( count( $parents ) >= $parents_count ) { + $parents_count = count( $parents ); + + // If higher count. + if ( count( $parents ) > $parents_count ) { + // Reset order. + $term_order = 9999; + } + + $parent_order = 9999; // Set default order. + foreach ( $parents as $parent ) { + if ( $parent->parent == 0 && isset( $parent->term_order ) ) { + $parent_order = $parent->term_order; + } + } + unset( $parent ); + + // Check if parent has lowest order. + if ( $parent_order < $term_order ) { + $term_order = $parent_order; + $deepest_term = $term; + } + } + } + + return $deepest_term; + } + + /** + * Retrieve the hierachical ancestors for the current 'post' + * + * @return array + */ + private function get_post_ancestors() { + $ancestors = array(); + + if ( isset( $this->post->ancestors ) ) { + if ( is_array( $this->post->ancestors ) ) { + $ancestors = array_values( $this->post->ancestors ); + } + else { + $ancestors = array( $this->post->ancestors ); + } + } + elseif ( isset( $this->post->post_parent ) ) { + $ancestors = array( $this->post->post_parent ); + } + + /** + * Filter: Allow changing the ancestors for the Yoast SEO breadcrumbs output + * + * @api array $ancestors Ancestors + */ + $ancestors = apply_filters( 'wp_seo_get_bc_ancestors', $ancestors ); + + if ( ! is_array( $ancestors ) ) { + trigger_error( 'The return value for the "wp_seo_get_bc_ancestors" filter should be an array.', E_USER_WARNING ); + $ancestors = (array) $ancestors; + } + + // Reverse the order so it's oldest to newest. + $ancestors = array_reverse( $ancestors ); + + return $ancestors; + } + + /** + * Determine the crumbs which should form the breadcrumb. + */ + private function set_crumbs() { + /** @var WP_Query $wp_query */ + global $wp_query; + + $this->add_home_crumb(); + $this->maybe_add_blog_crumb(); + + if ( ( $this->show_on_front === 'page' && is_front_page() ) || ( $this->show_on_front === 'posts' && is_home() ) ) { + // Do nothing. + } + elseif ( $this->show_on_front == 'page' && is_home() ) { + $this->add_blog_crumb(); + } + elseif ( is_singular() ) { + $this->maybe_add_pt_archive_crumb_for_post(); + + if ( isset( $this->post->post_parent ) && 0 == $this->post->post_parent ) { + $this->maybe_add_taxonomy_crumbs_for_post(); + } + else { + $this->add_post_ancestor_crumbs(); + } + + if ( isset( $this->post->ID ) ) { + $this->add_single_post_crumb( $this->post->ID ); + } + } + else { + if ( is_post_type_archive() ) { + $post_type = $wp_query->get( 'post_type' ); + + if ( $post_type && is_string( $post_type ) ) { + $this->add_ptarchive_crumb( $post_type ); + } + } + elseif ( is_tax() || is_tag() || is_category() ) { + $this->add_crumbs_for_taxonomy(); + } + elseif ( is_date() ) { + if ( is_day() ) { + $this->add_linked_month_year_crumb(); + $this->add_date_crumb(); + } + elseif ( is_month() ) { + $this->add_month_crumb(); + } + elseif ( is_year() ) { + $this->add_year_crumb(); + } + } + elseif ( is_author() ) { + $user = $wp_query->get_queried_object(); + $this->add_predefined_crumb( + $this->options['breadcrumbs-archiveprefix'] . ' ' . $user->display_name, + null, + true + ); + } + elseif ( is_search() ) { + $this->add_predefined_crumb( + $this->options['breadcrumbs-searchprefix'] . ' "' . esc_html( get_search_query() ) . '"', + null, + true + ); + } + elseif ( is_404() ) { + $this->add_predefined_crumb( + $this->options['breadcrumbs-404crumb'], + null, + true + ); + } + } + + /** + * Filter: 'wpseo_breadcrumb_links' - Allow the developer to filter the Yoast SEO breadcrumb links, add to them, change order, etc. + * + * @api array $crumbs The crumbs array + */ + $this->crumbs = apply_filters( 'wpseo_breadcrumb_links', $this->crumbs ); + + $this->crumb_count = count( $this->crumbs ); + } + + + /** + * Add a single id based crumb to the crumbs property + * + * @param int $id Post ID. + */ + private function add_single_post_crumb( $id ) { + $this->crumbs[] = array( + 'id' => $id, + ); + } + + /** + * Add a term based crumb to the crumbs property + * + * @param object $term Term data object. + */ + private function add_term_crumb( $term ) { + $this->crumbs[] = array( + 'term' => $term, + ); + } + + /** + * Add a ptarchive based crumb to the crumbs property + * + * @param string $pt Post type. + */ + private function add_ptarchive_crumb( $pt ) { + $this->crumbs[] = array( + 'ptarchive' => $pt, + ); + } + + /** + * Add a predefined crumb to the crumbs property + * + * @param string $text Text string. + * @param string $url URL string. + * @param bool $allow_html Flag to allow HTML. + */ + private function add_predefined_crumb( $text, $url = '', $allow_html = false ) { + $this->crumbs[] = array( + 'text' => $text, + 'url' => $url, + 'allow_html' => $allow_html, + ); + } + + /** + * Add Homepage crumb to the crumbs property + */ + private function add_home_crumb() { + $this->add_predefined_crumb( + $this->options['breadcrumbs-home'], + WPSEO_Utils::home_url(), + true + ); + } + + /** + * Add Blog crumb to the crumbs property + */ + private function add_blog_crumb() { + $this->add_single_post_crumb( $this->page_for_posts ); + } + + /** + * Add Blog crumb to the crumbs property for single posts where Home != blogpage + */ + private function maybe_add_blog_crumb() { + if ( ( 'page' === $this->show_on_front && 'post' === get_post_type() ) && ( ! is_home() && ! is_search() ) ) { + if ( $this->page_for_posts && $this->options['breadcrumbs-blog-remove'] === false ) { + $this->add_blog_crumb(); + } + } + } + + /** + * Add ptarchive crumb to the crumbs property if it can be linked to, for a single post + */ + private function maybe_add_pt_archive_crumb_for_post() { + // Never do this for the Post type archive for posts, as that would break `maybe_add_blog_crumb`. + if ( $this->post->post_type === 'post' ) { + return; + } + if ( isset( $this->post->post_type ) && get_post_type_archive_link( $this->post->post_type ) ) { + $this->add_ptarchive_crumb( $this->post->post_type ); + } + } + + /** + * Add taxonomy crumbs to the crumbs property for a single post + */ + private function maybe_add_taxonomy_crumbs_for_post() { + if ( isset( $this->options[ 'post_types-' . $this->post->post_type . '-maintax' ] ) && $this->options[ 'post_types-' . $this->post->post_type . '-maintax' ] != '0' ) { + $main_tax = $this->options[ 'post_types-' . $this->post->post_type . '-maintax' ]; + if ( isset( $this->post->ID ) ) { + $terms = get_the_terms( $this->post, $main_tax ); + + if ( is_array( $terms ) && $terms !== array() ) { + + $primary_term = new WPSEO_Primary_Term( $main_tax, $this->post->ID ); + if ( $primary_term->get_primary_term() ) { + $breadcrumb_term = get_term( $primary_term->get_primary_term(), $main_tax ); + } + else { + $breadcrumb_term = $this->find_deepest_term( $terms ); + } + + if ( is_taxonomy_hierarchical( $main_tax ) && $breadcrumb_term->parent != 0 ) { + $parent_terms = $this->get_term_parents( $breadcrumb_term ); + foreach ( $parent_terms as $parent_term ) { + $this->add_term_crumb( $parent_term ); + } + } + + $this->add_term_crumb( $breadcrumb_term ); + } + } + } + } + + /** + * Add hierarchical ancestor crumbs to the crumbs property for a single post + */ + private function add_post_ancestor_crumbs() { + $ancestors = $this->get_post_ancestors(); + if ( is_array( $ancestors ) && $ancestors !== array() ) { + foreach ( $ancestors as $ancestor ) { + $this->add_single_post_crumb( $ancestor ); + } + } + } + + /** + * Add taxonomy parent crumbs to the crumbs property for a taxonomy + */ + private function add_crumbs_for_taxonomy() { + $term = $GLOBALS['wp_query']->get_queried_object(); + + // @todo adjust function name!! + $this->maybe_add_preferred_term_parent_crumb( $term ); + + $this->maybe_add_term_parent_crumbs( $term ); + + $this->add_term_crumb( $term ); + } + + /** + * Add parent taxonomy crumb based on user defined preference + * + * @param object $term Term data object. + */ + private function maybe_add_preferred_term_parent_crumb( $term ) { + if ( isset( $this->options[ 'taxonomy-' . $term->taxonomy . '-ptparent' ] ) && $this->options[ 'taxonomy-' . $term->taxonomy . '-ptparent' ] != '0' ) { + if ( 'post' == $this->options[ 'taxonomy-' . $term->taxonomy . '-ptparent' ] && $this->show_on_front == 'page' ) { + if ( $this->page_for_posts ) { + $this->add_blog_crumb(); + } + } + else { + $this->add_ptarchive_crumb( $this->options[ 'taxonomy-' . $term->taxonomy . '-ptparent' ] ); + } + } + } + + /** + * Add parent taxonomy crumbs to the crumb property for hierachical taxonomy + * + * @param object $term Term data object. + */ + private function maybe_add_term_parent_crumbs( $term ) { + if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent != 0 ) { + foreach ( $this->get_term_parents( $term ) as $parent_term ) { + $this->add_term_crumb( $parent_term ); + } + } + } + + /** + * Add month-year crumb to crumbs property + */ + private function add_linked_month_year_crumb() { + $this->add_predefined_crumb( + $GLOBALS['wp_locale']->get_month( get_query_var( 'monthnum' ) ) . ' ' . get_query_var( 'year' ), + get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) ) + ); + } + + /** + * Add (non-link) month crumb to crumbs property + */ + private function add_month_crumb() { + $this->add_predefined_crumb( + $this->options['breadcrumbs-archiveprefix'] . ' ' . esc_html( single_month_title( ' ', false ) ), + null, + true + ); + } + + /** + * Add (non-link) year crumb to crumbs property + */ + private function add_year_crumb() { + $this->add_predefined_crumb( + $this->options['breadcrumbs-archiveprefix'] . ' ' . esc_html( get_query_var( 'year' ) ), + null, + true + ); + } + + /** + * Add (non-link) date crumb to crumbs property + * + * @param string $date Optional date string, defaults to post's date. + */ + private function add_date_crumb( $date = null ) { + if ( is_null( $date ) ) { + $date = get_the_date(); + } + else { + $date = mysql2date( get_option( 'date_format' ), $date, true ); + $date = apply_filters( 'get_the_date', $date, '' ); + } + + $this->add_predefined_crumb( + $this->options['breadcrumbs-archiveprefix'] . ' ' . esc_html( $date ), + null, + true + ); + } + + + /** + * Take the crumbs array and convert each crumb to a single breadcrumb string. + * + * @link http://support.google.com/webmasters/bin/answer.py?hl=en&answer=185417 Google documentation on RDFA + */ + private function prepare_links() { + if ( ! is_array( $this->crumbs ) || $this->crumbs === array() ) { + return; + } + + foreach ( $this->crumbs as $i => $crumb ) { + $link_info = $crumb; // Keep pre-set url/text combis. + + if ( isset( $crumb['id'] ) ) { + $link_info = $this->get_link_info_for_id( $crumb['id'] ); + } + if ( isset( $crumb['term'] ) ) { + $link_info = $this->get_link_info_for_term( $crumb['term'] ); + } + if ( isset( $crumb['ptarchive'] ) ) { + $link_info = $this->get_link_info_for_ptarchive( $crumb['ptarchive'] ); + } + + $this->links[] = $this->crumb_to_link( $link_info, $i ); + } + } + + /** + * Retrieve link url and text based on post id + * + * @param int $id Post ID. + * + * @return array Array of link text and url + */ + private function get_link_info_for_id( $id ) { + $link = array(); + + $link['url'] = get_permalink( $id ); + $link['text'] = WPSEO_Meta::get_value( 'bctitle', $id ); + if ( $link['text'] === '' ) { + $link['text'] = strip_tags( get_the_title( $id ) ); + } + + /** + * Filter: 'wp_seo_get_bc_title' - Allow developer to filter the Yoast SEO Breadcrumb title. + * + * @api string $link_text The Breadcrumb title text + * + * @param int $link_id The post ID + */ + $link['text'] = apply_filters( 'wp_seo_get_bc_title', $link['text'], $id ); + + return $link; + } + + /** + * Retrieve link url and text based on term object + * + * @param object $term Term object. + * + * @return array Array of link text and url + */ + private function get_link_info_for_term( $term ) { + $link = array(); + + $bctitle = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'bctitle' ); + if ( ! is_string( $bctitle ) || $bctitle === '' ) { + $bctitle = $term->name; + } + + $link['url'] = get_term_link( $term ); + $link['text'] = $bctitle; + + return $link; + } + + /** + * Retrieve link url and text based on post type + * + * @param string $pt Post type. + * + * @return array Array of link text and url + */ + private function get_link_info_for_ptarchive( $pt ) { + $link = array(); + $archive_title = ''; + + if ( isset( $this->options[ 'bctitle-ptarchive-' . $pt ] ) && $this->options[ 'bctitle-ptarchive-' . $pt ] !== '' ) { + + $archive_title = $this->options[ 'bctitle-ptarchive-' . $pt ]; + } + else { + $post_type_obj = get_post_type_object( $pt ); + if ( is_object( $post_type_obj ) ) { + if ( isset( $post_type_obj->label ) && $post_type_obj->label !== '' ) { + $archive_title = $post_type_obj->label; + } + elseif ( isset( $post_type_obj->labels->menu_name ) && $post_type_obj->labels->menu_name !== '' ) { + $archive_title = $post_type_obj->labels->menu_name; + } + else { + $archive_title = $post_type_obj->name; + } + } + } + + $link['url'] = get_post_type_archive_link( $pt ); + $link['text'] = $archive_title; + + return $link; + } + + + /** + * Create a breadcrumb element string + * + * @todo The `$paged` variable only works for archives, not for paged articles, so this does not work + * for paged article at this moment. + * + * @param array $link Link info array containing the keys: + * 'text' => (string) link text + * 'url' => (string) link url + * (optional) 'title' => (string) link title attribute text + * (optional) 'allow_html' => (bool) whether to (not) escape html in the link text + * This prevents html stripping from the text strings set in the + * WPSEO -> Internal Links options page. + * @param int $i Index for the current breadcrumb. + * + * @return string + */ + private function crumb_to_link( $link, $i ) { + $link_output = ''; + + if ( isset( $link['text'] ) && ( is_string( $link['text'] ) && $link['text'] !== '' ) ) { + + $link['text'] = trim( $link['text'] ); + if ( ! isset( $link['allow_html'] ) || $link['allow_html'] !== true ) { + $link['text'] = esc_html( $link['text'] ); + } + + $inner_elm = 'span'; + if ( $this->options['breadcrumbs-boldlast'] === true && $i === ( $this->crumb_count - 1 ) ) { + $inner_elm = 'strong'; + } + + if ( ( isset( $link['url'] ) && ( is_string( $link['url'] ) && $link['url'] !== '' ) ) && + ( $i < ( $this->crumb_count - 1 ) ) + ) { + if ( $i === 0 ) { + $link_output .= '<' . $this->element . ' typeof="v:Breadcrumb">'; + } + else { + $link_output .= '<' . $this->element . ' rel="v:child" typeof="v:Breadcrumb">'; + } + $title_attr = isset( $link['title'] ) ? ' title="' . esc_attr( $link['title'] ) . '"' : ''; + $link_output .= '' . $link['text'] . ''; + } + else { + $link_output .= '<' . $inner_elm . ' class="breadcrumb_last">' . $link['text'] . ''; + // This is the last element, now close all previous elements. + while ( $i > 0 ) { + $link_output .= 'element . '>'; + $i--; + } + } + } + + /** + * Filter: 'wpseo_breadcrumb_single_link' - Allow changing of each link being put out by the Yoast SEO breadcrumbs class + * + * @api string $link_output The output string + * + * @param array $link The link array. + */ + + return apply_filters( 'wpseo_breadcrumb_single_link', $link_output, $link ); + } + + + /** + * Create a complete breadcrumb string from an array of breadcrumb element strings + */ + private function links_to_string() { + if ( is_array( $this->links ) && $this->links !== array() ) { + // Remove any effectively empty links. + $links = array_map( 'trim', $this->links ); + $links = array_filter( $links ); + + $this->output = implode( $this->separator, $links ); + } + } + + /** + * Wrap a complete breadcrumb string in a Breadcrumb RDFA wrapper + */ + private function wrap_breadcrumb() { + if ( is_string( $this->output ) && $this->output !== '' ) { + $output = '<' . $this->wrapper . $this->get_output_id() . $this->get_output_class() . ' xmlns:v="http://rdf.data-vocabulary.org/#">' . $this->output . 'wrapper . '>'; + + /** + * Filter: 'wpseo_breadcrumb_output' - Allow changing the HTML output of the Yoast SEO breadcrumbs class + * + * @api string $unsigned HTML output + */ + $output = apply_filters( 'wpseo_breadcrumb_output', $output ); + + if ( $this->options['breadcrumbs-prefix'] !== '' ) { + $output = "\t" . $this->options['breadcrumbs-prefix'] . "\n" . $output; + } + + $this->output = $output; + } + } + + + /** + * Filter: 'wpseo_breadcrumb_output_id' - Allow changing the HTML ID on the Yoast SEO breadcrumbs wrapper element + * + * @api string $unsigned ID to add to the wrapper element + */ + private function get_output_id() { + $id = apply_filters( 'wpseo_breadcrumb_output_id', '' ); + if ( is_string( $id ) && '' !== $id ) { + $id = ' id="' . esc_attr( $id ) . '"'; + } + + return $id; + } + + /** + * Filter: 'wpseo_breadcrumb_output_class' - Allow changing the HTML class on the Yoast SEO breadcrumbs wrapper element + * + * @api string $unsigned class to add to the wrapper element + */ + private function get_output_class() { + $class = apply_filters( 'wpseo_breadcrumb_output_class', '' ); + if ( is_string( $class ) && '' !== $class ) { + $class = ' class="' . esc_attr( $class ) . '"'; + } + + return $class; + } + + + /********************** DEPRECATED METHODS **********************/ + + /** + * Wrapper function for the breadcrumb so it can be output for the supported themes. + * + * @deprecated 1.5.0 + */ + public function breadcrumb_output() { + _deprecated_function( __METHOD__, '1.5.0', 'yoast_breadcrumb' ); + self::breadcrumb( '
    ', '
    ' ); + } + + /** + * Take the links array and return a full breadcrumb string. + * + * @deprecated 1.5.2.3 + * + * @param string $links Unused. + * @param string $wrapper Unused. + * @param string $element Unused. + * + * @return void + */ + public function create_breadcrumbs_string( $links, $wrapper = 'span', $element = 'span' ) { + _deprecated_function( __METHOD__, 'WPSEO 1.5.2.3', 'yoast_breadcrumbs' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/frontend/class-frontend.php b/wp-content/plugins/wordpress-seo/frontend/class-frontend.php new file mode 100644 index 0000000..eaeff89 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/class-frontend.php @@ -0,0 +1,1939 @@ +options = WPSEO_Options::get_options( $this->required_options ); + + add_action( 'wp_head', array( $this, 'front_page_specific_init' ), 0 ); + add_action( 'wp_head', array( $this, 'head' ), 1 ); + + // The head function here calls action wpseo_head, to which we hook all our functionality. + add_action( 'wpseo_head', array( $this, 'debug_marker' ), 2 ); + add_action( 'wpseo_head', array( $this, 'metadesc' ), 6 ); + add_action( 'wpseo_head', array( $this, 'robots' ), 10 ); + add_action( 'wpseo_head', array( $this, 'metakeywords' ), 11 ); + add_action( 'wpseo_head', array( $this, 'canonical' ), 20 ); + add_action( 'wpseo_head', array( $this, 'adjacent_rel_links' ), 21 ); + add_action( 'wpseo_head', array( $this, 'publisher' ), 22 ); + + // Remove actions that we will handle through our wpseo_head call, and probably change the output of. + remove_action( 'wp_head', 'rel_canonical' ); + remove_action( 'wp_head', 'index_rel_link' ); + remove_action( 'wp_head', 'start_post_rel_link' ); + remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' ); + remove_action( 'wp_head', 'noindex', 1 ); + + // When using WP 4.4, just use the new hook. + add_filter( 'pre_get_document_title', array( $this, 'title' ), 15 ); + add_filter( 'wp_title', array( $this, 'title' ), 15, 3 ); + + add_filter( 'thematic_doctitle', array( $this, 'title' ), 15 ); + + add_action( 'wp', array( $this, 'page_redirect' ), 99 ); + + add_action( 'template_redirect', array( $this, 'noindex_feed' ) ); + + add_filter( 'loginout', array( $this, 'nofollow_link' ) ); + add_filter( 'register', array( $this, 'nofollow_link' ) ); + + // Fix the WooThemes woo_title() output. + add_filter( 'woo_title', array( $this, 'fix_woo_title' ), 99 ); + + if ( $this->options['disable-date'] === true || + $this->options['disable-author'] === true || + $this->options['disable-post_format'] === true + ) { + add_action( 'wp', array( $this, 'archive_redirect' ) ); + } + if ( $this->options['redirectattachment'] === true ) { + add_action( 'template_redirect', array( $this, 'attachment_redirect' ), 1 ); + } + + /* + * The setting to get here has been deprecated, but don't remove the code as that would break + * the functionality for those that still have it! + */ + if ( $this->options['trailingslash'] === true ) { + add_filter( 'user_trailingslashit', array( $this, 'add_trailingslash' ), 10, 2 ); + } + if ( $this->options['cleanpermalinks'] === true ) { + add_action( 'template_redirect', array( $this, 'clean_permalink' ), 1 ); + } + if ( $this->options['cleanreplytocom'] === true ) { + add_filter( 'comment_reply_link', array( $this, 'remove_reply_to_com' ) ); + add_action( 'template_redirect', array( $this, 'replytocom_redirect' ), 1 ); + } + add_filter( 'the_content_feed', array( $this, 'embed_rssfooter' ) ); + add_filter( 'the_excerpt_rss', array( $this, 'embed_rssfooter_excerpt' ) ); + + // For WordPress functions below 4.4. + if ( ! current_theme_supports( 'title-tag' ) && $this->options['forcerewritetitle'] === true ) { + add_action( 'template_redirect', array( $this, 'force_rewrite_output_buffer' ), 99999 ); + add_action( 'wp_footer', array( $this, 'flush_cache' ), - 1 ); + } + + if ( $this->options['title_test'] > 0 ) { + add_filter( 'wpseo_title', array( $this, 'title_test_helper' ) ); + } + + $primary_category = new WPSEO_Frontend_Primary_Category(); + $primary_category->register_hooks(); + + $this->hooks = array( $primary_category ); + } + + /** + * Initialize the functions that only need to run on the frontpage + */ + public function front_page_specific_init() { + if ( ! is_front_page() ) { + return; + } + + new WPSEO_JSON_LD; + add_action( 'wpseo_head', array( $this, 'webmaster_tools_authentication' ), 90 ); + } + + /** + * Resets the entire class so canonicals, titles etc can be regenerated. + */ + public function reset() { + foreach ( get_class_vars( __CLASS__ ) as $name => $default ) { + if ( $name == 'instance' ) { + self::$instance = null; + } + else { + $this->$name = $default; + } + } + $this->options = WPSEO_Options::get_options( $this->required_options ); + } + + /** + * Get the singleton instance of this class + * + * @return WPSEO_Frontend + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Override Woo's title with our own. + * + * @param string $title Title string. + * + * @return string + */ + public function fix_woo_title( $title ) { + return $this->title( $title ); + } + + /** + * Determine whether this is the homepage and shows posts. + * + * @return bool + */ + public function is_home_posts_page() { + return ( is_home() && 'posts' == get_option( 'show_on_front' ) ); + } + + /** + * Determine whether the this is the static frontpage. + * + * @return bool + */ + public function is_home_static_page() { + return ( is_front_page() && 'page' == get_option( 'show_on_front' ) && is_page( get_option( 'page_on_front' ) ) ); + } + + /** + * Determine whether this is the posts page, when it's not the frontpage. + * + * @return bool + */ + public function is_posts_page() { + return ( is_home() && 'page' == get_option( 'show_on_front' ) ); + } + + /** + * Used for static home and posts pages as well as singular titles. + * + * @param object|null $object If filled, object to get the title for. + * + * @return string + */ + public function get_content_title( $object = null ) { + if ( is_null( $object ) ) { + $object = $GLOBALS['wp_query']->get_queried_object(); + } + + if ( is_object( $object ) ) { + $title = WPSEO_Meta::get_value( 'title', $object->ID ); + + if ( $title !== '' ) { + return wpseo_replace_vars( $title, $object ); + } + + $post_type = ( isset( $object->post_type ) ? $object->post_type : $object->query_var ); + + return $this->get_title_from_options( 'title-' . $post_type, $object ); + } + + return $this->get_title_from_options( 'title-404-wpseo' ); + } + + /** + * Used for category, tag, and tax titles. + * + * @return string + */ + public function get_taxonomy_title() { + $object = $GLOBALS['wp_query']->get_queried_object(); + + $title = WPSEO_Taxonomy_Meta::get_term_meta( $object, $object->taxonomy, 'title' ); + + if ( is_string( $title ) && $title !== '' ) { + return wpseo_replace_vars( $title, $object ); + } + else { + return $this->get_title_from_options( 'title-tax-' . $object->taxonomy, $object ); + } + } + + /** + * Used for author titles. + * + * @return string + */ + public function get_author_title() { + $author_id = get_query_var( 'author' ); + $title = trim( get_the_author_meta( 'wpseo_title', $author_id ) ); + + if ( $title !== '' ) { + return wpseo_replace_vars( $title, array() ); + } + + return $this->get_title_from_options( 'title-author-wpseo' ); + } + + /** + * Simple function to use to pull data from $options. + * + * All titles pulled from options will be run through the wpseo_replace_vars function. + * + * @param string $index name of the page to get the title from the settings for. + * @param object|array $var_source possible object to pull variables from. + * + * @return string + */ + public function get_title_from_options( $index, $var_source = array() ) { + if ( ! isset( $this->options[ $index ] ) || $this->options[ $index ] === '' ) { + if ( is_singular() ) { + return wpseo_replace_vars( '%%title%% %%sep%% %%sitename%%', $var_source ); + } + else { + return ''; + } + } + else { + return wpseo_replace_vars( $this->options[ $index ], $var_source ); + } + } + + /** + * Get the default title for the current page. + * + * This is the fallback title generator used when a title hasn't been set for the specific content, taxonomy, author + * details, or in the options. It scrubs off any present prefix before or after the title (based on $seplocation) in + * order to prevent duplicate seperations from appearing in the title (this happens when a prefix is supplied to the + * wp_title call on singular pages). + * + * @param string $sep The separator used between variables. + * @param string $seplocation Whether the separator should be left or right. + * @param string $title Possible title that's already set. + * + * @return string + */ + public function get_default_title( $sep, $seplocation, $title = '' ) { + if ( 'right' == $seplocation ) { + $regex = '`\s*' . preg_quote( trim( $sep ), '`' ) . '\s*`u'; + } + else { + $regex = '`^\s*' . preg_quote( trim( $sep ), '`' ) . '\s*`u'; + } + $title = preg_replace( $regex, '', $title ); + + if ( ! is_string( $title ) || ( is_string( $title ) && $title === '' ) ) { + $title = get_bloginfo( 'name' ); + $title = $this->add_paging_to_title( $sep, $seplocation, $title ); + $title = $this->add_to_title( $sep, $seplocation, $title, strip_tags( get_bloginfo( 'description' ) ) ); + + return $title; + } + + $title = $this->add_paging_to_title( $sep, $seplocation, $title ); + $title = $this->add_to_title( $sep, $seplocation, $title, strip_tags( get_bloginfo( 'name' ) ) ); + + return $title; + } + + /** + * This function adds paging details to the title. + * + * @param string $sep Separator used in the title. + * @param string $seplocation Whether the separator should be left or right. + * @param string $title The title to append the paging info to. + * + * @return string + */ + public function add_paging_to_title( $sep, $seplocation, $title ) { + global $wp_query; + + if ( ! empty( $wp_query->query_vars['paged'] ) && $wp_query->query_vars['paged'] > 1 ) { + return $this->add_to_title( $sep, $seplocation, $title, $wp_query->query_vars['paged'] . '/' . $wp_query->max_num_pages ); + } + + return $title; + } + + /** + * Add part to title, while ensuring that the $seplocation variable is respected. + * + * @param string $sep Separator used in the title. + * @param string $seplocation Whether the separator should be left or right. + * @param string $title The title to append the title_part to. + * @param string $title_part The part to append to the title. + * + * @return string + */ + public function add_to_title( $sep, $seplocation, $title, $title_part ) { + if ( 'right' === $seplocation ) { + return $title . $sep . $title_part; + } + + return $title_part . $sep . $title; + } + + /** + * Main title function. + * + * @param string $title Title that might have already been set. + * @param string $separator Separator determined in theme (unused). + * @param string $separator_location Whether the separator should be left or right. + * + * @return string + */ + public function title( $title, $separator = '', $separator_location = '' ) { + if ( is_null( $this->title ) ) { + $this->title = $this->generate_title( $title, $separator_location ); + } + + return $this->title; + } + + /** + * Main title generation function. + * + * @param string $title Title that might have already been set. + * @param string $separator_location Whether the separator should be left or right. + * + * @return string + */ + private function generate_title( $title, $separator_location ) { + + if ( is_feed() ) { + return $title; + } + + $separator = wpseo_replace_vars( '%%sep%%', array() ); + $separator = ' ' . trim( $separator ) . ' '; + + if ( '' === trim( $separator_location ) ) { + $separator_location = ( is_rtl() ) ? 'left' : 'right'; + } + + // This needs to be kept track of in order to generate + // default titles for singular pages. + $original_title = $title; + + // This flag is used to determine if any additional + // processing should be done to the title after the + // main section of title generation completes. + $modified_title = true; + + // This variable holds the page-specific title part + // that is used to generate default titles. + $title_part = ''; + + if ( $this->is_home_static_page() ) { + $title = $this->get_content_title(); + } + elseif ( $this->is_home_posts_page() ) { + $title = $this->get_title_from_options( 'title-home-wpseo' ); + } + elseif ( $this->is_posts_page() ) { + $title = $this->get_content_title( get_post( get_option( 'page_for_posts' ) ) ); + } + elseif ( is_singular() ) { + $title = $this->get_content_title(); + + if ( ! is_string( $title ) || '' === $title ) { + $title_part = $original_title; + } + } + elseif ( is_search() ) { + $title = $this->get_title_from_options( 'title-search-wpseo' ); + + if ( ! is_string( $title ) || '' === $title ) { + $title_part = sprintf( __( 'Search for "%s"', 'wordpress-seo' ), esc_html( get_search_query() ) ); + } + } + elseif ( is_category() || is_tag() || is_tax() ) { + $title = $this->get_taxonomy_title(); + + if ( ! is_string( $title ) || '' === $title ) { + if ( is_category() ) { + $title_part = single_cat_title( '', false ); + } + elseif ( is_tag() ) { + $title_part = single_tag_title( '', false ); + } + else { + $title_part = single_term_title( '', false ); + if ( $title_part === '' ) { + $term = $GLOBALS['wp_query']->get_queried_object(); + $title_part = $term->name; + } + } + } + } + elseif ( is_author() ) { + $title = $this->get_author_title(); + + if ( ! is_string( $title ) || '' === $title ) { + $title_part = get_the_author_meta( 'display_name', get_query_var( 'author' ) ); + } + } + elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + + $title = $this->get_title_from_options( 'title-ptarchive-' . $post_type ); + + if ( ! is_string( $title ) || '' === $title ) { + $post_type_obj = get_post_type_object( $post_type ); + if ( isset( $post_type_obj->labels->menu_name ) ) { + $title_part = $post_type_obj->labels->menu_name; + } + elseif ( isset( $post_type_obj->name ) ) { + $title_part = $post_type_obj->name; + } + else { + $title_part = ''; // To be determined what this should be. + } + } + } + elseif ( is_archive() ) { + $title = $this->get_title_from_options( 'title-archive-wpseo' ); + + // @todo [JRF => Yoast] Should these not use the archive default if no title found ? + // WPSEO_Options::get_default( 'wpseo_titles', 'title-archive-wpseo' ) + // Replacement would be needed! + if ( empty( $title ) ) { + if ( is_month() ) { + $title_part = sprintf( __( '%s Archives', 'wordpress-seo' ), single_month_title( ' ', false ) ); + } + elseif ( is_year() ) { + $title_part = sprintf( __( '%s Archives', 'wordpress-seo' ), get_query_var( 'year' ) ); + } + elseif ( is_day() ) { + $title_part = sprintf( __( '%s Archives', 'wordpress-seo' ), get_the_date() ); + } + else { + $title_part = __( 'Archives', 'wordpress-seo' ); + } + } + } + elseif ( is_404() ) { + + $title = $this->get_title_from_options( 'title-404-wpseo' ); + + // @todo [JRF => Yoast] Should these not use the 404 default if no title found ? + // WPSEO_Options::get_default( 'wpseo_titles', 'title-404-wpseo' ) + // Replacement would be needed! + if ( empty( $title ) ) { + $title_part = __( 'Page not found', 'wordpress-seo' ); + } + } + else { + // In case the page type is unknown, leave the title alone. + $modified_title = false; + + // If you would like to generate a default title instead, + // the following code could be used + // $title_part = $title; + // instead of the line above. + } + + if ( ( $modified_title && empty( $title ) ) || ! empty( $title_part ) ) { + $title = $this->get_default_title( $separator, $separator_location, $title_part ); + } + + if ( defined( 'ICL_LANGUAGE_CODE' ) && false !== strpos( $title, ICL_LANGUAGE_CODE ) ) { + $title = str_replace( ' @' . ICL_LANGUAGE_CODE, '', $title ); + } + + /** + * Filter: 'wpseo_title' - Allow changing the Yoast SEO output + * + * @api string $title The page title being put out. + */ + + return esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) ); + } + + /** + * Function used when title needs to be force overridden. + * + * @return string + */ + function force_wp_title() { + global $wp_query; + $old_wp_query = null; + + if ( ! $wp_query->is_main_query() ) { + $old_wp_query = $wp_query; + wp_reset_query(); + } + + $title = $this->title( '' ); + + if ( ! empty( $old_wp_query ) ) { + $GLOBALS['wp_query'] = $old_wp_query; + unset( $old_wp_query ); + } + + return $title; + } + + /** + * Outputs or returns the debug marker, which is also used for title replacement when force rewrite is active. + * + * @param bool $echo Whether or not to echo the debug marker. + * + * @return string + */ + public function debug_marker( $echo = true ) { + $marker = sprintf( + '<!-- This site is optimized with the ' . $this->head_product_name() . '%1$s - https://yoast.com/wordpress/plugins/seo/ -->', + /** + * Filter: 'wpseo_hide_version' - can be used to hide the Yoast SEO version in the debug marker (only available in Yoast SEO Premium) + * + * @api bool + */ + ( ( apply_filters( 'wpseo_hide_version', false ) && $this->is_premium() ) ? '' : ' v' . WPSEO_VERSION ) + ); + + if ( $echo === false ) { + return $marker; + } + else { + echo "\n${marker}\n"; + } + } + + /** + * Output Webmaster Tools authentication strings + */ + public function webmaster_tools_authentication() { + // Bing. + if ( $this->options['msverify'] !== '' ) { + echo '<meta name="msvalidate.01" content="' . esc_attr( $this->options['msverify'] ) . "\" />\n"; + } + + // Google. + if ( $this->options['googleverify'] !== '' ) { + echo '<meta name="google-site-verification" content="' . esc_attr( $this->options['googleverify'] ) . "\" />\n"; + } + + // Pinterest. + if ( $this->options['pinterestverify'] !== '' ) { + echo '<meta name="p:domain_verify" content="' . esc_attr( $this->options['pinterestverify'] ) . "\" />\n"; + } + + // Yandex. + if ( $this->options['yandexverify'] !== '' ) { + echo '<meta name="yandex-verification" content="' . esc_attr( $this->options['yandexverify'] ) . "\" />\n"; + } + } + + /** + * Main wrapper function attached to wp_head. This combines all the output on the frontend of the Yoast SEO plugin. + */ + public function head() { + global $wp_query; + + $old_wp_query = null; + + if ( ! $wp_query->is_main_query() ) { + $old_wp_query = $wp_query; + wp_reset_query(); + } + + /** + * Action: 'wpseo_head' - Allow other plugins to output inside the Yoast SEO section of the head section. + */ + do_action( 'wpseo_head' ); + + echo '<!-- / ', $this->head_product_name(), ". -->\n\n"; + + if ( ! empty( $old_wp_query ) ) { + $GLOBALS['wp_query'] = $old_wp_query; + unset( $old_wp_query ); + } + + return; + } + + + /** + * Output the meta robots value. + * + * @return string + */ + public function robots() { + global $wp_query, $post; + + $robots = array(); + $robots['index'] = 'index'; + $robots['follow'] = 'follow'; + $robots['other'] = array(); + + if ( is_singular() && is_object( $post ) ) { + + $option_name = 'noindex-' . $post->post_type; + $noindex = isset( $this->options[ $option_name ] ) && $this->options[ $option_name ] === true; + $private = 'private' === $post->post_status; + + if ( $noindex || $private ) { + $robots['index'] = 'noindex'; + } + + $robots = $this->robots_for_single_post( $robots ); + + } + else { + if ( is_search() || is_404() ) { + $robots['index'] = 'noindex'; + } + elseif ( is_tax() || is_tag() || is_category() ) { + $term = $wp_query->get_queried_object(); + if ( is_object( $term ) && ( isset( $this->options[ 'noindex-tax-' . $term->taxonomy ] ) && $this->options[ 'noindex-tax-' . $term->taxonomy ] === true ) ) { + $robots['index'] = 'noindex'; + } + + // Three possible values, index, noindex and default, do nothing for default. + $term_meta = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'noindex' ); + if ( is_string( $term_meta ) && 'default' !== $term_meta ) { + $robots['index'] = $term_meta; + } + + if ( $this->is_multiple_terms_query() ) { + $robots['index'] = 'noindex'; + } + } + elseif ( + ( is_author() && $this->options['noindex-author-wpseo'] === true ) || + ( is_date() && $this->options['noindex-archive-wpseo'] === true ) + ) { + $robots['index'] = 'noindex'; + } + elseif ( is_home() ) { + if ( get_query_var( 'paged' ) > 1 && $this->options['noindex-subpages-wpseo'] === true ) { + $robots['index'] = 'noindex'; + } + + $page_for_posts = get_option( 'page_for_posts' ); + if ( $page_for_posts ) { + $robots = $this->robots_for_single_post( $robots, $page_for_posts ); + } + unset( $page_for_posts ); + + } + elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + + if ( isset( $this->options[ 'noindex-ptarchive-' . $post_type ] ) && $this->options[ 'noindex-ptarchive-' . $post_type ] === true ) { + $robots['index'] = 'noindex'; + } + } + + $is_paged = isset( $wp_query->query_vars['paged'] ) && ( $wp_query->query_vars['paged'] && $wp_query->query_vars['paged'] > 1 ); + $noindex_subpages = $this->options['noindex-subpages-wpseo'] === true; + if ( $is_paged && $noindex_subpages ) { + $robots['index'] = 'noindex'; + } + + if ( $this->options['noodp'] === true ) { + $robots['other'][] = 'noodp'; + } + unset( $robot ); + } + + // Force override to respect the WP settings. + if ( '0' == get_option( 'blog_public' ) || isset( $_GET['replytocom'] ) ) { + $robots['index'] = 'noindex'; + } + + + $robotsstr = $robots['index'] . ',' . $robots['follow']; + + if ( $robots['other'] !== array() ) { + $robots['other'] = array_unique( $robots['other'] ); // TODO Most likely no longer needed, needs testing. + $robotsstr .= ',' . implode( ',', $robots['other'] ); + } + + $robotsstr = preg_replace( '`^index,follow,?`', '', $robotsstr ); + + /** + * Filter: 'wpseo_robots' - Allows filtering of the meta robots output of Yoast SEO + * + * @api string $robotsstr The meta robots directives to be echoed. + */ + $robotsstr = apply_filters( 'wpseo_robots', $robotsstr ); + + if ( is_string( $robotsstr ) && $robotsstr !== '' ) { + echo '<meta name="robots" content="', esc_attr( $robotsstr ), '"/>', "\n"; + } + + return $robotsstr; + } + + /** + * Determine $robots values for a single post + * + * @param array $robots Robots data array. + * @param int $post_id The post ID for which to determine the $robots values, defaults to current post. + * + * @return array + */ + public function robots_for_single_post( $robots, $post_id = 0 ) { + $noindex = WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ); + if ( $noindex === '1' ) { + $robots['index'] = 'noindex'; + } + elseif ( $noindex === '2' ) { + $robots['index'] = 'index'; + } + + if ( WPSEO_Meta::get_value( 'meta-robots-nofollow', $post_id ) === '1' ) { + $robots['follow'] = 'nofollow'; + } + + $meta_robots_adv = WPSEO_Meta::get_value( 'meta-robots-adv', $post_id ); + + if ( $meta_robots_adv !== '' && ( $meta_robots_adv !== '-' && $meta_robots_adv !== 'none' ) ) { + $meta_robots_adv = explode( ',', $meta_robots_adv ); + foreach ( $meta_robots_adv as $robot ) { + $robots['other'][] = $robot; + } + unset( $robot ); + } + elseif ( $meta_robots_adv === '' || $meta_robots_adv === '-' ) { + if ( $this->options['noodp'] === true ) { + $robots['other'][] = 'noodp'; + } + } + unset( $meta_robots_adv ); + + return $robots; + } + + /** + * This function normally outputs the canonical but is also used in other places to retrieve + * the canonical URL for the current page. + * + * @param bool $echo Whether or not to output the canonical element. + * @param bool $un_paged Whether or not to return the canonical with or without pagination added to the URL. + * @param bool $no_override Whether or not to return a manually overridden canonical. + * + * @return string $canonical + */ + public function canonical( $echo = true, $un_paged = false, $no_override = false ) { + if ( is_null( $this->canonical ) ) { + $this->generate_canonical(); + } + + $canonical = $this->canonical; + + if ( $un_paged ) { + $canonical = $this->canonical_unpaged; + } + elseif ( $no_override ) { + $canonical = $this->canonical_no_override; + } + + if ( $echo === false ) { + return $canonical; + } + + if ( is_string( $canonical ) && '' !== $canonical ) { + echo '<link rel="canonical" href="' . esc_url( $canonical, null, 'other' ) . '" />' . "\n"; + } + } + + /** + * This function normally outputs the canonical but is also used in other places to retrieve + * the canonical URL for the current page. + * + * @return void + */ + private function generate_canonical() { + $canonical = false; + $canonical_override = false; + + // Set decent canonicals for homepage, singulars and taxonomy pages. + if ( is_singular() ) { + $obj = get_queried_object(); + $canonical = get_permalink( $obj->ID ); + + $this->canonical_unpaged = $canonical; + + $canonical_override = WPSEO_Meta::get_value( 'canonical' ); + + // Fix paginated pages canonical, but only if the page is truly paginated. + if ( get_query_var( 'page' ) > 1 ) { + $num_pages = ( substr_count( $obj->post_content, '<!--nextpage-->' ) + 1 ); + if ( $num_pages && get_query_var( 'page' ) <= $num_pages ) { + if ( ! $GLOBALS['wp_rewrite']->using_permalinks() ) { + $canonical = add_query_arg( 'page', get_query_var( 'page' ), $canonical ); + } + else { + $canonical = user_trailingslashit( trailingslashit( $canonical ) . get_query_var( 'page' ) ); + } + } + } + } + else { + if ( is_search() ) { + $search_query = get_search_query(); + + // Regex catches case when /search/page/N without search term is itself mistaken for search term. R. + if ( ! empty( $search_query ) && ! preg_match( '|^page/\d+$|', $search_query ) ) { + $canonical = get_search_link(); + } + } + elseif ( is_front_page() ) { + $canonical = WPSEO_Utils::home_url(); + } + elseif ( $this->is_posts_page() ) { + + $posts_page_id = get_option( 'page_for_posts' ); + $canonical = WPSEO_Meta::get_value( 'canonical', $posts_page_id ); + + if ( empty( $canonical ) ) { + $canonical = get_permalink( $posts_page_id ); + } + } + elseif ( is_tax() || is_tag() || is_category() ) { + + $term = get_queried_object(); + + if ( ! empty( $term ) && ! $this->is_multiple_terms_query() ) { + + $canonical_override = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'canonical' ); + $term_link = get_term_link( $term, $term->taxonomy ); + + if ( ! is_wp_error( $term_link ) ) { + $canonical = $term_link; + } + } + } + elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + $canonical = get_post_type_archive_link( $post_type ); + } + elseif ( is_author() ) { + $canonical = get_author_posts_url( get_query_var( 'author' ), get_query_var( 'author_name' ) ); + } + elseif ( is_archive() ) { + if ( is_date() ) { + if ( is_day() ) { + $canonical = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) ); + } + elseif ( is_month() ) { + $canonical = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) ); + } + elseif ( is_year() ) { + $canonical = get_year_link( get_query_var( 'year' ) ); + } + } + } + + $this->canonical_unpaged = $canonical; + + if ( $canonical && get_query_var( 'paged' ) > 1 ) { + global $wp_rewrite; + if ( ! $wp_rewrite->using_permalinks() ) { + if ( is_front_page() ) { + $canonical = trailingslashit( $canonical ); + } + $canonical = add_query_arg( 'paged', get_query_var( 'paged' ), $canonical ); + } + else { + if ( is_front_page() ) { + $canonical = WPSEO_Sitemaps_Router::get_base_url( '' ); + } + $canonical = user_trailingslashit( trailingslashit( $canonical ) . trailingslashit( $wp_rewrite->pagination_base ) . get_query_var( 'paged' ) ); + } + } + } + + $this->canonical_no_override = $canonical; + + if ( is_string( $canonical ) && $canonical !== '' ) { + // Force canonical links to be absolute, relative is NOT an option. + if ( WPSEO_Utils::is_url_relative( $canonical ) === true ) { + $canonical = $this->base_url( $canonical ); + } + } + + if ( is_string( $canonical_override ) && $canonical_override !== '' ) { + $canonical = $canonical_override; + } + + /** + * Filter: 'wpseo_canonical' - Allow filtering of the canonical URL put out by Yoast SEO + * + * @api string $canonical The canonical URL + */ + $this->canonical = apply_filters( 'wpseo_canonical', $canonical ); + } + + /** + * Parse the home URL setting to find the base URL for relative URLs. + * + * @param string $path Optional path string. + * + * @return string + */ + private function base_url( $path = null ) { + $url = get_option( 'home' ); + + $parts = wp_parse_url( $url ); + + $base_url = trailingslashit( $parts['scheme'] . '://' . $parts['host'] ); + + if ( ! is_null( $path ) ) { + $base_url .= ltrim( $path, '/' ); + } + + return $base_url; + } + + /** + * Adds 'prev' and 'next' links to archives. + * + * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html + * @since 1.0.3 + */ + public function adjacent_rel_links() { + // Don't do this for Genesis, as the way Genesis handles homepage functionality is different and causes issues sometimes. + /** + * Filter 'wpseo_genesis_force_adjacent_rel_home' - Allows devs to allow echoing rel="next" / rel="prev" by Yoast SEO on Genesis installs + * + * @api bool $unsigned Whether or not to rel=next / rel=prev + */ + if ( is_home() && function_exists( 'genesis' ) && apply_filters( 'wpseo_genesis_force_adjacent_rel_home', false ) === false ) { + return; + } + + global $wp_query; + + if ( ! is_singular() ) { + $url = $this->canonical( false, true, true ); + + if ( is_string( $url ) && $url !== '' ) { + $paged = get_query_var( 'paged' ); + + if ( 0 == $paged ) { + $paged = 1; + } + + if ( $paged == 2 ) { + $this->adjacent_rel_link( 'prev', $url, ( $paged - 1 ), true ); + } + + // Make sure to use index.php when needed, done after paged == 2 check so the prev links to homepage will not have index.php erroneously. + if ( is_front_page() ) { + $url = WPSEO_Sitemaps_Router::get_base_url( '' ); + } + + if ( $paged > 2 ) { + $this->adjacent_rel_link( 'prev', $url, ( $paged - 1 ), true ); + } + + if ( $paged < $wp_query->max_num_pages ) { + $this->adjacent_rel_link( 'next', $url, ( $paged + 1 ), true ); + } + } + } + else { + $numpages = 0; + if ( isset( $wp_query->post->post_content ) ) { + $numpages = ( substr_count( $wp_query->post->post_content, '<!--nextpage-->' ) + 1 ); + } + if ( $numpages > 1 ) { + $page = get_query_var( 'page' ); + if ( ! $page ) { + $page = 1; + } + + $url = get_permalink( $wp_query->post->ID ); + + // If the current page is the frontpage, pagination should use /base/. + if ( $this->is_home_static_page() ) { + $usebase = true; + } + else { + $usebase = false; + } + + if ( $page > 1 ) { + $this->adjacent_rel_link( 'prev', $url, ( $page - 1 ), $usebase, 'single_paged' ); + } + if ( $page < $numpages ) { + $this->adjacent_rel_link( 'next', $url, ( $page + 1 ), $usebase, 'single_paged' ); + } + } + } + } + + /** + * Get adjacent pages link for archives + * + * @since 1.0.2 + * + * @param string $rel Link relationship, prev or next. + * @param string $url the un-paginated URL of the current archive. + * @param string $page the page number to add on to $url for the $link tag. + * @param boolean $incl_pagination_base whether or not to include /page/ or not. + * + * @return void + */ + private function adjacent_rel_link( $rel, $url, $page, $incl_pagination_base ) { + global $wp_rewrite; + if ( ! $wp_rewrite->using_permalinks() ) { + if ( $page > 1 ) { + $url = add_query_arg( 'paged', $page, $url ); + } + } + else { + if ( $page > 1 ) { + $base = ''; + if ( $incl_pagination_base ) { + $base = trailingslashit( $wp_rewrite->pagination_base ); + } + $url = user_trailingslashit( trailingslashit( $url ) . $base . $page ); + } + } + /** + * Filter: 'wpseo_' . $rel . '_rel_link' - Allow changing link rel output by Yoast SEO + * + * @api string $unsigned The full `<link` element. + */ + $link = apply_filters( 'wpseo_' . $rel . '_rel_link', '<link rel="' . esc_attr( $rel ) . '" href="' . esc_url( $url ) . "\" />\n" ); + + if ( is_string( $link ) && $link !== '' ) { + echo $link; + } + } + + /** + * Output the rel=publisher code on every page of the site. + * + * @return boolean Boolean indicating whether the publisher link was printed + */ + public function publisher() { + + if ( $this->options['plus-publisher'] !== '' ) { + echo '<link rel="publisher" href="', esc_url( $this->options['plus-publisher'] ), '"/>', "\n"; + + return true; + } + + return false; + } + + /** + * Outputs the meta keywords element. + * + * @return void + */ + public function metakeywords() { + global $wp_query, $post; + + if ( $this->options['usemetakeywords'] === false ) { + return; + } + + $keywords = ''; + + if ( is_singular() ) { + $keywords = WPSEO_Meta::get_value( 'metakeywords' ); + if ( $keywords === '' && ( is_object( $post ) && ( ( isset( $this->options[ 'metakey-' . $post->post_type ] ) && $this->options[ 'metakey-' . $post->post_type ] !== '' ) ) ) ) { + $keywords = wpseo_replace_vars( $this->options[ 'metakey-' . $post->post_type ], $post ); + } + } + else { + if ( $this->is_home_posts_page() && $this->options['metakey-home-wpseo'] !== '' ) { + $keywords = wpseo_replace_vars( $this->options['metakey-home-wpseo'], array() ); + } + elseif ( $this->is_home_static_page() ) { + $keywords = WPSEO_Meta::get_value( 'metakeywords' ); + if ( $keywords === '' && ( is_object( $post ) && ( isset( $this->options[ 'metakey-' . $post->post_type ] ) && $this->options[ 'metakey-' . $post->post_type ] !== '' ) ) ) { + $keywords = wpseo_replace_vars( $this->options[ 'metakey-' . $post->post_type ], $post ); + } + } + elseif ( $this->is_posts_page() ) { + $keywords = $this->get_keywords( get_post( get_option( 'page_for_posts' ) ) ); + } + elseif ( is_category() || is_tag() || is_tax() ) { + $term = $wp_query->get_queried_object(); + + if ( is_object( $term ) ) { + $keywords = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'metakey' ); + if ( ( ! is_string( $keywords ) || $keywords === '' ) && ( isset( $this->options[ 'metakey-tax-' . $term->taxonomy ] ) && $this->options[ 'metakey-tax-' . $term->taxonomy ] !== '' ) ) { + $keywords = wpseo_replace_vars( $this->options[ 'metakey-tax-' . $term->taxonomy ], $term ); + } + } + } + elseif ( is_author() ) { + $author_id = get_query_var( 'author' ); + $keywords = get_the_author_meta( 'metakey', $author_id ); + if ( ! $keywords && $this->options['metakey-author-wpseo'] !== '' ) { + $keywords = wpseo_replace_vars( $this->options['metakey-author-wpseo'], $wp_query->get_queried_object() ); + } + } + elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + if ( isset( $this->options[ 'metakey-ptarchive-' . $post_type ] ) && $this->options[ 'metakey-ptarchive-' . $post_type ] !== '' ) { + $keywords = wpseo_replace_vars( $this->options[ 'metakey-ptarchive-' . $post_type ], $wp_query->get_queried_object() ); + } + } + } + + $keywords = apply_filters( 'wpseo_metakey', trim( $keywords ) ); // TODO Make deprecated. + + /** + * Filter: 'wpseo_metakeywords' - Allow changing the Yoast SEO meta keywords + * + * @api string $keywords The meta keywords to be echoed. + */ + $keywords = apply_filters( 'wpseo_metakeywords', trim( $keywords ) ); // More appropriately named. + + if ( is_string( $keywords ) && $keywords !== '' ) { + echo '<meta name="keywords" content="', esc_attr( strip_tags( stripslashes( $keywords ) ) ), '"/>', "\n"; + } + } + + /** + * Outputs the meta description element or returns the description text. + * + * @param bool $echo Echo or return output flag. + * + * @return string + */ + public function metadesc( $echo = true ) { + if ( is_null( $this->metadesc ) ) { + $this->generate_metadesc(); + } + + if ( $echo !== false ) { + if ( is_string( $this->metadesc ) && $this->metadesc !== '' ) { + echo '<meta name="description" content="', esc_attr( strip_tags( stripslashes( $this->metadesc ) ) ), '"/>', "\n"; + $this->add_robot_content_noodp( $this->metadesc ); + } + elseif ( current_user_can( 'manage_options' ) && is_singular() ) { + echo '<!-- ', __( 'Admin only notice: this page doesn\'t show a meta description because it doesn\'t have one, either write it for this page specifically or go into the SEO -> Titles menu and set up a template.', 'wordpress-seo' ), ' -->', "\n"; + } + } + else { + return $this->metadesc; + } + } + + /** + * Generates the meta description text. + */ + private function generate_metadesc() { + global $post, $wp_query; + + $metadesc = ''; + $metadesc_override = false; + $post_type = ''; + $template = ''; + + if ( is_object( $post ) && ( isset( $post->post_type ) && $post->post_type !== '' ) ) { + $post_type = $post->post_type; + } + + if ( is_singular() ) { + if ( ( $metadesc === '' && $post_type !== '' ) && isset( $this->options[ 'metadesc-' . $post_type ] ) ) { + $template = $this->options[ 'metadesc-' . $post_type ]; + $term = $post; + } + $metadesc_override = WPSEO_Meta::get_value( 'metadesc' ); + } + else { + if ( is_search() ) { + $metadesc = ''; + } + elseif ( $this->is_home_posts_page() ) { + $template = $this->options['metadesc-home-wpseo']; + $term = array(); + + if ( empty( $template ) ) { + $template = get_bloginfo( 'description' ); + } + } + elseif ( $this->is_posts_page() ) { + $metadesc = WPSEO_Meta::get_value( 'metadesc', get_option( 'page_for_posts' ) ); + if ( ( $metadesc === '' && $post_type !== '' ) && isset( $this->options[ 'metadesc-' . $post_type ] ) ) { + $page = get_post( get_option( 'page_for_posts' ) ); + $template = $this->options[ 'metadesc-' . $post_type ]; + $term = $page; + } + } + elseif ( $this->is_home_static_page() ) { + $metadesc = WPSEO_Meta::get_value( 'metadesc' ); + if ( ( $metadesc === '' && $post_type !== '' ) && isset( $this->options[ 'metadesc-' . $post_type ] ) ) { + $template = $this->options[ 'metadesc-' . $post_type ]; + } + } + elseif ( is_category() || is_tag() || is_tax() ) { + $term = $wp_query->get_queried_object(); + $metadesc_override = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'desc' ); + if ( is_object( $term ) && isset( $term->taxonomy, $this->options[ 'metadesc-tax-' . $term->taxonomy ] ) ) { + $template = $this->options[ 'metadesc-tax-' . $term->taxonomy ]; + } + } + elseif ( is_author() ) { + $author_id = get_query_var( 'author' ); + $metadesc = get_the_author_meta( 'wpseo_metadesc', $author_id ); + if ( ( ! is_string( $metadesc ) || $metadesc === '' ) && '' !== $this->options['metadesc-author-wpseo'] ) { + $template = $this->options['metadesc-author-wpseo']; + } + } + elseif ( is_post_type_archive() ) { + $post_type = get_query_var( 'post_type' ); + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + if ( isset( $this->options[ 'metadesc-ptarchive-' . $post_type ] ) ) { + $template = $this->options[ 'metadesc-ptarchive-' . $post_type ]; + } + } + elseif ( is_archive() ) { + $template = $this->options['metadesc-archive-wpseo']; + } + + // If we're on a paginated page, and the template doesn't change for paginated pages, bail. + if ( ( ! is_string( $metadesc ) || $metadesc === '' ) && get_query_var( 'paged' ) && get_query_var( 'paged' ) > 1 && $template !== '' ) { + if ( strpos( $template, '%%page' ) === false ) { + $metadesc = ''; + } + } + } + + $post_data = $post; + + if ( is_string( $metadesc_override ) && '' !== $metadesc_override ) { + $metadesc = $metadesc_override; + if ( isset( $term ) ) { + $post_data = $term; + } + } + else if ( ( ! is_string( $metadesc ) || '' === $metadesc ) && '' !== $template ) { + if ( ! isset( $term ) ) { + $term = $wp_query->get_queried_object(); + } + + $metadesc = $template; + $post_data = $term; + } + + $metadesc = wpseo_replace_vars( $metadesc, $post_data ); + + /** + * Filter: 'wpseo_metadesc' - Allow changing the Yoast SEO meta description sentence. + * + * @api string $metadesc The description sentence. + */ + $this->metadesc = apply_filters( 'wpseo_metadesc', trim( $metadesc ) ); + } + + /** + * Based on the redirect meta value, this function determines whether it should redirect the current post / page. + * + * @return boolean + */ + function page_redirect() { + if ( is_singular() ) { + global $post; + if ( ! isset( $post ) || ! is_object( $post ) ) { + return false; + } + + $redir = WPSEO_Meta::get_value( 'redirect', $post->ID ); + if ( $redir !== '' ) { + wp_redirect( $redir, 301 ); + exit; + } + } + + return false; + } + + /** + * Outputs noindex values for the current page. + */ + public function noindex_page() { + echo '<meta name="robots" content="noindex" />', "\n"; + } + + /** + * Send a Robots HTTP header preventing URL from being indexed in the search results while allowing search engines + * to follow the links in the object at the URL. + * + * @since 1.1.7 + * @return boolean Boolean indicating whether the noindex header was sent + */ + public function noindex_feed() { + + if ( ( is_feed() || is_robots() ) && headers_sent() === false ) { + header( 'X-Robots-Tag: noindex, follow', true ); + + return true; + } + + return false; + } + + /** + * Adds rel="nofollow" to a link, only used for login / registration links. + * + * @param string $input The link element as a string. + * + * @return string + */ + public function nofollow_link( $input ) { + return str_replace( '<a ', '<a rel="nofollow" ', $input ); + } + + /** + * When certain archives are disabled, this redirects those to the homepage. + * + * @return boolean False when no redirect was triggered + */ + function archive_redirect() { + global $wp_query; + + if ( + ( $this->options['disable-date'] === true && $wp_query->is_date ) || + ( $this->options['disable-author'] === true && $wp_query->is_author ) || + ( $this->options['disable-post_format'] === true && $wp_query->is_tax( 'post_format' ) ) + ) { + wp_safe_redirect( get_bloginfo( 'url' ), 301 ); + exit; + } + + return false; + } + + /** + * If the option to redirect attachments to their parent is checked, this performs the redirect. + * + * An extra check is done for when the attachment has no parent. + * + * @return boolean False when no redirect was triggered + */ + function attachment_redirect() { + global $post; + if ( is_attachment() && ( ( is_object( $post ) && isset( $post->post_parent ) ) && ( is_numeric( $post->post_parent ) && $post->post_parent != 0 ) ) ) { + wp_safe_redirect( get_permalink( $post->post_parent ), 301 ); + exit; + } + + return false; + } + + /** + * Trailing slashes for everything except is_single(). + * + * Thanks to Mark Jaquith for this code. + * + * @param string $url URL string. + * @param string $type Context (such as single). + * + * @return string + */ + function add_trailingslash( $url, $type ) { + if ( 'single' === $type || 'single_paged' === $type ) { + return $url; + } + else { + return trailingslashit( $url ); + } + } + + /** + * Removes the ?replytocom variable from the link, replacing it with a #comment-<number> anchor. + * + * @todo Should this function also allow for relative urls ? + * + * @param string $link The comment link as a string. + * + * @return string + */ + public function remove_reply_to_com( $link ) { + return preg_replace( '`href=(["\'])(?:.*(?:\?|&|&)replytocom=(\d+)#respond)`', 'href=$1#comment-$2', $link ); + } + + /** + * Redirect out the ?replytocom variables when cleanreplytocom is enabled + * + * @since 1.4.13 + * @return boolean + */ + function replytocom_redirect() { + + if ( isset( $_GET['replytocom'] ) && is_singular() ) { + $url = get_permalink( $GLOBALS['post']->ID ); + $hash = sanitize_text_field( $_GET['replytocom'] ); + $query_string = remove_query_arg( 'replytocom', sanitize_text_field( $_SERVER['QUERY_STRING'] ) ); + if ( ! empty( $query_string ) ) { + $url .= '?' . $query_string; + } + $url .= '#comment-' . $hash; + wp_safe_redirect( $url, 301 ); + exit; + } + + return false; + } + + /** + * Removes unneeded query variables from the URL. + * + * @return boolean + */ + public function clean_permalink() { + if ( is_robots() || get_query_var( 'sitemap' ) || empty( $_GET ) ) { + return false; + } + + global $wp_query; + + // Recreate current URL. + $cururl = 'http'; + if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) { + $cururl .= 's'; + } + $cururl .= '://'; + + if ( $_SERVER['SERVER_PORT'] != '80' && $_SERVER['SERVER_PORT'] != '443' ) { + $cururl .= $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI']; + } + else { + $cururl .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; + } + $properurl = ''; + + if ( is_singular() ) { + global $post; + if ( empty( $post ) ) { + $post = $wp_query->get_queried_object(); + } + + $properurl = get_permalink( $post->ID ); + + $page = get_query_var( 'page' ); + if ( $page && $page != 1 ) { + $post = get_post( $post->ID ); + $page_count = substr_count( $post->post_content, '<!--nextpage-->' ); + if ( $page > ( $page_count + 1 ) ) { + $properurl = user_trailingslashit( trailingslashit( $properurl ) . ( $page_count + 1 ) ); + } + else { + $properurl = user_trailingslashit( trailingslashit( $properurl ) . $page ); + } + } + + // Fix reply to comment links, whoever decided this should be a GET variable? + if ( preg_match( '`(\?replytocom=[^&]+)`', sanitize_text_field( $_SERVER['REQUEST_URI'] ), $matches ) ) { + $properurl .= str_replace( '?replytocom=', '#comment-', $matches[0] ); + } + unset( $matches ); + + // Prevent cleaning out posts & page previews for people capable of viewing them. + if ( isset( $_GET['preview'], $_GET['preview_nonce'] ) && current_user_can( 'edit_post' ) ) { + $properurl = ''; + } + } + elseif ( is_front_page() ) { + if ( $this->is_home_posts_page() ) { + $properurl = get_bloginfo( 'url' ) . '/'; + } + elseif ( $this->is_home_static_page() ) { + $properurl = get_permalink( $GLOBALS['post']->ID ); + } + } + elseif ( is_category() || is_tag() || is_tax() ) { + $term = $wp_query->get_queried_object(); + if ( is_feed() ) { + $properurl = get_term_feed_link( $term->term_id, $term->taxonomy ); + } + else { + $properurl = get_term_link( $term, $term->taxonomy ); + } + } + elseif ( is_search() ) { + $s = urlencode( preg_replace( '`(%20|\+)`', ' ', get_search_query() ) ); + $properurl = get_bloginfo( 'url' ) . '/?s=' . $s; + } + elseif ( is_404() ) { + if ( is_multisite() && ! is_subdomain_install() && is_main_site() ) { + if ( $cururl == get_bloginfo( 'url' ) . '/blog/' || $cururl == get_bloginfo( 'url' ) . '/blog' ) { + if ( $this->is_home_static_page() ) { + $properurl = get_permalink( get_option( 'page_for_posts' ) ); + } + else { + $properurl = get_bloginfo( 'url' ) . '/'; + } + } + } + } + + if ( ! empty( $properurl ) && $wp_query->query_vars['paged'] != 0 && $wp_query->post_count != 0 ) { + if ( is_search() && ! empty( $s ) ) { + $properurl = get_bloginfo( 'url' ) . '/page/' . $wp_query->query_vars['paged'] . '/?s=' . $s; + } + else { + $properurl = user_trailingslashit( trailingslashit( $properurl ) . 'page/' . $wp_query->query_vars['paged'] ); + } + } + + // Prevent cleaning out the WP Subscription managers interface for everyone. + if ( isset( $_GET['wp-subscription-manager'] ) ) { + $properurl = ''; + } + + /** + * Filter: 'wpseo_whitelist_permalink_vars' - Allow plugins to register their own variables not to clean + * + * @api array $unsigned Array of permalink variables _not_ to clean. Empty by default. + */ + $whitelisted_extravars = apply_filters( 'wpseo_whitelist_permalink_vars', array() ); + + if ( $this->options['cleanpermalink-googlesitesearch'] === true ) { + // Prevent cleaning out Google Site searches. + $whitelisted_extravars = array_merge( $whitelisted_extravars, array( + 'q', + 'cx', + 'debug', + 'cof', + 'ie', + 'sa', + ) ); + } + + if ( $this->options['cleanpermalink-googlecampaign'] === true ) { + // Prevent cleaning out Google Analytics campaign variables. + $whitelisted_extravars = array_merge( $whitelisted_extravars, array( + 'utm_campaign', + 'utm_medium', + 'utm_source', + 'utm_content', + 'utm_term', + 'utm_id', + 'gclid', + ) ); + } + + if ( $this->options['cleanpermalink-extravars'] !== '' ) { + $extravars = explode( ',', $this->options['cleanpermalink-extravars'] ); + $extravars = array_map( 'trim', $extravars ); + $whitelisted_extravars = array_merge( $whitelisted_extravars, $extravars ); + unset( $extravars ); + } + + foreach ( $whitelisted_extravars as $get ) { + if ( isset( $_GET[ trim( $get ) ] ) ) { + $properurl = ''; + } + } + unset( $get ); + + if ( ! empty( $properurl ) && $cururl != $properurl ) { + wp_safe_redirect( $properurl, 301 ); + exit; + } + } + + /** + * Replaces the possible RSS variables with their actual values. + * + * @param string $content The RSS content that should have the variables replaced. + * + * @return string + */ + function rss_replace_vars( $content ) { + global $post; + + /** + * Allow the developer to determine whether or not to follow the links in the bits Yoast SEO adds to the RSS feed, defaults to true. + * + * @api bool $unsigned Whether or not to follow the links in RSS feed, defaults to true. + * + * @since 1.4.20 + */ + $no_follow = apply_filters( 'nofollow_rss_links', true ); + $no_follow_attr = ''; + if ( $no_follow === true ) { + $no_follow_attr = 'rel="nofollow" '; + } + + $author_link = ''; + if ( is_object( $post ) ) { + $author_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_author_posts_url( $post->post_author ) ) . '">' . get_the_author() . '</a>'; + } + + $post_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_permalink() ) . '">' . get_the_title() . '</a>'; + $blog_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_bloginfo( 'url' ) ) . '">' . get_bloginfo( 'name' ) . '</a>'; + $blog_desc_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_bloginfo( 'url' ) ) . '">' . get_bloginfo( 'name' ) . ' - ' . strip_tags( get_bloginfo( 'description' ) ) . '</a>'; + + $content = stripslashes( trim( $content ) ); + $content = str_replace( '%%AUTHORLINK%%', $author_link, $content ); + $content = str_replace( '%%POSTLINK%%', $post_link, $content ); + $content = str_replace( '%%BLOGLINK%%', $blog_link, $content ); + $content = str_replace( '%%BLOGDESCLINK%%', $blog_desc_link, $content ); + + return $content; + } + + /** + * Adds the RSS footer (or header) to the full RSS feed item. + * + * @param string $content Feed item content. + * + * @return string + */ + function embed_rssfooter( $content ) { + return $this->embed_rss( $content, 'full' ); + } + + /** + * Adds the RSS footer (or header) to the excerpt RSS feed item. + * + * @param string $content Feed item excerpt. + * + * @return string + */ + function embed_rssfooter_excerpt( $content ) { + return $this->embed_rss( $content, 'excerpt' ); + } + + /** + * Adds the RSS footer and/or header to an RSS feed item. + * + * @since 1.4.14 + * + * @param string $content Feed item content. + * @param string $context Feed item context, either 'excerpt' or 'full'. + * + * @return string + */ + function embed_rss( $content, $context = 'full' ) { + + /** + * Filter: 'wpseo_include_rss_footer' - Allow the RSS footer to be dynamically shown/hidden. + * + * @api boolean $show_embed Indicates if the RSS footer should be shown or not + * + * @param string $context The context of the RSS content - 'full' or 'excerpt'. + */ + if ( ! apply_filters( 'wpseo_include_rss_footer', true, $context ) ) { + return $content; + } + + if ( is_feed() ) { + $before = ''; + $after = ''; + + if ( $this->options['rssbefore'] !== '' ) { + $before = wpautop( $this->rss_replace_vars( $this->options['rssbefore'] ) ); + } + if ( $this->options['rssafter'] !== '' ) { + $after = wpautop( $this->rss_replace_vars( $this->options['rssafter'] ) ); + } + if ( $before !== '' || $after !== '' ) { + if ( ( isset( $context ) && $context === 'excerpt' ) && trim( $content ) !== '' ) { + $content = wpautop( $content ); + } + $content = $before . $content . $after; + } + } + + return $content; + } + + + /** + * Used in the force rewrite functionality this retrieves the output, replaces the title with the proper SEO + * title and then flushes the output. + */ + function flush_cache() { + + global $wp_query; + + if ( $this->ob_started !== true ) { + return false; + } + + $content = ob_get_clean(); + + $old_wp_query = $wp_query; + + wp_reset_query(); + + $title = $this->title( '' ); + + // Find all titles, strip them out and add the new one in within the debug marker, so it's easily identified whether a site uses force rewrite. + $content = preg_replace( '/<title.*?\/title>/i', '', $content ); + $content = str_replace( $this->debug_marker( false ), $this->debug_marker( false ) . "\n" . '<title>' . $title . '', $content ); + + $GLOBALS['wp_query'] = $old_wp_query; + + echo $content; + + return true; + } + + /** + * Starts the output buffer so it can later be fixed by flush_cache() + */ + function force_rewrite_output_buffer() { + $this->ob_started = true; + ob_start(); + } + + /** + * Function used in testing whether the title should be force rewritten or not. + * + * @param string $title Title string. + * + * @return string + */ + function title_test_helper( $title ) { + $wpseo_titles = get_option( 'wpseo_titles' ); + + $wpseo_titles['title_test'] ++; + update_option( 'wpseo_titles', $wpseo_titles ); + + // Prevent this setting from being on forever when something breaks, as it breaks caching. + if ( $wpseo_titles['title_test'] > 5 ) { + $wpseo_titles['title_test'] = 0; + update_option( 'wpseo_titles', $wpseo_titles ); + + remove_filter( 'wpseo_title', array( $this, 'title_test_helper' ) ); + + return $title; + } + + if ( ! defined( 'DONOTCACHEPAGE' ) ) { + define( 'DONOTCACHEPAGE', true ); + } + if ( ! defined( 'DONOTCACHCEOBJECT' ) ) { + define( 'DONOTCACHCEOBJECT', true ); + } + if ( ! defined( 'DONOTMINIFY' ) ) { + define( 'DONOTMINIFY', true ); + } + + if ( $_SERVER['HTTP_USER_AGENT'] === "WordPress/{$GLOBALS['wp_version']}; " . get_bloginfo( 'url' ) . ' - Yoast' ) { + return 'This is a Yoast Test Title'; + } + + return $title; + } + + /** + * Get the product name in the head section + * + * @return string + */ + private function head_product_name() { + if ( $this->is_premium() ) { + return 'Yoast SEO Premium plugin'; + } + else { + return 'Yoast SEO plugin'; + } + } + + /** + * Check if this plugin is the premium version of WPSEO + * + * @return bool + */ + private function is_premium() { + return file_exists( WPSEO_PATH . 'premium/' ); + } + + /** + * Checks whether the user has written a meta-description. If written, makes sure meta robots content is noodp. + * + * @param String $description The content of the meta description. + */ + private function add_robot_content_noodp( $description ) { + if ( ! ( empty( $description ) ) && $this->options['noodp'] === false ) { + $this->options['noodp'] = true; + } + } + + /** + * Getting the keywords + * + * @param WP_Post $post The post object with the values. + * + * @return string + */ + private function get_keywords( $post ) { + $keywords = WPSEO_Meta::get_value( 'metakeywords', $post->ID ); + $option_meta_key = 'metakey-' . $post->post_type; + + if ( $keywords === '' && ( is_object( $post ) && ( isset( $this->options[ $option_meta_key ] ) && $this->options[ $option_meta_key ] !== '' ) ) ) { + $keywords = wpseo_replace_vars( $this->options[ $option_meta_key ], $post ); + } + + return $keywords; + } + + /** + * Check if term archive query is for multiple terms (/term-1,term2/ or /term-1+term-2/). + * + * @return bool + */ + protected function is_multiple_terms_query() { + + global $wp_query; + + if ( ! is_tax() && ! is_tag() && ! is_category() ) { + return false; + } + + $term = get_queried_object(); + $queried_terms = $wp_query->tax_query->queried_terms; + + if ( empty( $queried_terms[ $term->taxonomy ]['terms'] ) ) { + return false; + } + + return count( $queried_terms[ $term->taxonomy ]['terms'] ) > 1; + } +} diff --git a/wp-content/plugins/wordpress-seo/frontend/class-googleplus.php b/wp-content/plugins/wordpress-seo/frontend/class-googleplus.php new file mode 100644 index 0000000..bf16f9e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/class-googleplus.php @@ -0,0 +1,71 @@ +options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_social' ) ); + + add_action( 'wpseo_head', array( $this, 'json_ld' ), 90 ); + add_action( 'wpseo_json_ld', array( $this, 'website' ), 10 ); + add_action( 'wpseo_json_ld', array( $this, 'organization_or_person' ), 20 ); + } + + /** + * JSON LD output function that the functions for specific code can hook into + * + * @since 1.8 + */ + public function json_ld() { + do_action( 'wpseo_json_ld' ); + } + + /** + * Outputs code to allow Google to recognize social profiles for use in the Knowledge graph + * + * @since 1.8 + */ + public function organization_or_person() { + if ( '' === $this->options['company_or_person'] ) { + return; + } + + $this->prepare_organization_person_markup(); + + switch ( $this->options['company_or_person'] ) { + case 'company': + $this->organization(); + break; + case 'person': + $this->person(); + break; + } + + $this->output( $this->options['company_or_person'] ); + } + + /** + * Outputs code to allow recognition of the internal search engine + * + * @since 1.5.7 + * + * @link https://developers.google.com/structured-data/site-name + */ + public function website() { + $this->data = array( + '@context' => 'http://schema.org', + '@type' => 'WebSite', + '@id' => '#website', + 'url' => $this->get_home_url(), + 'name' => $this->get_website_name(), + ); + + $this->add_alternate_name(); + $this->internal_search_section(); + + $this->output( 'website' ); + } + + /** + * Outputs the JSON LD code in a valid JSON+LD wrapper + * + * @since 1.8 + * + * @param string $context The context of the output, useful for filtering. + */ + private function output( $context ) { + /** + * Filter: 'wpseo_json_ld_output' - Allows filtering of the JSON+LD output + * + * @api array $output The output array, before its JSON encoded + * + * @param string $context The context of the output, useful to determine whether to filter or not. + */ + $this->data = apply_filters( 'wpseo_json_ld_output', $this->data, $context ); + + if ( is_array( $this->data ) && ! empty( $this->data ) ) { + $json_data = wp_json_encode( $this->data ); + + echo "', "\n"; + } + + // Empty the $data array so we don't output it twice. + $this->data = array(); + } + + /** + * Schema for Organization + */ + private function organization() { + if ( '' !== $this->options['company_name'] ) { + $this->data['@type'] = 'Organization'; + $this->data['@id'] = '#organization'; + $this->data['name'] = $this->options['company_name']; + $this->data['logo'] = $this->options['company_logo']; + return; + } + $this->data = false; + } + + /** + * Schema for Person + */ + private function person() { + if ( '' !== $this->options['person_name'] ) { + $this->data['@type'] = 'Person'; + $this->data['@id'] = '#person'; + $this->data['name'] = $this->options['person_name']; + return; + } + $this->data = false; + } + + /** + * Prepares the organization or person markup + */ + private function prepare_organization_person_markup() { + $this->fetch_social_profiles(); + + $this->data = array( + '@context' => 'http://schema.org', + '@type' => '', + 'url' => WPSEO_Frontend::get_instance()->canonical( false, true ), + 'sameAs' => $this->profiles, + ); + } + + /** + * Retrieve the social profiles to display in the organization output. + * + * @since 1.8 + * + * @link https://developers.google.com/webmasters/structured-data/customize/social-profiles + */ + private function fetch_social_profiles() { + $social_profiles = array( + 'facebook_site', + 'instagram_url', + 'linkedin_url', + 'plus-publisher', + 'myspace_url', + 'youtube_url', + 'pinterest_url', + ); + foreach ( $social_profiles as $profile ) { + if ( $this->options[ $profile ] !== '' ) { + $this->profiles[] = $this->options[ $profile ]; + } + } + + if ( ! empty( $this->options['twitter_site'] ) ) { + $this->profiles[] = 'https://twitter.com/' . $this->options['twitter_site']; + } + } + + /** + * Retrieves the home URL + * + * @return string + */ + private function get_home_url() { + /** + * Filter: 'wpseo_json_home_url' - Allows filtering of the home URL for Yoast SEO's JSON+LD output + * + * @api unsigned string + */ + return apply_filters( 'wpseo_json_home_url', WPSEO_Utils::home_url() ); + } + + /** + * Returns an alternate name if one was specified in the Yoast SEO settings + */ + private function add_alternate_name() { + if ( '' !== $this->options['alternate_website_name'] ) { + $this->data['alternateName'] = $this->options['alternate_website_name']; + } + } + + /** + * Adds the internal search JSON LD code if it's not disabled + * + * @link https://developers.google.com/structured-data/slsb-overview + */ + private function internal_search_section() { + /** + * Filter: 'disable_wpseo_json_ld_search' - Allow disabling of the json+ld output + * + * @api bool $display_search Whether or not to display json+ld search on the frontend + */ + if ( ! apply_filters( 'disable_wpseo_json_ld_search', false ) ) { + /** + * Filter: 'wpseo_json_ld_search_url' - Allows filtering of the search URL for Yoast SEO + * + * @api string $search_url The search URL for this site with a `{search_term_string}` variable. + */ + $search_url = apply_filters( 'wpseo_json_ld_search_url', $this->get_home_url() . '?s={search_term_string}' ); + + $this->data['potentialAction'] = array( + '@type' => 'SearchAction', + 'target' => $search_url, + 'query-input' => 'required name=search_term_string', + ); + } + } + + /** + * Returns the website name either from Yoast SEO's options or from the site settings + * + * @since 2.1 + * + * @return string + */ + private function get_website_name() { + if ( '' !== $this->options['website_name'] ) { + return $this->options['website_name']; + } + + return get_bloginfo( 'name' ); + } + + /** + * Renders internal search schema markup + * + * @deprecated 2.1 + * @deprecated use WPSEO_JSON_LD::website() + */ + public function internal_search() { + _deprecated_function( __METHOD__, 'WPSEO 2.1', 'WPSEO_JSON_LD::website()' ); + + $this->website(); + } +} diff --git a/wp-content/plugins/wordpress-seo/frontend/class-opengraph.php b/wp-content/plugins/wordpress-seo/frontend/class-opengraph.php new file mode 100644 index 0000000..18ab985 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/class-opengraph.php @@ -0,0 +1,1078 @@ +options = WPSEO_Options::get_option( 'wpseo_social' ); + + if ( isset( $GLOBALS['fb_ver'] ) || class_exists( 'Facebook_Loader', false ) ) { + add_filter( 'fb_meta_tags', array( $this, 'facebook_filter' ), 10, 1 ); + } + else { + add_filter( 'language_attributes', array( $this, 'add_opengraph_namespace' ), 15 ); + + add_action( 'wpseo_opengraph', array( $this, 'locale' ), 1 ); + add_action( 'wpseo_opengraph', array( $this, 'type' ), 5 ); + add_action( 'wpseo_opengraph', array( $this, 'og_title' ), 10 ); + add_action( 'wpseo_opengraph', array( $this, 'site_owner' ), 20 ); + add_action( 'wpseo_opengraph', array( $this, 'description' ), 11 ); + add_action( 'wpseo_opengraph', array( $this, 'url' ), 12 ); + add_action( 'wpseo_opengraph', array( $this, 'site_name' ), 13 ); + add_action( 'wpseo_opengraph', array( $this, 'website_facebook' ), 14 ); + if ( is_singular() && ! is_front_page() ) { + add_action( 'wpseo_opengraph', array( $this, 'article_author_facebook' ), 15 ); + add_action( 'wpseo_opengraph', array( $this, 'tags' ), 16 ); + add_action( 'wpseo_opengraph', array( $this, 'category' ), 17 ); + add_action( 'wpseo_opengraph', array( $this, 'publish_date' ), 19 ); + } + + add_action( 'wpseo_opengraph', array( $this, 'image' ), 30 ); + } + add_filter( 'jetpack_enable_open_graph', '__return_false' ); + add_action( 'wpseo_head', array( $this, 'opengraph' ), 30 ); + } + + /** + * Main OpenGraph output. + */ + public function opengraph() { + wp_reset_query(); + /** + * Action: 'wpseo_opengraph' - Hook to add all Facebook OpenGraph output to so they're close together. + */ + do_action( 'wpseo_opengraph' ); + } + + /** + * Internal function to output FB tags. This also adds an output filter to each bit of output based on the property. + * + * @param string $property Property attribute value. + * @param string $content Content attribute value. + * + * @return boolean + */ + public function og_tag( $property, $content ) { + $og_property = str_replace( ':', '_', $property ); + /** + * Filter: 'wpseo_og_' . $og_property - Allow developers to change the content of specific OG meta tags. + * + * @api string $content The content of the property + */ + $content = apply_filters( 'wpseo_og_' . $og_property, $content ); + if ( empty( $content ) ) { + return false; + } + + echo '', "\n"; + + return true; + } + + /** + * Filter the Facebook plugins metadata + * + * @param array $meta_tags the array to fix. + * + * @return array $meta_tags + */ + public function facebook_filter( $meta_tags ) { + $meta_tags['http://ogp.me/ns#type'] = $this->type( false ); + $meta_tags['http://ogp.me/ns#title'] = $this->og_title( false ); + + // Filter the locale too because the Facebook plugin locale code is not as good as ours. + $meta_tags['http://ogp.me/ns#locale'] = $this->locale( false ); + + $ogdesc = $this->description( false ); + if ( ! empty( $ogdesc ) ) { + $meta_tags['http://ogp.me/ns#description'] = $ogdesc; + } + + return $meta_tags; + } + + /** + * Filter for the namespace, adding the OpenGraph namespace. + * + * @link https://developers.facebook.com/docs/web/tutorials/scrumptious/open-graph-object/ + * + * @param string $input The input namespace string. + * + * @return string + */ + public function add_opengraph_namespace( $input ) { + $namespaces = array( + 'og: http://ogp.me/ns#', + ); + if ( $this->options['fbadminapp'] != 0 || ( is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array() ) ) { + $namespaces[] = 'fb: http://ogp.me/ns/fb#'; + } + + /** + * Allow for adding additional namespaces to the prefix attributes. + * + * @since 3.9.0 + * + * @param array $namespaces Currently registered namespaces which are to be + * added to the prefix attribute. + * Namespaces are strings and have the following syntax: + * ns: http://url.to.namespace/definition + */ + $namespaces = apply_filters( 'wpseo_html_namespaces', $namespaces ); + $namespace_string = implode( ' ', array_unique( $namespaces ) ); + + if ( strpos( $input, ' prefix=' ) !== false ) { + $regex = '`prefix=([\'"])(.+?)\1`'; + $replace = 'prefix="$2 ' . $namespace_string . '"'; + $input = preg_replace( $regex, $replace, $input ); + } + else { + $input .= ' prefix="' . $namespace_string . '"'; + } + + return $input; + } + + /** + * Outputs the authors FB page. + * + * @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/ + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * + * @return boolean + */ + public function article_author_facebook() { + if ( ! is_singular() ) { + return false; + } + + /** + * Filter: 'wpseo_opengraph_author_facebook' - Allow developers to filter the Yoast SEO post authors facebook profile URL + * + * @api bool|string $unsigned The Facebook author URL, return false to disable + */ + $facebook = apply_filters( 'wpseo_opengraph_author_facebook', get_the_author_meta( 'facebook', $GLOBALS['post']->post_author ) ); + + if ( $facebook && ( is_string( $facebook ) && $facebook !== '' ) ) { + $this->og_tag( 'article:author', $facebook ); + + return true; + } + + return false; + } + + /** + * Outputs the websites FB page. + * + * @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/ + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean + */ + public function website_facebook() { + + if ( 'article' === $this->type( false ) && ! empty( $this->options['facebook_site'] ) ) { + $this->og_tag( 'article:publisher', $this->options['facebook_site'] ); + + return true; + } + + return false; + } + + /** + * Outputs the site owner + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean + */ + public function site_owner() { + if ( isset( $this->options['fbadminapp'] ) && $this->options['fbadminapp'] != 0 ) { + $this->og_tag( 'fb:app_id', $this->options['fbadminapp'] ); + + return true; + } + else if ( isset( $this->options['fb_admins'] ) && is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array() ) { + $adminstr = implode( ',', array_keys( $this->options['fb_admins'] ) ); + /** + * Filter: 'wpseo_opengraph_admin' - Allow developer to filter the fb:admins string put out by Yoast SEO + * + * @api string $adminstr The admin string + */ + $adminstr = apply_filters( 'wpseo_opengraph_admin', $adminstr ); + if ( is_string( $adminstr ) && $adminstr !== '' ) { + + $admins = explode( ',', $adminstr ); + + foreach ( $admins as $admin_id ) { + $this->og_tag( 'fb:admins', $admin_id ); + } + + return true; + } + } + + return false; + } + + /** + * Outputs the SEO title as OpenGraph title. + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * + * @param bool $echo Whether or not to echo the output. + * + * @return string|boolean + */ + public function og_title( $echo = true ) { + + $frontend = WPSEO_Frontend::get_instance(); + $is_posts_page = $frontend->is_posts_page(); + + if ( is_singular() || $is_posts_page ) { + + $post_id = ( $is_posts_page ) ? get_option( 'page_for_posts' ) : get_the_ID(); + $post = get_post( $post_id ); + $title = WPSEO_Meta::get_value( 'opengraph-title', $post_id ); + + if ( $title === '' ) { + $title = $frontend->title( '' ); + } + else { + // Replace Yoast SEO Variables. + $title = wpseo_replace_vars( $title, $post ); + } + } + else if ( is_front_page() ) { + $title = ( isset( $this->options['og_frontpage_title'] ) && $this->options['og_frontpage_title'] !== '' ) ? $this->options['og_frontpage_title'] : $frontend->title( '' ); + } + elseif ( is_category() || is_tax() || is_tag() ) { + $title = WPSEO_Taxonomy_Meta::get_meta_without_term( 'opengraph-title' ); + if ( $title === '' ) { + $title = $frontend->title( '' ); + } + else { + // Replace Yoast SEO Variables. + $title = wpseo_replace_vars( $title, $GLOBALS['wp_query']->get_queried_object() ); + } + } + else { + $title = $frontend->title( '' ); + } + + /** + * Filter: 'wpseo_opengraph_title' - Allow changing the title specifically for OpenGraph + * + * @api string $unsigned The title string + */ + $title = trim( apply_filters( 'wpseo_opengraph_title', $title ) ); + + if ( is_string( $title ) && $title !== '' ) { + if ( $echo !== false ) { + $this->og_tag( 'og:title', $title ); + + return true; + } + } + + if ( $echo === false ) { + return $title; + } + + return false; + } + + /** + * Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares. + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean + */ + public function url() { + /** + * Filter: 'wpseo_opengraph_url' - Allow changing the OpenGraph URL + * + * @api string $unsigned Canonical URL + */ + $url = apply_filters( 'wpseo_opengraph_url', WPSEO_Frontend::get_instance()->canonical( false ) ); + + if ( is_string( $url ) && $url !== '' ) { + $this->og_tag( 'og:url', esc_url( $url ) ); + + return true; + } + + return false; + } + + /** + * Output the locale, doing some conversions to make sure the proper Facebook locale is outputted. + * + * Last update/compare with FB list done on 2015-03-16 by Rarst + * + * @see http://www.facebook.com/translations/FacebookLocales.xml for the list of supported locales + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * + * @param bool $echo Whether to echo or return the locale. + * + * @return string $locale + */ + public function locale( $echo = true ) { + /** + * Filter: 'wpseo_locale' - Allow changing the locale output + * + * @api string $unsigned Locale string + */ + $locale = apply_filters( 'wpseo_locale', get_locale() ); + + // Catch some weird locales served out by WP that are not easily doubled up. + $fix_locales = array( + 'ca' => 'ca_ES', + 'en' => 'en_US', + 'el' => 'el_GR', + 'et' => 'et_EE', + 'ja' => 'ja_JP', + 'sq' => 'sq_AL', + 'uk' => 'uk_UA', + 'vi' => 'vi_VN', + 'zh' => 'zh_CN', + ); + + if ( isset( $fix_locales[ $locale ] ) ) { + $locale = $fix_locales[ $locale ]; + } + + // Convert locales like "es" to "es_ES", in case that works for the given locale (sometimes it does). + if ( strlen( $locale ) == 2 ) { + $locale = strtolower( $locale ) . '_' . strtoupper( $locale ); + } + + // These are the locales FB supports. + $fb_valid_fb_locales = array( + 'af_ZA', // Afrikaans. + 'ak_GH', // Akan. + 'am_ET', // Amharic. + 'ar_AR', // Arabic. + 'as_IN', // Assamese. + 'ay_BO', // Aymara. + 'az_AZ', // Azerbaijani. + 'be_BY', // Belarusian. + 'bg_BG', // Bulgarian. + 'bn_IN', // Bengali. + 'br_FR', // Breton. + 'bs_BA', // Bosnian. + 'ca_ES', // Catalan. + 'cb_IQ', // Sorani Kurdish. + 'ck_US', // Cherokee. + 'co_FR', // Corsican. + 'cs_CZ', // Czech. + 'cx_PH', // Cebuano. + 'cy_GB', // Welsh. + 'da_DK', // Danish. + 'de_DE', // German. + 'el_GR', // Greek. + 'en_GB', // English (UK). + 'en_IN', // English (India). + 'en_PI', // English (Pirate). + 'en_UD', // English (Upside Down). + 'en_US', // English (US). + 'eo_EO', // Esperanto. + 'es_CL', // Spanish (Chile). + 'es_CO', // Spanish (Colombia). + 'es_ES', // Spanish (Spain). + 'es_LA', // Spanish. + 'es_MX', // Spanish (Mexico). + 'es_VE', // Spanish (Venezuela). + 'et_EE', // Estonian. + 'eu_ES', // Basque. + 'fa_IR', // Persian. + 'fb_LT', // Leet Speak. + 'ff_NG', // Fulah. + 'fi_FI', // Finnish. + 'fo_FO', // Faroese. + 'fr_CA', // French (Canada). + 'fr_FR', // French (France). + 'fy_NL', // Frisian. + 'ga_IE', // Irish. + 'gl_ES', // Galician. + 'gn_PY', // Guarani. + 'gu_IN', // Gujarati. + 'gx_GR', // Classical Greek. + 'ha_NG', // Hausa. + 'he_IL', // Hebrew. + 'hi_IN', // Hindi. + 'hr_HR', // Croatian. + 'hu_HU', // Hungarian. + 'hy_AM', // Armenian. + 'id_ID', // Indonesian. + 'ig_NG', // Igbo. + 'is_IS', // Icelandic. + 'it_IT', // Italian. + 'ja_JP', // Japanese. + 'ja_KS', // Japanese (Kansai). + 'jv_ID', // Javanese. + 'ka_GE', // Georgian. + 'kk_KZ', // Kazakh. + 'km_KH', // Khmer. + 'kn_IN', // Kannada. + 'ko_KR', // Korean. + 'ku_TR', // Kurdish (Kurmanji). + 'ky_KG', // Kyrgyz. + 'la_VA', // Latin. + 'lg_UG', // Ganda. + 'li_NL', // Limburgish. + 'ln_CD', // Lingala. + 'lo_LA', // Lao. + 'lt_LT', // Lithuanian. + 'lv_LV', // Latvian. + 'mg_MG', // Malagasy. + 'mi_NZ', // Maori. + 'mk_MK', // Macedonian. + 'ml_IN', // Malayalam. + 'mn_MN', // Mongolian. + 'mr_IN', // Marathi. + 'ms_MY', // Malay. + 'mt_MT', // Maltese. + 'my_MM', // Burmese. + 'nb_NO', // Norwegian (bokmal). + 'nd_ZW', // Ndebele. + 'ne_NP', // Nepali. + 'nl_BE', // Dutch (Belgie). + 'nl_NL', // Dutch. + 'nn_NO', // Norwegian (nynorsk). + 'ny_MW', // Chewa. + 'or_IN', // Oriya. + 'pa_IN', // Punjabi. + 'pl_PL', // Polish. + 'ps_AF', // Pashto. + 'pt_BR', // Portuguese (Brazil). + 'pt_PT', // Portuguese (Portugal). + 'qu_PE', // Quechua. + 'rm_CH', // Romansh. + 'ro_RO', // Romanian. + 'ru_RU', // Russian. + 'rw_RW', // Kinyarwanda. + 'sa_IN', // Sanskrit. + 'sc_IT', // Sardinian. + 'se_NO', // Northern Sami. + 'si_LK', // Sinhala. + 'sk_SK', // Slovak. + 'sl_SI', // Slovenian. + 'sn_ZW', // Shona. + 'so_SO', // Somali. + 'sq_AL', // Albanian. + 'sr_RS', // Serbian. + 'sv_SE', // Swedish. + 'sw_KE', // Swahili. + 'sy_SY', // Syriac. + 'sz_PL', // Silesian. + 'ta_IN', // Tamil. + 'te_IN', // Telugu. + 'tg_TJ', // Tajik. + 'th_TH', // Thai. + 'tk_TM', // Turkmen. + 'tl_PH', // Filipino. + 'tl_ST', // Klingon. + 'tr_TR', // Turkish. + 'tt_RU', // Tatar. + 'tz_MA', // Tamazight. + 'uk_UA', // Ukrainian. + 'ur_PK', // Urdu. + 'uz_UZ', // Uzbek. + 'vi_VN', // Vietnamese. + 'wo_SN', // Wolof. + 'xh_ZA', // Xhosa. + 'yi_DE', // Yiddish. + 'yo_NG', // Yoruba. + 'zh_CN', // Simplified Chinese (China). + 'zh_HK', // Traditional Chinese (Hong Kong). + 'zh_TW', // Traditional Chinese (Taiwan). + 'zu_ZA', // Zulu. + 'zz_TR', // Zazaki. + ); + + // Check to see if the locale is a valid FB one, if not, use en_US as a fallback. + if ( ! in_array( $locale, $fb_valid_fb_locales ) ) { + $locale = strtolower( substr( $locale, 0, 2 ) ) . '_' . strtoupper( substr( $locale, 0, 2 ) ); + if ( ! in_array( $locale, $fb_valid_fb_locales ) ) { + $locale = 'en_US'; + } + } + + if ( $echo !== false ) { + $this->og_tag( 'og:locale', $locale ); + } + + return $locale; + } + + /** + * Output the OpenGraph type. + * + * @param boolean $echo Whether to echo or return the type. + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/object/ + * + * @return string $type + */ + public function type( $echo = true ) { + + if ( is_front_page() || is_home() ) { + $type = 'website'; + } + elseif ( is_singular() ) { + + // This'll usually only be changed by plugins right now. + $type = WPSEO_Meta::get_value( 'og_type' ); + + if ( $type === '' ) { + $type = 'article'; + } + } + else { + // We use "object" for archives etc. as article doesn't apply there. + $type = 'object'; + } + + /** + * Filter: 'wpseo_opengraph_type' - Allow changing the OpenGraph type of the page + * + * @api string $type The OpenGraph type string. + */ + $type = apply_filters( 'wpseo_opengraph_type', $type ); + + if ( is_string( $type ) && $type !== '' ) { + if ( $echo !== false ) { + $this->og_tag( 'og:type', $type ); + } + else { + return $type; + } + } + + return ''; + } + + /** + * Create new WPSEO_OpenGraph_Image class and get the images to set the og:image + * + * @param string|boolean $image Optional image URL. + */ + public function image( $image = false ) { + $opengraph_images = new WPSEO_OpenGraph_Image( $this->options, $image ); + + foreach ( $opengraph_images->get_images() as $img ) { + $this->og_tag( 'og:image', esc_url( $img ) ); + } + + $dimensions = $opengraph_images->get_dimensions(); + + if ( ! empty( $dimensions['width'] ) ) { + $this->og_tag( 'og:image:width', absint( $dimensions['width'] ) ); + } + + if ( ! empty( $dimensions['height'] ) ) { + $this->og_tag( 'og:image:height', absint( $dimensions['height'] ) ); + } + } + + /** + * Fallback method for plugins using image_output + * + * @param string $image Image URL. + */ + public function image_output( $image ) { + $this->image( $image ); + } + + /** + * Output the OpenGraph description, specific OG description first, if not, grab the meta description. + * + * @param bool $echo Whether to echo or return the description. + * + * @return string $ogdesc + */ + public function description( $echo = true ) { + $ogdesc = ''; + $frontend = WPSEO_Frontend::get_instance(); + + if ( is_front_page() ) { + if ( isset( $this->options['og_frontpage_desc'] ) && $this->options['og_frontpage_desc'] !== '' ) { + $ogdesc = wpseo_replace_vars( $this->options['og_frontpage_desc'], null ); + } + else { + $ogdesc = $frontend->metadesc( false ); + } + } + + $is_posts_page = $frontend->is_posts_page(); + + if ( is_singular() || $is_posts_page ) { + $post_id = ( $is_posts_page ) ? get_option( 'page_for_posts' ) : get_the_ID(); + $post = get_post( $post_id ); + $ogdesc = WPSEO_Meta::get_value( 'opengraph-description', $post_id ); + + // Replace Yoast SEO Variables. + $ogdesc = wpseo_replace_vars( $ogdesc, $post ); + + // Use metadesc if $ogdesc is empty. + if ( $ogdesc === '' ) { + $ogdesc = $frontend->metadesc( false ); + } + + // Tag og:description is still blank so grab it from get_the_excerpt(). + if ( ! is_string( $ogdesc ) || ( is_string( $ogdesc ) && $ogdesc === '' ) ) { + $ogdesc = str_replace( '[…]', '…', strip_tags( get_the_excerpt() ) ); + } + } + + if ( is_category() || is_tag() || is_tax() ) { + $ogdesc = WPSEO_Taxonomy_Meta::get_meta_without_term( 'opengraph-description' ); + if ( $ogdesc === '' ) { + $ogdesc = $frontend->metadesc( false ); + } + + if ( $ogdesc === '' ) { + $ogdesc = trim( strip_tags( term_description() ) ); + } + + if ( $ogdesc === '' ) { + $ogdesc = WPSEO_Taxonomy_Meta::get_meta_without_term( 'desc' ); + } + } + + // Strip shortcodes if any. + $ogdesc = strip_shortcodes( $ogdesc ); + + /** + * Filter: 'wpseo_opengraph_desc' - Allow changing the OpenGraph description + * + * @api string $ogdesc The description string. + */ + $ogdesc = trim( apply_filters( 'wpseo_opengraph_desc', $ogdesc ) ); + + if ( is_string( $ogdesc ) && $ogdesc !== '' ) { + if ( $echo !== false ) { + $this->og_tag( 'og:description', $ogdesc ); + } + } + + return $ogdesc; + } + + /** + * Output the site name straight from the blog info. + */ + public function site_name() { + /** + * Filter: 'wpseo_opengraph_site_name' - Allow changing the OpenGraph site name + * + * @api string $unsigned Blog name string + */ + $name = apply_filters( 'wpseo_opengraph_site_name', get_bloginfo( 'name' ) ); + if ( is_string( $name ) && $name !== '' ) { + $this->og_tag( 'og:site_name', $name ); + } + } + + /** + * Output the article tags as article:tag tags. + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean + */ + public function tags() { + if ( ! is_singular() ) { + return false; + } + + $tags = get_the_tags(); + if ( ! is_wp_error( $tags ) && ( is_array( $tags ) && $tags !== array() ) ) { + + foreach ( $tags as $tag ) { + $this->og_tag( 'article:tag', $tag->name ); + } + + return true; + } + + return false; + } + + /** + * Output the article category as an article:section tag. + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean; + */ + public function category() { + + if ( ! is_singular() ) { + return false; + } + + $terms = get_the_category(); + + if ( ! is_wp_error( $terms ) && ( is_array( $terms ) && $terms !== array() ) ) { + + // We can only show one section here, so we take the first one. + $this->og_tag( 'article:section', $terms[0]->name ); + + return true; + } + + return false; + } + + /** + * Output the article publish and last modification date + * + * @link https://developers.facebook.com/docs/reference/opengraph/object-type/article/ + * @return boolean; + */ + public function publish_date() { + + if ( ! is_singular( 'post' ) ) { + /** + * Filter: 'wpseo_opengraph_show_publish_date' - Allow showing publication date for other post types + * + * @api bool $unsigned Whether or not to show publish date + * + * @param string $post_type The current URL's post type. + */ + if ( false === apply_filters( 'wpseo_opengraph_show_publish_date', false, get_post_type() ) ) { + return false; + } + } + + $pub = get_the_date( DATE_W3C ); + $this->og_tag( 'article:published_time', $pub ); + + $mod = get_the_modified_date( DATE_W3C ); + if ( $mod != $pub ) { + $this->og_tag( 'article:modified_time', $mod ); + $this->og_tag( 'og:updated_time', $mod ); + } + + return true; + } +} /* End of class */ + +/** + * Class WPSEO_OpenGraph_Image + */ +class WPSEO_OpenGraph_Image { + + /** + * @var array $options Holds options passed to the constructor + */ + private $options; + + /** + * @var array $images Holds the images that have been put out as OG image. + */ + private $images = array(); + + /** + * @TODO This needs to be refactored since we only hold one set of dimensions for multiple images. R. + * @var array $dimensions Holds image dimensions, if determined. + */ + protected $dimensions = array(); + + /** + * Constructor + * + * @param array $options Options set. + * @param string|boolean $image Optional image URL. + */ + public function __construct( $options, $image = false ) { + $this->options = $options; + + if ( ! empty( $image ) && $this->add_image( $image ) ) { + // Safely assume an image was added so we don't need to automatically determine it anymore. + } + else { + $this->set_images(); + } + } + + /** + * Return the images array + * + * @return array + */ + public function get_images() { + return $this->images; + } + + /** + * Return the dimensions array. + * + * @return array + */ + public function get_dimensions() { + return $this->dimensions; + } + + /** + * Check if page is front page or singular and call the corresponding functions. If not, call get_default_image. + */ + private function set_images() { + if ( is_front_page() ) { + $this->get_front_page_image(); + } + elseif ( is_home() ) { // Posts page, which won't be caught by is_singular() below. + $this->get_posts_page_image(); + } + + if ( is_singular() ) { + $this->get_singular_image(); + } + + if ( is_category() || is_tax() || is_tag() ) { + $this->get_opengraph_image_taxonomy(); + } + + $this->get_default_image(); + } + + /** + * If the frontpage image exists, call add_image + */ + private function get_front_page_image() { + if ( $this->options['og_frontpage_image'] !== '' ) { + $this->add_image( $this->options['og_frontpage_image'] ); + } + } + + /** + * Get the images of the posts page. + */ + private function get_posts_page_image() { + + $post_id = get_option( 'page_for_posts' ); + + if ( $this->get_opengraph_image_post( $post_id ) ) { + return; + } + + if ( $this->get_featured_image( $post_id ) ) { + return; + } + } + + /** + * Get the images of the singular post. + */ + private function get_singular_image() { + global $post; + + if ( $this->get_opengraph_image_post() ) { + return; + } + + if ( $this->get_attachment_page_image( $post->ID ) ) { + return; + } + + if ( $this->get_featured_image( $post->ID ) ) { + return; + } + + $this->get_content_images( $post ); + } + + /** + * Get default image and call add_image + */ + private function get_default_image() { + if ( count( $this->images ) === 0 && isset( $this->options['og_default_image'] ) && $this->options['og_default_image'] !== '' ) { + $this->add_image( $this->options['og_default_image'] ); + } + } + + /** + * If opengraph-image is set, call add_image and return true. + * + * @param int $post_id Optional post ID to use. + * + * @return bool + */ + private function get_opengraph_image_post( $post_id = 0 ) { + $ogimg = WPSEO_Meta::get_value( 'opengraph-image', $post_id ); + if ( $ogimg !== '' ) { + $this->add_image( $ogimg ); + + return true; + } + + return false; + } + + /** + * Check if taxonomy has an image and add this image + */ + private function get_opengraph_image_taxonomy() { + if ( ( $ogimg = WPSEO_Taxonomy_Meta::get_meta_without_term( 'opengraph-image' ) ) !== '' ) { + $this->add_image( $ogimg ); + } + } + + /** + * If there is a featured image, check image size. If image size is correct, call add_image and return true + * + * @param int $post_id The post ID. + * + * @return bool + */ + private function get_featured_image( $post_id ) { + + if ( has_post_thumbnail( $post_id ) ) { + /** + * Filter: 'wpseo_opengraph_image_size' - Allow changing the image size used for OpenGraph sharing + * + * @api string $unsigned Size string + */ + $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), apply_filters( 'wpseo_opengraph_image_size', 'original' ) ); + + if ( $this->check_featured_image_size( $thumb ) ) { + + $this->dimensions['width'] = $thumb[1]; + $this->dimensions['height'] = $thumb[2]; + + return $this->add_image( $thumb[0] ); + } + } + + return false; + } + + /** + * If this is an attachment page, call add_image with the attachment and return true + * + * @param int $post_id The post ID. + * + * @return bool + */ + private function get_attachment_page_image( $post_id ) { + if ( get_post_type( $post_id ) === 'attachment' ) { + $mime_type = get_post_mime_type( $post_id ); + switch ( $mime_type ) { + case 'image/jpeg': + case 'image/png': + case 'image/gif': + return $this->add_image( wp_get_attachment_url( $post_id ) ); + } + } + + return false; + } + + /** + * Filter: 'wpseo_pre_analysis_post_content' - Allow filtering the content before analysis + * + * @api string $post_content The Post content string + * + * @param object $post - The post object. + */ + private function get_content_images( $post ) { + $content = apply_filters( 'wpseo_pre_analysis_post_content', $post->post_content, $post ); + + if ( preg_match_all( '`]+>`', $content, $matches ) ) { + foreach ( $matches[0] as $img ) { + if ( preg_match( '`src=(["\'])(.*?)\1`', $img, $match ) ) { + $this->add_image( $match[2] ); + } + } + } + } + + /** + * Check size of featured image. If image is too small, return false, else return true + * + * @param array $img_data wp_get_attachment_image_src: url, width, height, icon. + * + * @return bool + */ + private function check_featured_image_size( $img_data ) { + + if ( ! is_array( $img_data ) ) { + return false; + } + + // Get the width and height of the image. + if ( $img_data[1] < 200 || $img_data[2] < 200 ) { + return false; + } + + return true; + } + + /** + * Display an OpenGraph image tag + * + * @param string $img - Source URL to the image. + * + * @return bool + */ + private function add_image( $img ) { + + $original = trim( $img ); + + // Filter: 'wpseo_opengraph_image' - Allow changing the OpenGraph image. + $img = trim( apply_filters( 'wpseo_opengraph_image', $img ) ); + + if ( $original !== $img ) { + $this->dimensions = array(); + } + + if ( empty( $img ) ) { + return false; + } + + if ( WPSEO_Utils::is_url_relative( $img ) === true ) { + $img = $this->get_relative_path( $img ); + } + + if ( in_array( $img, $this->images ) ) { + return false; + } + array_push( $this->images, $img ); + + return true; + } + + /** + * Get the relative path of the image + * + * @param array $img Image data array. + * + * @return bool|string + */ + private function get_relative_path( $img ) { + if ( $img[0] != '/' ) { + return false; + } + + // If it's a relative URL, it's relative to the domain, not necessarily to the WordPress install, we + // want to preserve domain name and URL scheme (http / https) though. + $parsed_url = wp_parse_url( home_url() ); + $img = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img; + + return $img; + } +} diff --git a/wp-content/plugins/wordpress-seo/frontend/class-primary-category.php b/wp-content/plugins/wordpress-seo/frontend/class-primary-category.php new file mode 100644 index 0000000..bbf6340 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/class-primary-category.php @@ -0,0 +1,69 @@ +get_primary_category( $post ); + + if ( false !== $primary_category && $primary_category !== $category->cat_ID ) { + $category = $this->get_category( $primary_category ); + } + + return $category; + } + + /** + * Get the id of the primary category + * + * @param WP_Post $post The post in question. + * + * @return int primary category id + */ + protected function get_primary_category( $post = null ) { + $post = get_post( $post ); + + if ( $post === null ) { + return false; + } + + $primary_term = new WPSEO_Primary_Term( 'category', $post->ID ); + + return $primary_term->get_primary_term(); + } + + /** + * Wrapper for get category to make mocking easier + * + * @param int $primary_category id of primary category. + * + * @return array|null|object|WP_Error + */ + protected function get_category( $primary_category ) { + $category = get_category( $primary_category ); + + return $category; + } +} diff --git a/wp-content/plugins/wordpress-seo/frontend/class-twitter.php b/wp-content/plugins/wordpress-seo/frontend/class-twitter.php new file mode 100644 index 0000000..a6a1747 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/class-twitter.php @@ -0,0 +1,643 @@ +options = WPSEO_Options::get_option( 'wpseo_social' ); + $this->twitter(); + } + + /** + * Outputs the Twitter Card code on singular pages. + */ + public function twitter() { + wp_reset_query(); + + $this->type(); + $this->description(); + $this->title(); + $this->site_twitter(); + $this->image(); + if ( is_singular() ) { + $this->author(); + } + + /** + * Action: 'wpseo_twitter' - Hook to add all Yoast SEO Twitter output to so they're close together. + */ + do_action( 'wpseo_twitter' ); + } + + /** + * Display the Twitter card type. + * + * This defaults to summary but can be filtered using the wpseo_twitter_card_type filter. + * + * @link https://dev.twitter.com/docs/cards + */ + protected function type() { + $this->determine_card_type(); + $this->sanitize_card_type(); + + $this->output_metatag( 'card', $this->type ); + } + + /** + * Determines the twitter card type for the current page + */ + private function determine_card_type() { + $this->type = $this->options['twitter_card_type']; + + // TODO this should be reworked to use summary_large_image for any fitting image R. + if ( is_singular() && has_shortcode( $GLOBALS['post']->post_content, 'gallery' ) ) { + + $this->images = get_post_gallery_images(); + + if ( count( $this->images ) > 0 ) { + $this->type = 'summary_large_image'; + } + } + + /** + * Filter: 'wpseo_twitter_card_type' - Allow changing the Twitter Card type as output in the Twitter card by Yoast SEO + * + * @api string $unsigned The type string + */ + $this->type = apply_filters( 'wpseo_twitter_card_type', $this->type ); + } + + /** + * Determines whether the card type is of a type currently allowed by Twitter + * + * @link https://dev.twitter.com/cards/types + */ + private function sanitize_card_type() { + if ( ! in_array( $this->type, array( + 'summary', + 'summary_large_image', + 'app', + 'player', + ) ) + ) { + $this->type = 'summary'; + } + } + + /** + * Output the metatag + * + * @param string $name Tag name string. + * @param string $value Tag value string. + * @param bool $escaped Force escape flag. + */ + private function output_metatag( $name, $value, $escaped = false ) { + + // Escape the value if not escaped. + if ( false === $escaped ) { + $value = esc_attr( $value ); + } + + /** + * Filter: 'wpseo_twitter_metatag_key' - Make the Twitter metatag key filterable + * + * @api string $key The Twitter metatag key + */ + $metatag_key = apply_filters( 'wpseo_twitter_metatag_key', 'name' ); + + // Output meta. + echo '', "\n"; + } + + /** + * Displays the description for Twitter. + * + * Only used when OpenGraph is inactive. + */ + protected function description() { + if ( is_singular() ) { + $meta_desc = $this->single_description(); + } + elseif ( WPSEO_Frontend::get_instance()->is_posts_page() ) { + $meta_desc = $this->single_description( get_option( 'page_for_posts' ) ); + } + elseif ( is_category() || is_tax() || is_tag() ) { + $meta_desc = $this->taxonomy_description(); + } + else { + $meta_desc = $this->fallback_description(); + } + + /** + * Filter: 'wpseo_twitter_description' - Allow changing the Twitter description as output in the Twitter card by Yoast SEO + * + * @api string $twitter The description string + */ + $meta_desc = apply_filters( 'wpseo_twitter_description', $meta_desc ); + if ( is_string( $meta_desc ) && $meta_desc !== '' ) { + $this->output_metatag( 'description', $meta_desc ); + } + } + + /** + * Returns the description for a singular page + * + * @param int $post_id Post ID. + * + * @return string + */ + private function single_description( $post_id = 0 ) { + $meta_desc = trim( WPSEO_Meta::get_value( 'twitter-description', $post_id ) ); + + if ( is_string( $meta_desc ) && '' !== $meta_desc ) { + return $meta_desc; + } + + $meta_desc = $this->fallback_description(); + if ( is_string( $meta_desc ) && '' !== $meta_desc ) { + return $meta_desc; + } + + return strip_tags( get_the_excerpt() ); + } + + + /** + * Getting the description for the taxonomy + * + * @return bool|mixed|string + */ + private function taxonomy_description() { + $meta_desc = WPSEO_Taxonomy_Meta::get_meta_without_term( 'twitter-description' ); + + if ( ! is_string( $meta_desc ) || $meta_desc === '' ) { + $meta_desc = $this->fallback_description(); + } + + if ( is_string( $meta_desc ) || $meta_desc !== '' ) { + return $meta_desc; + } + + return trim( strip_tags( term_description() ) ); + + } + + /** + * Returns a fallback description + * + * @return string + */ + private function fallback_description() { + return trim( WPSEO_Frontend::get_instance()->metadesc( false ) ); + } + + /** + * Displays the title for Twitter. + * + * Only used when OpenGraph is inactive. + */ + protected function title() { + if ( is_singular() ) { + $title = $this->single_title(); + } + elseif ( WPSEO_Frontend::get_instance()->is_posts_page() ) { + $title = $this->single_title( get_option( 'page_for_posts' ) ); + } + elseif ( is_category() || is_tax() || is_tag() ) { + $title = $this->taxonomy_title(); + } + else { + $title = $this->fallback_title(); + } + + /** + * Filter: 'wpseo_twitter_title' - Allow changing the Twitter title as output in the Twitter card by Yoast SEO + * + * @api string $twitter The title string + */ + $title = apply_filters( 'wpseo_twitter_title', $title ); + if ( is_string( $title ) && $title !== '' ) { + $this->output_metatag( 'title', $title ); + } + } + + /** + * Returns the Twitter title for a single post + * + * @param int $post_id Post ID. + * + * @return string + */ + private function single_title( $post_id = 0 ) { + $title = WPSEO_Meta::get_value( 'twitter-title', $post_id ); + if ( ! is_string( $title ) || $title === '' ) { + return $this->fallback_title(); + } + + return $title; + } + + /** + * Getting the title for the taxonomy + * + * @return bool|mixed|string + */ + private function taxonomy_title() { + $title = WPSEO_Taxonomy_Meta::get_meta_without_term( 'twitter-title' ); + + if ( ! is_string( $title ) || $title === '' ) { + return $this->fallback_title(); + } + + return $title; + } + + /** + * Returns the Twitter title for any page + * + * @return string + */ + private function fallback_title() { + return WPSEO_Frontend::get_instance()->title( '' ); + } + + /** + * Displays the Twitter account for the site. + */ + protected function site_twitter() { + /** + * Filter: 'wpseo_twitter_site' - Allow changing the Twitter site account as output in the Twitter card by Yoast SEO + * + * @api string $unsigned Twitter site account string + */ + $site = apply_filters( 'wpseo_twitter_site', $this->options['twitter_site'] ); + $site = $this->get_twitter_id( $site ); + + if ( is_string( $site ) && $site !== '' ) { + $this->output_metatag( 'site', '@' . $site ); + } + } + + /** + * Checks if the given id is actually an id or a url and if url, distills the id from it. + * + * Solves issues with filters returning urls and theme's/other plugins also adding a user meta + * twitter field which expects url rather than an id (which is what we expect). + * + * @param string $id Twitter ID or url. + * + * @return string|bool Twitter ID or false if it failed to get a valid Twitter ID. + */ + private function get_twitter_id( $id ) { + if ( preg_match( '`([A-Za-z0-9_]{1,25})$`', $id, $match ) ) { + return $match[1]; + } + else { + return false; + } + } + + /** + * Displays the image for Twitter + * + * Only used when OpenGraph is inactive or Summary Large Image card is chosen. + */ + protected function image() { + + if ( is_category() || is_tax() || is_tag() ) { + $this->taxonomy_image_output(); + } + else { + $this->single_image_output(); + } + + if ( count( $this->shown_images ) === 0 && $this->options['og_default_image'] !== '' ) { + $this->image_output( $this->options['og_default_image'] ); + } + } + + /** + * Outputs the first image of a gallery. + */ + private function gallery_images_output() { + + $this->image_output( reset( $this->images ) ); + } + + /** + * @return bool + */ + private function taxonomy_image_output() { + foreach ( array( 'twitter-image', 'opengraph-image' ) as $tag ) { + $img = WPSEO_Taxonomy_Meta::get_meta_without_term( $tag ); + if ( $img !== '' ) { + $this->image_output( $img ); + + return true; + } + } + + return false; + } + + /** + * Takes care of image output when we only need to display a single image. + */ + private function single_image_output() { + if ( $this->homepage_image_output() ) { + return; + } + elseif ( $this->posts_page_image_output() ) { // Posts page, which won't be caught by is_singular() below. + return; + } + + if ( is_singular() ) { + if ( $this->image_from_meta_values_output() ) { + return; + } + + $post_id = get_the_ID(); + + if ( $this->image_of_attachment_page_output( $post_id ) ) { + return; + } + if ( $this->image_thumbnail_output() ) { + return; + } + if ( count( $this->images ) > 0 ) { + $this->gallery_images_output(); + return; + } + if ( $this->image_from_content_output() ) { + return; + } + } + } + + /** + * Show the front page image + * + * @return bool + */ + private function homepage_image_output() { + if ( is_front_page() ) { + if ( $this->options['og_frontpage_image'] !== '' ) { + $this->image_output( $this->options['og_frontpage_image'] ); + + return true; + } + } + + return false; + } + + /** + * Show the posts page image. + * + * @return bool + */ + private function posts_page_image_output() { + + if ( is_front_page() || ! is_home() ) { + return false; + } + + $post_id = get_option( 'page_for_posts' ); + + if ( $this->image_from_meta_values_output( $post_id ) ) { + return true; + } + + if ( $this->image_thumbnail_output( $post_id ) ) { + return true; + } + + return false; + } + + /** + * Outputs a Twitter image tag for a given image + * + * @param string $img The source URL to the image. + * @param boolean $tag Deprecated argument, previously used for gallery images. + * + * @return bool + */ + protected function image_output( $img, $tag = false ) { + + if ( $tag ) { + _deprecated_argument( __METHOD__, 'WPSEO 2.4' ); + } + + /** + * Filter: 'wpseo_twitter_image' - Allow changing the Twitter Card image + * + * @api string $img Image URL string + */ + $img = apply_filters( 'wpseo_twitter_image', $img ); + + if ( WPSEO_Utils::is_url_relative( $img ) === true && $img[0] === '/' ) { + $parsed_url = wp_parse_url( home_url() ); + $img = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img; + } + + $escaped_img = esc_url( $img ); + + if ( in_array( $escaped_img, $this->shown_images ) ) { + return false; + } + + if ( is_string( $escaped_img ) && $escaped_img !== '' ) { + $this->output_metatag( 'image', $escaped_img, true ); + array_push( $this->shown_images, $escaped_img ); + + return true; + } + + return false; + } + + /** + * Retrieve images from the post meta values + * + * @param int $post_id Optional post ID to use. + * + * @return bool + */ + private function image_from_meta_values_output( $post_id = 0 ) { + foreach ( array( 'twitter-image', 'opengraph-image' ) as $tag ) { + $img = WPSEO_Meta::get_value( $tag, $post_id ); + if ( $img !== '' ) { + $this->image_output( $img ); + + return true; + } + } + + return false; + } + + /** + * Retrieve an attachment page's attachment + * + * @param string $attachment_id The ID of the attachment for which to retrieve the image. + * + * @return bool + */ + private function image_of_attachment_page_output( $attachment_id ) { + if ( get_post_type( $attachment_id ) === 'attachment' ) { + $mime_type = get_post_mime_type( $attachment_id ); + switch ( $mime_type ) { + case 'image/jpeg': + case 'image/png': + case 'image/gif': + $this->image_output( wp_get_attachment_url( $attachment_id ) ); + return true; + } + } + + return false; + } + + /** + * Retrieve the featured image + * + * @param int $post_id Optional post ID to use. + * + * @return bool + */ + private function image_thumbnail_output( $post_id = 0 ) { + + if ( empty( $post_id ) ) { + $post_id = get_the_ID(); + } + + if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( $post_id ) ) { + /** + * Filter: 'wpseo_twitter_image_size' - Allow changing the Twitter Card image size + * + * @api string $featured_img Image size string + */ + $featured_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), apply_filters( 'wpseo_twitter_image_size', 'full' ) ); + + if ( $featured_img ) { + $this->image_output( $featured_img[0] ); + + return true; + } + } + + return false; + } + + /** + * Retrieve the image from the content + * + * @return bool + */ + private function image_from_content_output() { + /** + * Filter: 'wpseo_pre_analysis_post_content' - Allow filtering the content before analysis + * + * @api string $post_content The Post content string + * + * @param object $post - The post object. + */ + global $post; + $content = apply_filters( 'wpseo_pre_analysis_post_content', $post->post_content, $post ); + + if ( preg_match_all( '`]+>`', $content, $matches ) ) { + foreach ( $matches[0] as $img ) { + if ( preg_match( '`src=(["\'])(.*?)\1`', $img, $match ) ) { + $this->image_output( $match[2] ); + + return true; + } + } + } + + return false; + } + + /** + * Displays the authors Twitter account. + */ + protected function author() { + $twitter = ltrim( trim( get_the_author_meta( 'twitter', get_post()->post_author ) ), '@' ); + /** + * Filter: 'wpseo_twitter_creator_account' - Allow changing the Twitter account as output in the Twitter card by Yoast SEO + * + * @api string $twitter The twitter account name string + */ + $twitter = apply_filters( 'wpseo_twitter_creator_account', $twitter ); + $twitter = $this->get_twitter_id( $twitter ); + + if ( is_string( $twitter ) && $twitter !== '' ) { + $this->output_metatag( 'creator', '@' . $twitter ); + } + elseif ( $this->options['twitter_site'] !== '' ) { + if ( is_string( $this->options['twitter_site'] ) && $this->options['twitter_site'] !== '' ) { + $this->output_metatag( 'creator', '@' . $this->options['twitter_site'] ); + } + } + } + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Displays the domain tag for the site. + * + * @deprecated 3.0 + */ + protected function site_domain() { + _deprecated_function( __METHOD__, 'WPSEO 3.0' ); + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/frontend/index.php b/wp-content/plugins/wordpress-seo/frontend/index.php new file mode 100644 index 0000000..e94d9a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/frontend/index.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/images/banner/basic-seo-training.png b/wp-content/plugins/wordpress-seo/images/banner/basic-seo-training.png new file mode 100644 index 0000000..3a1828b Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/basic-seo-training.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/configuration-service.png b/wp-content/plugins/wordpress-seo/images/banner/configuration-service.png new file mode 100644 index 0000000..5a43c21 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/configuration-service.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/keyword-research-training.png b/wp-content/plugins/wordpress-seo/images/banner/keyword-research-training.png new file mode 100644 index 0000000..a7036f2 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/keyword-research-training.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/local-seo-for-woocommerce.png b/wp-content/plugins/wordpress-seo/images/banner/local-seo-for-woocommerce.png new file mode 100644 index 0000000..e43b35c Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/local-seo-for-woocommerce.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/local-seo.png b/wp-content/plugins/wordpress-seo/images/banner/local-seo.png new file mode 100644 index 0000000..476bb65 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/local-seo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/news-seo.png b/wp-content/plugins/wordpress-seo/images/banner/news-seo.png new file mode 100644 index 0000000..f45d6a9 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/news-seo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/premium-seo.png b/wp-content/plugins/wordpress-seo/images/banner/premium-seo.png new file mode 100644 index 0000000..ef57b6c Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/premium-seo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/seo-care.png b/wp-content/plugins/wordpress-seo/images/banner/seo-care.png new file mode 100644 index 0000000..82d49ae Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/seo-care.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/seo-copywriting-training.png b/wp-content/plugins/wordpress-seo/images/banner/seo-copywriting-training.png new file mode 100644 index 0000000..210483c Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/seo-copywriting-training.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/video-seo.png b/wp-content/plugins/wordpress-seo/images/banner/video-seo.png new file mode 100644 index 0000000..2e0c28c Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/video-seo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/website-review.png b/wp-content/plugins/wordpress-seo/images/banner/website-review.png new file mode 100644 index 0000000..0b47c81 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/website-review.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/woocommerce-seo.png b/wp-content/plugins/wordpress-seo/images/banner/woocommerce-seo.png new file mode 100644 index 0000000..0a9ba80 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/woocommerce-seo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/banner/yoast-seo-for-wordpress-training.png b/wp-content/plugins/wordpress-seo/images/banner/yoast-seo-for-wordpress-training.png new file mode 100644 index 0000000..0ef2add Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/banner/yoast-seo-for-wordpress-training.png differ diff --git a/wp-content/plugins/wordpress-seo/images/editicon.png b/wp-content/plugins/wordpress-seo/images/editicon.png new file mode 100644 index 0000000..2463f1b Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/editicon.png differ diff --git a/wp-content/plugins/wordpress-seo/images/extensions-local.png b/wp-content/plugins/wordpress-seo/images/extensions-local.png new file mode 100644 index 0000000..efc82b0 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/extensions-local.png differ diff --git a/wp-content/plugins/wordpress-seo/images/extensions-news.png b/wp-content/plugins/wordpress-seo/images/extensions-news.png new file mode 100644 index 0000000..f05ea47 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/extensions-news.png differ diff --git a/wp-content/plugins/wordpress-seo/images/extensions-premium-ribbon.png b/wp-content/plugins/wordpress-seo/images/extensions-premium-ribbon.png new file mode 100644 index 0000000..4345f25 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/extensions-premium-ribbon.png differ diff --git a/wp-content/plugins/wordpress-seo/images/extensions-video.png b/wp-content/plugins/wordpress-seo/images/extensions-video.png new file mode 100644 index 0000000..1d9091a Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/extensions-video.png differ diff --git a/wp-content/plugins/wordpress-seo/images/extensions-woo.png b/wp-content/plugins/wordpress-seo/images/extensions-woo.png new file mode 100644 index 0000000..45c6156 Binary files /dev/null and b/wp-content/plugins/wordpress-seo/images/extensions-woo.png differ diff --git a/wp-content/plugins/wordpress-seo/images/index.php b/wp-content/plugins/wordpress-seo/images/index.php new file mode 100644 index 0000000..e94d9a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/images/index.php @@ -0,0 +1,4 @@ + false ) ); + if ( is_array( $categories ) && $categories !== array() ) { + foreach ( $categories as $category ) { + $category_nicename = $category->slug; + if ( $category->parent == $category->cat_ID ) { + // Recursive recursion. + $category->parent = 0; + } + elseif ( $taxonomy->rewrite['hierarchical'] != 0 && $category->parent != 0 ) { + $parents = get_category_parents( $category->parent, false, '/', true ); + if ( ! is_wp_error( $parents ) ) { + $category_nicename = $parents . $category_nicename; + } + unset( $parents ); + } + + $category_rewrite[ $blog_prefix . '(' . $category_nicename . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]'; + $category_rewrite[ $blog_prefix . '(' . $category_nicename . ')/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[2]'; + $category_rewrite[ $blog_prefix . '(' . $category_nicename . ')/?$' ] = 'index.php?category_name=$matches[1]'; + } + unset( $categories, $category, $category_nicename ); + } + + // Redirect support from Old Category Base. + $old_base = $wp_rewrite->get_category_permastruct(); + $old_base = str_replace( '%category%', '(.+)', $old_base ); + $old_base = trim( $old_base, '/' ); + $category_rewrite[ $old_base . '$' ] = 'index.php?wpseo_category_redirect=$matches[1]'; + + return $category_rewrite; + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/inc/class-upgrade.php b/wp-content/plugins/wordpress-seo/inc/class-upgrade.php new file mode 100644 index 0000000..70c469e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-upgrade.php @@ -0,0 +1,242 @@ +options = WPSEO_Options::get_option( 'wpseo' ); + + WPSEO_Options::maybe_set_multisite_defaults( false ); + + if ( version_compare( $this->options['version'], '1.5.0', '<' ) ) { + $this->upgrade_15( $this->options['version'] ); + } + + if ( version_compare( $this->options['version'], '2.0', '<' ) ) { + $this->upgrade_20(); + } + + if ( version_compare( $this->options['version'], '2.1', '<' ) ) { + $this->upgrade_21(); + } + + if ( version_compare( $this->options['version'], '2.2', '<' ) ) { + $this->upgrade_22(); + } + + if ( version_compare( $this->options['version'], '2.3', '<' ) ) { + $this->upgrade_23(); + } + + if ( version_compare( $this->options['version'], '3.0', '<' ) ) { + $this->upgrade_30(); + } + + if ( version_compare( $this->options['version'], '3.3', '<' ) ) { + $this->upgrade_33(); + } + + if ( version_compare( $this->options['version'], '3.6', '<' ) ) { + $this->upgrade_36(); + } + + if ( version_compare( $this->options['version'], '4.0', '<' ) ) { + $this->upgrade_40(); + } + + // Since 3.7. + $upsell_notice = new WPSEO_Product_Upsell_Notice(); + $upsell_notice->set_upgrade_notice(); + + /** + * Filter: 'wpseo_run_upgrade' - Runs the upgrade hook which are dependent on Yoast SEO + * + * @deprecated Since 3.1 + * + * @api string - The current version of Yoast SEO + */ + do_action( 'wpseo_run_upgrade', $this->options['version'] ); + + $this->finish_up(); + } + + /** + * Run the Yoast SEO 1.5 upgrade routine + * + * @param string $version Current plugin version. + */ + private function upgrade_15( $version ) { + // Clean up options and meta. + WPSEO_Options::clean_up( null, $version ); + WPSEO_Meta::clean_up(); + + // Add new capabilities on upgrade. + wpseo_add_capabilities(); + } + + /** + * Moves options that moved position in WPSEO 2.0 + */ + private function upgrade_20() { + /** + * Clean up stray wpseo_ms options from the options table, option should only exist in the sitemeta table. + * This could have been caused in many version of Yoast SEO, so deleting it for everything below 2.0 + */ + delete_option( 'wpseo_ms' ); + + $this->move_pinterest_option(); + } + + /** + * Detects if taxonomy terms were split and updates the corresponding taxonomy meta's accordingly. + */ + private function upgrade_21() { + $taxonomies = get_option( 'wpseo_taxonomy_meta', array() ); + + if ( ! empty( $taxonomies ) ) { + foreach ( $taxonomies as $taxonomy => $tax_metas ) { + foreach ( $tax_metas as $term_id => $tax_meta ) { + if ( function_exists( 'wp_get_split_term' ) && $new_term_id = wp_get_split_term( $term_id, $taxonomy ) ) { + $taxonomies[ $taxonomy ][ $new_term_id ] = $taxonomies[ $taxonomy ][ $term_id ]; + unset( $taxonomies[ $taxonomy ][ $term_id ] ); + } + } + } + + update_option( 'wpseo_taxonomy_meta', $taxonomies ); + } + } + + /** + * Performs upgrade functions to Yoast SEO 2.2 + */ + private function upgrade_22() { + // Unschedule our tracking. + wp_clear_scheduled_hook( 'yoast_tracking' ); + + // Clear the tracking settings, the seen about setting and the ignore tour setting. + $options = get_option( 'wpseo' ); + unset( $options['tracking_popup_done'], $options['yoast_tracking'], $options['seen_about'], $options['ignore_tour'] ); + update_option( 'wpseo', $options ); + } + + /** + * Schedules upgrade function to Yoast SEO 2.3 + */ + private function upgrade_23() { + add_action( 'wp', array( $this, 'upgrade_23_query' ), 90 ); + add_action( 'admin_head', array( $this, 'upgrade_23_query' ), 90 ); + } + + /** + * Performs upgrade query to Yoast SEO 2.3 + */ + public function upgrade_23_query() { + $wp_query = new WP_Query( 'post_type=any&meta_key=_yoast_wpseo_sitemap-include&meta_value=never&order=ASC' ); + + if ( ! empty( $wp_query->posts ) ) { + $options = get_option( 'wpseo_xml' ); + + $excluded_posts = array(); + if ( $options['excluded-posts'] !== '' ) { + $excluded_posts = explode( ',', $options['excluded-posts'] ); + } + + foreach ( $wp_query->posts as $post ) { + if ( ! in_array( $post->ID, $excluded_posts ) ) { + $excluded_posts[] = $post->ID; + } + } + + // Updates the meta value. + $options['excluded-posts'] = implode( ',', $excluded_posts ); + + // Update the option. + update_option( 'wpseo_xml', $options ); + } + + // Remove the meta fields. + delete_post_meta_by_key( '_yoast_wpseo_sitemap-include' ); + } + + /** + * Performs upgrade functions to Yoast SEO 3.0 + */ + private function upgrade_30() { + // Remove the meta fields for sitemap prio. + delete_post_meta_by_key( '_yoast_wpseo_sitemap-prio' ); + } + + /** + * Performs upgrade functions to Yoast SEO 3.3 + */ + private function upgrade_33() { + // Notification dismissals have been moved to User Meta instead of global option. + delete_option( Yoast_Notification_Center::STORAGE_KEY ); + } + + /** + * Performs upgrade functions to Yoast SEO 3.6 + */ + private function upgrade_36() { + global $wpdb; + + // Between 3.2 and 3.4 the sitemap options were saved with autoloading enabled. + $wpdb->query( 'DELETE FROM ' . $wpdb->options . ' WHERE option_name LIKE "wpseo_sitemap_%" AND autoload = "yes"' ); + } + + /** + * Move the pinterest verification option from the wpseo option to the wpseo_social option + */ + private function move_pinterest_option() { + $options_social = get_option( 'wpseo_social' ); + + if ( isset( $option_wpseo['pinterestverify'] ) ) { + $options_social['pinterestverify'] = $option_wpseo['pinterestverify']; + unset( $option_wpseo['pinterestverify'] ); + update_option( 'wpseo_social', $options_social ); + update_option( 'wpseo', $option_wpseo ); + } + } + + /** + * Runs the needed cleanup after an update, setting the DB version to latest version, flushing caches etc. + */ + private function finish_up() { + $this->options = WPSEO_Options::get_option( 'wpseo' ); // Re-get to make sure we have the latest version. + update_option( 'wpseo', $this->options ); // This also ensures the DB version is equal to WPSEO_VERSION. + + add_action( 'shutdown', 'flush_rewrite_rules' ); // Just flush rewrites, always, to at least make them work after an upgrade. + WPSEO_Sitemaps_Cache::clear(); // Flush the sitemap cache. + + WPSEO_Options::ensure_options_exist(); // Make sure all our options always exist - issue #1245. + } + + /** + * Removes the about notice when its still in the database. + */ + private function upgrade_40() { + $center = Yoast_Notification_Center::get(); + $notification = $center->get_notification_by_id( 'wpseo-dismiss-about' ); + + if ( $notification ) { + $center->remove_notification( $notification ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-features.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-features.php new file mode 100644 index 0000000..c54c823 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-features.php @@ -0,0 +1,29 @@ +is_premium(); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-installation.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-installation.php new file mode 100644 index 0000000..4fda27d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-installation.php @@ -0,0 +1,45 @@ +is_first_install(); + + if ( $is_first_install && WPSEO_Utils::is_api_available() ) { + add_action( 'wpseo_activate', array( $this, 'set_first_install_options' ) ); + } + } + + /** + * When the option doesn't exist, it should be a new install. + * + * @return bool + */ + private function is_first_install() { + return ( get_option( 'wpseo' ) === false ); + } + + /** + * Sets the options on first install for showing the installation notice and disabling of the settings pages. + */ + public function set_first_install_options() { + $options = get_option( 'wpseo' ); + + $options['enable_setting_pages'] = false; + $options['show_onboarding_notice'] = true; + $options['first_activated_on'] = time(); + + update_option( 'wpseo', $options ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php new file mode 100644 index 0000000..ddfaf0e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php @@ -0,0 +1,1083 @@ + (string) field type. i.e. text / textarea / checkbox / + * radio / select / multiselect / upload / snippetpreview etc + * (required) 'title' => (string) table row title + * (recommended) 'default_value' => (string|array) default value for the field + * IMPORTANT: + * - if the field has options, the default has to be the + * key of one of the options + * - if the field is a text field, the default **has** to be + * an empty string as otherwise the user can't save + * an empty value/delete the meta value + * - if the field is a checkbox, the only valid values + * are 'on' or 'off' + * (semi-required) 'options' => (array) options for used with (multi-)select and radio + * fields, required if that's the field type + * key = (string) value which will be saved to db + * value = (string) text label for the option + * (optional) 'autocomplete' => (bool) whether autocomplete is on for text fields, + * defaults to true + * (optional) 'class' => (string) classname(s) to add to the actual tag + * (optional) 'description' => (string) description to show underneath the field + * (optional) 'expl' => (string) label for a checkbox + * (optional) 'help' => (string) help text to show on mouse over ? image + * (optional) 'rows' => (int) number of rows for a textarea, defaults to 3 + * + * (optional) 'placeholder' => (string) Currently only used by add-on plugins + * (optional) 'serialized' => (bool) whether the value is expected to be serialized, + * i.e. an array or object, defaults to false + * Currently only used by add-on plugins + * + * @static + * + * @internal + * - Titles, help texts, description text and option labels are added via a translate_meta_boxes() method + * in the relevant child classes (WPSEO_Metabox and WPSEO_Social_admin) as they are only needed there. + * - Beware: even though the meta keys are divided into subsets, they still have to be uniquely named! + */ + public static $meta_fields = array( + 'general' => array( + 'snippetpreview' => array( + 'type' => 'snippetpreview', + 'title' => '', // Translation added later. + 'help' => '', // Translation added later. + 'help-button' => '', // Translation added later. + ), + 'focuskw_text_input' => array( + 'type' => 'focuskeyword', + 'title' => '', // Translation added later. + 'default_value' => '', + 'autocomplete' => false, + 'help' => '', // Translation added later. + 'description' => '
    ', + 'help-button' => '', // Translation added later. + ), + 'focuskw' => array( + 'type' => 'hidden', + 'title' => '', + ), + 'title' => array( + 'type' => 'hidden', + 'title' => '', // Translation added later. + 'default_value' => '', + 'description' => '', // Translation added later. + 'help' => '', // Translation added later. + ), + 'metadesc' => array( + 'type' => 'hidden', + 'title' => '', // Translation added later. + 'default_value' => '', + 'class' => 'metadesc', + 'rows' => 2, + 'description' => '', // Translation added later. + 'help' => '', // Translation added later. + ), + 'linkdex' => array( + 'type' => 'hidden', + 'title' => 'linkdex', + 'default_value' => '0', + 'description' => '', + ), + 'content_score' => array( + 'type' => 'hidden', + 'title' => 'content_score', + 'default_value' => '0', + 'description' => '', + ), + 'metakeywords' => array( + 'type' => 'metakeywords', + 'title' => '', // Translation added later. + 'default_value' => '', + 'class' => 'metakeywords', + 'description' => '', // Translation added later. + ), + 'pageanalysis' => array( + 'type' => 'pageanalysis', + 'title' => '', // Translation added later. + 'help' => '', // Translation added later. + 'help-button' => '', // Translation added later. + ), + ), + 'advanced' => array( + 'meta-robots-noindex' => array( + 'type' => 'select', + 'title' => '', // Translation added later. + 'default_value' => '0', // = post-type default. + 'options' => array( + '0' => '', // Post type default - translation added later. + '2' => '', // Index - translation added later. + '1' => '', // No-index - translation added later. + ), + ), + 'meta-robots-nofollow' => array( + 'type' => 'radio', + 'title' => '', // Translation added later. + 'default_value' => '0', // = follow. + 'options' => array( + '0' => '', // Follow - translation added later. + '1' => '', // No-follow - translation added later. + ), + ), + 'meta-robots-adv' => array( + 'type' => 'multiselect', + 'title' => '', // Translation added later. + 'default_value' => '-', // = site-wide default. + 'description' => '', // Translation added later. + 'options' => array( + '-' => '', // Site-wide default - translation added later. + 'none' => '', // Translation added later. + 'noodp' => '', // Translation added later. + 'noimageindex' => '', // Translation added later. + 'noarchive' => '', // Translation added later. + 'nosnippet' => '', // Translation added later. + ), + ), + 'bctitle' => array( + 'type' => 'text', + 'title' => '', // Translation added later. + 'default_value' => '', + 'description' => '', // Translation added later. + ), + 'canonical' => array( + 'type' => 'text', + 'title' => '', // Translation added later. + 'default_value' => '', + 'description' => '', // Translation added later. + ), + 'redirect' => array( + 'type' => 'text', + 'title' => '', // Translation added later. + 'default_value' => '', + 'description' => '', // Translation added later. + ), + ), + 'social' => array(), + /* Fields we should validate & save, but not show on any form */ + 'non_form' => array( + 'linkdex' => array( + 'type' => null, + 'default_value' => '0', + ), + ), + ); + + + /** + * @var array Helper property - reverse index of the definition array + * Format: [full meta key including prefix] => array + * ['subset'] => (string) primary index + * ['key'] => (string) internal key + * @static + */ + public static $fields_index = array(); + + + /** + * @var array Helper property - array containing only the defaults in the format: + * [full meta key including prefix] => (string) default value + * @static + */ + public static $defaults = array(); + + /** + * @var array Helper property to define the social network meta field definitions - networks + * @static + */ + private static $social_networks = array( + 'opengraph' => 'opengraph', + 'twitter' => 'twitter', + ); + + /** + * @var array Helper property to define the social network meta field definitions - fields and their type + * @static + */ + private static $social_fields = array( + 'title' => 'text', + 'description' => 'textarea', + 'image' => 'upload', + ); + + + /** + * Register our actions and filters + * + * @static + * @return void + */ + public static function init() { + + $options = WPSEO_Options::get_option( 'wpseo_social' ); + foreach ( self::$social_networks as $option => $network ) { + if ( true === $options[ $option ] ) { + foreach ( self::$social_fields as $box => $type ) { + self::$meta_fields['social'][ $network . '-' . $box ] = array( + 'type' => $type, + 'title' => '', // Translation added later. + 'default_value' => '', + 'description' => '', // Translation added later. + ); + } + } + } + unset( $options, $option, $network, $box, $type ); + + /** + * Allow add-on plugins to register their meta fields for management by this class + * add_filter() calls must be made before plugins_loaded prio 14 + */ + $extra_fields = apply_filters( 'add_extra_wpseo_meta_fields', array() ); + if ( is_array( $extra_fields ) ) { + self::$meta_fields = self::array_merge_recursive_distinct( $extra_fields, self::$meta_fields ); + } + unset( $extra_fields ); + + $register = function_exists( 'register_meta' ); + + foreach ( self::$meta_fields as $subset => $field_group ) { + foreach ( $field_group as $key => $field_def ) { + if ( $field_def['type'] !== 'snippetpreview' ) { + /** + * Function register_meta() is undocumented and not used by WP internally, wrapped in + * function_exists as a precaution in case they remove it. + */ + if ( $register === true ) { + register_meta( 'post', self::$meta_prefix . $key, array( __CLASS__, 'sanitize_post_meta' ) ); + } + else { + add_filter( 'sanitize_post_meta_' . self::$meta_prefix . $key, array( __CLASS__, 'sanitize_post_meta' ), 10, 2 ); + } + + // Set the $fields_index property for efficiency. + self::$fields_index[ self::$meta_prefix . $key ] = array( + 'subset' => $subset, + 'key' => $key, + ); + + // Set the $defaults property for efficiency. + if ( isset( $field_def['default_value'] ) ) { + self::$defaults[ self::$meta_prefix . $key ] = $field_def['default_value']; + } + else { + // Meta will always be a string, so let's make the meta meta default also a string. + self::$defaults[ self::$meta_prefix . $key ] = ''; + } + } + } + } + unset( $subset, $field_group, $key, $field_def, $register ); + + add_filter( 'update_post_metadata', array( __CLASS__, 'remove_meta_if_default' ), 10, 5 ); + add_filter( 'add_post_metadata', array( __CLASS__, 'dont_save_meta_if_default' ), 10, 4 ); + } + + + /** + * Retrieve the meta box form field definitions for the given tab and post type. + * + * @static + * + * @param string $tab Tab for which to retrieve the field definitions. + * @param string $post_type Post type of the current post. + * + * @return array Array containing the meta box field definitions + */ + public static function get_meta_field_defs( $tab, $post_type = 'post' ) { + if ( ! isset( self::$meta_fields[ $tab ] ) ) { + return array(); + } + + $field_defs = self::$meta_fields[ $tab ]; + + switch ( $tab ) { + case 'non-form': + // Prevent non-form fields from being passed to forms. + $field_defs = array(); + break; + + + case 'general': + $options = WPSEO_Options::get_option( 'wpseo_titles' ); + if ( $options['usemetakeywords'] === true ) { + /* Adjust the link in the keywords description text string based on the post type */ + $field_defs['metakeywords']['description'] = sprintf( $field_defs['metakeywords']['description'], '', '' ); + } + else { + /* Don't show the keywords field if keywords aren't enabled */ + unset( $field_defs['metakeywords'] ); + } + /** + * Filter the WPSEO metabox form field definitions for the general tab, backward compatibility + * + * @deprecated 1.5.0 + * @deprecated use the 'wpseo_metabox_entries_general' filter instead + * @see WPSEO_Meta::get_meta_field_defs() + * + * @param array $field_defs Metabox orm definitions. + * + * @return array + */ + $field_defs = apply_filters( 'wpseo_metabox_entries', $field_defs ); + break; + + + case 'advanced': + global $post; + + $options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_titles', 'wpseo_internallinks' ) ); + + if ( ! current_user_can( 'manage_options' ) && $options['disableadvanced_meta'] ) { + return array(); + } + + $post_type = ''; + if ( isset( $post->post_type ) ) { + $post_type = $post->post_type; + } + elseif ( ! isset( $post->post_type ) && isset( $_GET['post_type'] ) ) { + $post_type = sanitize_text_field( $_GET['post_type'] ); + } + + /* Adjust the no-index 'default for post type' text string based on the post type */ + $field_defs['meta-robots-noindex']['options']['0'] = sprintf( $field_defs['meta-robots-noindex']['options']['0'], ( ( isset( $options[ 'noindex-' . $post_type ] ) && $options[ 'noindex-' . $post_type ] === true ) ? 'noindex' : 'index' ) ); + + /* Adjust the robots advanced 'site-wide default' text string based on those settings */ + if ( $options['noodp'] !== false ) { + $robots_adv = array(); + if ( $options['noodp'] === true ) { + // Use translation from field def options - mind that $options and $field_def['options'] keys should be the same! + $robots_adv[] = $field_defs['meta-robots-adv']['options']['noodp']; + } + $robots_adv = implode( ', ', $robots_adv ); + } + else { + $robots_adv = __( 'None', 'wordpress-seo' ); + } + $field_defs['meta-robots-adv']['options']['-'] = sprintf( $field_defs['meta-robots-adv']['options']['-'], $robots_adv ); + unset( $robots_adv ); + + + /* Don't show the breadcrumb title field if breadcrumbs aren't enabled */ + if ( $options['breadcrumbs-enable'] !== true && ! current_theme_supports( 'yoast-seo-breadcrumbs' ) ) { + unset( $field_defs['bctitle'] ); + } + + global $post; + + if ( empty( $post->ID ) || ( ! empty( $post->ID ) && self::get_value( 'redirect', $post->ID ) === '' ) ) { + unset( $field_defs['redirect'] ); + } + break; + } + + /** + * Filter the WPSEO metabox form field definitions for a tab + * {tab} can be 'general', 'advanced' or 'social' + * + * @param array $field_defs Metabox form definitions. + * @param string $post_type Post type of the post the metabox is for, defaults to 'post'. + * + * @return array + */ + + return apply_filters( 'wpseo_metabox_entries_' . $tab, $field_defs, $post_type ); + } + + + /** + * Validate the post meta values + * + * @static + * + * @param mixed $meta_value The new value. + * @param string $meta_key The full meta key (including prefix). + * + * @return string Validated meta value + */ + public static function sanitize_post_meta( $meta_value, $meta_key ) { + $field_def = self::$meta_fields[ self::$fields_index[ $meta_key ]['subset'] ][ self::$fields_index[ $meta_key ]['key'] ]; + $clean = self::$defaults[ $meta_key ]; + + switch ( true ) { + case ( $meta_key === self::$meta_prefix . 'linkdex' ): + $int = WPSEO_Utils::validate_int( $meta_value ); + if ( $int !== false && $int >= 0 ) { + $clean = strval( $int ); // Convert to string to make sure default check works. + } + break; + + case ( $field_def['type'] === 'checkbox' ): + // Only allow value if it's one of the predefined options. + if ( in_array( $meta_value, array( 'on', 'off' ), true ) ) { + $clean = $meta_value; + } + break; + + + case ( $field_def['type'] === 'select' || $field_def['type'] === 'radio' ): + // Only allow value if it's one of the predefined options. + if ( isset( $field_def['options'][ $meta_value ] ) ) { + $clean = $meta_value; + } + break; + + + case ( $field_def['type'] === 'multiselect' && $meta_key === self::$meta_prefix . 'meta-robots-adv' ): + $clean = self::validate_meta_robots_adv( $meta_value ); + break; + + + case ( $field_def['type'] === 'text' && $meta_key === self::$meta_prefix . 'canonical' ): + case ( $field_def['type'] === 'text' && $meta_key === self::$meta_prefix . 'redirect' ): + // Validate as url(-part). + $url = WPSEO_Utils::sanitize_url( $meta_value ); + if ( $url !== '' ) { + $clean = $url; + } + break; + + + case ( $field_def['type'] === 'upload' && $meta_key === self::$meta_prefix . 'opengraph-image' ): + // Validate as url. + $url = WPSEO_Utils::sanitize_url( $meta_value, array( 'http', 'https', 'ftp', 'ftps' ) ); + if ( $url !== '' ) { + $clean = $url; + } + break; + + + case ( $field_def['type'] === 'textarea' ): + if ( is_string( $meta_value ) ) { + // Remove line breaks and tabs. + // @todo [JRF => Yoast] verify that line breaks and the likes aren't allowed/recommended in meta header fields. + $meta_value = str_replace( array( "\n", "\r", "\t", ' ' ), ' ', $meta_value ); + $clean = WPSEO_Utils::sanitize_text_field( trim( $meta_value ) ); + } + break; + + case ( 'multiselect' === $field_def['type'] ): + $clean = $meta_value; + break; + + + case ( $field_def['type'] === 'text' ): + default: + if ( is_string( $meta_value ) ) { + $clean = WPSEO_Utils::sanitize_text_field( trim( $meta_value ) ); + } + + if ( $meta_key === self::$meta_prefix . 'focuskw' ) { + $clean = str_replace( array( + '<', + '>', + '"', + '`', + '<', + '>', + '"', + '`', + ), '', $clean ); + } + break; + } + + $clean = apply_filters( 'wpseo_sanitize_post_meta_' . $meta_key, $clean, $meta_value, $field_def, $meta_key ); + + return $clean; + } + + + /** + * Validate a meta-robots-adv meta value + * + * @todo [JRF => Yoast] Verify that this logic for the prioritisation is correct + * + * @static + * + * @param array|string $meta_value The value to validate. + * + * @return string Clean value + */ + public static function validate_meta_robots_adv( $meta_value ) { + $clean = self::$meta_fields['advanced']['meta-robots-adv']['default_value']; + $options = self::$meta_fields['advanced']['meta-robots-adv']['options']; + + if ( is_string( $meta_value ) ) { + $meta_value = explode( ',', $meta_value ); + } + + if ( is_array( $meta_value ) && $meta_value !== array() ) { + $meta_value = array_map( 'trim', $meta_value ); + + if ( in_array( 'none', $meta_value, true ) ) { + // None is one of the selected values, takes priority over everything else. + $clean = 'none'; + } + elseif ( in_array( '-', $meta_value, true ) ) { + // Site-wide defaults is one of the selected values, takes priority over individual selected entries. + $clean = '-'; + } + else { + // Individual selected entries. + $cleaning = array(); + foreach ( $meta_value as $value ) { + if ( isset( $options[ $value ] ) ) { + $cleaning[] = $value; + } + } + + if ( $cleaning !== array() ) { + $clean = implode( ',', $cleaning ); + } + unset( $cleaning, $value ); + } + } + + return $clean; + } + + + /** + * Prevent saving of default values and remove potential old value from the database if replaced by a default + * + * @static + * + * @param null $null Old, disregard. + * @param int $object_id ID of the current object for which the meta is being updated. + * @param string $meta_key The full meta key (including prefix). + * @param string $meta_value New meta value. + * @param string $prev_value The old meta value. + * + * @return null|bool true = stop saving, null = continue saving + */ + public static function remove_meta_if_default( $null, $object_id, $meta_key, $meta_value, $prev_value = '' ) { + /* If it's one of our meta fields, check against default */ + if ( isset( self::$fields_index[ $meta_key ] ) && self::meta_value_is_default( $meta_key, $meta_value ) === true ) { + if ( $prev_value !== '' ) { + delete_post_meta( $object_id, $meta_key, $prev_value ); + } + else { + delete_post_meta( $object_id, $meta_key ); + } + + return true; // Stop saving the value. + } + + return null; // Go on with the normal execution (update) in meta.php. + } + + + /** + * Prevent adding of default values to the database + * + * @static + * + * @param null $null Old, disregard. + * @param int $object_id ID of the current object for which the meta is being added. + * @param string $meta_key The full meta key (including prefix). + * @param string $meta_value New meta value. + * + * @return null|bool true = stop saving, null = continue saving + */ + public static function dont_save_meta_if_default( $null, $object_id, $meta_key, $meta_value ) { + /* If it's one of our meta fields, check against default */ + if ( isset( self::$fields_index[ $meta_key ] ) && self::meta_value_is_default( $meta_key, $meta_value ) === true ) { + return true; // Stop saving the value. + } + + return null; // Go on with the normal execution (add) in meta.php. + } + + + /** + * Is the given meta value the same as the default value ? + * + * @static + * + * @param string $meta_key The full meta key (including prefix). + * @param mixed $meta_value The value to check. + * + * @return bool + */ + public static function meta_value_is_default( $meta_key, $meta_value ) { + return ( isset( self::$defaults[ $meta_key ] ) && $meta_value === self::$defaults[ $meta_key ] ); + } + + + /** + * Get a custom post meta value + * Returns the default value if the meta value has not been set + * + * @internal Unfortunately there isn't a filter available to hook into before returning the results + * for get_post_meta(), get_post_custom() and the likes. That would have been the preferred solution. + * + * @static + * + * @param string $key Internal key of the value to get (without prefix). + * @param int $postid Post ID of the post to get the value for. + * + * @return string All 'normal' values returned from get_post_meta() are strings. + * Objects and arrays are possible, but not used by this plugin + * and therefore discarted (except when the special 'serialized' field def + * value is set to true - only used by add-on plugins for now). + * Will return the default value if no value was found.. + * Will return empty string if no default was found (not one of our keys) or + * if the post does not exist. + */ + public static function get_value( $key, $postid = 0 ) { + global $post; + + $postid = absint( $postid ); + if ( $postid === 0 ) { + if ( ( isset( $post ) && is_object( $post ) ) && ( isset( $post->post_status ) && $post->post_status !== 'auto-draft' ) ) { + $postid = $post->ID; + } + else { + return ''; + } + } + + $custom = get_post_custom( $postid ); // Array of strings or empty array. + + if ( isset( $custom[ self::$meta_prefix . $key ][0] ) ) { + $unserialized = maybe_unserialize( $custom[ self::$meta_prefix . $key ][0] ); + if ( $custom[ self::$meta_prefix . $key ][0] === $unserialized ) { + return $custom[ self::$meta_prefix . $key ][0]; + } + else { + $field_def = self::$meta_fields[ self::$fields_index[ self::$meta_prefix . $key ]['subset'] ][ self::$fields_index[ self::$meta_prefix . $key ]['key'] ]; + if ( isset( $field_def['serialized'] ) && $field_def['serialized'] === true ) { + // Ok, serialize value expected/allowed. + return $unserialized; + } + } + } + + // Meta was either not found or found, but object/array while not allowed to be. + if ( isset( self::$defaults[ self::$meta_prefix . $key ] ) ) { + return self::$defaults[ self::$meta_prefix . $key ]; + } + else { + /* + Shouldn't ever happen, means not one of our keys as there will always be a default available + for all our keys + */ + return ''; + } + } + + + /** + * Update a meta value for a post + * + * @static + * + * @param string $key The internal key of the meta value to change (without prefix). + * @param mixed $meta_value The value to set the meta to. + * @param int $post_id The ID of the post to change the meta for. + * + * @return bool whether the value was changed + */ + public static function set_value( $key, $meta_value, $post_id ) { + return update_post_meta( $post_id, self::$meta_prefix . $key, $meta_value ); + } + + /** + * Deletes a meta value for a post + * + * @static + * + * @param string $key The internal key of the meta value to change (without prefix). + * @param int $post_id The ID of the post to change the meta for. + * + * @return bool Whether the value was changed + */ + public static function delete( $key, $post_id ) { + return delete_post_meta( $post_id, self::$meta_prefix . $key ); + } + + /** + * Used for imports, this functions imports the value of $old_metakey into $new_metakey for those post + * where no WPSEO meta data has been set. + * Optionally deletes the $old_metakey values. + * + * @static + * + * @param string $old_metakey The old key of the meta value. + * @param string $new_metakey The new key, usually the WPSEO meta key (including prefix). + * @param bool $delete_old Whether to delete the old meta key/value-sets. + * + * @return void + */ + public static function replace_meta( $old_metakey, $new_metakey, $delete_old = false ) { + global $wpdb; + + /* + Get only those rows where no wpseo meta values exist for the same post + (with the exception of linkdex as that will be set independently of whether the post has been edited) + @internal Query is pretty well optimized this way + */ + $query = $wpdb->prepare( + " + SELECT `a`.* + FROM {$wpdb->postmeta} AS a + WHERE `a`.`meta_key` = %s + AND NOT EXISTS ( + SELECT DISTINCT `post_id` , count( `meta_id` ) AS count + FROM {$wpdb->postmeta} AS b + WHERE `a`.`post_id` = `b`.`post_id` + AND `meta_key` LIKE %s + AND `meta_key` <> %s + GROUP BY `post_id` + ) + ;", + $old_metakey, + $wpdb->esc_like( self::$meta_prefix . '%' ), + self::$meta_prefix . 'linkdex' + ); + $oldies = $wpdb->get_results( $query ); + + if ( is_array( $oldies ) && $oldies !== array() ) { + foreach ( $oldies as $old ) { + update_post_meta( $old->post_id, $new_metakey, $old->meta_value ); + } + } + + // Delete old keys. + if ( $delete_old === true ) { + delete_post_meta_by_key( $old_metakey ); + } + } + + + /** + * General clean-up of the saved meta values + * - Remove potentially lingering old meta keys + * - Remove all default and invalid values + * + * @static + * @return void + */ + public static function clean_up() { + global $wpdb; + + /** + * Clean up '_yoast_wpseo_meta-robots' + * + * Retrieve all '_yoast_wpseo_meta-robots' meta values and convert if no new values found + * + * @internal Query is pretty well optimized this way + * + * @todo [JRF => Yoast] find out all possible values which the old '_yoast_wpseo_meta-robots' could contain + * to convert the data correctly + */ + $query = $wpdb->prepare( + " + SELECT `a`.* + FROM {$wpdb->postmeta} AS a + WHERE `a`.`meta_key` = %s + AND NOT EXISTS ( + SELECT DISTINCT `post_id` , count( `meta_id` ) AS count + FROM {$wpdb->postmeta} AS b + WHERE `a`.`post_id` = `b`.`post_id` + AND ( `meta_key` = %s + OR `meta_key` = %s ) + GROUP BY `post_id` + ) + ;", + self::$meta_prefix . 'meta-robots', + self::$meta_prefix . 'meta-robots-noindex', + self::$meta_prefix . 'meta-robots-nofollow' + ); + $oldies = $wpdb->get_results( $query ); + + if ( is_array( $oldies ) && $oldies !== array() ) { + foreach ( $oldies as $old ) { + $old_values = explode( ',', $old->meta_value ); + foreach ( $old_values as $value ) { + if ( $value === 'noindex' ) { + update_post_meta( $old->post_id, self::$meta_prefix . 'meta-robots-noindex', 1 ); + } + elseif ( $value === 'nofollow' ) { + update_post_meta( $old->post_id, self::$meta_prefix . 'meta-robots-nofollow', 1 ); + } + } + } + } + unset( $query, $oldies, $old, $old_values, $value ); + + // Delete old keys. + delete_post_meta_by_key( self::$meta_prefix . 'meta-robots' ); + + + /** + * Remove all default values and (most) invalid option values + * Invalid option values for the multiselect (meta-robots-adv) field will be dealt with seperately + * + * @internal some of the defaults have changed in v1.5, but as the defaults will be removed and + * new defaults will now automatically be passed when no data found, this update is automatic + * (as long as we remove the old values which we do in the below routine) + * + * @internal unfortunately we can't use the normal delete_meta() with key/value combination as '' + * (empty string) values will be ignored and would result in all metas with that key being deleted, + * not just the empty fields. + * Still, the below implementation is largely based on the delete_meta() function + */ + $query = array(); + + foreach ( self::$meta_fields as $subset => $field_group ) { + foreach ( $field_group as $key => $field_def ) { + if ( $field_def['type'] === 'snippetpreview' || ! isset( $field_def['default_value'] ) ) { + continue; + } + + if ( $key === 'meta-robots-adv' ) { + $query[] = $wpdb->prepare( + "( meta_key = %s AND ( meta_value = 'none' OR meta_value = '-' ) )", + self::$meta_prefix . $key + ); + } + elseif ( isset( $field_def['options'] ) && is_array( $field_def['options'] ) && $field_def['options'] !== array() ) { + $valid = $field_def['options']; + // Remove the default value from the valid options. + unset( $valid[ $field_def['default_value'] ] ); + $valid = array_keys( $valid ); + + $query[] = $wpdb->prepare( + "( meta_key = %s AND meta_value NOT IN ( '" . implode( "','", esc_sql( $valid ) ) . "' ) )", + self::$meta_prefix . $key + ); + unset( $valid ); + } + elseif ( is_string( $field_def['default_value'] ) && $field_def['default_value'] !== '' ) { + $query[] = $wpdb->prepare( + '( meta_key = %s AND meta_value = %s )', + self::$meta_prefix . $key, + $field_def['default_value'] + ); + } + else { + $query[] = $wpdb->prepare( + "( meta_key = %s AND meta_value = '' )", + self::$meta_prefix . $key + ); + } + } + } + unset( $subset, $field_group, $key, $field_def ); + + $query = "SELECT meta_id FROM {$wpdb->postmeta} WHERE " . implode( ' OR ', $query ) . ';'; + $meta_ids = $wpdb->get_col( $query ); + + if ( is_array( $meta_ids ) && $meta_ids !== array() ) { + // WP native action. + do_action( 'delete_post_meta', $meta_ids, null, null, null ); + + $query = "DELETE FROM {$wpdb->postmeta} WHERE meta_id IN( " . implode( ',', $meta_ids ) . ' )'; + $count = $wpdb->query( $query ); + + if ( $count ) { + foreach ( $meta_ids as $object_id ) { + wp_cache_delete( $object_id, 'post_meta' ); + } + + // WP native action. + do_action( 'deleted_post_meta', $meta_ids, null, null, null ); + } + } + unset( $query, $meta_ids, $count, $object_id ); + + + /** + * Deal with the multiselect (meta-robots-adv) field + * + * Removes invalid option combinations, such as 'none,noarchive' + * + * Default values have already been removed, so we should have a small result set and + * (hopefully) even smaller set of invalid results. + */ + $query = $wpdb->prepare( + "SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s", + self::$meta_prefix . 'meta-robots-adv' + ); + $oldies = $wpdb->get_results( $query ); + + if ( is_array( $oldies ) && $oldies !== array() ) { + foreach ( $oldies as $old ) { + $clean = self::validate_meta_robots_adv( $old->meta_value ); + + if ( $clean !== $old->meta_value ) { + if ( $clean !== self::$meta_fields['advanced']['meta-robots-adv']['default_value'] ) { + update_metadata_by_mid( 'post', $old->meta_id, $clean ); + } + else { + delete_metadata_by_mid( 'post', $old->meta_id ); + } + } + } + } + unset( $query, $oldies, $old, $clean ); + + do_action( 'wpseo_meta_clean_up' ); + } + + + /** + * Recursively merge a variable number of arrays, using the left array as base, + * giving priority to the right array. + * + * Difference with native array_merge_recursive(): + * array_merge_recursive converts values with duplicate keys to arrays rather than + * overwriting the value in the first array with the duplicate value in the second array. + * + * array_merge_recursive_distinct does not change the data types of the values in the arrays. + * Matching keys' values in the second array overwrite those in the first array, as is the + * case with array_merge. + * + * Freely based on information found on http://www.php.net/manual/en/function.array-merge-recursive.php + * + * @internal Should be moved to a general utility class + * + * @return array + */ + public static function array_merge_recursive_distinct() { + + $arrays = func_get_args(); + if ( count( $arrays ) < 2 ) { + if ( $arrays === array() ) { + return array(); + } + else { + return $arrays[0]; + } + } + + $merged = array_shift( $arrays ); + + foreach ( $arrays as $array ) { + foreach ( $array as $key => $value ) { + if ( is_array( $value ) && ( isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) ) { + $merged[ $key ] = self::array_merge_recursive_distinct( $merged[ $key ], $value ); + } + else { + $merged[ $key ] = $value; + } + } + unset( $key, $value ); + } + + return $merged; + } + + /** + * Get a value from $_POST for a given key + * Returns the $_POST value if exists, returns an empty string if key does not exist + * + * @static + * + * @param string $key Key of the value to get from $_POST. + * + * @return string Returns $_POST value, which will be a string the majority of the time + * Will return empty string if key does not exists in $_POST + */ + public static function get_post_value( $key ) { + return ( array_key_exists( $key, $_POST ) ) ? $_POST[ $key ] : ''; + } + + /** + * Counts the total of all the keywords being used for posts except the given one + * + * @param string $keyword The keyword to be counted. + * @param integer $post_id The is of the post to which the keyword belongs. + * + * @return array + */ + public static function keyword_usage( $keyword, $post_id ) { + + if ( empty( $keyword ) ) { + return array(); + } + + $get_posts = new WP_Query( + array( + 'meta_key' => '_yoast_wpseo_focuskw', + 'meta_value' => $keyword, + 'post__not_in' => array( $post_id ), + 'fields' => 'ids', + 'post_type' => 'any', + + /* + * We only need to return zero, one or two results: + * - Zero: keyword hasn't been used before + * - One: Keyword has been used once before + * - Two or more: Keyword has been used twice before + */ + 'posts_per_page' => 2, + ) + ); + + return $get_posts->posts; + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-primary-term.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-primary-term.php new file mode 100644 index 0000000..24b46c2 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-primary-term.php @@ -0,0 +1,74 @@ +taxonomy_name = $taxonomy_name; + $this->post_ID = $post_id; + } + + /** + * Returns the primary term ID + * + * @return int|bool + */ + public function get_primary_term() { + $primary_term = get_post_meta( $this->post_ID, WPSEO_Meta::$meta_prefix . 'primary_' . $this->taxonomy_name, true ); + + $terms = $this->get_terms(); + + if ( ! in_array( $primary_term, wp_list_pluck( $terms, 'term_id' ) ) ) { + $primary_term = false; + } + + $primary_term = (int) $primary_term; + return ( $primary_term ) ? ( $primary_term ) : false; + } + + /** + * Sets the new primary term ID + * + * @param int $new_primary_term New primary term ID. + */ + public function set_primary_term( $new_primary_term ) { + update_post_meta( $this->post_ID, WPSEO_Meta::$meta_prefix . 'primary_' . $this->taxonomy_name, $new_primary_term ); + } + + /** + * Get the terms for the current post ID. + * When $terms is not an array, set $terms to an array. + * + * @return array + */ + protected function get_terms() { + $terms = get_the_terms( $this->post_ID, $this->taxonomy_name ); + + if ( ! is_array( $terms ) ) { + $terms = array(); + } + + return $terms; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-rank.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-rank.php new file mode 100644 index 0000000..99adb5e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-rank.php @@ -0,0 +1,192 @@ + array( + 'start' => 0, + 'end' => 0, + ), + self::BAD => array( + 'start' => 1, + 'end' => 40, + ), + self::OK => array( + 'start' => 41, + 'end' => 70, + ), + self::GOOD => array( + 'start' => 71, + 'end' => 100, + ), + ); + + /** + * @var int + */ + protected $rank; + + /** + * @param int $rank The actual rank. + */ + public function __construct( $rank ) { + if ( ! in_array( $rank, self::$ranks ) ) { + $rank = self::BAD; + } + + $this->rank = $rank; + } + + /** + * Returns the saved rank for this rank. + * + * @return string + */ + public function get_rank() { + return $this->rank; + } + + /** + * Returns a CSS class for this rank + * + * @return string + */ + public function get_css_class() { + $labels = array( + self::NO_FOCUS => 'na', + self::NO_INDEX => 'noindex', + self::BAD => 'bad', + self::OK => 'ok', + self::GOOD => 'good', + ); + + return $labels[ $this->rank ]; + } + + /** + * Returns a label for this rank + * + * @return string + */ + public function get_label() { + $labels = array( + self::NO_FOCUS => __( 'Not available', 'wordpress-seo' ), + self::NO_INDEX => __( 'No index', 'wordpress-seo' ), + self::BAD => __( 'Bad', 'wordpress-seo' ), + self::OK => __( 'OK', 'wordpress-seo' ), + self::GOOD => __( 'Good', 'wordpress-seo' ), + ); + + return $labels[ $this->rank ]; + } + + /** + * Returns a label for use in a drop down + * + * @return mixed + */ + public function get_drop_down_label() { + $labels = array( + self::NO_FOCUS => __( 'SEO: No Focus Keyword', 'wordpress-seo' ), + self::BAD => __( 'SEO: Bad', 'wordpress-seo' ), + self::OK => __( 'SEO: OK', 'wordpress-seo' ), + self::GOOD => __( 'SEO: Good', 'wordpress-seo' ), + self::NO_INDEX => __( 'SEO: Post Noindexed', 'wordpress-seo' ), + ); + + return $labels[ $this->rank ]; + } + + /** + * @return int The starting score for this rank. + */ + public function get_starting_score() { + // No index does not have a starting score. + if ( self::NO_INDEX === $this->rank ) { + return -1; + } + + return self::$ranges[ $this->rank ]['start']; + } + + /** + * @return int The end score for this rank. + */ + public function get_end_score() { + // No index does not have an end score. + if ( self::NO_INDEX === $this->rank ) { + return -1; + } + + return self::$ranges[ $this->rank ]['end']; + } + + /** + * Returns a rank for a specific numeric score + * + * @param int $score The score to determine a rank for. + * + * @return self + */ + public static function from_numeric_score( $score ) { + // Set up the default value. + $rank = new self( self::BAD ); + + foreach ( self::$ranges as $rank_index => $range ) { + if ( $range['start'] <= $score && $score <= $range['end'] ) { + $rank = new self( $rank_index ); + break; + } + } + + return $rank; + } + + /** + * Returns a list of all possible SEO Ranks + * + * @return WPSEO_Rank[] + */ + public static function get_all_ranks() { + return array_map( array( 'WPSEO_Rank', 'create_rank' ), self::$ranks ); + } + + /** + * Converts a numeric rank into a WPSEO_Rank object, for use in functional array_* functions + * + * @param string $rank SEO Rank. + * + * @return WPSEO_Rank + */ + private static function create_rank( $rank ) { + return new self( $rank ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-replace-vars.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-replace-vars.php new file mode 100644 index 0000000..3ea367c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-replace-vars.php @@ -0,0 +1,1215 @@ + '', + 'name' => '', + 'post_author' => '', + 'post_content' => '', + 'post_date' => '', + 'post_excerpt' => '', + 'post_modified' => '', + 'post_title' => '', + 'taxonomy' => '', + 'term_id' => '', + 'term404' => '', + ); + + /** + * @var object Current post/page/cpt information + */ + protected $args; + + /** + * @var array Help texts for use in WPSEO -> Titles and Meta's help tabs + */ + protected static $help_texts = array(); + + /** + * @var array Register of additional variable replacements registered by other plugins/themes + */ + protected static $external_replacements = array(); + + + /** + * Constructor + * + * @return \WPSEO_Replace_Vars + */ + public function __construct() { + } + + + /** + * Setup the help texts and external replacements as statics so they will be available to all instances + */ + public static function setup_statics_once() { + if ( self::$help_texts === array() ) { + self::set_basic_help_texts(); + self::set_advanced_help_texts(); + } + + if ( self::$external_replacements === array() ) { + /** + * Action: 'wpseo_register_extra_replacements' - Allows for registration of additional + * variables to replace + */ + do_action( 'wpseo_register_extra_replacements' ); + } + } + + + /** + * Register new replacement %%variables%% + * For use by other plugins/themes to register extra variables + * + * @see wpseo_register_var_replacement() for a usage example + * + * @param string $var The name of the variable to replace, i.e. '%%var%%' + * - the surrounding %% are optional. + * @param mixed $replace_function Function or method to call to retrieve the replacement value for the variable + * Uses the same format as add_filter/add_action function parameter and + * should *return* the replacement value. DON'T echo it. + * @param string $type Type of variable: 'basic' or 'advanced', defaults to 'advanced'. + * @param string $help_text Help text to be added to the help tab for this variable. + * + * @return bool Whether the replacement function was succesfully registered + */ + public static function register_replacement( $var, $replace_function, $type = 'advanced', $help_text = '' ) { + $success = false; + + if ( is_string( $var ) && $var !== '' ) { + $var = self::remove_var_delimiter( $var ); + + if ( preg_match( '`^[A-Z0-9_-]+$`i', $var ) === false ) { + trigger_error( __( 'A replacement variable can only contain alphanumeric characters, an underscore or a dash. Try renaming your variable.', 'wordpress-seo' ), E_USER_WARNING ); + } + elseif ( strpos( $var, 'cf_' ) === 0 || strpos( $var, 'ct_' ) === 0 ) { + trigger_error( __( 'A replacement variable can not start with "%%cf_" or "%%ct_" as these are reserved for the WPSEO standard variable variables for custom fields and custom taxonomies. Try making your variable name unique.', 'wordpress-seo' ), E_USER_WARNING ); + } + elseif ( ! method_exists( __CLASS__, 'retrieve_' . $var ) ) { + if ( ! isset( self::$external_replacements[ $var ] ) ) { + self::$external_replacements[ $var ] = $replace_function; + self::register_help_text( $type, $var, $help_text ); + $success = true; + } + else { + trigger_error( __( 'A replacement variable with the same name has already been registered. Try making your variable name more unique.', 'wordpress-seo' ), E_USER_WARNING ); + } + } + else { + trigger_error( __( 'You cannot overrule a WPSEO standard variable replacement by registering a variable with the same name. Use the "wpseo_replacements" filter instead to adjust the replacement value.', 'wordpress-seo' ), E_USER_WARNING ); + } + } + + return $success; + } + + + /** + * Replace `%%variable_placeholders%%` with their real value based on the current requested page/post/cpt/etc + * + * @param string $string the string to replace the variables in. + * @param array $args the object some of the replacement values might come from, + * could be a post, taxonomy or term. + * @param array $omit variables that should not be replaced by this function. + * + * @return string + */ + public function replace( $string, $args, $omit = array() ) { + + $string = strip_tags( $string ); + + // Let's see if we can bail super early. + if ( strpos( $string, '%%' ) === false ) { + return WPSEO_Utils::standardize_whitespace( $string ); + } + + $args = (array) $args; + if ( isset( $args['post_content'] ) && ! empty( $args['post_content'] ) ) { + $args['post_content'] = WPSEO_Utils::strip_shortcode( $args['post_content'] ); + } + if ( isset( $args['post_excerpt'] ) && ! empty( $args['post_excerpt'] ) ) { + $args['post_excerpt'] = WPSEO_Utils::strip_shortcode( $args['post_excerpt'] ); + } + $this->args = (object) wp_parse_args( $args, $this->defaults ); + + // Clean $omit array. + if ( is_array( $omit ) && $omit !== array() ) { + $omit = array_map( array( __CLASS__, 'remove_var_delimiter' ), $omit ); + } + + $replacements = array(); + if ( preg_match_all( '`%%([^%]+(%%single)?)%%?`iu', $string, $matches ) ) { + $replacements = $this->set_up_replacements( $matches, $omit ); + } + + /** + * Filter: 'wpseo_replacements' - Allow customization of the replacements before they are applied + * + * @api array $replacements The replacements + */ + $replacements = apply_filters( 'wpseo_replacements', $replacements ); + + // Do the actual replacements. + if ( is_array( $replacements ) && $replacements !== array() ) { + $string = str_replace( array_keys( $replacements ), array_values( $replacements ), $string ); + } + + /** + * Filter: 'wpseo_replacements_final' - Allow overruling of whether or not to remove placeholders + * which didn't yield a replacement + * + * @example add_filter( 'wpseo_replacements_final', '__return_false' ); + * + * @api bool $final + */ + if ( apply_filters( 'wpseo_replacements_final', true ) === true && ( isset( $matches[1] ) && is_array( $matches[1] ) ) ) { + // Remove non-replaced variables. + $remove = array_diff( $matches[1], $omit ); // Make sure the $omit variables do not get removed. + $remove = array_map( array( __CLASS__, 'add_var_delimiter' ), $remove ); + $string = str_replace( $remove, '', $string ); + } + + // Undouble separators which have nothing between them, i.e. where a non-replaced variable was removed. + if ( isset( $replacements['%%sep%%'] ) && ( is_string( $replacements['%%sep%%'] ) && $replacements['%%sep%%'] !== '' ) ) { + $q_sep = preg_quote( $replacements['%%sep%%'], '`' ); + $string = preg_replace( '`' . $q_sep . '(?:\s*' . $q_sep . ')*`u', $replacements['%%sep%%'], $string ); + } + + // Remove superfluous whitespace. + $string = WPSEO_Utils::standardize_whitespace( $string ); + + return trim( $string ); + } + + + /** + * Retrieve the replacements for the variables found. + * + * @param array $matches variables found in the original string - regex result. + * @param array $omit variables that should not be replaced by this function. + * + * @return array retrieved replacements - this might be a smaller array as some variables + * may not yield a replacement in certain contexts. + */ + private function set_up_replacements( $matches, $omit ) { + + $replacements = array(); + + // @todo -> figure out a way to deal with external functions starting with cf_/ct_. + foreach ( $matches[1] as $k => $var ) { + + // Don't set up replacements which should be omitted. + if ( in_array( $var, $omit, true ) ) { + continue; + } + + // Deal with variable variable names first. + if ( strpos( $var, 'cf_' ) === 0 ) { + $replacement = $this->retrieve_cf_custom_field_name( $var ); + } + elseif ( strpos( $var, 'ct_desc_' ) === 0 ) { + $replacement = $this->retrieve_ct_desc_custom_tax_name( $var ); + } + elseif ( strpos( $var, 'ct_' ) === 0 ) { + $single = ( isset( $matches[2][ $k ] ) && $matches[2][ $k ] !== '' ) ? true : false; + $replacement = $this->retrieve_ct_custom_tax_name( $var, $single ); + } // Deal with non-variable variable names. + elseif ( method_exists( $this, 'retrieve_' . $var ) ) { + $method_name = 'retrieve_' . $var; + $replacement = $this->$method_name(); + } // Deal with externally defined variable names. + elseif ( isset( self::$external_replacements[ $var ] ) && ! is_null( self::$external_replacements[ $var ] ) ) { + $replacement = call_user_func( self::$external_replacements[ $var ], $var, $this->args ); + } + + // Replacement retrievals can return null if no replacement can be determined, root those outs. + if ( isset( $replacement ) ) { + $var = self::add_var_delimiter( $var ); + $replacements[ $var ] = $replacement; + } + unset( $replacement, $single, $method_name ); + } + + return $replacements; + } + + + + /* *********************** BASIC VARIABLES ************************** */ + + /** + * Retrieve the post/cpt categories (comma separated) for use as replacement string. + * + * @return string|null + */ + private function retrieve_category() { + $replacement = null; + + if ( ! empty( $this->args->ID ) ) { + $cat = $this->get_terms( $this->args->ID, 'category' ); + if ( $cat !== '' ) { + $replacement = $cat; + } + } + + if ( ( ! isset( $replacement ) || $replacement === '' ) && ( isset( $this->args->cat_name ) && ! empty( $this->args->cat_name ) ) ) { + $replacement = $this->args->cat_name; + } + + return $replacement; + } + + /** + * Retrieve the category description for use as replacement string. + * + * @return string|null + */ + private function retrieve_category_description() { + return $this->retrieve_term_description(); + } + + /** + * Retrieve the date of the post/page/cpt for use as replacement string. + * + * @return string|null + */ + private function retrieve_date() { + $replacement = null; + + if ( $this->args->post_date !== '' ) { + $replacement = mysql2date( get_option( 'date_format' ), $this->args->post_date, true ); + } + else { + if ( get_query_var( 'day' ) && get_query_var( 'day' ) !== '' ) { + $replacement = get_the_date(); + } + else { + if ( single_month_title( ' ', false ) && single_month_title( ' ', false ) !== '' ) { + $replacement = single_month_title( ' ', false ); + } + elseif ( get_query_var( 'year' ) !== '' ) { + $replacement = get_query_var( 'year' ); + } + } + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt excerpt for use as replacement string. + * The excerpt will be auto-generated if it does not exist. + * + * @return string|null + */ + private function retrieve_excerpt() { + $replacement = null; + + if ( ! empty( $this->args->ID ) ) { + if ( $this->args->post_excerpt !== '' ) { + $replacement = strip_tags( $this->args->post_excerpt ); + } + elseif ( $this->args->post_content !== '' ) { + $replacement = wp_html_excerpt( strip_shortcodes( $this->args->post_content ), 155 ); + } + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt excerpt for use as replacement string (without auto-generation). + * + * @return string|null + */ + private function retrieve_excerpt_only() { + $replacement = null; + + if ( ! empty( $this->args->ID ) && $this->args->post_excerpt !== '' ) { + $replacement = strip_tags( $this->args->post_excerpt ); + } + + return $replacement; + } + + /** + * Retrieve the title of the parent page of the current page/cpt for use as replacement string. + * Only applicable for hierarchical post types. + * + * @todo - check: shouldn't this use $this->args as well ? + * + * @return string|null + */ + private function retrieve_parent_title() { + $replacement = null; + + if ( ! isset( $replacement ) && ( ( is_singular() || is_admin() ) && isset( $GLOBALS['post'] ) ) ) { + if ( isset( $GLOBALS['post']->post_parent ) && 0 !== $GLOBALS['post']->post_parent ) { + $replacement = get_the_title( $GLOBALS['post']->post_parent ); + } + } + + return $replacement; + } + + /** + * Retrieve the current search phrase for use as replacement string. + * + * @return string|null + */ + private function retrieve_searchphrase() { + $replacement = null; + + if ( ! isset( $replacement ) ) { + $search = get_query_var( 's' ); + if ( $search !== '' ) { + $replacement = esc_html( $search ); + } + } + + return $replacement; + } + + /** + * Retrieve the separator for use as replacement string. + * + * @return string + */ + private function retrieve_sep() { + return WPSEO_Utils::get_title_separator(); + } + + /** + * Retrieve the site's tag line / description for use as replacement string. + * + * @return string|null + */ + private function retrieve_sitedesc() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $description = trim( strip_tags( get_bloginfo( 'description' ) ) ); + if ( $description !== '' ) { + $replacement = $description; + } + } + + return $replacement; + } + + + /** + * Retrieve the site's name for use as replacement string. + * + * @return string|null + */ + private function retrieve_sitename() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $sitename = WPSEO_Utils::get_site_name(); + if ( $sitename !== '' ) { + $replacement = $sitename; + } + } + + return $replacement; + } + + /** + * Retrieve the current tag/tags for use as replacement string. + * + * @return string|null + */ + private function retrieve_tag() { + $replacement = null; + + if ( isset( $this->args->ID ) ) { + $tags = $this->get_terms( $this->args->ID, 'post_tag' ); + if ( $tags !== '' ) { + $replacement = $tags; + } + } + + return $replacement; + } + + /** + * Retrieve the tag description for use as replacement string. + * + * @return string|null + */ + private function retrieve_tag_description() { + return $this->retrieve_term_description(); + } + + /** + * Retrieve the term description for use as replacement string. + * + * @return string|null + */ + private function retrieve_term_description() { + $replacement = null; + + if ( isset( $this->args->term_id ) && ! empty( $this->args->taxonomy ) ) { + $term_desc = get_term_field( 'description', $this->args->term_id, $this->args->taxonomy ); + if ( $term_desc !== '' ) { + $replacement = trim( strip_tags( $term_desc ) ); + } + } + + return $replacement; + } + + /** + * Retrieve the term name for use as replacement string. + * + * @return string|null + */ + private function retrieve_term_title() { + $replacement = null; + + if ( ! empty( $this->args->taxonomy ) && ! empty( $this->args->name ) ) { + $replacement = $this->args->name; + } + + return $replacement; + } + + /** + * Retrieve the title of the post/page/cpt for use as replacement string. + * + * @return string|null + */ + private function retrieve_title() { + $replacement = null; + + if ( is_string( $this->args->post_title ) && $this->args->post_title !== '' ) { + $replacement = stripslashes( $this->args->post_title ); + } + + return $replacement; + } + + /** + * Retrieve primary category for use as replacement string. + * + * @return bool|int|null + */ + private function retrieve_primary_category() { + $primary_category = null; + + if ( ! empty( $this->args->ID ) ) { + $wpseo_primary_category = new WPSEO_Primary_Term( 'category', $this->args->ID ); + + $term_id = $wpseo_primary_category->get_primary_term(); + $term = get_term( $term_id ); + + if ( ! is_wp_error( $term ) && ! empty( $term ) ) { + $primary_category = $term->name; + } + } + + return $primary_category; + } + + + /* *********************** ADVANCED VARIABLES ************************** */ + + /** + * Determine the page numbering of the current post/page/cpt + * + * @param string $request 'nr'|'max' - whether to return the page number or the max number of pages. + * + * @return int|null + */ + private function determine_pagenumbering( $request = 'nr' ) { + global $wp_query, $post; + $max_num_pages = null; + $page_number = null; + + $max_num_pages = 1; + + if ( ! is_singular() ) { + $page_number = get_query_var( 'paged' ); + if ( $page_number === 0 || $page_number === '' ) { + $page_number = 1; + } + + if ( isset( $wp_query->max_num_pages ) && ( $wp_query->max_num_pages != '' && $wp_query->max_num_pages != 0 ) ) { + $max_num_pages = $wp_query->max_num_pages; + } + } + else { + $page_number = get_query_var( 'page' ); + if ( $page_number === 0 || $page_number === '' ) { + $page_number = 1; + } + + if ( isset( $post->post_content ) ) { + $max_num_pages = ( substr_count( $post->post_content, '' ) + 1 ); + } + } + + $return = null; + + switch ( $request ) { + case 'nr': + $return = $page_number; + break; + case 'max': + $return = $max_num_pages; + break; + } + + return $return; + } + + + /** + * Determine the post type names for the current post/page/cpt + * + * @param string $request 'single'|'plural' - whether to return the single or plural form. + * + * @return string|null + */ + private function determine_pt_names( $request = 'single' ) { + global $wp_query; + $pt_single = null; + $pt_plural = null; + + if ( isset( $wp_query->query_vars['post_type'] ) && ( ( is_string( $wp_query->query_vars['post_type'] ) && $wp_query->query_vars['post_type'] !== '' ) || ( is_array( $wp_query->query_vars['post_type'] ) && $wp_query->query_vars['post_type'] !== array() ) ) ) { + $post_type = $wp_query->query_vars['post_type']; + } + else { + // Make it work in preview mode. + $post_type = $wp_query->get_queried_object()->post_type; + } + + if ( is_array( $post_type ) ) { + $post_type = reset( $post_type ); + } + + if ( $post_type !== '' ) { + $pt = get_post_type_object( $post_type ); + $pt_plural = $pt_single = $pt->name; + if ( isset( $pt->labels->singular_name ) ) { + $pt_single = $pt->labels->singular_name; + } + if ( isset( $pt->labels->name ) ) { + $pt_plural = $pt->labels->name; + } + } + + $return = null; + + switch ( $request ) { + case 'single': + $return = $pt_single; + break; + case 'plural': + $return = $pt_plural; + break; + } + + return $return; + } + + /** + * Retrieve the attachment caption for use as replacement string. + * + * @return string|null + */ + private function retrieve_caption() { + return $this->retrieve_excerpt_only(); + } + + + /** + * Retrieve a post/page/cpt's custom field value for use as replacement string + * + * @param string $var The complete variable to replace which includes the name of + * the custom field which value is to be retrieved. + * + * @return string|null + */ + private function retrieve_cf_custom_field_name( $var ) { + global $post; + $replacement = null; + + if ( is_string( $var ) && $var !== '' ) { + $field = substr( $var, 3 ); + if ( ( is_singular() || is_admin() ) && ( is_object( $post ) && isset( $post->ID ) ) ) { + $name = get_post_meta( $post->ID, $field, true ); + if ( $name !== '' ) { + $replacement = $name; + } + } + } + + return $replacement; + } + + + /** + * Retrieve a post/page/cpt's custom taxonomies for use as replacement string + * + * @param string $var The complete variable to replace which includes the name of + * the custom taxonomy which value(s) is to be retrieved. + * @param bool $single Whether to retrieve only the first or all values for the taxonomy. + * + * @return string|null + */ + private function retrieve_ct_custom_tax_name( $var, $single = false ) { + $replacement = null; + + if ( ( is_string( $var ) && $var !== '' ) && ! empty( $this->args->ID ) ) { + $tax = substr( $var, 3 ); + $name = $this->get_terms( $this->args->ID, $tax, $single ); + if ( $name !== '' ) { + $replacement = $name; + } + } + + return $replacement; + } + + + /** + * Retrieve a post/page/cpt's custom taxonomies description for use as replacement string + * + * @param string $var The complete variable to replace which includes the name of + * the custom taxonomy which description is to be retrieved. + * + * @return string|null + */ + private function retrieve_ct_desc_custom_tax_name( $var ) { + global $post; + $replacement = null; + + if ( is_string( $var ) && $var !== '' ) { + $tax = substr( $var, 8 ); + if ( is_object( $post ) && isset( $post->ID ) ) { + $terms = get_the_terms( $post->ID, $tax ); + if ( is_array( $terms ) && $terms !== array() ) { + $term = current( $terms ); + $term_desc = get_term_field( 'description', $term->term_id, $tax ); + if ( $term_desc !== '' ) { + $replacement = trim( strip_tags( $term_desc ) ); + } + } + } + } + + return $replacement; + } + + /** + * Retrieve the current date for use as replacement string. + * + * @return string + */ + private function retrieve_currentdate() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $replacement = date_i18n( get_option( 'date_format' ) ); + } + + return $replacement; + } + + /** + * Retrieve the current day for use as replacement string. + * + * @return string + */ + private function retrieve_currentday() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $replacement = date_i18n( 'j' ); + } + + return $replacement; + } + + /** + * Retrieve the current month for use as replacement string. + * + * @return string + */ + private function retrieve_currentmonth() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $replacement = date_i18n( 'F' ); + } + + return $replacement; + } + + /** + * Retrieve the current time for use as replacement string. + * + * @return string + */ + private function retrieve_currenttime() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $replacement = date_i18n( get_option( 'time_format' ) ); + } + + return $replacement; + } + + /** + * Retrieve the current year for use as replacement string. + * + * @return string + */ + private function retrieve_currentyear() { + static $replacement; + + if ( ! isset( $replacement ) ) { + $replacement = date_i18n( 'Y' ); + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt's focus keyword for use as replacement string. + * + * @return string|null + */ + private function retrieve_focuskw() { + $replacement = null; + + if ( ! empty( $this->args->ID ) ) { + $focus_kw = WPSEO_Meta::get_value( 'focuskw', $this->args->ID ); + if ( $focus_kw !== '' ) { + $replacement = $focus_kw; + } + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt ID for use as replacement string. + * + * @return string|null + */ + private function retrieve_id() { + $replacement = null; + + if ( ! empty( $this->args->ID ) ) { + $replacement = $this->args->ID; + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt modified time for use as replacement string. + * + * @return string|null + */ + private function retrieve_modified() { + $replacement = null; + + if ( ! empty( $this->args->post_modified ) ) { + $replacement = mysql2date( get_option( 'date_format' ), $this->args->post_modified, true ); + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt author's "nice name" for use as replacement string. + * + * @return string|null + */ + private function retrieve_name() { + $replacement = null; + + $user_id = $this->retrieve_userid(); + $name = get_the_author_meta( 'display_name', $user_id ); + if ( $name !== '' ) { + $replacement = $name; + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt author's users description for use as a replacement string. + * + * @return null|string + */ + private function retrieve_user_description() { + $replacement = null; + + $user_id = $this->retrieve_userid(); + $description = get_the_author_meta( 'description', $user_id ); + if ( $description != '' ) { + $replacement = $description; + } + + return $replacement; + } + + /** + * Retrieve the current page number with context (i.e. 'page 2 of 4') for use as replacement string. + * + * @return string + */ + private function retrieve_page() { + $replacement = null; + + $max = $this->determine_pagenumbering( 'max' ); + $nr = $this->determine_pagenumbering( 'nr' ); + $sep = $this->retrieve_sep(); + + if ( $max > 1 && $nr > 1 ) { + $replacement = sprintf( $sep . ' ' . __( 'Page %1$d of %2$d', 'wordpress-seo' ), $nr, $max ); + } + + return $replacement; + } + + /** + * Retrieve the current page number for use as replacement string. + * + * @return string|null + */ + private function retrieve_pagenumber() { + $replacement = null; + + $nr = $this->determine_pagenumbering( 'nr' ); + if ( isset( $nr ) && $nr > 0 ) { + $replacement = (string) $nr; + } + + return $replacement; + } + + /** + * Retrieve the current page total for use as replacement string. + * + * @return string|null + */ + private function retrieve_pagetotal() { + $replacement = null; + + $max = $this->determine_pagenumbering( 'max' ); + if ( isset( $max ) && $max > 0 ) { + $replacement = (string) $max; + } + + return $replacement; + } + + /** + * Retrieve the post type plural label for use as replacement string. + * + * @return string|null + */ + private function retrieve_pt_plural() { + $replacement = null; + + $name = $this->determine_pt_names( 'plural' ); + if ( isset( $name ) && $name !== '' ) { + $replacement = $name; + } + + return $replacement; + } + + /** + * Retrieve the post type single label for use as replacement string. + * + * @return string|null + */ + private function retrieve_pt_single() { + $replacement = null; + + $name = $this->determine_pt_names( 'single' ); + if ( isset( $name ) && $name !== '' ) { + $replacement = $name; + } + + return $replacement; + } + + /** + * Retrieve the slug which caused the 404 for use as replacement string. + * + * @return string|null + */ + private function retrieve_term404() { + $replacement = null; + + if ( $this->args->term404 !== '' ) { + $replacement = sanitize_text_field( str_replace( '-', ' ', $this->args->term404 ) ); + } + else { + $error_request = get_query_var( 'pagename' ); + if ( $error_request !== '' ) { + $replacement = sanitize_text_field( str_replace( '-', ' ', $error_request ) ); + } + else { + $error_request = get_query_var( 'name' ); + if ( $error_request !== '' ) { + $replacement = sanitize_text_field( str_replace( '-', ' ', $error_request ) ); + } + } + } + + return $replacement; + } + + /** + * Retrieve the post/page/cpt author's user id for use as replacement string. + * + * @return string + */ + private function retrieve_userid() { + $replacement = ! empty( $this->args->post_author ) ? $this->args->post_author : get_query_var( 'author' ); + + return $replacement; + } + + + + /* *********************** HELP TEXT RELATED ************************** */ + + /** + * Create a variable help text table + * + * @param string $type Either 'basic' or 'advanced'. + * + * @return string Help text table + */ + private static function create_variable_help_table( $type ) { + if ( ! in_array( $type, array( 'basic', 'advanced' ), true ) ) { + return ''; + } + + $table = ' + '; + + foreach ( self::$help_texts[ $type ] as $replace => $help_text ) { + $table .= ' + + + + '; + } + + $table .= ' +
    %%' . esc_html( $replace ) . '%%' . $help_text . '
    '; + + return $table; + } + + /** + * Create the help text table for the basic variables for use in a help tab + * + * @return string + */ + public static function get_basic_help_texts() { + return self::create_variable_help_table( 'basic' ); + } + + + /** + * Create the help text table for the advanced variables for use in a help tab + * + * @return string + */ + public static function get_advanced_help_texts() { + return self::create_variable_help_table( 'advanced' ); + } + + + /** + * Set the help text for a user/plugin/theme defined extra variable. + * + * @param string $type Type of variable: 'basic' or 'advanced'. + * @param string $replace Variable to replace, i.e. '%%var%%'. + * @param string $help_text The actual help text string. + */ + private static function register_help_text( $type, $replace, $help_text = '' ) { + if ( is_string( $replace ) && $replace !== '' ) { + $replace = self::remove_var_delimiter( $replace ); + + if ( ( is_string( $type ) && in_array( $type, array( + 'basic', + 'advanced', + ), true ) ) && ( $replace !== '' && ! isset( self::$help_texts[ $type ][ $replace ] ) ) + ) { + self::$help_texts[ $type ][ $replace ] = $help_text; + } + } + } + + + /** + * Set/translate the help texts for the WPSEO standard basic variables. + */ + private static function set_basic_help_texts() { + self::$help_texts['basic'] = array( + 'date' => __( 'Replaced with the date of the post/page', 'wordpress-seo' ), + 'title' => __( 'Replaced with the title of the post/page', 'wordpress-seo' ), + 'parent_title' => __( 'Replaced with the title of the parent page of the current page', 'wordpress-seo' ), + 'sitename' => __( 'The site\'s name', 'wordpress-seo' ), + 'sitedesc' => __( 'The site\'s tag line / description', 'wordpress-seo' ), + 'excerpt' => __( 'Replaced with the post/page excerpt (or auto-generated if it does not exist)', 'wordpress-seo' ), + 'excerpt_only' => __( 'Replaced with the post/page excerpt (without auto-generation)', 'wordpress-seo' ), + 'tag' => __( 'Replaced with the current tag/tags', 'wordpress-seo' ), + 'category' => __( 'Replaced with the post categories (comma separated)', 'wordpress-seo' ), + 'primary_category' => __( 'Replaced with the primary category of the post/page', 'wordpress-seo' ), + 'category_description' => __( 'Replaced with the category description', 'wordpress-seo' ), + 'tag_description' => __( 'Replaced with the tag description', 'wordpress-seo' ), + 'term_description' => __( 'Replaced with the term description', 'wordpress-seo' ), + 'term_title' => __( 'Replaced with the term name', 'wordpress-seo' ), + 'searchphrase' => __( 'Replaced with the current search phrase', 'wordpress-seo' ), + 'sep' => sprintf( + /* translators: %s: wp_title() function */ + __( 'The separator defined in your theme\'s %s tag.', 'wordpress-seo' ), + 'wp_title()' + ), + ); + } + + /** + * Set/translate the help texts for the WPSEO standard advanced variables. + */ + private static function set_advanced_help_texts() { + self::$help_texts['advanced'] = array( + 'pt_single' => __( 'Replaced with the post type single label', 'wordpress-seo' ), + 'pt_plural' => __( 'Replaced with the post type plural label', 'wordpress-seo' ), + 'modified' => __( 'Replaced with the post/page modified time', 'wordpress-seo' ), + 'id' => __( 'Replaced with the post/page ID', 'wordpress-seo' ), + 'name' => __( 'Replaced with the post/page author\'s \'nicename\'', 'wordpress-seo' ), + 'user_description' => __( 'Replaced with the post/page author\'s \'Biographical Info\'', 'wordpress-seo' ), + 'userid' => __( 'Replaced with the post/page author\'s userid', 'wordpress-seo' ), + 'currenttime' => __( 'Replaced with the current time', 'wordpress-seo' ), + 'currentdate' => __( 'Replaced with the current date', 'wordpress-seo' ), + 'currentday' => __( 'Replaced with the current day', 'wordpress-seo' ), + 'currentmonth' => __( 'Replaced with the current month', 'wordpress-seo' ), + 'currentyear' => __( 'Replaced with the current year', 'wordpress-seo' ), + 'page' => __( 'Replaced with the current page number with context (i.e. page 2 of 4)', 'wordpress-seo' ), + 'pagetotal' => __( 'Replaced with the current page total', 'wordpress-seo' ), + 'pagenumber' => __( 'Replaced with the current page number', 'wordpress-seo' ), + 'caption' => __( 'Attachment caption', 'wordpress-seo' ), + 'focuskw' => __( 'Replaced with the posts focus keyword', 'wordpress-seo' ), + 'term404' => __( 'Replaced with the slug which caused the 404', 'wordpress-seo' ), + 'cf_' => __( 'Replaced with a posts custom field value', 'wordpress-seo' ), + 'ct_' => __( 'Replaced with a posts custom taxonomies, comma separated.', 'wordpress-seo' ), + 'ct_desc_' => __( 'Replaced with a custom taxonomies description', 'wordpress-seo' ), + ); + } + + + + + /* *********************** GENERAL HELPER METHODS ************************** */ + + /** + * Remove the '%%' delimiters from a variable string + * + * @param string $string Variable string to be cleaned. + * + * @return string + */ + private static function remove_var_delimiter( $string ) { + return trim( $string, '%' ); + } + + /** + * Add the '%%' delimiters to a variable string + * + * @param string $string Variable string to be delimited. + * + * @return string + */ + private static function add_var_delimiter( $string ) { + return '%%' . $string . '%%'; + } + + /** + * Retrieve a post's terms, comma delimited. + * + * @param int $id ID of the post to get the terms for. + * @param string $taxonomy The taxonomy to get the terms for this post from. + * @param bool $return_single If true, return the first term. + * + * @return string either a single term or a comma delimited string of terms. + */ + public function get_terms( $id, $taxonomy, $return_single = false ) { + + $output = ''; + + // If we're on a specific tag, category or taxonomy page, use that. + if ( is_category() || is_tag() || is_tax() ) { + $term = $GLOBALS['wp_query']->get_queried_object(); + $output = $term->name; + } + elseif ( ! empty( $id ) && ! empty( $taxonomy ) ) { + $terms = get_the_terms( $id, $taxonomy ); + if ( is_array( $terms ) && $terms !== array() ) { + foreach ( $terms as $term ) { + if ( $return_single ) { + $output = $term->name; + break; + } + else { + $output .= $term->name . ', '; + } + } + $output = rtrim( trim( $output ), ',' ); + } + } + unset( $terms, $term ); + + /** + * Allows filtering of the terms list used to replace %%category%%, %%tag%% and %%ct_%% variables + * + * @api string $output Comma-delimited string containing the terms + */ + return apply_filters( 'wpseo_terms', $output ); + } +} /* End of class WPSEO_Replace_Vars */ + + +/** + * Setup the class statics when the file is first loaded + */ +WPSEO_Replace_Vars::setup_statics_once(); diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-statistics.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-statistics.php new file mode 100644 index 0000000..5ebb81d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-statistics.php @@ -0,0 +1,138 @@ +get_rank() ) { + $posts = array( + 'meta_query' => array( + 'relation' => 'OR', + array( + 'key' => WPSEO_Meta::$meta_prefix . 'focuskw', + 'value' => 'needs-a-value-anyway', + 'compare' => 'NOT EXISTS', + ) + ), + ); + } + elseif ( WPSEO_Rank::NO_INDEX === $rank->get_rank() ) { + $posts = array( + 'meta_key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', + 'meta_value' => '1', + 'compare' => '=', + ); + } + else { + $posts = array( + 'meta_key' => WPSEO_Meta::$meta_prefix . 'linkdex', + 'meta_value' => array( $rank->get_starting_score(), $rank->get_end_score() ), + 'meta_compare' => 'BETWEEN', + 'meta_type' => 'NUMERIC', + ); + } + + $posts['fields'] = 'ids'; + $posts['post_status'] = 'publish'; + + if ( current_user_can( 'edit_others_posts' ) === false ) { + $posts['author'] = get_current_user_id(); + } + + $posts = new WP_Query( $posts ); + + return $posts->found_posts; + } + + /** + * Returns the amount of posts that have no focus keyword + * + * @deprecated + * + * @return int + */ + public function get_no_focus_post_count() { + _deprecated_function( 'get_no_focus_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( WPSEO_Rank::NO_FOCUS ) ); + } + + /** + * Returns the amount of posts that have a bad SEO ranking + * + * @deprecated + * + * @return int + */ + public function get_bad_seo_post_count() { + _deprecated_function( 'get_bad_seo_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( WPSEO_Rank::BAD ) ); + } + + /** + * Returns the amount of posts that have a poor SEO ranking + * + * @deprecated + * + * @return int + */ + public function get_poor_seo_post_count() { + _deprecated_function( 'get_poor_seo_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( 'poor' ) ); + } + + /** + * Returns the amount of posts that have an ok SEO ranking + * + * @deprecated + * + * @return int + */ + public function get_ok_seo_post_count() { + _deprecated_function( 'get_ok_seo_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( WPSEO_Rank::OK ) ); + } + + /** + * Returns the amount of posts that have a good SEO ranking + * + * @deprecated + * + * @return int + */ + public function get_good_seo_post_count() { + _deprecated_function( 'get_good_seo_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( WPSEO_Rank::GOOD ) ); + } + + /** + * Returns the amount of posts that have no SEO ranking + * + * @deprecated + * + * @return int + */ + public function get_no_index_post_count() { + _deprecated_function( 'get_no_index_post_count', 'WPSEO 3.0', 'WPSEO_Statistics::get_post_count' ); + + return $this->get_post_count( new WPSEO_Rank( WPSEO_Rank::NO_INDEX ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/class-wpseo-utils.php b/wp-content/plugins/wordpress-seo/inc/class-wpseo-utils.php new file mode 100644 index 0000000..04f78a9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/class-wpseo-utils.php @@ -0,0 +1,969 @@ +get_names(); + + return $roles; + } + + /** + * Standardize whitespace in a string + * + * Replace line breaks, carriage returns, tabs with a space, then remove double spaces. + * + * @param string $string String input to standardize. + * + * @return string + */ + public static function standardize_whitespace( $string ) { + return trim( str_replace( ' ', ' ', str_replace( array( "\t", "\n", "\r", "\f" ), ' ', $string ) ) ); + } + + /** + * First strip out registered and enclosing shortcodes using native WordPress strip_shortcodes function. + * Then strip out the shortcodes with a filthy regex, because people don't properly register their shortcodes. + * + * @static + * + * @param string $text Input string that might contain shortcodes. + * + * @return string $text string without shortcodes + */ + public static function strip_shortcode( $text ) { + return preg_replace( '`\[[^\]]+\]`s', '', strip_shortcodes( $text ) ); + } + + /** + * Recursively trim whitespace round a string value or of string values within an array + * Only trims strings to avoid typecasting a variable (to string) + * + * @static + * + * @param mixed $value Value to trim or array of values to trim. + * + * @return mixed Trimmed value or array of trimmed values + */ + public static function trim_recursive( $value ) { + if ( is_string( $value ) ) { + $value = trim( $value ); + } + elseif ( is_array( $value ) ) { + $value = array_map( array( __CLASS__, 'trim_recursive' ), $value ); + } + + return $value; + } + + /** + * Translates a decimal analysis score into a textual one. + * + * @static + * + * @param int $val The decimal score to translate. + * @param bool $css_value Whether to return the i18n translated score or the CSS class value. + * + * @return string + */ + public static function translate_score( $val, $css_value = true ) { + $seo_rank = WPSEO_Rank::from_numeric_score( $val ); + + if ( $css_value ) { + return $seo_rank->get_css_class(); + } + + return $seo_rank->get_label(); + } + + /** + * Emulate the WP native sanitize_text_field function in a %%variable%% safe way + * + * @see https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php for the original + * + * Sanitize a string from user input or from the db + * + * check for invalid UTF-8, + * Convert single < characters to entity, + * strip all tags, + * remove line breaks, tabs and extra white space, + * strip octets - BUT DO NOT REMOVE (part of) VARIABLES WHICH WILL BE REPLACED. + * + * @param string $value String value to sanitize. + * + * @return string + */ + public static function sanitize_text_field( $value ) { + $filtered = wp_check_invalid_utf8( $value ); + + if ( strpos( $filtered, '<' ) !== false ) { + $filtered = wp_pre_kses_less_than( $filtered ); + // This will strip extra whitespace for us. + $filtered = wp_strip_all_tags( $filtered, true ); + } + else { + $filtered = trim( preg_replace( '`[\r\n\t ]+`', ' ', $filtered ) ); + } + + $found = false; + while ( preg_match( '`[^%](%[a-f0-9]{2})`i', $filtered, $match ) ) { + $filtered = str_replace( $match[1], '', $filtered ); + $found = true; + } + unset( $match ); + + if ( $found ) { + // Strip out the whitespace that may now exist after removing the octets. + $filtered = trim( preg_replace( '` +`', ' ', $filtered ) ); + } + + /** + * Filter a sanitized text field string. + * + * @since WP 2.9.0 + * + * @param string $filtered The sanitized string. + * @param string $str The string prior to being sanitized. + */ + + return apply_filters( 'sanitize_text_field', $filtered, $value ); + } + + /** + * Sanitize a url for saving to the database + * Not to be confused with the old native WP function + * + * @todo [JRF => whomever] check/improve url verification + * + * @param string $value String URL value to sanitize. + * @param array $allowed_protocols Optional set of allowed protocols. + * + * @return string + */ + public static function sanitize_url( $value, $allowed_protocols = array( 'http', 'https' ) ) { + return esc_url_raw( sanitize_text_field( rawurldecode( $value ) ), $allowed_protocols ); + } + + /** + * Validate a value as boolean + * + * @static + * + * @param mixed $value Value to validate. + * + * @return bool + */ + public static function validate_bool( $value ) { + if ( ! isset( self::$has_filters ) ) { + self::$has_filters = extension_loaded( 'filter' ); + } + + if ( self::$has_filters ) { + return filter_var( $value, FILTER_VALIDATE_BOOLEAN ); + } + else { + return self::emulate_filter_bool( $value ); + } + } + + /** + * Cast a value to bool + * + * @static + * + * @param mixed $value Value to cast. + * + * @return bool + */ + public static function emulate_filter_bool( $value ) { + $true = array( + '1', + 'true', + 'True', + 'TRUE', + 'y', + 'Y', + 'yes', + 'Yes', + 'YES', + 'on', + 'On', + 'ON', + + ); + $false = array( + '0', + 'false', + 'False', + 'FALSE', + 'n', + 'N', + 'no', + 'No', + 'NO', + 'off', + 'Off', + 'OFF', + ); + + if ( is_bool( $value ) ) { + return $value; + } + else if ( is_int( $value ) && ( $value === 0 || $value === 1 ) ) { + return (bool) $value; + } + else if ( ( is_float( $value ) && ! is_nan( $value ) ) && ( $value === (float) 0 || $value === (float) 1 ) ) { + return (bool) $value; + } + else if ( is_string( $value ) ) { + $value = trim( $value ); + if ( in_array( $value, $true, true ) ) { + return true; + } + else if ( in_array( $value, $false, true ) ) { + return false; + } + else { + return false; + } + } + + return false; + } + + /** + * Validate a value as integer + * + * @static + * + * @param mixed $value Value to validate. + * + * @return int|bool int or false in case of failure to convert to int + */ + public static function validate_int( $value ) { + if ( ! isset( self::$has_filters ) ) { + self::$has_filters = extension_loaded( 'filter' ); + } + + if ( self::$has_filters ) { + return filter_var( $value, FILTER_VALIDATE_INT ); + } + else { + return self::emulate_filter_int( $value ); + } + } + + /** + * Cast a value to integer + * + * @static + * + * @param mixed $value Value to cast. + * + * @return int|bool + */ + public static function emulate_filter_int( $value ) { + if ( is_int( $value ) ) { + return $value; + } + else if ( is_float( $value ) ) { + if ( (int) $value == $value && ! is_nan( $value ) ) { + return (int) $value; + } + else { + return false; + } + } + else if ( is_string( $value ) ) { + $value = trim( $value ); + if ( $value === '' ) { + return false; + } + else if ( ctype_digit( $value ) ) { + return (int) $value; + } + else if ( strpos( $value, '-' ) === 0 && ctype_digit( substr( $value, 1 ) ) ) { + return (int) $value; + } + else { + return false; + } + } + + return false; + } + + /** + * Clears the WP or W3TC cache depending on which is used + * + * @static + */ + public static function clear_cache() { + if ( function_exists( 'w3tc_pgcache_flush' ) ) { + w3tc_pgcache_flush(); + } + elseif ( function_exists( 'wp_cache_clear_cache' ) ) { + wp_cache_clear_cache(); + } + } + + /** + * Flush W3TC cache after succesfull update/add of taxonomy meta option + * + * @static + */ + public static function flush_w3tc_cache() { + if ( defined( 'W3TC_DIR' ) && function_exists( 'w3tc_objectcache_flush' ) ) { + w3tc_objectcache_flush(); + } + } + + /** + * Clear rewrite rules + * + * @static + */ + public static function clear_rewrites() { + delete_option( 'rewrite_rules' ); + } + + /** + * Do simple reliable math calculations without the risk of wrong results + * + * @see http://floating-point-gui.de/ + * @see the big red warning on http://php.net/language.types.float.php + * + * In the rare case that the bcmath extension would not be loaded, it will return the normal calculation results + * + * @static + * + * @since 1.5.0 + * + * @param mixed $number1 Scalar (string/int/float/bool). + * @param string $action Calculation action to execute. Valid input: + * '+' or 'add' or 'addition', + * '-' or 'sub' or 'subtract', + * '*' or 'mul' or 'multiply', + * '/' or 'div' or 'divide', + * '%' or 'mod' or 'modulus' + * '=' or 'comp' or 'compare'. + * @param mixed $number2 Scalar (string/int/float/bool). + * @param bool $round Whether or not to round the result. Defaults to false. + * Will be disregarded for a compare operation. + * @param int $decimals Decimals for rounding operation. Defaults to 0. + * @param int $precision Calculation precision. Defaults to 10. + * + * @return mixed Calculation Result or false if either or the numbers isn't scalar or + * an invalid operation was passed + * - for compare the result will always be an integer + * - for all other operations, the result will either be an integer (preferred) + * or a float + */ + public static function calc( $number1, $action, $number2, $round = false, $decimals = 0, $precision = 10 ) { + static $bc; + + if ( ! is_scalar( $number1 ) || ! is_scalar( $number2 ) ) { + return false; + } + + if ( ! isset( $bc ) ) { + $bc = extension_loaded( 'bcmath' ); + } + + if ( $bc ) { + $number1 = number_format( $number1, 10, '.', '' ); + $number2 = number_format( $number2, 10, '.', '' ); + } + + $result = null; + $compare = false; + + switch ( $action ) { + case '+': + case 'add': + case 'addition': + $result = ( $bc ) ? bcadd( $number1, $number2, $precision ) /* string */ : ( $number1 + $number2 ); + break; + + case '-': + case 'sub': + case 'subtract': + $result = ( $bc ) ? bcsub( $number1, $number2, $precision ) /* string */ : ( $number1 - $number2 ); + break; + + case '*': + case 'mul': + case 'multiply': + $result = ( $bc ) ? bcmul( $number1, $number2, $precision ) /* string */ : ( $number1 * $number2 ); + break; + + case '/': + case 'div': + case 'divide': + if ( $bc ) { + $result = bcdiv( $number1, $number2, $precision ); // String, or NULL if right_operand is 0. + } + elseif ( $number2 != 0 ) { + $result = ( $number1 / $number2 ); + } + + if ( ! isset( $result ) ) { + $result = 0; + } + break; + + case '%': + case 'mod': + case 'modulus': + if ( $bc ) { + $result = bcmod( $number1, $number2 ); // String, or NULL if modulus is 0. + } + elseif ( $number2 != 0 ) { + $result = ( $number1 % $number2 ); + } + + if ( ! isset( $result ) ) { + $result = 0; + } + break; + + case '=': + case 'comp': + case 'compare': + $compare = true; + if ( $bc ) { + $result = bccomp( $number1, $number2, $precision ); // Returns int 0, 1 or -1. + } + else { + $result = ( $number1 == $number2 ) ? 0 : ( ( $number1 > $number2 ) ? 1 : - 1 ); + } + break; + } + + if ( isset( $result ) ) { + if ( $compare === false ) { + if ( $round === true ) { + $result = round( floatval( $result ), $decimals ); + if ( $decimals === 0 ) { + $result = (int) $result; + } + } + else { + $result = ( intval( $result ) == $result ) ? intval( $result ) : floatval( $result ); + } + } + + return $result; + } + + return false; + } + + /** + * Trim whitespace and NBSP (Non-breaking space) from string + * + * @param string $string String input to trim. + * + * @return string + */ + public static function trim_nbsp_from_string( $string ) { + $find = array( ' ', chr( 0xC2 ) . chr( 0xA0 ) ); + $string = str_replace( $find, ' ', $string ); + $string = trim( $string ); + + return $string; + } + + /** + * Check if a string is a valid datetime + * + * @param string $datetime String input to check as valid input for DateTime class. + * + * @return bool + */ + public static function is_valid_datetime( $datetime ) { + + if ( substr( $datetime, 0, 1 ) === '-' ) { + return false; + } + + try { + return new DateTime( $datetime ) !== false; + } catch ( Exception $exc ) { + return false; + } + } + + /** + * Format the URL to be sure it is okay for using as a redirect url. + * + * This method will parse the URL and combine them in one string. + * + * @param string $url URL string. + * + * @return mixed + */ + public static function format_url( $url ) { + $parsed_url = wp_parse_url( $url ); + + $formatted_url = ''; + if ( ! empty( $parsed_url['path'] ) ) { + $formatted_url = $parsed_url['path']; + } + + // Prepend a slash if first char != slash. + if ( stripos( $formatted_url, '/' ) !== 0 ) { + $formatted_url = '/' . $formatted_url; + } + + // Append 'query' string if it exists. + if ( isset( $parsed_url['query'] ) && '' != $parsed_url['query'] ) { + $formatted_url .= '?' . $parsed_url['query']; + } + + return apply_filters( 'wpseo_format_admin_url', $formatted_url ); + } + + + /** + * Get plugin name from file + * + * @param string $plugin Plugin path relative to plugins directory. + * + * @return string|bool + */ + public static function get_plugin_name( $plugin ) { + $plugin_details = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); + + if ( $plugin_details['Name'] != '' ) { + return $plugin_details['Name']; + } + + return false; + } + + /** + * Retrieves the sitename. + * + * @return string + */ + public static function get_site_name() { + return trim( strip_tags( get_bloginfo( 'name' ) ) ); + } + + /** + * Retrieves the title separator. + * + * @return string + */ + public static function get_title_separator() { + $replacement = WPSEO_Options::get_default( 'wpseo_titles', 'separator' ); + + // Get the titles option and the separator options. + $titles_options = WPSEO_Options::get_option( 'wpseo_titles' ); + $seperator_options = WPSEO_Option_Titles::get_instance()->get_separator_options(); + + // This should always be set, but just to be sure. + if ( isset( $seperator_options[ $titles_options['separator'] ] ) ) { + // Set the new replacement. + $replacement = $seperator_options[ $titles_options['separator'] ]; + } + + /** + * Filter: 'wpseo_replacements_filter_sep' - Allow customization of the separator character(s) + * + * @api string $replacement The current separator + */ + return apply_filters( 'wpseo_replacements_filter_sep', $replacement ); + } + + /** + * Check if the current opened page is a Yoast SEO page. + * + * @return bool + */ + public static function is_yoast_seo_page() { + static $is_yoast_seo; + + if ( $is_yoast_seo === null ) { + $current_page = filter_input( INPUT_GET, 'page' ); + $is_yoast_seo = ( substr( $current_page, 0, 6 ) === 'wpseo_' ); + } + + return $is_yoast_seo; + } + + /** + * Check if the current opened page belongs to Yoast SEO Free. + * + * @param string $current_page the current page the user is on. + * + * @return bool + */ + public static function is_yoast_seo_free_page( $current_page ) { + $yoast_seo_free_pages = array( + 'wpseo_dashboard', + 'wpseo_titles', + 'wpseo_social', + 'wpseo_xml', + 'wpseo_advanced', + 'wpseo_tools', + 'wpseo_search_console', + 'wpseo_licenses', + ); + + return in_array( $current_page, $yoast_seo_free_pages ); + } + + /** + * Determine if Yoast SEO is in development mode? + * + * Inspired by JetPack (https://github.com/Automattic/jetpack/blob/master/class.jetpack.php#L1383-L1406). + * + * @return bool + */ + public static function is_development_mode() { + $development_mode = false; + + if ( defined( 'WPSEO_DEBUG' ) ) { + $development_mode = WPSEO_DEBUG; + } + elseif ( site_url() && false === strpos( site_url(), '.' ) ) { + $development_mode = true; + } + + /** + * Filter the Yoast SEO development mode. + * + * @since 3.0 + * + * @param bool $development_mode Is Yoast SEOs development mode active. + */ + + return apply_filters( 'yoast_seo_development_mode', $development_mode ); + } + + /** + * Retrieve home URL with proper trailing slash. + * + * @param string $path Path relative to home URL. + * @param string|null $scheme Scheme to apply. + * + * @return string Home URL with optional path, appropriately slashed if not. + */ + public static function home_url( $path = '', $scheme = null ) { + + $home_url = home_url( $path, $scheme ); + + if ( ! empty( $path ) ) { + return $home_url; + } + + $home_path = parse_url( $home_url, PHP_URL_PATH ); + + if ( '/' === $home_path ) { // Home at site root, already slashed. + return $home_url; + } + + if ( is_null( $home_path ) ) { // Home at site root, always slash. + return trailingslashit( $home_url ); + } + + if ( is_string( $home_path ) ) { // Home in subdirectory, slash if permalink structure has slash. + return user_trailingslashit( $home_url ); + } + + return $home_url; + } + + /** + * Returns a base64 URL for the svg for use in the menu + * + * @param bool $base64 Whether or not to return base64'd output. + * + * @return string + */ + public static function get_icon_svg( $base64 = true ) { + $svg = ''; + + if ( $base64 ) { + return 'data:image/svg+xml;base64,' . base64_encode( $svg ); + } + + return $svg; + } + + /** + * Returns the language part of a given locale, defaults to english when the $locale is empty + * + * @param string $locale The locale to get the language of. + * @returns string The language part of the locale. + */ + public static function get_language( $locale ) { + $language = 'en'; + + if ( ! empty( $locale ) && strlen( $locale ) >= 2 ) { + $language = substr( $locale, 0, 2 ); + } + + return $language; + } + + /** + * Returns the user locale for the language to be used in the admin. + * + * WordPress 4.7 introduced the ability for users to specify an Admin language + * different from the language used on the front end. This checks if the feature + * is available and returns the user's language, with a fallback to the site's language. + * Can be removed when support for WordPress 4.6 will be dropped, in favor + * of WordPress get_user_locale() that already fallbacks to the site’s locale. + * + * @returns string The locale. + */ + public static function get_user_locale() { + if ( function_exists( 'get_user_locale' ) ) { + return get_user_locale(); + } + return get_locale(); + } + + /** + * Checks if the WP-REST-API is available. + * + * @since 3.6 + * + * @param string $minimum_version The minimum version the API should be. + * + * @return bool Returns true if the API is available. + */ + public static function is_api_available( $minimum_version = '2.0' ) { + return ( defined( 'REST_API_VERSION' ) + && version_compare( REST_API_VERSION, $minimum_version, '>=' ) ); + } + + /** + * Wrapper for the PHP filter input function. + * + * This is used because stupidly enough, the `filter_input` function is not available on all hosts... + * + * @deprecated Passes through to PHP call, no longer used in code. + * + * @param int $type Input type constant. + * @param string $variable_name Variable name to get. + * @param int $filter Filter to apply. + * + * @return mixed + */ + public static function filter_input( $type, $variable_name, $filter = FILTER_DEFAULT ) { + return filter_input( $type, $variable_name, $filter ); + } + + /** + * Adds a hook that when given option is updated, the XML sitemap transient cache is cleared + * + * @deprecated + * @see WPSEO_Sitemaps_Cache::register_clear_on_option_update() + * + * @param string $option Option name. + * @param string $type Sitemap type. + */ + public static function register_cache_clear_option( $option, $type = '' ) { + WPSEO_Sitemaps_Cache::register_clear_on_option_update( $option, $type ); + } + + /** + * Clears the transient cache when a given option is updated, if that option has been registered before + * + * @deprecated + * @see WPSEO_Sitemaps_Cache::clear_on_option_update() + * + * @param string $option The option that's being updated. + */ + public static function clear_transient_cache( $option ) { + WPSEO_Sitemaps_Cache::clear_on_option_update( $option ); + } + + /** + * Clear entire XML sitemap cache + * + * @deprecated + * @see WPSEO_Sitemaps_Cache::clear() + * + * @param array $types Set of sitemap types to invalidate cache for. + */ + public static function clear_sitemap_cache( $types = array() ) { + WPSEO_Sitemaps_Cache::clear( $types ); + } + + /** + * Wrapper for encoding the array as a json string. Includes a fallback if wp_json_encode doesn't exist. + * + * @deprecated 3.3 Core versions without wp_json_encode() no longer supported, fallback unnecessary. + * + * @param array $array_to_encode The array which will be encoded. + * @param int $options Optional. Array with options which will be passed in to the encoding methods. + * @param int $depth Optional. Maximum depth to walk through $data. Must be greater than 0. Default 512. + * + * @return false|string + */ + public static function json_encode( array $array_to_encode, $options = 0, $depth = 512 ) { + return wp_json_encode( $array_to_encode, $options, $depth ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/index.php b/wp-content/plugins/wordpress-seo/inc/index.php new file mode 100644 index 0000000..e94d9a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/index.php @@ -0,0 +1,4 @@ +get_defaults(); + * @internal Note: Some of the default values are added via the translate_defaults() method + */ + protected $defaults = array( + 'breadcrumbs-404crumb' => '', // Text field. + 'breadcrumbs-blog-remove' => false, + 'breadcrumbs-boldlast' => false, + 'breadcrumbs-archiveprefix' => '', // Text field. + 'breadcrumbs-enable' => false, + 'breadcrumbs-home' => '', // Text field. + 'breadcrumbs-prefix' => '', // Text field. + 'breadcrumbs-searchprefix' => '', // Text field. + 'breadcrumbs-sep' => '»', // Text field. + + /** + * Uses enrich_defaults() to add more along the lines of: + * - 'post_types-' . $pt->name . '-maintax' => 0 / string + * - 'taxonomy-' . $tax->name . '-ptparent' => 0 / string + */ + ); + + /** + * @var array Array of variable option name patterns for the option + */ + protected $variable_array_key_patterns = array( + 'post_types-', + 'taxonomy-', + ); + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + + /** + * Translate strings used in the option defaults + * + * @return void + */ + public function translate_defaults() { + $this->defaults['breadcrumbs-404crumb'] = __( 'Error 404: Page not found', 'wordpress-seo' ); + $this->defaults['breadcrumbs-archiveprefix'] = __( 'Archives for', 'wordpress-seo' ); + $this->defaults['breadcrumbs-home'] = __( 'Home', 'wordpress-seo' ); + $this->defaults['breadcrumbs-searchprefix'] = __( 'You searched for', 'wordpress-seo' ); + } + + + /** + * Add dynamically created default options based on available post types and taxonomies + * + * @return void + */ + public function enrich_defaults() { + + // Retrieve all the relevant post type and taxonomy arrays. + $post_type_names = get_post_types( array( 'public' => true ), 'names' ); + $taxonomy_names_custom = get_taxonomies( array( 'public' => true, '_builtin' => false ), 'names' ); + + if ( $post_type_names !== array() ) { + foreach ( $post_type_names as $pt ) { + $pto_taxonomies = get_object_taxonomies( $pt, 'names' ); + if ( $pto_taxonomies !== array() ) { + $this->defaults[ 'post_types-' . $pt . '-maintax' ] = 0; // Select box. + } + unset( $pto_taxonomies ); + } + unset( $pt ); + } + + if ( $taxonomy_names_custom !== array() ) { + foreach ( $taxonomy_names_custom as $tax ) { + $this->defaults[ 'taxonomy-' . $tax . '-ptparent' ] = 0; // Select box;. + } + unset( $tax ); + } + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + $allowed_post_types = $this->get_allowed_post_types(); + + foreach ( $clean as $key => $value ) { + + $switch_key = $this->get_switch_key( $key ); + + switch ( $switch_key ) { + /* text fields */ + case 'breadcrumbs-404crumb': + case 'breadcrumbs-archiveprefix': + case 'breadcrumbs-home': + case 'breadcrumbs-prefix': + case 'breadcrumbs-searchprefix': + case 'breadcrumbs-sep': + if ( isset( $dirty[ $key ] ) ) { + $clean[ $key ] = wp_kses_post( $dirty[ $key ] ); + } + break; + + + /* 'post_types-' . $pt->name . '-maintax' fields */ + case 'post_types-': + $post_type = str_replace( array( 'post_types-', '-maintax' ), '', $key ); + $taxonomies = get_object_taxonomies( $post_type, 'names' ); + + if ( isset( $dirty[ $key ] ) ) { + if ( $taxonomies !== array() && in_array( $dirty[ $key ], $taxonomies, true ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + elseif ( (string) $dirty[ $key ] === '0' || (string) $dirty[ $key ] === '' ) { + $clean[ $key ] = 0; + } + elseif ( sanitize_title_with_dashes( $dirty[ $key ] ) === $dirty[ $key ] ) { + // Allow taxonomies which may not be registered yet. + $clean[ $key ] = $dirty[ $key ]; + } + else { + if ( isset( $old[ $key ] ) ) { + $clean[ $key ] = sanitize_title_with_dashes( $old[ $key ] ); + } + if ( function_exists( 'add_settings_error' ) ) { + /** + * @todo [JRF => whomever] maybe change the untranslated $pt name in the + * error message to the nicely translated label ? + */ + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + sprintf( __( 'Please select a valid taxonomy for post type "%s"', 'wordpress-seo' ), $post_type ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + } + } + elseif ( isset( $old[ $key ] ) ) { + $clean[ $key ] = sanitize_title_with_dashes( $old[ $key ] ); + } + unset( $taxonomies, $post_type ); + break; + + + /* 'taxonomy-' . $tax->name . '-ptparent' fields */ + case 'taxonomy-': + if ( isset( $dirty[ $key ] ) ) { + if ( $allowed_post_types !== array() && in_array( $dirty[ $key ], $allowed_post_types, true ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + elseif ( (string) $dirty[ $key ] === '0' || (string) $dirty[ $key ] === '' ) { + $clean[ $key ] = 0; + } + elseif ( sanitize_key( $dirty[ $key ] ) === $dirty[ $key ] ) { + // Allow taxonomies which may not be registered yet. + $clean[ $key ] = $dirty[ $key ]; + } + else { + if ( isset( $old[ $key ] ) ) { + $clean[ $key ] = sanitize_key( $old[ $key ] ); + } + if ( function_exists( 'add_settings_error' ) ) { + /** + * @todo [JRF =? whomever] maybe change the untranslated $tax name in the + * error message to the nicely translated label ? + */ + $tax = str_replace( array( 'taxonomy-', '-ptparent' ), '', $key ); + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $tax, // Suffix-id for the error message box. + sprintf( __( 'Please select a valid post type for taxonomy "%s"', 'wordpress-seo' ), $tax ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + unset( $tax ); + } + } + } + elseif ( isset( $old[ $key ] ) ) { + $clean[ $key ] = sanitize_key( $old[ $key ] ); + } + break; + + + /* + Boolean fields + */ + + /* + Covers: + * 'breadcrumbs-blog-remove' + * 'breadcrumbs-boldlast' + * 'breadcrumbs-enable' + */ + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Retrieve a list of the allowed post types as breadcrumb parent for a taxonomy + * Helper method for validation + * + * @internal don't make static as new types may still be registered + * + * @return array + */ + protected function get_allowed_post_types() { + $allowed_post_types = array(); + + $post_types = get_post_types( array( 'public' => true ), 'objects' ); + + if ( get_option( 'show_on_front' ) == 'page' && get_option( 'page_for_posts' ) > 0 ) { + $allowed_post_types[] = 'post'; + } + + if ( is_array( $post_types ) && $post_types !== array() ) { + foreach ( $post_types as $type ) { + if ( $type->has_archive ) { + $allowed_post_types[] = $type->name; + } + } + } + + return $allowed_post_types; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + + /* Make sure the old fall-back defaults for empty option keys are now added to the option */ + if ( isset( $current_version ) && version_compare( $current_version, '1.5.2.3', '<' ) ) { + if ( has_action( 'init', array( 'WPSEO_Options', 'bring_back_breadcrumb_defaults' ) ) === false ) { + add_action( 'init', array( 'WPSEO_Options', 'bring_back_breadcrumb_defaults' ), 3 ); + } + } + + /* + Make sure the values of the variable option key options are cleaned as they + may be retained and would not be cleaned/validated then + */ + if ( is_array( $option_value ) && $option_value !== array() ) { + + $allowed_post_types = $this->get_allowed_post_types(); + + foreach ( $option_value as $key => $value ) { + $switch_key = $this->get_switch_key( $key ); + + // Similar to validation routine - any changes made there should be made here too. + switch ( $switch_key ) { + /* 'post_types-' . $pt->name . '-maintax' fields */ + case 'post_types-': + $post_type = str_replace( array( 'post_types-', '-maintax' ), '', $key ); + $taxonomies = get_object_taxonomies( $post_type, 'names' ); + + if ( $taxonomies !== array() && in_array( $value, $taxonomies, true ) ) { + $option_value[ $key ] = $value; + } + elseif ( (string) $value === '0' || (string) $value === '' ) { + $option_value[ $key ] = 0; + } + elseif ( sanitize_title_with_dashes( $value ) === $value ) { + // Allow taxonomies which may not be registered yet. + $option_value[ $key ] = $value; + } + unset( $taxonomies, $post_type ); + break; + + + /* 'taxonomy-' . $tax->name . '-ptparent' fields */ + case 'taxonomy-': + if ( $allowed_post_types !== array() && in_array( $value, $allowed_post_types, true ) ) { + $option_value[ $key ] = $value; + } + elseif ( (string) $value === '0' || (string) $value === '' ) { + $option_value[ $key ] = 0; + } + elseif ( sanitize_key( $option_value[ $key ] ) === $option_value[ $key ] ) { + // Allow post types which may not be registered yet. + $option_value[ $key ] = $value; + } + break; + } + } + } + + return $option_value; + } + + /** + * With the changes to v1.5, the defaults for some of the textual breadcrumb settings are added + * dynamically, but empty strings are allowed. + * This caused issues for people who left the fields empty on purpose relying on the defaults. + * This little routine fixes that. + * Needs to be run on 'init' hook at prio 3 to make sure the defaults are translated. + */ + public function bring_back_defaults() { + $option = get_option( $this->option_name ); + + $values_to_bring_back = array( + 'breadcrumbs-404crumb', + 'breadcrumbs-archiveprefix', + 'breadcrumbs-home', + 'breadcrumbs-searchprefix', + 'breadcrumbs-sep', + ); + foreach ( $values_to_bring_back as $key ) { + if ( $option[ $key ] === '' && $this->defaults[ $key ] !== '' ) { + $option[ $key ] = $this->defaults[ $key ]; + } + } + update_option( $this->option_name, $option ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-ms.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-ms.php new file mode 100644 index 0000000..f259e61 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-ms.php @@ -0,0 +1,220 @@ +get_defaults(); + */ + protected $defaults = array( + 'access' => 'admin', + 'defaultblog' => '', // Numeric blog ID or empty. + ); + + /** + * @var array $allowed_access_options Available options for the 'access' setting + * Used for input validation + * + * @static + * + * @internal Important: Make sure the options added to the array here are in line with the keys + * for the options set for the select box in the admin/pages/network.php file + */ + public static $allowed_access_options = array( + 'admin', + 'superadmin', + ); + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Only run parent constructor in multisite context. + */ + public function __construct() { + if ( is_multisite() ) { + parent::__construct(); + } + } + + /** + * Add filters to make sure that the option default is returned if the option is not set + * + * @return void + */ + public function add_default_filters() { + // Don't change, needs to check for false as could return prio 0 which would evaluate to false. + if ( has_filter( 'default_site_option_' . $this->option_name, array( $this, 'get_defaults' ) ) === false ) { + add_filter( 'default_site_option_' . $this->option_name, array( $this, 'get_defaults' ) ); + } + } + + + /** + * Remove the default filters. + * Called from the validate() method to prevent failure to add new options + * + * @return void + */ + public function remove_default_filters() { + remove_filter( 'default_site_option_' . $this->option_name, array( $this, 'get_defaults' ) ); + } + + + /** + * Add filters to make sure that the option is merged with its defaults before being returned + * + * @return void + */ + public function add_option_filters() { + // Don't change, needs to check for false as could return prio 0 which would evaluate to false. + if ( has_filter( 'site_option_' . $this->option_name, array( $this, 'get_option' ) ) === false ) { + add_filter( 'site_option_' . $this->option_name, array( $this, 'get_option' ) ); + } + } + + + /** + * Remove the option filters. + * Called from the clean_up methods to make sure we retrieve the original old option + * + * @return void + */ + public function remove_option_filters() { + remove_filter( 'site_option_' . $this->option_name, array( $this, 'get_option' ) ); + } + + + /* *********** METHODS influencing add_uption(), update_option() and saving from admin pages *********** */ + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + foreach ( $clean as $key => $value ) { + switch ( $key ) { + case 'access': + if ( isset( $dirty[ $key ] ) && in_array( $dirty[ $key ], self::$allowed_access_options, true ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + elseif ( function_exists( 'add_settings_error' ) ) { + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + /* translators: %1$s expands to the option name and %2$sexpands to Yoast SEO */ + sprintf( __( '%1$s is not a valid choice for who should be allowed access to the %2$s settings. Value reset to the default.', 'wordpress-seo' ), esc_html( sanitize_text_field( $dirty[ $key ] ) ), 'Yoast SEO' ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + break; + + + case 'defaultblog': + if ( isset( $dirty[ $key ] ) && ( $dirty[ $key ] !== '' && $dirty[ $key ] !== '-' ) ) { + $int = WPSEO_Utils::validate_int( $dirty[ $key ] ); + if ( $int !== false && $int > 0 ) { + // Check if a valid blog number has been received. + $exists = get_blog_details( $int, false ); + if ( $exists && $exists->deleted == 0 ) { + $clean[ $key ] = $int; + } + elseif ( function_exists( 'add_settings_error' ) ) { + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + esc_html__( 'The default blog setting must be the numeric blog id of the blog you want to use as default.', 'wordpress-seo' ) . '
    ' . sprintf( esc_html__( 'This must be an existing blog. Blog %s does not exist or has been marked as deleted.', 'wordpress-seo' ), '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '' ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + unset( $exists ); + } + elseif ( function_exists( 'add_settings_error' ) ) { + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + esc_html__( 'The default blog setting must be the numeric blog id of the blog you want to use as default.', 'wordpress-seo' ) . '
    ' . esc_html__( 'No numeric value was received.', 'wordpress-seo' ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + unset( $int ); + } + break; + + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + + /* + Protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + + return $option_value; + } + */ +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-permalinks.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-permalinks.php new file mode 100644 index 0000000..e2ae859 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-permalinks.php @@ -0,0 +1,131 @@ +get_defaults(); + */ + protected $defaults = array( + 'cleanpermalinks' => false, + 'cleanpermalink-extravars' => '', // Text field. + 'cleanpermalink-googlecampaign' => false, + 'cleanpermalink-googlesitesearch' => false, + 'cleanreplytocom' => false, + 'cleanslugs' => true, + 'redirectattachment' => false, + 'stripcategorybase' => false, + 'trailingslash' => false, + ); + + + /** + * Add the actions and filters for the option + * + * @todo [JRF => testers] Check if the extra actions below would run into problems if an option + * is updated early on and if so, change the call to schedule these for a later action on add/update + * instead of running them straight away + * + * @return \WPSEO_Option_Permalinks + */ + protected function __construct() { + parent::__construct(); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Utils', 'clear_rewrites' ) ); + } + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option (not used here as all fields will always be in the form). + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + foreach ( $clean as $key => $value ) { + switch ( $key ) { + /* text fields */ + case 'cleanpermalink-extravars': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $clean[ $key ] = sanitize_text_field( $dirty[ $key ] ); + } + break; + + /* + Boolean (checkbox) fields + */ + + /* + Covers: + * 'cleanpermalinks' + * 'cleanpermalink-googlesitesearch' + * 'cleanpermalink-googlecampaign' + * 'cleanreplytocom' + * 'cleanslugs' + * 'hide-rsdlink' + * 'hide-wlwmanifest' + * 'hide-shortlink' + * 'hide-feedlinks' + * 'redirectattachment' + * 'stripcategorybase' + * 'trailingslash' + */ + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + + /* + Protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + + return $option_value; + } + */ +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-rss.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-rss.php new file mode 100644 index 0000000..8c9898a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-rss.php @@ -0,0 +1,69 @@ +get_defaults(); + * @internal Note: Some of the default values are added via the translate_defaults() method + */ + protected $defaults = array( + 'rssbefore' => '', // Text area. + 'rssafter' => '', // Text area. + ); + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + + /** + * Translate strings used in the option defaults + * + * @return void + */ + public function translate_defaults() { + $this->defaults['rssafter'] = sprintf( __( 'The post %s appeared first on %s.', 'wordpress-seo' ), '%%POSTLINK%%', '%%BLOGLINK%%' ); + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + foreach ( $clean as $key => $value ) { + if ( isset( $dirty[ $key ] ) ) { + $clean[ $key ] = wp_kses_post( $dirty[ $key ] ); + } + } + + return $clean; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-social.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-social.php new file mode 100644 index 0000000..414bea6 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-social.php @@ -0,0 +1,319 @@ +get_defaults(); + */ + protected $defaults = array( + // Non-form fields, set via procedural code in admin/pages/social.php. + 'fb_admins' => array(), // Array of user id's => array( name => '', link => '' ). + + // Non-form field, set via translate_defaults() and validate_option() methods. + 'fbconnectkey' => '', + // Form fields: + 'facebook_site' => '', // Text field. + 'instagram_url' => '', + 'linkedin_url' => '', + 'myspace_url' => '', + 'og_default_image' => '', // Text field. + 'og_frontpage_title' => '', // Text field. + 'og_frontpage_desc' => '', // Text field. + 'og_frontpage_image' => '', // Text field. + 'opengraph' => true, + 'pinterest_url' => '', + 'pinterestverify' => '', + 'plus-publisher' => '', // Text field. + 'twitter' => true, + 'twitter_site' => '', // Text field. + 'twitter_card_type' => 'summary', + 'youtube_url' => '', + 'google_plus_url' => '', + // Form field, but not always available: + 'fbadminapp' => '', // Facebook app ID. + ); + + /** + * @var array Array of sub-options which should not be overloaded with multi-site defaults + */ + public $ms_exclude = array( + /* privacy */ + 'fb_admins', + 'fbconnectkey', + 'fbadminapp', + 'pinterestverify', + ); + + + /** + * @var array Array of allowed twitter card types + * While we only have the options summary and summary_large_image in the + * interface now, we might change that at some point. + * + * @internal Uncomment any of these to allow them in validation *and* automatically add them as a choice + * in the options page + */ + public static $twitter_card_types = array( + 'summary' => '', + 'summary_large_image' => '', + // 'photo' => '', + // 'gallery' => '', + // 'app' => '', + // 'player' => '', + // 'product' => '', + ); + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + + /** + * Translate/set strings used in the option defaults + * + * @return void + */ + public function translate_defaults() { + /* Auto-magically set the fb connect key */ + $this->defaults['fbconnectkey'] = self::get_fbconnectkey(); + + self::$twitter_card_types['summary'] = __( 'Summary', 'wordpress-seo' ); + self::$twitter_card_types['summary_large_image'] = __( 'Summary with large image', 'wordpress-seo' ); + } + + + /** + * Get a Facebook connect key for the blog + * + * @static + * @return string + */ + public static function get_fbconnectkey() { + return md5( get_bloginfo( 'url' ) . rand() ); + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + foreach ( $clean as $key => $value ) { + switch ( $key ) { + /* Automagic Facebook connect key */ + case 'fbconnectkey': + if ( ( isset( $old[ $key ] ) && $old[ $key ] !== '' ) && preg_match( '`^[a-f0-9]{32}$`', $old[ $key ] ) > 0 ) { + $clean[ $key ] = $old[ $key ]; + } + else { + $clean[ $key ] = self::get_fbconnectkey(); + } + break; + + + /* Will not always exist in form */ + case 'fb_admins': + if ( isset( $dirty[ $key ] ) && is_array( $dirty[ $key ] ) ) { + if ( $dirty[ $key ] === array() ) { + $clean[ $key ] = array(); + } + else { + foreach ( $dirty[ $key ] as $user_id => $fb_array ) { + /* + * @todo [JRF/JRF => Yoast/whomever] add user_id validation - + * are these WP user-ids or FB user-ids ? Probably FB user-ids, + * if so, find out the rules for FB user-ids + */ + if ( is_array( $fb_array ) && $fb_array !== array() ) { + foreach ( $fb_array as $fb_key => $fb_value ) { + switch ( $fb_key ) { + case 'name': + /** + * @todo [JRF => whomever] add validation for name based + * on rules if there are any + * Input comes from: $_GET['userrealname'] + */ + $clean[ $key ][ $user_id ][ $fb_key ] = sanitize_text_field( $fb_value ); + break; + + case 'link': + $clean[ $key ][ $user_id ][ $fb_key ] = WPSEO_Utils::sanitize_url( $fb_value ); + break; + } + } + } + } + unset( $user_id, $fb_array, $fb_key, $fb_value ); + } + } + elseif ( isset( $old[ $key ] ) && is_array( $old[ $key ] ) ) { + $clean[ $key ] = $old[ $key ]; + } + break; + + /* text fields */ + case 'og_frontpage_desc': + case 'og_frontpage_title': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $clean[ $key ] = WPSEO_Utils::sanitize_text_field( $dirty[ $key ] ); + } + break; + + + /* url text fields - no ftp allowed */ + case 'facebook_site': + case 'instagram_url': + case 'linkedin_url': + case 'myspace_url': + case 'pinterest_url': + case 'plus-publisher': + case 'og_default_image': + case 'og_frontpage_image': + case 'youtube_url': + case 'google_plus_url': + $this->validate_url( $key, $dirty, $old, $clean ); + break; + + case 'pinterestverify': + $this->validate_verification_string( $key, $dirty, $old, $clean ); + break; + + /* twitter user name */ + case 'twitter_site': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $twitter_id = sanitize_text_field( ltrim( $dirty[ $key ], '@' ) ); + /** + * From the Twitter documentation about twitter screen names: + * Typically a maximum of 15 characters long, but some historical accounts + * may exist with longer names. + * A username can only contain alphanumeric characters (letters A-Z, numbers 0-9) + * with the exception of underscores + * + * @link https://support.twitter.com/articles/101299-why-can-t-i-register-certain-usernames + * @link https://dev.twitter.com/docs/platform-objects/users + */ + if ( preg_match( '`^[A-Za-z0-9_]{1,25}$`', $twitter_id ) ) { + $clean[ $key ] = $twitter_id; + } + elseif ( preg_match( '`^http(?:s)?://(?:www\.)?twitter\.com/(?P[A-Za-z0-9_]{1,25})/?$`', $twitter_id, $matches ) ) { + $clean[ $key ] = $matches['handle']; + } + else { + if ( isset( $old[ $key ] ) && $old[ $key ] !== '' ) { + $twitter_id = sanitize_text_field( ltrim( $old[ $key ], '@' ) ); + if ( preg_match( '`^[A-Za-z0-9_]{1,25}$`', $twitter_id ) ) { + $clean[ $key ] = $twitter_id; + } + } + if ( function_exists( 'add_settings_error' ) ) { + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + sprintf( __( '%s does not seem to be a valid Twitter user-id. Please correct.', 'wordpress-seo' ), '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '' ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + } + unset( $twitter_id ); + } + break; + + case 'twitter_card_type': + if ( isset( $dirty[ $key ], self::$twitter_card_types[ $dirty[ $key ] ] ) && $dirty[ $key ] !== '' ) { + $clean[ $key ] = $dirty[ $key ]; + } + break; + + /* boolean fields */ + case 'opengraph': + case 'twitter': + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + /** + * Only validate 'fbadminapp', so leave the clean default. + */ + if ( isset( $dirty['fbadminapp'] ) && ! empty( $dirty['fbadminapp'] ) ) { + $clean['fbadminapp'] = $dirty['fbadminapp']; + } + + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + + /* Move options from very old option to this one */ + $old_option = null; + if ( isset( $all_old_option_values ) ) { + // Ok, we have an import. + if ( isset( $all_old_option_values['wpseo_indexation'] ) && is_array( $all_old_option_values['wpseo_indexation'] ) && $all_old_option_values['wpseo_indexation'] !== array() ) { + $old_option = $all_old_option_values['wpseo_indexation']; + } + } + else { + $old_option = get_option( 'wpseo_indexation' ); + } + + if ( is_array( $old_option ) && $old_option !== array() ) { + $move = array( + 'opengraph', + 'fb_adminid', + 'fb_appid', + ); + foreach ( $move as $key ) { + if ( isset( $old_option[ $key ] ) && ! isset( $option_value[ $key ] ) ) { + $option_value[ $key ] = $old_option[ $key ]; + } + } + unset( $move, $key ); + } + unset( $old_option ); + + + return $option_value; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-titles.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-titles.php new file mode 100644 index 0000000..38d528a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-titles.php @@ -0,0 +1,613 @@ +get_defaults(); + * @internal Note: Some of the default values are added via the translate_defaults() method + */ + protected $defaults = array( + // Non-form fields, set via (ajax) function. + 'title_test' => 0, + // Form fields. + 'forcerewritetitle' => false, + 'content-analysis-active' => true, + 'keyword-analysis-active' => true, + 'separator' => 'sc-dash', + 'noodp' => false, + 'usemetakeywords' => false, + 'title-home-wpseo' => '%%sitename%% %%page%% %%sep%% %%sitedesc%%', // Text field. + 'title-author-wpseo' => '', // Text field. + 'title-archive-wpseo' => '%%date%% %%page%% %%sep%% %%sitename%%', // Text field. + 'title-search-wpseo' => '', // Text field. + 'title-404-wpseo' => '', // Text field. + + 'metadesc-home-wpseo' => '', // Text area. + 'metadesc-author-wpseo' => '', // Text area. + 'metadesc-archive-wpseo' => '', // Text area. + 'metakey-home-wpseo' => '', // Text field. + 'metakey-author-wpseo' => '', // Text field. + + 'noindex-subpages-wpseo' => false, + 'noindex-author-wpseo' => false, + 'noindex-archive-wpseo' => true, + + 'disable-author' => false, + 'disable-date' => false, + 'disable-post_format' => false, + + /** + * Uses enrich_defaults to add more along the lines of: + * - 'title-' . $pt->name => ''; // Text field. + * - 'metadesc-' . $pt->name => ''; // Text field. + * - 'metakey-' . $pt->name => ''; // Text field. + * - 'noindex-' . $pt->name => false; + * - 'showdate-' . $pt->name => false; + * - 'hideeditbox-' . $pt->name => false; + * + * - 'title-ptarchive-' . $pt->name => ''; // Text field. + * - 'metadesc-ptarchive-' . $pt->name => ''; // Text field. + * - 'metakey-ptarchive-' . $pt->name => ''; // Text field. + * - 'bctitle-ptarchive-' . $pt->name => ''; // Text field. + * - 'noindex-ptarchive-' . $pt->name => false; + * + * - 'title-tax-' . $tax->name => '''; // Text field. + * - 'metadesc-tax-' . $tax->name => ''; // Text field. + * - 'metakey-tax-' . $tax->name => ''; // Text field. + * - 'noindex-tax-' . $tax->name => false; + * - 'hideeditbox-tax-' . $tax->name => false; + */ + ); + + /** + * @var array Array of variable option name patterns for the option + */ + protected $variable_array_key_patterns = array( + 'title-', + 'metadesc-', + 'metakey-', + 'noindex-', + 'showdate-', + 'hideeditbox-', + 'bctitle-ptarchive-', + ); + + /** + * @var array Array of sub-options which should not be overloaded with multi-site defaults + */ + public $ms_exclude = array( + /* theme dependent */ + 'title_test', + 'forcerewritetitle', + ); + + /** + * @var array Array of the separator options. To get these options use WPSEO_Option_Titles::get_instance()->get_separator_options() + */ + private $separator_options = array( + 'sc-dash' => '-', + 'sc-ndash' => '–', + 'sc-mdash' => '—', + 'sc-middot' => '·', + 'sc-bull' => '•', + 'sc-star' => '*', + 'sc-smstar' => '⋆', + 'sc-pipe' => '|', + 'sc-tilde' => '~', + 'sc-laquo' => '«', + 'sc-raquo' => '»', + 'sc-lt' => '<', + 'sc-gt' => '>', + ); + + /** + * Add the actions and filters for the option + * + * @todo [JRF => testers] Check if the extra actions below would run into problems if an option + * is updated early on and if so, change the call to schedule these for a later action on add/update + * instead of running them straight away + * + * @return \WPSEO_Option_Titles + */ + protected function __construct() { + parent::__construct(); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Utils', 'clear_cache' ) ); + add_action( 'init', array( $this, 'end_of_init' ), 999 ); + } + + + /** + * Make sure we can recognize the right action for the double cleaning + */ + public function end_of_init() { + do_action( 'wpseo_double_clean_titles' ); + } + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Get the available separator options + * + * @return array + */ + public function get_separator_options() { + $separators = $this->separator_options; + + /** + * Allow altering the array with separator options + * + * @api array $separator_options Array with the separator options + */ + $filtered_separators = apply_filters( 'wpseo_separator_options', $separators ); + + if ( is_array( $filtered_separators ) && $filtered_separators !== array() ) { + $separators = array_merge( $separators, $filtered_separators ); + } + + return $separators; + } + + /** + * Translate strings used in the option defaults + * + * @return void + */ + public function translate_defaults() { + $this->defaults['title-author-wpseo'] = sprintf( __( '%s, Author at %s', 'wordpress-seo' ), '%%name%%', '%%sitename%%' ) . ' %%page%% '; + $this->defaults['title-search-wpseo'] = sprintf( __( 'You searched for %s', 'wordpress-seo' ), '%%searchphrase%%' ) . ' %%page%% %%sep%% %%sitename%%'; + $this->defaults['title-404-wpseo'] = __( 'Page not found', 'wordpress-seo' ) . ' %%sep%% %%sitename%%'; + } + + + /** + * Add dynamically created default options based on available post types and taxonomies + * + * @return void + */ + public function enrich_defaults() { + + // Retrieve all the relevant post type and taxonomy arrays. + $post_type_names = get_post_types( array( 'public' => true ), 'names' ); + + $post_type_objects_custom = get_post_types( array( 'public' => true, '_builtin' => false ), 'objects' ); + + $taxonomy_names = get_taxonomies( array( 'public' => true ), 'names' ); + + + if ( $post_type_names !== array() ) { + foreach ( $post_type_names as $pt ) { + $this->defaults[ 'title-' . $pt ] = '%%title%% %%page%% %%sep%% %%sitename%%'; // Text field. + $this->defaults[ 'metadesc-' . $pt ] = ''; // Text area. + $this->defaults[ 'metakey-' . $pt ] = ''; // Text field. + $this->defaults[ 'noindex-' . $pt ] = false; + $this->defaults[ 'showdate-' . $pt ] = false; + $this->defaults[ 'hideeditbox-' . $pt ] = false; + } + unset( $pt ); + } + + if ( $post_type_objects_custom !== array() ) { + $archive = sprintf( __( '%s Archive', 'wordpress-seo' ), '%%pt_plural%%' ); + foreach ( $post_type_objects_custom as $pt ) { + if ( ! $pt->has_archive ) { + continue; + } + + $this->defaults[ 'title-ptarchive-' . $pt->name ] = $archive . ' %%page%% %%sep%% %%sitename%%'; // Text field. + $this->defaults[ 'metadesc-ptarchive-' . $pt->name ] = ''; // Text area. + $this->defaults[ 'metakey-ptarchive-' . $pt->name ] = ''; // Text field. + $this->defaults[ 'bctitle-ptarchive-' . $pt->name ] = ''; // Text field. + $this->defaults[ 'noindex-ptarchive-' . $pt->name ] = false; + } + unset( $pt ); + } + + if ( $taxonomy_names !== array() ) { + $archives = sprintf( __( '%s Archives', 'wordpress-seo' ), '%%term_title%%' ); + foreach ( $taxonomy_names as $tax ) { + $this->defaults[ 'title-tax-' . $tax ] = $archives . ' %%page%% %%sep%% %%sitename%%'; // Text field. + $this->defaults[ 'metadesc-tax-' . $tax ] = ''; // Text area. + $this->defaults[ 'metakey-tax-' . $tax ] = ''; // Text field. + $this->defaults[ 'hideeditbox-tax-' . $tax ] = false; + + if ( $tax !== 'post_format' ) { + $this->defaults[ 'noindex-tax-' . $tax ] = false; + } + else { + $this->defaults[ 'noindex-tax-' . $tax ] = true; + } + } + unset( $tax ); + } + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + foreach ( $clean as $key => $value ) { + $switch_key = $this->get_switch_key( $key ); + + switch ( $switch_key ) { + /* + Text fields + */ + + /* + Covers: + 'title-home-wpseo', 'title-author-wpseo', 'title-archive-wpseo', + 'title-search-wpseo', 'title-404-wpseo' + 'title-' . $pt->name + 'title-ptarchive-' . $pt->name + 'title-tax-' . $tax->name + */ + case 'title-': + if ( isset( $dirty[ $key ] ) ) { + $clean[ $key ] = WPSEO_Utils::sanitize_text_field( $dirty[ $key ] ); + } + break; + + /* + Covers: + 'metadesc-home-wpseo', 'metadesc-author-wpseo', 'metadesc-archive-wpseo' + 'metadesc-' . $pt->name + 'metadesc-ptarchive-' . $pt->name + 'metadesc-tax-' . $tax->name + */ + case 'metadesc-': + /* + Covers: + 'metakey-home-wpseo', 'metakey-author-wpseo' + 'metakey-' . $pt->name + 'metakey-ptarchive-' . $pt->name + 'metakey-tax-' . $tax->name + */ + case 'metakey-': + /* + Covers: + ''bctitle-ptarchive-' . $pt->name + */ + case 'bctitle-ptarchive-': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $clean[ $key ] = WPSEO_Utils::sanitize_text_field( $dirty[ $key ] ); + } + break; + + + /* integer field - not in form*/ + case 'title_test': + if ( isset( $dirty[ $key ] ) ) { + $int = WPSEO_Utils::validate_int( $dirty[ $key ] ); + if ( $int !== false && $int >= 0 ) { + $clean[ $key ] = $int; + } + } + elseif ( isset( $old[ $key ] ) ) { + $int = WPSEO_Utils::validate_int( $old[ $key ] ); + if ( $int !== false && $int >= 0 ) { + $clean[ $key ] = $int; + } + } + break; + + /* Separator field - Radio */ + case 'separator': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + + // Get separator fields. + $separator_fields = $this->get_separator_options(); + + // Check if the given separator is exists. + if ( isset( $separator_fields[ $dirty[ $key ] ] ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + } + break; + + /* + Boolean fields + */ + + /* + Covers: + * 'noindex-subpages-wpseo', 'noindex-author-wpseo', 'noindex-archive-wpseo' + * 'noindex-' . $pt->name + * 'noindex-ptarchive-' . $pt->name + * 'noindex-tax-' . $tax->name + * 'forcerewritetitle': + * 'usemetakeywords': + * 'noodp': + * 'noydir': + * 'disable-author': + * 'disable-date': + * 'disable-post_format'; + * 'noindex-' + * 'showdate-' + * 'showdate-'. $pt->name + * 'hideeditbox-' + * 'hideeditbox-'. $pt->name + * 'hideeditbox-tax-' . $tax->name + */ + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + static $original = null; + + // Double-run this function to ensure renaming of the taxonomy options will work. + if ( ! isset( $original ) && has_action( 'wpseo_double_clean_titles', array( + $this, + 'clean', + ) ) === false + ) { + add_action( 'wpseo_double_clean_titles', array( $this, 'clean' ) ); + $original = $option_value; + } + + /* + Move options from very old option to this one + @internal Don't rename to the 'current' names straight away as that would prevent + the rename/unset combi below from working + @todo [JRF] maybe figure out a smarter way to deal with this + */ + $old_option = null; + if ( isset( $all_old_option_values ) ) { + // Ok, we have an import. + if ( isset( $all_old_option_values['wpseo_indexation'] ) && is_array( $all_old_option_values['wpseo_indexation'] ) && $all_old_option_values['wpseo_indexation'] !== array() ) { + $old_option = $all_old_option_values['wpseo_indexation']; + } + } + else { + $old_option = get_option( 'wpseo_indexation' ); + } + if ( is_array( $old_option ) && $old_option !== array() ) { + $move = array( + 'noindexauthor' => 'noindex-author', + 'disableauthor' => 'disable-author', + 'noindexdate' => 'noindex-archive', + 'noindexcat' => 'noindex-category', + 'noindextag' => 'noindex-post_tag', + 'noindexpostformat' => 'noindex-post_format', + 'noindexsubpages' => 'noindex-subpages', + ); + foreach ( $move as $old => $new ) { + if ( isset( $old_option[ $old ] ) && ! isset( $option_value[ $new ] ) ) { + $option_value[ $new ] = $old_option[ $old ]; + } + } + unset( $move, $old, $new ); + } + unset( $old_option ); + + + // Fix wrongness created by buggy version 1.2.2. + if ( isset( $option_value['title-home'] ) && $option_value['title-home'] === '%%sitename%% - %%sitedesc%% - 12345' ) { + $option_value['title-home-wpseo'] = '%%sitename%% - %%sitedesc%%'; + } + + + /* + Renaming these options to avoid ever overwritting these if a (bloody stupid) user / + programmer would use any of the following as a custom post type or custom taxonomy: + 'home', 'author', 'archive', 'search', '404', 'subpages' + + Similarly, renaming the tax options to avoid a custom post type and a taxonomy + with the same name occupying the same option + */ + $rename = array( + 'title-home' => 'title-home-wpseo', + 'title-author' => 'title-author-wpseo', + 'title-archive' => 'title-archive-wpseo', + 'title-search' => 'title-search-wpseo', + 'title-404' => 'title-404-wpseo', + 'metadesc-home' => 'metadesc-home-wpseo', + 'metadesc-author' => 'metadesc-author-wpseo', + 'metadesc-archive' => 'metadesc-archive-wpseo', + 'metakey-home' => 'metakey-home-wpseo', + 'metakey-author' => 'metakey-author-wpseo', + 'noindex-subpages' => 'noindex-subpages-wpseo', + 'noindex-author' => 'noindex-author-wpseo', + 'noindex-archive' => 'noindex-archive-wpseo', + ); + foreach ( $rename as $old => $new ) { + if ( isset( $option_value[ $old ] ) && ! isset( $option_value[ $new ] ) ) { + $option_value[ $new ] = $option_value[ $old ]; + unset( $option_value[ $old ] ); + } + } + unset( $rename, $old, $new ); + + + /** + * @internal This clean-up action can only be done effectively once the taxonomies and post_types + * have been registered, i.e. at the end of the init action. + */ + if ( isset( $original ) && current_filter() === 'wpseo_double_clean_titles' || did_action( 'wpseo_double_clean_titles' ) > 0 ) { + $rename = array( + 'title-' => 'title-tax-', + 'metadesc-' => 'metadesc-tax-', + 'metakey-' => 'metakey-tax-', + 'noindex-' => 'noindex-tax-', + 'tax-hideeditbox-' => 'hideeditbox-tax-', + + ); + $taxonomy_names = get_taxonomies( array( 'public' => true ), 'names' ); + $post_type_names = get_post_types( array( 'public' => true ), 'names' ); + $defaults = $this->get_defaults(); + if ( $taxonomy_names !== array() ) { + foreach ( $taxonomy_names as $tax ) { + foreach ( $rename as $old_prefix => $new_prefix ) { + if ( + ( isset( $original[ $old_prefix . $tax ] ) && ! isset( $original[ $new_prefix . $tax ] ) ) + && ( ! isset( $option_value[ $new_prefix . $tax ] ) + || ( isset( $option_value[ $new_prefix . $tax ] ) + && $option_value[ $new_prefix . $tax ] === $defaults[ $new_prefix . $tax ] ) ) + ) { + $option_value[ $new_prefix . $tax ] = $original[ $old_prefix . $tax ]; + + /* + Check if there is a cpt with the same name as the tax, + if so, we should make sure that the old setting hasn't been removed + */ + if ( ! isset( $post_type_names[ $tax ] ) && isset( $option_value[ $old_prefix . $tax ] ) ) { + unset( $option_value[ $old_prefix . $tax ] ); + } + else { + if ( isset( $post_type_names[ $tax ] ) && ! isset( $option_value[ $old_prefix . $tax ] ) ) { + $option_value[ $old_prefix . $tax ] = $original[ $old_prefix . $tax ]; + } + } + + if ( $old_prefix === 'tax-hideeditbox-' ) { + unset( $option_value[ $old_prefix . $tax ] ); + } + } + } + } + } + unset( $rename, $taxonomy_names, $post_type_names, $defaults, $tax, $old_prefix, $new_prefix ); + } + + + /* + Make sure the values of the variable option key options are cleaned as they + may be retained and would not be cleaned/validated then + */ + if ( is_array( $option_value ) && $option_value !== array() ) { + foreach ( $option_value as $key => $value ) { + $switch_key = $this->get_switch_key( $key ); + + // Similar to validation routine - any changes made there should be made here too. + switch ( $switch_key ) { + /* text fields */ + case 'title-': + case 'metadesc-': + case 'metakey-': + case 'bctitle-ptarchive-': + $option_value[ $key ] = WPSEO_Utils::sanitize_text_field( $value ); + break; + + case 'separator': + if ( ! array_key_exists( $value, $this->get_separator_options() ) ) { + $option_value[ $key ] = false; + } + break; + + /* + Boolean fields + */ + + /* + Covers: + * 'noindex-' + * 'showdate-' + * 'hideeditbox-' + */ + default: + $option_value[ $key ] = WPSEO_Utils::validate_bool( $value ); + break; + } + } + unset( $key, $value, $switch_key ); + } + + return $option_value; + } + + + /** + * Make sure that any set option values relating to post_types and/or taxonomies are retained, + * even when that post_type or taxonomy may not yet have been registered. + * + * @internal Overrule the abstract class version of this to make sure one extra renamed variable key + * does not get removed. IMPORTANT: keep this method in line with the parent on which it is based! + * + * @param array $dirty Original option as retrieved from the database. + * @param array $clean Filtered option where any options which shouldn't be in our option + * have already been removed and any options which weren't set + * have been set to their defaults. + * + * @return array + */ + protected function retain_variable_keys( $dirty, $clean ) { + if ( ( is_array( $this->variable_array_key_patterns ) && $this->variable_array_key_patterns !== array() ) && ( is_array( $dirty ) && $dirty !== array() ) ) { + + // Add the extra pattern. + $patterns = $this->variable_array_key_patterns; + $patterns[] = 'tax-hideeditbox-'; + + /** + * Allow altering the array with variable array key patterns + * + * @api array $patterns Array with the variable array key patterns + */ + $patterns = apply_filters( 'wpseo_option_titles_variable_array_key_patterns', $patterns ); + + foreach ( $dirty as $key => $value ) { + + // Do nothing if already in filtered option array. + if ( isset( $clean[ $key ] ) ) { + continue; + } + + foreach ( $patterns as $pattern ) { + if ( strpos( $key, $pattern ) === 0 ) { + $clean[ $key ] = $value; + break; + } + } + } + } + + return $clean; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-wpseo.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-wpseo.php new file mode 100644 index 0000000..13b831f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-wpseo.php @@ -0,0 +1,244 @@ +get_defaults(); + */ + protected $defaults = array( + // Non-form fields, set via (ajax) function. + 'blocking_files' => array(), + 'ms_defaults_set' => false, + // Non-form field, should only be set via validation routine. + 'version' => '', // Leave default as empty to ensure activation/upgrade works. + + // Form fields. + 'company_logo' => '', + 'company_name' => '', + 'company_or_person' => '', + 'disableadvanced_meta' => true, + 'onpage_indexability' => true, + 'googleverify' => '', // Text field. + 'msverify' => '', // Text field. + 'person_name' => '', + 'website_name' => '', + 'alternate_website_name' => '', + 'yandexverify' => '', + 'site_type' => '', // List of options. + 'has_multiple_authors' => '', + 'environment_type' => '', + 'enable_setting_pages' => true, + 'enable_admin_bar_menu' => true, + 'show_onboarding_notice' => false, + 'first_activated_on' => false, + ); + + /** + * @var array Sub-options which should not be overloaded with multi-site defaults + */ + public $ms_exclude = array( + /* privacy */ + 'alexaverify', + 'googleverify', + 'msverify', + 'yandexverify', + ); + + /** @var array Possible values for the site_type option */ + protected $site_types = array( + '', + 'blog', + 'news', + 'smallBusiness', + 'corporateOther', + 'personalOther', + ); + + /** @var array Possible environment types. */ + protected $environment_types = array( + '', + 'production', + 'staging', + 'development', + ); + + /** + * Add the actions and filters for the option + * + * @todo [JRF => testers] Check if the extra actions below would run into problems if an option + * is updated early on and if so, change the call to schedule these for a later action on add/update + * instead of running them straight away + * + * @return \WPSEO_Option_Wpseo + */ + protected function __construct() { + parent::__construct(); + + /* Clear the cache on update/add */ + add_action( 'add_option_' . $this->option_name, array( 'WPSEO_Utils', 'clear_cache' ) ); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Utils', 'clear_cache' ) ); + + /** + * Filter the `wpseo` option defaults. + * + * @param array $defaults Array the defaults for the `wpseo` option attributes. + */ + $this->defaults = apply_filters( 'wpseo_option_wpseo_defaults', $this->defaults ); + } + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + foreach ( $clean as $key => $value ) { + switch ( $key ) { + case 'version': + $clean[ $key ] = WPSEO_VERSION; + break; + + + case 'blocking_files': + /** + * @internal [JRF] to really validate this we should also do a file_exists() + * on each array entry and remove files which no longer exist, but that might be overkill + */ + if ( isset( $dirty[ $key ] ) && is_array( $dirty[ $key ] ) ) { + $clean[ $key ] = array_unique( $dirty[ $key ] ); + } + elseif ( isset( $old[ $key ] ) && is_array( $old[ $key ] ) ) { + $clean[ $key ] = array_unique( $old[ $key ] ); + } + break; + + case 'company_or_person': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + if ( in_array( $dirty[ $key ], array( 'company', 'person' ) ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + } + break; + + /* text fields */ + case 'company_name': + case 'person_name': + case 'website_name': + case 'alternate_website_name': + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $clean[ $key ] = sanitize_text_field( $dirty[ $key ] ); + } + break; + + case 'company_logo': + $this->validate_url( $key, $dirty, $old, $clean ); + break; + + /* verification strings */ + case 'googleverify': + case 'msverify': + case 'yandexverify': + $this->validate_verification_string( $key, $dirty, $old, $clean ); + break; + + /* + Boolean dismiss warnings - not fields - may not be in form + (and don't need to be either as long as the default is false) + */ + case 'ms_defaults_set': + if ( isset( $dirty[ $key ] ) ) { + $clean[ $key ] = WPSEO_Utils::validate_bool( $dirty[ $key ] ); + } + elseif ( isset( $old[ $key ] ) ) { + $clean[ $key ] = WPSEO_Utils::validate_bool( $old[ $key ] ); + } + break; + + case 'site_type': + $clean[ $key ] = ''; + if ( isset( $dirty[ $key ] ) && in_array( $dirty[ $key ], $this->site_types, true ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + break; + case 'environment_type': + $clean[ $key ] = ''; + if ( isset( $dirty[ $key ] ) && in_array( $dirty[ $key ], $this->environment_types, true ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + break; + + case 'first_activated_on' : + $clean[ $key ] = false; + if ( isset( $dirty[ $key ] ) ) { + if ( $dirty[ $key ] === false || WPSEO_Utils::validate_int( $dirty[ $key ] ) ) { + $clean[ $key ] = $dirty[ $key ]; + } + } + break; + + /* + Boolean (checkbox) fields + */ + + /* + Covers + * 'disableadvanced_meta' + * 'yoast_tracking' + */ + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + return $option_value; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-xml.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-xml.php new file mode 100644 index 0000000..6b14eb4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-xml.php @@ -0,0 +1,259 @@ +get_defaults(); + */ + protected $defaults = array( + 'disable_author_sitemap' => true, + 'disable_author_noposts' => true, + 'enablexmlsitemap' => true, + 'entries-per-page' => 1000, + 'excluded-posts' => '', + + /** + * Uses enrich_defaults to add more along the lines of: + * - 'user_role-' . $role_name . '-not_in_sitemap' => bool + * - 'post_types-' . $pt->name . '-not_in_sitemap' => bool + * - 'taxonomies-' . $tax->name . '-not_in_sitemap' => bool + */ + ); + + /** + * @var array Array of variable option name patterns for the option + */ + protected $variable_array_key_patterns = array( + 'user_role-', + 'post_types-', + 'taxonomies-', + ); + + + /** + * Add the actions and filters for the option + * + * @todo [JRF => testers] Check if the extra actions below would run into problems if an option + * is updated early on and if so, change the call to schedule these for a later action on add/update + * instead of running them straight away + * + * @return \WPSEO_Option_XML + */ + protected function __construct() { + parent::__construct(); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Utils', 'clear_rewrites' ) ); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Sitemaps_Cache', 'clear' ) ); + } + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Add dynamically created default options based on available post types and taxonomies + * + * @return void + */ + public function enrich_defaults() { + + $user_roles = WPSEO_Utils::get_roles(); + $filtered_user_roles = apply_filters( 'wpseo_sitemaps_supported_user_roles', $user_roles ); + if ( is_array( $filtered_user_roles ) && $filtered_user_roles !== array() ) { + foreach ( $filtered_user_roles as $role_name => $role_value ) { + $this->defaults[ 'user_role-' . $role_name . '-not_in_sitemap' ] = false; + + unset( $user_role ); + } + unset( $role_name, $role_value ); + } + unset( $user_roles, $filtered_user_roles ); + + $post_type_names = get_post_types( array( 'public' => true ), 'names' ); + $filtered_post_types = apply_filters( 'wpseo_sitemaps_supported_post_types', $post_type_names ); + + if ( is_array( $filtered_post_types ) && $filtered_post_types !== array() ) { + foreach ( $filtered_post_types as $pt ) { + if ( $pt !== 'attachment' ) { + $this->defaults[ 'post_types-' . $pt . '-not_in_sitemap' ] = false; + } + else { + $this->defaults[ 'post_types-' . $pt . '-not_in_sitemap' ] = true; + } + } + unset( $pt ); + } + unset( $post_type_names, $filtered_post_types ); + + $taxonomy_objects = get_taxonomies( array( 'public' => true ), 'objects' ); + $filtered_taxonomies = apply_filters( 'wpseo_sitemaps_supported_taxonomies', $taxonomy_objects ); + if ( is_array( $filtered_taxonomies ) && $filtered_taxonomies !== array() ) { + foreach ( $filtered_taxonomies as $tax ) { + if ( isset( $tax->labels->name ) && trim( $tax->labels->name ) != '' ) { + $this->defaults[ 'taxonomies-' . $tax->name . '-not_in_sitemap' ] = false; + } + } + unset( $tax ); + } + unset( $taxonomy_objects, $filtered_taxonomies ); + + } + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + + foreach ( $clean as $key => $value ) { + $switch_key = $this->get_switch_key( $key ); + + switch ( $switch_key ) { + /* integer fields */ + case 'entries-per-page': + + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + + $int = WPSEO_Utils::validate_int( $dirty[ $key ] ); + + if ( $int !== false && $int > 0 ) { + + if ( $int > 50000 ) { + + $error_message = sprintf( + __( '"Max entries per sitemap page" should be below %s to meet Google\'s requirements, which %s is not.', 'wordpress-seo' ), + number_format_i18n( 50000 ), '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '' + ); + add_settings_error( $this->group_name, '_' . $key, $error_message, 'error' ); + + $int = 50000; + } + + $clean[ $key ] = $int; + } + else { + + if ( isset( $old[ $key ] ) && $old[ $key ] !== '' ) { + + $int = WPSEO_Utils::validate_int( $old[ $key ] ); + + if ( $int !== false && $int > 0 ) { + $clean[ $key ] = $int; + } + } + + $error_message = sprintf( + __( '"Max entries per sitemap page" should be a positive number, which %s is not. Please correct.', 'wordpress-seo' ), + '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '' + ); + add_settings_error( $this->group_name, '_' . $key, $error_message, 'error' ); + } + unset( $int ); + } + break; + + case 'excluded-posts' : + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + if ( $filtered_array = filter_var_array( explode( ',', $dirty[ $key ] ), FILTER_VALIDATE_INT ) ) { + $clean[ $key ] = implode( ',', array_filter( $filtered_array, 'is_integer' ) ); + + unset( $filtered_array ); + } + } + + break; + + /* + Boolean fields + */ + + /* + Covers: + * 'disable_author_sitemap': + * 'disable_author_noposts': + * 'enablexmlsitemap': + * 'user_role-': + * 'user_role' . $role_name . '-not_in_sitemap' fields + * 'post_types-': + * 'post_types-' . $pt->name . '-not_in_sitemap' fields + * 'taxonomies-': + * 'taxonomies-' . $tax->name . '-not_in_sitemap' fields + */ + default: + $clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : false ); + break; + } + } + + return $clean; + } + + + /** + * Clean a given option value + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + /* + Make sure the values of the variable option key options are cleaned as they + may be retained and would not be cleaned/validated then + */ + if ( is_array( $option_value ) && $option_value !== array() ) { + + foreach ( $option_value as $key => $value ) { + $switch_key = $this->get_switch_key( $key ); + + // Similar to validation routine - any changes made there should be made here too. + switch ( $switch_key ) { + case 'user_role-': /* 'user_role-' . $role_name. '-not_in_sitemap' fields */ + case 'post_types-': /* 'post_types-' . $pt->name . '-not_in_sitemap' fields */ + case 'taxonomies-': /* 'taxonomies-' . $tax->name . '-not_in_sitemap' fields */ + $option_value[ $key ] = WPSEO_Utils::validate_bool( $value ); + break; + } + } + } + + return $option_value; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php new file mode 100644 index 0000000..80d959c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php @@ -0,0 +1,854 @@ + testers] double check that validation will not cause errors when called + * from upgrade routine (some of the WP functions may not yet be available) + */ +abstract class WPSEO_Option { + + /** + * @var string Option name - MUST be set in concrete class and set to public. + */ + protected $option_name; + + /** + * @var string Option group name for use in settings forms + * - will be set automagically if not set in concrete class + * (i.e. if it confirm to the normal pattern 'yoast' . $option_name . 'options', + * only set in conrete class if it doesn't) + */ + public $group_name; + + /** + * @var bool Whether to include the option in the return for WPSEO_Options::get_all(). + * Also determines which options are copied over for ms_(re)set_blog(). + */ + public $include_in_all = true; + + /** + * @var bool Whether this option is only for when the install is multisite. + */ + public $multisite_only = false; + + /** + * @var array Array of defaults for the option - MUST be set in concrete class. + * Shouldn't be requested directly, use $this->get_defaults(); + */ + protected $defaults; + + /** + * @var array Array of variable option name patterns for the option - if any - + * Set this when the option contains array keys which vary based on post_type + * or taxonomy + */ + protected $variable_array_key_patterns; + + /** + * @var array Array of sub-options which should not be overloaded with multi-site defaults + */ + public $ms_exclude = array(); + + /** + * @var object Instance of this class + */ + protected static $instance; + + + /* *********** INSTANTIATION METHODS *********** */ + + /** + * Add all the actions and filters for the option + * + * @return \WPSEO_Option + */ + protected function __construct() { + + /* Add filters which get applied to the get_options() results */ + $this->add_default_filters(); // Return defaults if option not set. + $this->add_option_filters(); // Merge with defaults if option *is* set. + + + if ( $this->multisite_only !== true ) { + /** + * The option validation routines remove the default filters to prevent failing + * to insert an option if it's new. Let's add them back afterwards. + */ + add_action( 'add_option', array( $this, 'add_default_filters' ) ); // Adding back after INSERT. + + if ( version_compare( $GLOBALS['wp_version'], '3.7', '!=' ) ) { // Adding back after non-WP 3.7 UPDATE. + add_action( 'update_option', array( $this, 'add_default_filters' ) ); + } + else { // Adding back after WP 3.7 UPDATE. + add_filter( 'pre_update_option_' . $this->option_name, array( $this, 'wp37_add_default_filters' ) ); + } + } + else if ( is_multisite() ) { + /* + The option validation routines remove the default filters to prevent failing + to insert an option if it's new. Let's add them back afterwards. + + For site_options, this method is not foolproof as these actions are not fired + on an insert/update failure. Please use the WPSEO_Options::update_site_option() method + for updating site options to make sure the filters are in place. + */ + add_action( 'add_site_option_' . $this->option_name, array( $this, 'add_default_filters' ) ); + add_action( 'update_site_option_' . $this->option_name, array( $this, 'add_default_filters' ) ); + + } + + + /* + Make sure the option will always get validated, independently of register_setting() + (only available on back-end) + */ + add_filter( 'sanitize_option_' . $this->option_name, array( $this, 'validate' ) ); + + /* Register our option for the admin pages */ + add_action( 'admin_init', array( $this, 'register_setting' ) ); + + + /* Set option group name if not given */ + if ( ! isset( $this->group_name ) || $this->group_name === '' ) { + $this->group_name = 'yoast_' . $this->option_name . '_options'; + } + + /* Translate some defaults as early as possible - textdomain is loaded in init on priority 1 */ + if ( method_exists( $this, 'translate_defaults' ) ) { + add_action( 'init', array( $this, 'translate_defaults' ), 2 ); + } + + /** + * Enrich defaults once custom post types and taxonomies have been registered + * which is normally done on the init action. + * + * @todo - [JRF/testers] verify that none of the options which are only available after + * enrichment are used before the enriching + */ + if ( method_exists( $this, 'enrich_defaults' ) ) { + add_action( 'init', array( $this, 'enrich_defaults' ), 99 ); + } + } + +// @codingStandardsIgnoreStart + + /** + * All concrete classes *must* contain the get_instance method + * @internal Unfortunately I can't define it as an abstract as it also *has* to be static.... + */ + // abstract protected static function get_instance(); + + + /** + * Concrete classes *may* contain a translate_defaults method + */ + // abstract public function translate_defaults(); + + + /** + * Concrete classes *may* contain a enrich_defaults method to add additional defaults once + * all post_types and taxonomies have been registered + */ + // abstract public function enrich_defaults(); + +// @codingStandardsIgnoreEnd + + /* *********** METHODS INFLUENCING get_option() *********** */ + + /** + * Add filters to make sure that the option default is returned if the option is not set + * + * @return void + */ + public function add_default_filters() { + // Don't change, needs to check for false as could return prio 0 which would evaluate to false. + if ( has_filter( 'default_option_' . $this->option_name, array( $this, 'get_defaults' ) ) === false ) { + add_filter( 'default_option_' . $this->option_name, array( $this, 'get_defaults' ) ); + } + } + + + /** + * Abusing a filter to re-add our default filters + * WP 3.7 specific as update_option action hook was in the wrong place temporarily + * + * @see http://core.trac.wordpress.org/ticket/25705 + * + * @param mixed $new_value Pass through value in filter. + * + * @deprecated 3.7 version no longer supported. + * + * @todo Drop this and logic adding it. R. + * + * @return mixed unchanged value + */ + public function wp37_add_default_filters( $new_value ) { + $this->add_default_filters(); + + return $new_value; + } + + /** + * Validate webmaster tools & Pinterest verification strings + * + * @param string $key Key to check, by type of service. + * @param array $dirty Dirty data. + * @param array $old Old data. + * @param array $clean Clean data by reference. + */ + public function validate_verification_string( $key, $dirty, $old, &$clean ) { + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $meta = $dirty[ $key ]; + if ( strpos( $meta, 'content=' ) ) { + // Make sure we only have the real key, not a complete meta tag. + preg_match( '`content=([\'"])?([^\'"> ]+)(?:\1|[ />])`', $meta, $match ); + if ( isset( $match[2] ) ) { + $meta = $match[2]; + } + unset( $match ); + } + + $meta = sanitize_text_field( $meta ); + if ( $meta !== '' ) { + $regex = '`^[A-Fa-f0-9_-]+$`'; + $service = ''; + + switch ( $key ) { + case 'googleverify': + $regex = '`^[A-Za-z0-9_-]+$`'; + $service = 'Google Webmaster tools'; + break; + + case 'msverify': + $service = 'Bing Webmaster tools'; + break; + + case 'pinterestverify': + $service = 'Pinterest'; + break; + + case 'yandexverify': + $service = 'Yandex Webmaster tools'; + break; + } + + if ( preg_match( $regex, $meta ) ) { + $clean[ $key ] = $meta; + } + else { + if ( isset( $old[ $key ] ) && preg_match( $regex, $old[ $key ] ) ) { + $clean[ $key ] = $old[ $key ]; + } + if ( function_exists( 'add_settings_error' ) ) { + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + sprintf( __( '%s does not seem to be a valid %s verification string. Please correct.', 'wordpress-seo' ), '' . esc_html( $meta ) . '', $service ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + } + } + } + } + + /** + * @param string $key Key to check, by type of service. + * @param array $dirty Dirty data. + * @param array $old Old data. + * @param array $clean Clean data by reference. + */ + public function validate_url( $key, $dirty, $old, &$clean ) { + if ( isset( $dirty[ $key ] ) && $dirty[ $key ] !== '' ) { + $url = WPSEO_Utils::sanitize_url( $dirty[ $key ] ); + if ( $url !== '' ) { + $clean[ $key ] = $url; + } + else { + if ( isset( $old[ $key ] ) && $old[ $key ] !== '' ) { + $url = WPSEO_Utils::sanitize_url( $old[ $key ] ); + if ( $url !== '' ) { + $clean[ $key ] = $url; + } + } + if ( function_exists( 'add_settings_error' ) ) { + $url = WPSEO_Utils::sanitize_url( $dirty[ $key ] ); + add_settings_error( + $this->group_name, // Slug title of the setting. + '_' . $key, // Suffix-id for the error message box. + sprintf( __( '%s does not seem to be a valid url. Please correct.', 'wordpress-seo' ), '' . esc_html( $url ) . '' ), // The error message. + 'error' // Error type, either 'error' or 'updated'. + ); + } + } + } + } + + /** + * Remove the default filters. + * Called from the validate() method to prevent failure to add new options + * + * @return void + */ + public function remove_default_filters() { + remove_filter( 'default_option_' . $this->option_name, array( $this, 'get_defaults' ) ); + } + + + /** + * Get the enriched default value for an option + * + * Checks if the concrete class contains an enrich_defaults() method and if so, runs it. + * + * @internal the enrich_defaults method is used to set defaults for variable array keys in an option, + * such as array keys depending on post_types and/or taxonomies + * + * @return array + */ + public function get_defaults() { + if ( method_exists( $this, 'translate_defaults' ) ) { + $this->translate_defaults(); + } + + if ( method_exists( $this, 'enrich_defaults' ) ) { + $this->enrich_defaults(); + } + + return apply_filters( 'wpseo_defaults', $this->defaults, $this->option_name ); + } + + + /** + * Add filters to make sure that the option is merged with its defaults before being returned + * + * @return void + */ + public function add_option_filters() { + // Don't change, needs to check for false as could return prio 0 which would evaluate to false. + if ( has_filter( 'option_' . $this->option_name, array( $this, 'get_option' ) ) === false ) { + add_filter( 'option_' . $this->option_name, array( $this, 'get_option' ) ); + } + } + + + /** + * Remove the option filters. + * Called from the clean_up methods to make sure we retrieve the original old option + * + * @return void + */ + public function remove_option_filters() { + remove_filter( 'option_' . $this->option_name, array( $this, 'get_option' ) ); + } + + + /** + * Merge an option with its default values + * + * This method should *not* be called directly!!! It is only meant to filter the get_option() results + * + * @param mixed $options Option value. + * + * @return mixed Option merged with the defaults for that option + */ + public function get_option( $options = null ) { + $filtered = $this->array_filter_merge( $options ); + + /* + If the option contains variable option keys, make sure we don't remove those settings + - even if the defaults are not complete yet. + Unfortunately this means we also won't be removing the settings for post types or taxonomies + which are no longer in the WP install, but rather that than the other way around + */ + if ( isset( $this->variable_array_key_patterns ) ) { + $filtered = $this->retain_variable_keys( $options, $filtered ); + } + + return $filtered; + } + + + /* *********** METHODS influencing add_uption(), update_option() and saving from admin pages *********** */ + + /** + * Register (whitelist) the option for the configuration pages. + * The validation callback is already registered separately on the sanitize_option hook, + * so no need to double register. + * + * @return void + */ + public function register_setting() { + if ( WPSEO_Utils::grant_access() ) { + register_setting( $this->group_name, $this->option_name ); + } + } + + + /** + * Validate the option + * + * @param mixed $option_value The unvalidated new value for the option. + * + * @return array Validated new value for the option + */ + public function validate( $option_value ) { + $clean = $this->get_defaults(); + + /* Return the defaults if the new value is empty */ + if ( ! is_array( $option_value ) || $option_value === array() ) { + return $clean; + } + + + $option_value = array_map( array( 'WPSEO_Utils', 'trim_recursive' ), $option_value ); + if ( $this->multisite_only !== true ) { + $old = get_option( $this->option_name ); + } + else { + $old = get_site_option( $this->option_name ); + } + $clean = $this->validate_option( $option_value, $clean, $old ); + + /* Retain the values for variable array keys even when the post type/taxonomy is not yet registered */ + if ( isset( $this->variable_array_key_patterns ) ) { + $clean = $this->retain_variable_keys( $option_value, $clean ); + } + + $this->remove_default_filters(); + + return $clean; + } + + + /** + * All concrete classes must contain a validate_option() method which validates all + * values within the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + */ + abstract protected function validate_option( $dirty, $clean, $old ); + + + /* *********** METHODS for ADDING/UPDATING/UPGRADING the option *********** */ + + /** + * Retrieve the real old value (unmerged with defaults) + * + * @return array|bool the original option value (which can be false if the option doesn't exist) + */ + protected function get_original_option() { + $this->remove_default_filters(); + $this->remove_option_filters(); + + // Get (unvalidated) array, NOT merged with defaults. + if ( $this->multisite_only !== true ) { + $option_value = get_option( $this->option_name ); + } + else { + $option_value = get_site_option( $this->option_name ); + } + + $this->add_option_filters(); + $this->add_default_filters(); + + return $option_value; + } + + /** + * Add the option if it doesn't exist for some strange reason + * + * @uses WPSEO_Option::get_original_option() + * + * @return void + */ + public function maybe_add_option() { + if ( $this->get_original_option() === false ) { + if ( $this->multisite_only !== true ) { + update_option( $this->option_name, $this->get_defaults() ); + } + else { + $this->update_site_option( $this->get_defaults() ); + } + } + } + + + /** + * Update a site_option + * + * @internal This special method is only needed for multisite options, but very needed indeed there. + * The order in which certain functions and hooks are run is different between get_option() and + * get_site_option() which means in practice that the removing of the default filters would be + * done too late and the re-adding of the default filters might not be done at all. + * Aka: use the WPSEO_Options::update_site_option() method (which calls this method) for + * safely adding/updating multisite options. + * + * @param mixed $value The new value for the option. + * + * @return bool whether the update was succesfull + */ + public function update_site_option( $value ) { + if ( $this->multisite_only === true && is_multisite() ) { + $this->remove_default_filters(); + $result = update_site_option( $this->option_name, $value ); + $this->add_default_filters(); + + return $result; + } + else { + return false; + } + } + + + /** + * Retrieve the real old value (unmerged with defaults), clean and re-save the option + * + * @uses WPSEO_Option::get_original_option() + * @uses WPSEO_Option::import() + * + * @param string $current_version (optional) Version from which to upgrade, if not set, version specific upgrades will be disregarded. + * + * @return void + */ + public function clean( $current_version = null ) { + $option_value = $this->get_original_option(); + $this->import( $option_value, $current_version ); + } + + + /** + * Clean and re-save the option + * + * @uses clean_option() method from concrete class if it exists + * + * @todo [JRF/whomever] Figure out a way to show settings error during/after the upgrade - maybe + * something along the lines of: + * -> add them to a property in this class + * -> if that property isset at the end of the routine and add_settings_error function does not exist, + * save as transient (or update the transient if one already exists) + * -> next time an admin is in the WP back-end, show the errors and delete the transient or only delete it + * once the admin has dismissed the message (add ajax function) + * Important: all validation routines which add_settings_errors would need to be changed for this to work + * + * @param array $option_value Option value to be imported. + * @param string $current_version (optional) Version from which to upgrade, if not set, version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have access to the real old values, in contrast to the saved ones. + * + * @return void + */ + public function import( $option_value, $current_version = null, $all_old_option_values = null ) { + if ( $option_value === false ) { + $option_value = $this->get_defaults(); + } + elseif ( is_array( $option_value ) && method_exists( $this, 'clean_option' ) ) { + $option_value = $this->clean_option( $option_value, $current_version, $all_old_option_values ); + } + + /* + Save the cleaned value - validation will take care of cleaning out array keys which + should no longer be there + */ + if ( $this->multisite_only !== true ) { + update_option( $this->option_name, $option_value ); + } + else { + $this->update_site_option( $this->option_name, $option_value ); + } + } + + + /** + * Concrete classes *may* contain a clean_option method which will clean out old/renamed + * values within the option + */ + // abstract public function clean_option( $option_value, $current_version = null, $all_old_option_values = null ); + /* *********** HELPER METHODS for internal use *********** */ + + /** + * Helper method - Combines a fixed array of default values with an options array + * while filtering out any keys which are not in the defaults array. + * + * @todo [JRF] - shouldn't this be a straight array merge ? at the end of the day, the validation + * removes any invalid keys on save + * + * @param array $options (Optional) Current options. If not set, the option defaults for the $option_key will be returned. + * + * @return array Combined and filtered options array. + */ + protected function array_filter_merge( $options = null ) { + + $defaults = $this->get_defaults(); + + if ( ! isset( $options ) || $options === false || $options === array() ) { + return $defaults; + } + + $options = (array) $options; + + /* + $filtered = array(); + + if ( $defaults !== array() ) { + foreach ( $defaults as $key => $default_value ) { + // @todo should this walk through array subkeys ? + $filtered[ $key ] = ( isset( $options[ $key ] ) ? $options[ $key ] : $default_value ); + } + } + */ + $filtered = array_merge( $defaults, $options ); + + return $filtered; + } + + + /** + * Make sure that any set option values relating to post_types and/or taxonomies are retained, + * even when that post_type or taxonomy may not yet have been registered. + * + * @internal The wpseo_titles concrete class overrules this method. Make sure that any changes + * applied here, also get ported to that version. + * + * @param array $dirty Original option as retrieved from the database. + * @param array $clean Filtered option where any options which shouldn't be in our option + * have already been removed and any options which weren't set + * have been set to their defaults. + * + * @return array + */ + protected function retain_variable_keys( $dirty, $clean ) { + if ( ( is_array( $this->variable_array_key_patterns ) && $this->variable_array_key_patterns !== array() ) && ( is_array( $dirty ) && $dirty !== array() ) ) { + foreach ( $dirty as $key => $value ) { + + // Do nothing if already in filtered options. + if ( isset( $clean[ $key ] ) ) { + continue; + } + + foreach ( $this->variable_array_key_patterns as $pattern ) { + + if ( strpos( $key, $pattern ) === 0 ) { + $clean[ $key ] = $value; + break; + } + } + } + } + + return $clean; + } + + + /** + * Check whether a given array key conforms to one of the variable array key patterns for this option + * + * @usedby validate_option() methods for options with variable array keys + * + * @param string $key Array key to check. + * + * @return string Pattern if it conforms, original array key if it doesn't or if the option + * does not have variable array keys + */ + protected function get_switch_key( $key ) { + if ( ! isset( $this->variable_array_key_patterns ) || ( ! is_array( $this->variable_array_key_patterns ) || $this->variable_array_key_patterns === array() ) ) { + return $key; + } + + foreach ( $this->variable_array_key_patterns as $pattern ) { + if ( strpos( $key, $pattern ) === 0 ) { + return $pattern; + } + } + + return $key; + } + + + /* *********** DEPRECATED METHODS *********** */ + + /** + * Emulate the WP native sanitize_text_field function in a %%variable%% safe way + * + * @see https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php for the original + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::sanitize_text_field() + * @see WPSEO_Utils::sanitize_text_field() + * + * @param string $value String value to sanitize. + * + * @return string + */ + public static function sanitize_text_field( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::sanitize_text_field()' ); + + return WPSEO_Utils::sanitize_text_field( $value ); + } + + + /** + * Sanitize a url for saving to the database + * Not to be confused with the old native WP function + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::sanitize_url() + * @see WPSEO_Utils::sanitize_url() + * + * @param string $value URL string to sanitize. + * @param array $allowed_protocols Set of allowed protocols. + * + * @return string + */ + public static function sanitize_url( $value, $allowed_protocols = array( 'http', 'https' ) ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::sanitize_url()' ); + + return WPSEO_Utils::sanitize_url( $value, $allowed_protocols ); + } + + /** + * Validate a value as boolean + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::validate_bool() + * @see WPSEO_Utils::validate_bool() + * + * @static + * + * @param mixed $value Value to validate. + * + * @return bool + */ + public static function validate_bool( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::validate_bool()' ); + + return WPSEO_Utils::validate_bool( $value ); + } + + /** + * Cast a value to bool + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::emulate_filter_bool() + * @see WPSEO_Utils::emulate_filter_bool() + * + * @static + * + * @param mixed $value Value to cast. + * + * @return bool + */ + public static function emulate_filter_bool( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::emulate_filter_bool()' ); + + return WPSEO_Utils::emulate_filter_bool( $value ); + } + + + /** + * Validate a value as integer + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::validate_int() + * @see WPSEO_Utils::validate_int() + * + * @param mixed $value Value to validate. + * + * @return mixed int or false in case of failure to convert to int + */ + public static function validate_int( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::validate_int()' ); + + return WPSEO_Utils::validate_int( $value ); + } + + /** + * Cast a value to integer + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::emulate_filter_int() + * @see WPSEO_Utils::emulate_filter_int() + * + * @static + * + * @param mixed $value Value to cast. + * + * @return int|bool + */ + public static function emulate_filter_int( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::emulate_filter_int()' ); + + return WPSEO_Utils::emulate_filter_int( $value ); + } + + + /** + * Recursively trim whitespace round a string value or of string values within an array + * Only trims strings to avoid typecasting a variable (to string) + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::trim_recursive() + * @see WPSEO_Utils::trim_recursive() + * + * @static + * + * @param mixed $value Value to trim or array of values to trim. + * + * @return mixed Trimmed value or array of trimmed values + */ + public static function trim_recursive( $value ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::trim_recursive()' ); + + return WPSEO_Utils::trim_recursive( $value ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php new file mode 100644 index 0000000..4002624 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php @@ -0,0 +1,455 @@ + (string) name of concrete class for the option + * @static + */ + public static $options = array( + 'wpseo' => 'WPSEO_Option_Wpseo', + 'wpseo_permalinks' => 'WPSEO_Option_Permalinks', + 'wpseo_titles' => 'WPSEO_Option_Titles', + 'wpseo_social' => 'WPSEO_Option_Social', + 'wpseo_rss' => 'WPSEO_Option_RSS', + 'wpseo_internallinks' => 'WPSEO_Option_InternalLinks', + 'wpseo_xml' => 'WPSEO_Option_XML', + 'wpseo_ms' => 'WPSEO_Option_MS', + 'wpseo_taxonomy_meta' => 'WPSEO_Taxonomy_Meta', + ); + + /** + * @var array Array of instantiated option objects + */ + protected static $option_instances = array(); + + /** + * @var object Instance of this class + */ + protected static $instance; + + + /** + * Instantiate all the WPSEO option management classes + */ + protected function __construct() { + $is_multisite = is_multisite(); + + foreach ( self::$options as $option_name => $option_class ) { + $instance = call_user_func( array( $option_class, 'get_instance' ) ); + + if ( ! $instance->multisite_only || $is_multisite ) { + self::$option_instances[ $option_name ] = $instance; + } + else { + unset( self::$options[ $option_name ] ); + } + } + } + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Get the group name of an option for use in the settings form + * + * @param string $option_name the option for which you want to retrieve the option group name. + * + * @return string|bool + */ + public static function get_group_name( $option_name ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + return self::$option_instances[ $option_name ]->group_name; + } + + return false; + } + + /** + * Get a specific default value for an option + * + * @param string $option_name The option for which you want to retrieve a default. + * @param string $key The key within the option who's default you want. + * + * @return mixed + */ + public static function get_default( $option_name, $key ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + $defaults = self::$option_instances[ $option_name ]->get_defaults(); + if ( isset( $defaults[ $key ] ) ) { + return $defaults[ $key ]; + } + } + + return null; + } + + /** + * Update a site_option + * + * @param string $option_name The option name of the option to save. + * @param mixed $value The new value for the option. + * + * @return bool + */ + public static function update_site_option( $option_name, $value ) { + if ( is_network_admin() && isset( self::$option_instances[ $option_name ] ) ) { + return self::$option_instances[ $option_name ]->update_site_option( $value ); + } + else { + return false; + } + } + + /** + * Get the instantiated option instance + * + * @param string $option_name The option for which you want to retrieve the instance. + * + * @return object|bool + */ + public static function get_option_instance( $option_name ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + return self::$option_instances[ $option_name ]; + } + + return false; + } + + /** + * Retrieve an array of the options which should be included in get_all() and reset(). + * + * @static + * @return array Array of option names + */ + public static function get_option_names() { + static $option_names = array(); + + if ( $option_names === array() ) { + foreach ( self::$option_instances as $option_name => $option_object ) { + if ( $option_object->include_in_all === true ) { + $option_names[] = $option_name; + } + } + $option_names = apply_filters( 'wpseo_options', $option_names ); + } + + return $option_names; + } + + /** + * Retrieve all the options for the SEO plugin in one go. + * + * @todo [JRF] see if we can get some extra efficiency for this one, though probably not as options may + * well change between calls (enriched defaults and such) + * + * @static + * @return array Array combining the values of all the options + */ + public static function get_all() { + return self::get_options( self::get_option_names() ); + } + + /** + * Retrieve one or more options for the SEO plugin. + * + * @static + * + * @param array $option_names An array of option names of the options you want to get. + * + * @return array Array combining the values of the requested options + */ + public static function get_options( array $option_names ) { + $options = array(); + $option_names = array_filter( $option_names, 'is_string' ); + foreach ( $option_names as $option_name ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + $option = self::get_option( $option_name ); + $options = array_merge( $options, $option ); + } + } + + return $options; + } + + /** + * Retrieve a single option for the SEO plugin. + * + * @static + * + * @param string $option_name the name of the option you want to get. + * + * @return array Array containing the requested option + */ + public static function get_option( $option_name ) { + $option = null; + if ( is_string( $option_name ) && ! empty( $option_name ) ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + if ( self::$option_instances[ $option_name ]->multisite_only !== true ) { + $option = get_option( $option_name ); + } + else { + $option = get_site_option( $option_name ); + } + } + } + + return $option; + } + + /** + * Run the clean up routine for one or all options + * + * @param array|string $option_name (optional) the option you want to clean or an array of + * option names for the options you want to clean. + * If not set, all options will be cleaned. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * + * @return void + */ + public static function clean_up( $option_name = null, $current_version = null ) { + if ( isset( $option_name ) && is_string( $option_name ) && $option_name !== '' ) { + if ( isset( self::$option_instances[ $option_name ] ) ) { + self::$option_instances[ $option_name ]->clean( $current_version ); + } + } + elseif ( isset( $option_name ) && is_array( $option_name ) && $option_name !== array() ) { + foreach ( $option_name as $option ) { + if ( isset( self::$option_instances[ $option ] ) ) { + self::$option_instances[ $option ]->clean( $current_version ); + } + } + unset( $option ); + } + else { + foreach ( self::$option_instances as $instance ) { + $instance->clean( $current_version ); + } + unset( $instance ); + + // If we've done a full clean-up, we can safely remove this really old option. + delete_option( 'wpseo_indexation' ); + } + } + + + /** + * Check that all options exist in the database and add any which don't + * + * @return void + */ + public static function ensure_options_exist() { + foreach ( self::$option_instances as $instance ) { + $instance->maybe_add_option(); + } + } + + /** + * Correct the inadvertent removal of the fallback to default values from the breadcrumbs + * + * @since 1.5.2.3 + */ + public static function bring_back_breadcrumb_defaults() { + if ( isset( self::$option_instances['wpseo_internallinks'] ) ) { + self::$option_instances['wpseo_internallinks']->bring_back_defaults(); + } + } + + /** + * Initialize some options on first install/activate/reset + * + * @static + * @return void + */ + public static function initialize() { + /* Force WooThemes to use Yoast SEO data. */ + if ( function_exists( 'woo_version_init' ) ) { + update_option( 'seo_woo_use_third_party_data', 'true' ); + } + } + + /** + * Reset all options to their default values and rerun some tests + * + * @static + * @return void + */ + public static function reset() { + if ( ! is_multisite() ) { + $option_names = self::get_option_names(); + if ( is_array( $option_names ) && $option_names !== array() ) { + foreach ( $option_names as $option_name ) { + delete_option( $option_name ); + update_option( $option_name, get_option( $option_name ) ); + } + } + unset( $option_names ); + } + else { + // Reset MS blog based on network default blog setting. + self::reset_ms_blog( get_current_blog_id() ); + } + + self::initialize(); + } + + /** + * Initialize default values for a new multisite blog + * + * @static + * + * @param bool $force_init Whether to always do the initialization routine (title/desc test). + * + * @return void + */ + public static function maybe_set_multisite_defaults( $force_init = false ) { + $option = get_option( 'wpseo' ); + + if ( is_multisite() ) { + if ( $option['ms_defaults_set'] === false ) { + self::reset_ms_blog( get_current_blog_id() ); + self::initialize(); + } + else if ( $force_init === true ) { + self::initialize(); + } + } + } + + /** + * Reset all options for a specific multisite blog to their default values based upon a + * specified default blog if one was chosen on the network page or the plugin defaults if it was not + * + * @static + * + * @param int|string $blog_id Blog id of the blog for which to reset the options. + * + * @return void + */ + public static function reset_ms_blog( $blog_id ) { + if ( is_multisite() ) { + $options = get_site_option( 'wpseo_ms' ); + $option_names = self::get_option_names(); + + if ( is_array( $option_names ) && $option_names !== array() ) { + $base_blog_id = $blog_id; + if ( $options['defaultblog'] !== '' && $options['defaultblog'] != 0 ) { + $base_blog_id = $options['defaultblog']; + } + + foreach ( $option_names as $option_name ) { + delete_blog_option( $blog_id, $option_name ); + + $new_option = get_blog_option( $base_blog_id, $option_name ); + + /* Remove sensitive, theme dependent and site dependent info */ + if ( isset( self::$option_instances[ $option_name ] ) && self::$option_instances[ $option_name ]->ms_exclude !== array() ) { + foreach ( self::$option_instances[ $option_name ]->ms_exclude as $key ) { + unset( $new_option[ $key ] ); + } + } + + if ( $option_name === 'wpseo' ) { + $new_option['ms_defaults_set'] = true; + } + + update_blog_option( $blog_id, $option_name, $new_option ); + } + } + } + } + + /** + * Saves the option to the database. + * + * @param string $wpseo_options_group_name The name for the wpseo option group in the database. + * @param string $option_name The name for the option to set. + * @param * $option_value The value for the option. + * + * @return boolean Returns true if the option is successfully saved in the database. + */ + public static function save_option( $wpseo_options_group_name, $option_name, $option_value ) { + $options = WPSEO_Options::get_option( $wpseo_options_group_name ); + $options[ $option_name ] = $option_value; + update_option( $wpseo_options_group_name, $options ); + + // Check if everything got saved properly. + $saved_option = self::get_option( $wpseo_options_group_name ); + return $saved_option[ $option_name ] === $options[ $option_name ]; + } + + /********************** DEPRECATED FUNCTIONS **********************/ + + /** + * Check whether the current user is allowed to access the configuration. + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::grant_access() + * @see WPSEO_Utils::grant_access() + * + * @return boolean + */ + public static function grant_access() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::grant_access()' ); + + return WPSEO_Utils::grant_access(); + } + + /** + * Clears the WP or W3TC cache depending on which is used + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::clear_cache() + * @see WPSEO_Utils::clear_cache() + */ + public static function clear_cache() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::clear_cache()' ); + WPSEO_Utils::clear_cache(); + } + + + /** + * Flush W3TC cache after succesfull update/add of taxonomy meta option + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::flush_w3tc_cache() + * @see WPSEO_Utils::flush_w3tc_cache() + */ + public static function flush_w3tc_cache() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::flush_w3tc_cache()' ); + WPSEO_Utils::flush_w3tc_cache(); + } + + + /** + * Clear rewrite rules + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::clear_rewrites() + * @see WPSEO_Utils::clear_rewrites() + */ + public static function clear_rewrites() { + _deprecated_function( __METHOD__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::clear_rewrites()' ); + WPSEO_Utils::clear_rewrites(); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-taxonomy-meta.php b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-taxonomy-meta.php new file mode 100644 index 0000000..c8c0d15 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-taxonomy-meta.php @@ -0,0 +1,600 @@ +get_defaults(); + * @internal Important: in contrast to most defaults, the below array format is + * very bare. The real option is in the format [taxonomy_name][term_id][...] + * where [...] is any of the $defaults_per_term options shown below. + * This is of course taken into account in the below methods. + */ + protected $defaults = array(); + + + /** + * @var string Option name - same as $option_name property, but now also available to static methods + * @static + */ + public static $name; + + /** + * @var array Array of defaults for individual taxonomy meta entries + * @static + */ + public static $defaults_per_term = array( + 'wpseo_title' => '', + 'wpseo_desc' => '', + 'wpseo_metakey' => '', + 'wpseo_canonical' => '', + 'wpseo_bctitle' => '', + 'wpseo_noindex' => 'default', + 'wpseo_sitemap_include' => '-', + 'wpseo_focuskw' => '', + 'wpseo_linkdex' => '', + 'wpseo_content_score' => '', + + // Social fields. + 'wpseo_opengraph-title' => '', + 'wpseo_opengraph-description' => '', + 'wpseo_opengraph-image' => '', + 'wpseo_twitter-title' => '', + 'wpseo_twitter-description' => '', + 'wpseo_twitter-image' => '', + ); + + /** + * @var array Available index options + * Used for form generation and input validation + * + * @static + * + * @internal Labels (translation) added on admin_init via WPSEO_Taxonomy::translate_meta_options() + */ + public static $no_index_options = array( + 'default' => '', + 'index' => '', + 'noindex' => '', + ); + + /** + * @var array Available sitemap include options + * Used for form generation and input validation + * + * @static + * + * @internal Labels (translation) added on admin_init via WPSEO_Taxonomy::translate_meta_options() + */ + public static $sitemap_include_options = array( + '-' => '', + 'always' => '', + 'never' => '', + ); + + + /** + * Add the actions and filters for the option + * + * @todo [JRF => testers] Check if the extra actions below would run into problems if an option + * is updated early on and if so, change the call to schedule these for a later action on add/update + * instead of running them straight away + * + * @return \WPSEO_Taxonomy_Meta + */ + protected function __construct() { + parent::__construct(); + + self::$name = $this->option_name; + + /* On succesfull update/add of the option, flush the W3TC cache */ + add_action( 'add_option_' . $this->option_name, array( 'WPSEO_Utils', 'flush_w3tc_cache' ) ); + add_action( 'update_option_' . $this->option_name, array( 'WPSEO_Utils', 'flush_w3tc_cache' ) ); + } + + + /** + * Get the singleton instance of this class + * + * @return object + */ + public static function get_instance() { + if ( ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + self::$name = self::$instance->option_name; + } + + return self::$instance; + } + + + /** + * Add extra default options received from a filter + */ + public function enrich_defaults() { + $extra_defaults_per_term = apply_filters( 'wpseo_add_extra_taxmeta_term_defaults', array() ); + if ( is_array( $extra_defaults_per_term ) ) { + self::$defaults_per_term = array_merge( $extra_defaults_per_term, self::$defaults_per_term ); + } + } + + + /** + * Helper method - Combines a fixed array of default values with an options array + * while filtering out any keys which are not in the defaults array. + * + * @static + * + * @param string $option_key Option name of the option we're doing the merge for. + * @param array $options (Optional) Current options. If not set, the option defaults for the $option_key will be returned. + * + * @return array Combined and filtered options array. + */ + + /* + Public function array_filter_merge( $option_key, $options = null ) { + + $defaults = $this->get_defaults( $option_key ); + + if ( ! isset( $options ) || $options === false ) { + return $defaults; + } + + / * + @internal Adding the defaults to all taxonomy terms each time the option is retrieved + will be quite inefficient if there are a lot of taxonomy terms + As long as taxonomy_meta is only retrieved via methods in this class, we shouldn't need this + + $options = (array) $options; + $filtered = array(); + + if ( $options !== array() ) { + foreach ( $options as $taxonomy => $terms ) { + if ( is_array( $terms ) && $terms !== array() ) { + foreach ( $terms as $id => $term_meta ) { + foreach ( self::$defaults_per_term as $name => $default ) { + if ( isset( $options[ $taxonomy ][ $id ][ $name ] ) ) { + $filtered[ $taxonomy ][ $id ][ $name ] = $options[ $taxonomy ][ $id ][ $name ]; + } + else { + $filtered[ $name ] = $default; + } + } + } + } + } + unset( $taxonomy, $terms, $id, $term_meta, $name, $default ); + } + // end of may be remove. + + return $filtered; + * / + + return (array) $options; + } + */ + + + /** + * Validate the option + * + * @param array $dirty New value for the option. + * @param array $clean Clean value for the option, normally the defaults. + * @param array $old Old value of the option. + * + * @return array Validated clean value for the option to be saved to the database + */ + protected function validate_option( $dirty, $clean, $old ) { + /* + Prevent complete validation (which can be expensive when there are lots of terms) + if only one item has changed and has already been validated + */ + if ( isset( $dirty['wpseo_already_validated'] ) && $dirty['wpseo_already_validated'] === true ) { + unset( $dirty['wpseo_already_validated'] ); + + return $dirty; + } + + + foreach ( $dirty as $taxonomy => $terms ) { + /* Don't validate taxonomy - may not be registered yet and we don't want to remove valid ones */ + if ( is_array( $terms ) && $terms !== array() ) { + foreach ( $terms as $term_id => $meta_data ) { + /* Only validate term if the taxonomy exists */ + if ( taxonomy_exists( $taxonomy ) && get_term_by( 'id', $term_id, $taxonomy ) === false ) { + /* Is this term id a special case ? */ + if ( has_filter( 'wpseo_tax_meta_special_term_id_validation_' . $term_id ) !== false ) { + $clean[ $taxonomy ][ $term_id ] = apply_filters( 'wpseo_tax_meta_special_term_id_validation_' . $term_id, $meta_data, $taxonomy, $term_id ); + } + continue; + } + + if ( is_array( $meta_data ) && $meta_data !== array() ) { + /* Validate meta data */ + $old_meta = self::get_term_meta( $term_id, $taxonomy ); + $meta_data = self::validate_term_meta_data( $meta_data, $old_meta ); + if ( $meta_data !== array() ) { + $clean[ $taxonomy ][ $term_id ] = $meta_data; + } + } + + // Deal with special cases (for when taxonomy doesn't exist yet). + if ( ! isset( $clean[ $taxonomy ][ $term_id ] ) && has_filter( 'wpseo_tax_meta_special_term_id_validation_' . $term_id ) !== false ) { + $clean[ $taxonomy ][ $term_id ] = apply_filters( 'wpseo_tax_meta_special_term_id_validation_' . $term_id, $meta_data, $taxonomy, $term_id ); + } + } + } + } + + return $clean; + } + + + /** + * Validate the meta data for one individual term and removes default values (no need to save those) + * + * @static + * + * @param array $meta_data New values. + * @param array $old_meta The original values. + * + * @return array Validated and filtered value + */ + public static function validate_term_meta_data( $meta_data, $old_meta ) { + + $clean = self::$defaults_per_term; + $meta_data = array_map( array( 'WPSEO_Utils', 'trim_recursive' ), $meta_data ); + + if ( ! is_array( $meta_data ) || $meta_data === array() ) { + return $clean; + } + + foreach ( $clean as $key => $value ) { + switch ( $key ) { + + case 'wpseo_noindex': + if ( isset( $meta_data[ $key ] ) ) { + if ( isset( self::$no_index_options[ $meta_data[ $key ] ] ) ) { + $clean[ $key ] = $meta_data[ $key ]; + } + } + elseif ( isset( $old_meta[ $key ] ) ) { + // Retain old value if field currently not in use. + $clean[ $key ] = $old_meta[ $key ]; + } + break; + + case 'wpseo_sitemap_include': + if ( isset( $meta_data[ $key ], self::$sitemap_include_options[ $meta_data[ $key ] ] ) ) { + $clean[ $key ] = $meta_data[ $key ]; + } + break; + + case 'wpseo_canonical': + if ( isset( $meta_data[ $key ] ) && $meta_data[ $key ] !== '' ) { + $url = WPSEO_Utils::sanitize_url( $meta_data[ $key ] ); + if ( $url !== '' ) { + $clean[ $key ] = $url; + } + unset( $url ); + } + break; + + case 'wpseo_metakey': + case 'wpseo_bctitle': + if ( isset( $meta_data[ $key ] ) ) { + $clean[ $key ] = WPSEO_Utils::sanitize_text_field( stripslashes( $meta_data[ $key ] ) ); + } + elseif ( isset( $old_meta[ $key ] ) ) { + // Retain old value if field currently not in use. + $clean[ $key ] = $old_meta[ $key ]; + } + break; + case 'wpseo_focuskw': + case 'wpseo_title': + case 'wpseo_desc': + case 'wpseo_linkdex': + default: + if ( isset( $meta_data[ $key ] ) && is_string( $meta_data[ $key ] ) ) { + $clean[ $key ] = WPSEO_Utils::sanitize_text_field( stripslashes( $meta_data[ $key ] ) ); + } + + if ( 'wpseo_focuskw' === $key ) { + $clean[ $key ] = str_replace( array( + '<', + '>', + '"', + '`', + '<', + '>', + '"', + '`', + ), '', $clean[ $key ] ); + } + break; + } + + $clean[ $key ] = apply_filters( 'wpseo_sanitize_tax_meta_' . $key, $clean[ $key ], ( isset( $meta_data[ $key ] ) ? $meta_data[ $key ] : null ), ( isset( $old_meta[ $key ] ) ? $old_meta[ $key ] : null ) ); + } + + // Only save the non-default values. + return array_diff_assoc( $clean, self::$defaults_per_term ); + } + + + /** + * Clean a given option value + * - Convert old option values to new + * - Fixes strings which were escaped (should have been sanitized - escaping is for output) + * + * @param array $option_value Old (not merged with defaults or filtered) option value to + * clean according to the rules for this option. + * @param string $current_version (optional) Version from which to upgrade, if not set, + * version specific upgrades will be disregarded. + * @param array $all_old_option_values (optional) Only used when importing old options to have + * access to the real old values, in contrast to the saved ones. + * + * @return array Cleaned option + */ + protected function clean_option( $option_value, $current_version = null, $all_old_option_values = null ) { + + /* Clean up old values and remove empty arrays */ + if ( is_array( $option_value ) && $option_value !== array() ) { + + foreach ( $option_value as $taxonomy => $terms ) { + + if ( is_array( $terms ) && $terms !== array() ) { + + foreach ( $terms as $term_id => $meta_data ) { + if ( ! is_array( $meta_data ) || $meta_data === array() ) { + // Remove empty term arrays. + unset( $option_value[ $taxonomy ][ $term_id ] ); + } + else { + foreach ( $meta_data as $key => $value ) { + + switch ( $key ) { + case 'noindex': + if ( $value === 'on' ) { + // Convert 'on' to 'noindex'. + $option_value[ $taxonomy ][ $term_id ][ $key ] = 'noindex'; + } + break; + + case 'canonical': + case 'wpseo_metakey': + case 'wpseo_bctitle': + case 'wpseo_title': + case 'wpseo_desc': + case 'wpseo_linkdex': + // @todo [JRF => whomever] needs checking, I don't have example data [JRF]. + if ( $value !== '' ) { + // Fix incorrectly saved (encoded) canonical urls and texts. + $option_value[ $taxonomy ][ $term_id ][ $key ] = wp_specialchars_decode( stripslashes( $value ), ENT_QUOTES ); + } + break; + + default: + // @todo [JRF => whomever] needs checking, I don't have example data [JRF]. + if ( $value !== '' ) { + // Fix incorrectly saved (escaped) text strings. + $option_value[ $taxonomy ][ $term_id ][ $key ] = wp_specialchars_decode( $value, ENT_QUOTES ); + } + break; + } + } + } + } + } + else { + // Remove empty taxonomy arrays. + unset( $option_value[ $taxonomy ] ); + } + } + } + + return $option_value; + } + + + /** + * Retrieve a taxonomy term's meta value(s). + * + * @static + * + * @param mixed $term Term to get the meta value for + * either (string) term name, (int) term id or (object) term. + * @param string $taxonomy Name of the taxonomy to which the term is attached. + * @param string $meta (optional) Meta value to get (without prefix). + * + * @return mixed|bool Value for the $meta if one is given, might be the default. + * If no meta is given, an array of all the meta data for the term. + * False if the term does not exist or the $meta provided is invalid. + */ + public static function get_term_meta( $term, $taxonomy, $meta = null ) { + /* Figure out the term id */ + if ( is_int( $term ) ) { + $term = get_term_by( 'id', $term, $taxonomy ); + } + elseif ( is_string( $term ) ) { + $term = get_term_by( 'slug', $term, $taxonomy ); + } + + if ( is_object( $term ) && isset( $term->term_id ) ) { + $term_id = $term->term_id; + } + else { + return false; + } + + $tax_meta = self::get_term_tax_meta( $term_id, $taxonomy ); + + /* + Either return the complete array or a single value from it or false if the value does not exist + (shouldn't happen after merge with defaults, indicates typo in request) + */ + if ( ! isset( $meta ) ) { + return $tax_meta; + } + + + if ( isset( $tax_meta[ 'wpseo_' . $meta ] ) ) { + return $tax_meta[ 'wpseo_' . $meta ]; + } + + return false; + } + + /** + * Get the current queried object and return the meta value + * + * @param string $meta The meta field that is needed. + * + * @return bool|mixed + */ + public static function get_meta_without_term( $meta ) { + $term = $GLOBALS['wp_query']->get_queried_object(); + + return self::get_term_meta( $term, $term->taxonomy, $meta ); + + } + + /** + * Saving the values for the given term_id + * + * @param int $term_id ID of the term to save data for. + * @param string $taxonomy The taxonomy the term belongs to. + * @param array $meta_values The values that will be saved. + */ + public static function set_values( $term_id, $taxonomy, array $meta_values ) { + /* Validate the post values */ + $old = self::get_term_meta( $term_id, $taxonomy ); + $clean = self::validate_term_meta_data( $meta_values, $old ); + + self::save_clean_values( $term_id, $taxonomy, $clean ); + } + + /** + * Setting a single value to the term meta + * + * @param int $term_id ID of the term to save data for. + * @param string $taxonomy The taxonomy the term belongs to. + * @param string $meta_key The target meta key to store the value in. + * @param string $meta_value The value of the target meta key. + */ + public static function set_value( $term_id, $taxonomy, $meta_key, $meta_value ) { + + if ( substr( strtolower( $meta_key ), 0, 6 ) !== 'wpseo_' ) { + $meta_key = 'wpseo_' . $meta_key; + } + + self::set_values( $term_id, $taxonomy, array( $meta_key => $meta_value ) ); + } + + /** + * Find the keyword usages in the metas for the taxonomies/terms + * + * @param string $keyword The keyword to look for. + * @param string $current_term_id The current term id. + * @param string $current_taxonomy The current taxonomy name. + * + * @return array + */ + public static function get_keyword_usage( $keyword, $current_term_id, $current_taxonomy ) { + $tax_meta = self::get_tax_meta(); + + + $found = array(); + // Todo check for terms of all taxonomies, not only the current taxonomy. + foreach ( $tax_meta as $taxonomy_name => $terms ) { + foreach ( $terms as $term_id => $meta_values ) { + $is_current = ( $current_taxonomy === $taxonomy_name && (string) $current_term_id === (string) $term_id ); + if ( ! $is_current && ! empty( $meta_values['wpseo_focuskw'] ) && $meta_values['wpseo_focuskw'] === $keyword ) { + $found[] = $term_id; + } + } + } + + return array( $keyword => $found ); + } + + /** + * Saving the values for the given term_id + * + * @param int $term_id ID of the term to save data for. + * @param string $taxonomy The taxonomy the term belongs to. + * @param array $clean Array with clean values. + */ + private static function save_clean_values( $term_id, $taxonomy, array $clean ) { + $tax_meta = self::get_tax_meta(); + + /* Add/remove the result to/from the original option value */ + if ( $clean !== array() ) { + $tax_meta[ $taxonomy ][ $term_id ] = $clean; + } + else { + unset( $tax_meta[ $taxonomy ][ $term_id ] ); + if ( isset( $tax_meta[ $taxonomy ] ) && $tax_meta[ $taxonomy ] === array() ) { + unset( $tax_meta[ $taxonomy ] ); + } + } + + // Prevent complete array validation. + $tax_meta['wpseo_already_validated'] = true; + + self::save_tax_meta( $tax_meta ); + } + + /** + * Getting the meta from the options + * + * @return void|array + */ + private static function get_tax_meta() { + return get_option( self::$name ); + } + + /** + * Saving the tax meta values to the database + * + * @param array $tax_meta Array with the meta values for taxonomy. + */ + private static function save_tax_meta( $tax_meta ) { + update_option( self::$name, $tax_meta ); + } + + /** + * Getting the taxonomy meta for the given term_id and taxonomy + * + * @param int $term_id The id of the term. + * @param string $taxonomy Name of the taxonomy to which the term is attached. + * + * @return array + */ + private static function get_term_tax_meta( $term_id, $taxonomy ) { + $tax_meta = self::get_tax_meta(); + + /* If we have data for the term, merge with defaults for complete array, otherwise set defaults */ + if ( isset( $tax_meta[ $taxonomy ][ $term_id ] ) ) { + return array_merge( self::$defaults_per_term, $tax_meta[ $taxonomy ][ $term_id ] ); + } + + return self::$defaults_per_term; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-author-sitemap-provider.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-author-sitemap-provider.php new file mode 100644 index 0000000..89a9106 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-author-sitemap-provider.php @@ -0,0 +1,304 @@ +update_user_meta(); + + $has_exclude_filter = has_filter( 'wpseo_sitemap_exclude_author' ); + + $query_arguments = array(); + + if ( ! $has_exclude_filter ) { // We only need full users if legacy filter(s) hooked to exclusion logic. R. + $query_arguments['fields'] = 'ID'; + } + + $users = $this->get_users( $query_arguments ); + + if ( $has_exclude_filter ) { + $users = $this->exclude_users( $users ); + $users = wp_list_pluck( $users, 'ID' ); + } + + if ( empty( $users ) ) { + return array(); + } + + $index = array(); + $page = 1; + $user_pages = array_chunk( $users, $max_entries ); + + if ( count( $user_pages ) === 1 ) { + $page = ''; + } + + foreach ( $user_pages as $users_page ) { + + $user_id = array_shift( $users_page ); // Time descending, first user on page is most recently updated. + $user = get_user_by( 'id', $user_id ); + $index[] = array( + 'loc' => WPSEO_Sitemaps_Router::get_base_url( 'author-sitemap' . $page . '.xml' ), + 'lastmod' => '@' . $user->_yoast_wpseo_profile_updated, // @ for explicit timestamp format + ); + + $page++; + } + + return $index; + } + + /** + * Retrieve users, taking account of all necessary exclusions. + * + * @param array $arguments Arguments to add. + * + * @return array + */ + protected function get_users( $arguments = array() ) { + + global $wpdb; + + $options = WPSEO_Options::get_all(); + + $defaults = array( + // TODO re-enable after plugin requirements raised to WP 4.6 with the fix. + // 'who' => 'authors', Breaks meta keys, see https://core.trac.wordpress.org/ticket/36724#ticket R. + 'meta_key' => '_yoast_wpseo_profile_updated', + 'orderby' => 'meta_value_num', + 'order' => 'DESC', + 'meta_query' => array( + 'relation' => 'AND', + array( + 'key' => $wpdb->get_blog_prefix() . 'user_level', + 'value' => '0', + 'compare' => '!=', + ), + array( + 'relation' => 'OR', + array( + 'key' => 'wpseo_excludeauthorsitemap', + 'value' => 'on', + 'compare' => '!=', + ), + array( + 'key' => 'wpseo_excludeauthorsitemap', + 'compare' => 'NOT EXISTS', + ), + ), + ), + ); + + if ( $options['disable_author_noposts'] === true ) { + // $defaults['who'] = ''; // Otherwise it cancels out next argument. + $defaults['has_published_posts'] = true; + } + + $excluded_roles = $this->get_excluded_roles(); + + if ( ! empty( $excluded_roles ) ) { + // $defaults['who'] = ''; // Otherwise it cancels out next argument. + $defaults['role__not_in'] = $excluded_roles; + } + + return get_users( array_merge( $defaults, $arguments ) ); + } + + /** + * Retrieve array of roles, excluded in settings. + * + * @return array + */ + protected function get_excluded_roles() { + + static $excluded_roles; + + if ( isset( $excluded_roles ) ) { + return $excluded_roles; + } + + $options = WPSEO_Options::get_all(); + $roles = WPSEO_Utils::get_roles(); + + foreach ( $roles as $role_slug => $role_name ) { + + if ( ! empty( $options[ "user_role-{$role_slug}-not_in_sitemap" ] ) ) { + $excluded_roles[] = $role_name; + } + } + + if ( ! empty( $excluded_roles ) ) { // Otherwise it's handled by who=>authors query. + $excluded_roles[] = 'Subscriber'; + } + + return $excluded_roles; + } + + /** + * Get set of sitemap link data. + * + * @param string $type Sitemap type. + * @param int $max_entries Entries per sitemap. + * @param int $current_page Current page of the sitemap. + * + * @return array + */ + public function get_sitemap_links( $type, $max_entries, $current_page ) { + + $options = WPSEO_Options::get_all(); + + $links = array(); + + if ( $options['disable-author'] === true || $options['disable_author_sitemap'] === true ) { + return $links; + } + + $users = $this->get_users( array( + 'offset' => ( $current_page - 1 ) * $max_entries, + 'number' => $max_entries, + ) ); + + $users = $this->exclude_users( $users ); + + if ( empty( $users ) ) { + $users = array(); + } + + $time = time(); + + foreach ( $users as $user ) { + + $author_link = get_author_posts_url( $user->ID ); + + if ( empty( $author_link ) ) { + continue; + } + + $mod = $time; + + if ( isset( $user->_yoast_wpseo_profile_updated ) ) { + $mod = $user->_yoast_wpseo_profile_updated; + } + + $url = array( + 'loc' => $author_link, + 'mod' => date( DATE_W3C, $mod ), + + // Deprecated, kept for backwards data compat. R. + 'chf' => 'daily', + 'pri' => 1, + ); + + /** This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php */ + $url = apply_filters( 'wpseo_sitemap_entry', $url, 'user', $user ); + + if ( ! empty( $url ) ) { + $links[] = $url; + } + } + + return $links; + } + + /** + * Update any users that don't have last profile update timestamp. + * + * @return int Count of users updated. + */ + protected function update_user_meta() { + + $users = get_users( array( + 'who' => 'authors', + 'meta_query' => array( + array( + 'key' => '_yoast_wpseo_profile_updated', + 'compare' => 'NOT EXISTS', + ), + ), + ) ); + + $time = time(); + + foreach ( $users as $user ) { + update_user_meta( $user->ID, '_yoast_wpseo_profile_updated', $time ); + } + + return count( $users ); + } + + /** + * Wrap legacy filter to deduplicate calls. + * + * @param array $users Array of user objects to filter. + * + * @return array + */ + protected function exclude_users( $users ) { + + /** + * Filter the authors, included in XML sitemap. + * + * @param array $users Array of user objects to filter. + */ + return apply_filters( 'wpseo_sitemap_exclude_author', $users ); + } + + /** + * Sorts an array of WP_User by the _yoast_wpseo_profile_updated meta field. + * + * @since 1.6 + * + * @deprecated 3.3 User meta sort can now be done by queries. + * + * @param WP_User $first The first WP user. + * @param WP_User $second The second WP user. + * + * @return int 0 if equal, 1 if $a is larger else or -1; + */ + public function user_map_sorter( $first, $second ) { + + if ( ! isset( $first->_yoast_wpseo_profile_updated ) ) { + $first->_yoast_wpseo_profile_updated = time(); + } + + if ( ! isset( $second->_yoast_wpseo_profile_updated ) ) { + $second->_yoast_wpseo_profile_updated = time(); + } + + if ( $first->_yoast_wpseo_profile_updated === $second->_yoast_wpseo_profile_updated ) { + return 0; + } + + return ( ( $first->_yoast_wpseo_profile_updated > $second->_yoast_wpseo_profile_updated ) ? 1 : -1 ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php new file mode 100644 index 0000000..342f524 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php @@ -0,0 +1,631 @@ + true ) ); + $post_types = array_filter( $post_types, array( $this, 'is_valid_post_type' ) ); + $last_modified_times = WPSEO_Sitemaps::get_last_modified_gmt( $post_types, true ); + $index = array(); + + foreach ( $post_types as $post_type ) { + + $total_count = $this->get_post_type_count( $post_type ); + + if ( $total_count === 0 ) { + continue; + } + + $max_pages = 1; + + if ( $total_count > $max_entries ) { + $max_pages = (int) ceil( $total_count / $max_entries ); + } + + $all_dates = array(); + + if ( $max_pages > 1 ) { + + $sql = " + SELECT post_modified_gmt + FROM ( SELECT @rownum:=0 ) init + JOIN {$wpdb->posts} USE INDEX( type_status_date ) + WHERE post_status IN ( 'publish', 'inherit' ) + AND post_type = %s + AND ( @rownum:=@rownum+1 ) %% %d = 0 + ORDER BY post_modified_gmt ASC + "; + + $all_dates = $wpdb->get_col( $wpdb->prepare( $sql, $post_type, $max_entries ) ); + } + + for ( $page_counter = 0; $page_counter < $max_pages; $page_counter++ ) { + + $current_page = ( $max_pages > 1 ) ? ( $page_counter + 1 ) : ''; + $date = false; + + if ( empty( $current_page ) || $current_page === $max_pages ) { + + if ( ! empty( $last_modified_times[ $post_type ] ) ) { + $date = $last_modified_times[ $post_type ]; + } + } + else { + $date = $all_dates[ $page_counter ]; + } + + $index[] = array( + 'loc' => WPSEO_Sitemaps_Router::get_base_url( $post_type . '-sitemap' . $current_page . '.xml' ), + 'lastmod' => $date, + ); + } + } + + return $index; + } + + /** + * Get set of sitemap link data. + * + * @param string $type Sitemap type. + * @param int $max_entries Entries per sitemap. + * @param int $current_page Current page of the sitemap. + * + * @return array + */ + public function get_sitemap_links( $type, $max_entries, $current_page ) { + + $links = array(); + $post_type = $type; + + if ( ! $this->is_valid_post_type( $post_type ) ) { + return $links; + } + + $steps = min( 100, $max_entries ); + $offset = ( $current_page > 1 ) ? ( ( $current_page - 1 ) * $max_entries ) : 0; + $total = ( $offset + $max_entries ); + + $typecount = $this->get_post_type_count( $post_type ); + + if ( $total > $typecount ) { + $total = $typecount; + } + + if ( $current_page === 1 ) { + $links = array_merge( $links, $this->get_first_links( $post_type ) ); + } + + if ( $typecount === 0 ) { + + return $links; + } + + $options = $this->get_options(); + + $stacked_urls = array(); + + while ( $total > $offset ) { + + $posts = $this->get_posts( $post_type, $steps, $offset ); + + $offset += $steps; + + if ( empty( $posts ) ) { + continue; + } + + $posts_to_exclude = explode( ',', $options['excluded-posts'] ); + + foreach ( $posts as $post ) { + + if ( WPSEO_Meta::get_value( 'meta-robots-noindex', $post->ID ) === '1' ) { + continue; + } + + if ( in_array( $post->ID, $posts_to_exclude ) ) { + continue; + } + + $url = $this->get_url( $post ); + + if ( ! isset( $url['loc'] ) ) { + continue; + } + + /** + * Filter URL entry before it gets added to the sitemap. + * + * @param array $url Array of URL parts. + * @param string $type URL type. + * @param object $user Data object for the URL. + */ + $url = apply_filters( 'wpseo_sitemap_entry', $url, 'post', $post ); + + if ( empty( $url ) ) { + continue; + } + + $stacked_urls[] = $url['loc']; + + if ( (int) $post->ID === $this->get_page_for_posts_id() || (int) $post->ID === $this->get_page_on_front_id() ) { + + array_unshift( $links, $url ); + continue; + } + $links[] = $url; + } + + unset( $post, $url ); + } + + return $links; + } + + /** + * Check for relevant post type before invalidation. + * + * @param int $post_id Post ID to possibly invalidate for. + */ + public function save_post( $post_id ) { + + if ( $this->is_valid_post_type( get_post_type( $post_id ) ) ) { + WPSEO_Sitemaps_Cache::invalidate_post( $post_id ); + } + } + + /** + * Check if post type should be present in sitemaps. + * + * @param string $post_type Post type string to check for. + * + * @return bool + */ + public function is_valid_post_type( $post_type ) { + + $options = $this->get_options(); + + if ( ! empty( $options[ "post_types-{$post_type}-not_in_sitemap" ] ) ) { + return false; + } + + if ( ! in_array( $post_type, get_post_types( array( 'public' => true ) ) ) ) { + return false; + } + + /** + * Filter decision if post type is excluded from the XML sitemap. + * + * @param bool $exclude Default false. + * @param string $post_type Post type name. + */ + if ( apply_filters( 'wpseo_sitemap_exclude_post_type', false, $post_type ) ) { + return false; + } + + return true; + } + + /** + * Get count of posts for post type. + * + * @param string $post_type Post type to retrieve count for. + * + * @return int + */ + protected function get_post_type_count( $post_type ) { + + global $wpdb; + + /** + * Filter JOIN query part for type count of post type. + * + * @param string $join SQL part, defaults to empty string. + * @param string $post_type Post type name. + */ + $join_filter = apply_filters( 'wpseo_typecount_join', '', $post_type ); + + /** + * Filter WHERE query part for type count of post type. + * + * @param string $where SQL part, defaults to empty string. + * @param string $post_type Post type name. + */ + $where_filter = apply_filters( 'wpseo_typecount_where', '', $post_type ); + + $where = $this->get_sql_where_clause( $post_type ); + + $sql = " + SELECT COUNT({$wpdb->posts}.ID) + FROM {$wpdb->posts} + {$join_filter} + {$where} + {$where_filter} + "; + + return (int) $wpdb->get_var( $sql ); + } + + /** + * Produces set of links to prepend at start of first sitemap page. + * + * @param string $post_type Post type to produce links for. + * + * @return array + */ + protected function get_first_links( $post_type ) { + + $links = array(); + + $needs_archive = true; + + if ( ! $this->get_page_on_front_id() && ( $post_type == 'post' || $post_type == 'page' ) ) { + + $links[] = array( + 'loc' => $this->get_home_url(), + + // Deprecated, kept for backwards data compat. R. + 'chf' => 'daily', + 'pri' => 1, + ); + + $needs_archive = false; + } + elseif ( $this->get_page_on_front_id() && $post_type === 'post' && $this->get_page_for_posts_id() ) { + + $page_for_posts_url = get_permalink( $this->get_page_for_posts_id() ); + + $links[] = array( + 'loc' => $page_for_posts_url, + + // Deprecated, kept for backwards data compat. R. + 'chf' => 'daily', + 'pri' => 1, + ); + + $needs_archive = false; + } + + if ( ! $needs_archive ) { + return $links; + } + + $archive_url = get_post_type_archive_link( $post_type ); + + /** + * Filter the URL Yoast SEO uses in the XML sitemap for this post type archive. + * + * @param string $archive_url The URL of this archive + * @param string $post_type The post type this archive is for. + */ + $archive_url = apply_filters( 'wpseo_sitemap_post_type_archive_link', $archive_url, $post_type ); + + if ( $archive_url ) { + /** + * Filter the priority of the URL Yoast SEO uses in the XML sitemap. + * + * @param float $priority The priority for this URL, ranging from 0 to 1 + * @param string $post_type The post type this archive is for. + */ + $links[] = array( + 'loc' => $archive_url, + 'mod' => WPSEO_Sitemaps::get_last_modified_gmt( $post_type ), + + // Deprecated, kept for backwards data compat. R. + 'chf' => 'daily', + 'pri' => 1, + ); + } + + return $links; + } + + /** + * Retrieve set of posts with optimized query routine. + * + * @param string $post_type Post type to retrieve. + * @param int $count Count of posts to retrieve. + * @param int $offset Starting offset. + * + * @return object[] + */ + protected function get_posts( $post_type, $count, $offset ) { + + global $wpdb; + + static $filters = array(); + + if ( ! isset( $filters[ $post_type ] ) ) { + // Make sure you're wpdb->preparing everything you throw into this!! + $filters[ $post_type ] = array( + /** + * Filter JOIN query part for the post type. + * + * @param string $join SQL part, defaults to false. + * @param string $post_type Post type name. + */ + 'join' => apply_filters( 'wpseo_posts_join', false, $post_type ), + + /** + * Filter Where query part for the post type. + * + * @param string $where SQL part, defaults to false. + * @param string $post_type Post type name. + */ + 'where' => apply_filters( 'wpseo_posts_where', false, $post_type ), + ); + } + + $join_filter = $filters[ $post_type ]['join']; + $where_filter = $filters[ $post_type ]['where']; + $where = $this->get_sql_where_clause( $post_type ); + + // Optimized query per this thread: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-performance-suggestion. + // Also see http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/. + $sql = " + SELECT l.ID, post_title, post_content, post_name, post_parent, post_author, post_modified_gmt, post_date, post_date_gmt + FROM ( + SELECT {$wpdb->posts}.ID + FROM {$wpdb->posts} + {$join_filter} + {$where} + {$where_filter} + ORDER BY {$wpdb->posts}.post_modified ASC LIMIT %d OFFSET %d + ) + o JOIN {$wpdb->posts} l ON l.ID = o.ID + "; + + $posts = $wpdb->get_results( $wpdb->prepare( $sql, $count, $offset ) ); + + $post_ids = array(); + + foreach ( $posts as $post ) { + $post->post_type = $post_type; + $post->post_status = 'publish'; + $post->filter = 'sample'; + $post_ids[] = $post->ID; + } + + update_meta_cache( 'post', $post_ids ); + + return $posts; + } + + /** + * @param string $post_type Post type slug. + * + * @return string + */ + protected function get_sql_where_clause( $post_type ) { + + global $wpdb; + + $join = ''; + $status = "{$wpdb->posts}.post_status = 'publish'"; + + // Based on WP_Query->get_posts(). R. + if ( 'attachment' === $post_type ) { + $join = " LEFT JOIN {$wpdb->posts} AS p2 ON ({$wpdb->posts}.post_parent = p2.ID) "; + $status = "p2.post_status = 'publish'"; + } + + $where_clause = " + {$join} + WHERE {$status} + AND {$wpdb->posts}.post_type = '%s' + AND {$wpdb->posts}.post_password = '' + AND {$wpdb->posts}.post_date != '0000-00-00 00:00:00' + "; + + return $wpdb->prepare( $where_clause, $post_type ); + } + + /** + * Produce array of URL parts for given post object. + * + * @param object $post Post object to get URL parts for. + * + * @return array|bool + */ + protected function get_url( $post ) { + + $url = array(); + + /** + * Filter the URL Yoast SEO uses in the XML sitemap. + * + * Note that only absolute local URLs are allowed as the check after this removes external URLs. + * + * @param string $url URL to use in the XML sitemap + * @param object $post Post object for the URL. + */ + $url['loc'] = apply_filters( 'wpseo_xml_sitemap_post_url', get_permalink( $post ), $post ); + + /** + * Do not include external URLs. + * + * @see https://wordpress.org/plugins/page-links-to/ can rewrite permalinks to external URLs. + */ + if ( false === strpos( $url['loc'], $this->get_home_url() ) ) { + return false; + } + + $modified = max( $post->post_modified_gmt, $post->post_date_gmt ); + + if ( $modified !== '0000-00-00 00:00:00' ) { + $url['mod'] = $modified; + } + + $url['chf'] = 'daily'; // Deprecated, kept for backwards data compat. R. + + $canonical = WPSEO_Meta::get_value( 'canonical', $post->ID ); + + if ( $canonical !== '' && $canonical !== $url['loc'] ) { + /* + Let's assume that if a canonical is set for this page and it's different from + the URL of this post, that page is either already in the XML sitemap OR is on + an external site, either way, we shouldn't include it here. + */ + return false; + } + unset( $canonical ); + + $options = $this->get_options(); + if ( $options['trailingslash'] === true && $post->post_type !== 'post' ) { + $url['loc'] = trailingslashit( $url['loc'] ); + } + + $url['pri'] = 1; // Deprecated, kept for backwards data compat. R. + $url['images'] = $this->get_image_parser()->get_images( $post ); + + return $url; + } + + /** + * Calculate the priority of the post. + * + * @deprecated 3.5 Priority data dropped from sitemaps. + * + * @param WP_Post $post Post object. + * + * @return float|mixed + */ + private function calculate_priority( $post ) { + + $return = 0.6; + if ( $post->post_parent == 0 && $post->post_type == 'page' ) { + $return = 0.8; + } + + if ( $post->ID === $this->get_page_on_front_id() || $post->ID === $this->get_page_for_posts_id() ) { + $return = 1.0; + } + + /** + * Filter the priority of the URL Yoast SEO uses in the XML sitemap. + * + * @param float $priority The priority for this URL, ranging from 0 to 1 + * @param string $post_type The post type this archive is for. + * @param object $post The post object. + */ + $return = apply_filters( 'wpseo_xml_sitemap_post_priority', $return, $post->post_type, $post ); + + return $return; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-cache-data.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-cache-data.php new file mode 100644 index 0000000..d53779b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-cache-data.php @@ -0,0 +1,129 @@ +sitemap = $sitemap; + + /** + * Empty sitemap is not usable. + */ + if ( ! empty( $sitemap ) ) { + $this->set_status( self::OK ); + } + else { + $this->set_status( self::ERROR ); + } + } + + /** + * Set the status of the sitemap, is it usable. + * + * @param bool|string $valid Is the sitemap valid or not. + * + * @return void + */ + public function set_status( $valid ) { + + if ( self::OK === $valid ) { + $this->status = self::OK; + + return; + } + + if ( self::ERROR === $valid ) { + $this->status = self::ERROR; + $this->sitemap = ''; + + return; + } + + $this->status = self::UNKNOWN; + } + + /** + * Is the sitemap usable. + * + * @return bool True if usable, False if bad or unknown. + */ + public function is_usable() { + + return self::OK === $this->status; + } + + /** + * Get the XML content of the sitemap. + * + * @return string The content of the sitemap. + */ + public function get_sitemap() { + + return $this->sitemap; + } + + /** + * Get the status of the sitemap. + * + * @return string Status of the sitemap, 'ok'/'error'/'unknown' + */ + public function get_status() { + + return $this->status; + } + + /** + * String representation of object + * + * @link http://php.net/manual/en/serializable.serialize.php + * @return string the string representation of the object or null + * @since 5.1.0 + */ + public function serialize() { + + $data = array( + 'status' => $this->status, + 'xml' => $this->sitemap, + ); + + return serialize( $data ); + } + + /** + * Constructs the object + * + * @link http://php.net/manual/en/serializable.unserialize.php + * + * @param string $serialized The string representation of the object. + * + * @return void + * @since 5.1.0 + */ + public function unserialize( $serialized ) { + + $data = unserialize( $serialized ); + $this->set_sitemap( $data['xml'] ); + $this->set_status( $data['status'] ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-image-parser.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-image-parser.php new file mode 100644 index 0000000..1cbacab --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-image-parser.php @@ -0,0 +1,428 @@ +home_url = home_url(); + $parsed_home = wp_parse_url( $this->home_url ); + + if ( ! empty( $parsed_home['host'] ) ) { + $this->host = str_replace( 'www.', '', $parsed_home['host'] ); + } + + if ( ! empty( $parsed_home['scheme'] ) ) { + $this->scheme = $parsed_home['scheme']; + } + + $this->charset = esc_attr( get_bloginfo( 'charset' ) ); + } + + /** + * Get set of image data sets for the given post. + * + * @param object $post Post object to get images for. + * + * @return array + */ + public function get_images( $post ) { + + $images = array(); + + if ( ! is_object( $post ) ) { + return $images; + } + + $thumbnail_id = get_post_thumbnail_id( $post->ID ); + + if ( $thumbnail_id ) { + + $src = $this->get_absolute_url( $this->image_url( $thumbnail_id ) ); + $alt = get_post_meta( $thumbnail_id, '_wp_attachment_image_alt', true ); + $title = get_post_field( 'post_title', $thumbnail_id ); + $images[] = $this->get_image_item( $post, $src, $title, $alt ); + } + + $unfiltered_images = $this->parse_html_images( $post->post_content ); + + foreach ( $unfiltered_images as $image ) { + $images[] = $this->get_image_item( $post, $image['src'], $image['title'], $image['alt'] ); + } + + foreach ( $this->parse_galleries( $post->post_content, $post->ID ) as $attachment ) { + + $src = $this->get_absolute_url( $this->image_url( $attachment->ID ) ); + $alt = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ); + + $images[] = $this->get_image_item( $post, $src, $attachment->post_title, $alt ); + } + + if ( 'attachment' === $post->post_type && wp_attachment_is_image( $post ) ) { + + $src = $this->get_absolute_url( $this->image_url( $post->ID ) ); + $alt = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); + + $images[] = $this->get_image_item( $post, $src, $post->post_title, $alt ); + } + + foreach ( $images as $key => $image ) { + + if ( empty( $image['src'] ) ) { + unset( $images[ $key ] ); + } + } + + /** + * Filter images to be included for the post in XML sitemap. + * + * @param array $images Array of image items. + * @param int $post_id ID of the post. + */ + $images = apply_filters( 'wpseo_sitemap_urlimages', $images, $post->ID ); + + return $images; + } + + /** + * @param object $term Term to get images from description for. + * + * @return array + */ + public function get_term_images( $term ) { + + $images = $this->parse_html_images( $term->description ); + + foreach ( $this->parse_galleries( $term->description ) as $attachment ) { + + $images[] = array( + 'src' => $this->get_absolute_url( $this->image_url( $attachment->ID ) ), + 'title' => $attachment->post_title, + 'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), + ); + } + + return $images; + } + + /** + * Parse `` tags in content. + * + * @param string $content Content string to parse. + * + * @return array + */ + private function parse_html_images( $content ) { + + $images = array(); + + if ( ! class_exists( 'DOMDocument' ) ) { + return $images; + } + + if ( empty( $content ) ) { + return $images; + } + + // Prevent DOMDocument from bubbling warnings about invalid HTML. + libxml_use_internal_errors( true ); + + $post_dom = new DOMDocument(); + $post_dom->loadHTML( 'charset .'">' . $content ); + + // Clear the errors, so they don't get kept in memory. + libxml_clear_errors(); + + /** @var DOMElement $img */ + foreach ( $post_dom->getElementsByTagName( 'img' ) as $img ) { + + $src = $img->getAttribute( 'src' ); + + if ( empty( $src ) ) { + continue; + } + + $class = $img->getAttribute( 'class' ); + + if ( // This detects WP-inserted images, which we need to upsize. R. + ! empty( $class ) + && false === strpos( $class, 'size-full' ) + && preg_match( '|wp-image-(?P\d+)|', $class, $matches ) + && get_post_status( $matches['id'] ) + ) { + $src = $this->image_url( $matches['id'] ); + } + + $src = $this->get_absolute_url( $src ); + + if ( strpos( $src, $this->host ) === false ) { + continue; + } + + if ( $src !== esc_url( $src ) ) { + continue; + } + + $images[] = array( + 'src' => $src, + 'title' => $img->getAttribute( 'title' ), + 'alt' => $img->getAttribute( 'alt' ), + ); + } + + return $images; + } + + /** + * Parse gallery shortcodes in a given content. + * + * @param string $content Content string. + * @param int $post_id Optional ID of post being parsed. + * + * @return array Set of attachment objects. + */ + private function parse_galleries( $content, $post_id = 0 ) { + + $attachments = array(); + $galleries = $this->get_content_galleries( $content ); + + foreach ( $galleries as $gallery ) { + + $id = $post_id; + + if ( ! empty( $gallery['id'] ) ) { + $id = intval( $gallery['id'] ); + } + + // Forked from core gallery_shortcode() to have exact same logic. R. + if ( ! empty( $gallery['ids'] ) ) { + $gallery['include'] = $gallery['ids']; + } + + $gallery_attachments = array(); + + if ( ! empty( $gallery['include'] ) ) { + + $_attachments = get_posts( array( + 'include' => $gallery['include'], + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + ) ); + + foreach ( $_attachments as $key => $val ) { + $gallery_attachments[ $val->ID ] = $_attachments[ $key ]; + } + } + elseif ( ! empty( $gallery['exclude'] ) && ! empty( $id ) ) { + + $gallery_attachments = get_children( array( + 'post_parent' => $id, + 'exclude' => $gallery['exclude'], + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + ) ); + } + elseif ( ! empty( $id ) ) { + + $gallery_attachments = get_children( array( + 'post_parent' => $id, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + ) ); + } + + $attachments = array_merge( $attachments, $gallery_attachments ); + } + + return array_unique( $attachments, SORT_REGULAR ); + } + + /** + * Retrieves galleries from the passed content. + * + * Forked from core to skip executing shortcodes for performance. + * + * @param string $content Content to parse for shortcodes. + * + * @return array A list of arrays, each containing gallery data. + */ + protected function get_content_galleries( $content ) { + + if ( ! has_shortcode( $content, 'gallery' ) ) { + return array(); + } + + $galleries = array(); + + if ( ! preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) ) { + return $galleries; + } + + foreach ( $matches as $shortcode ) { + if ( 'gallery' === $shortcode[2] ) { + + $attributes = shortcode_parse_atts( $shortcode[3] ); + + if ( '' === $attributes ) { // Valid shortcode without any attributes. R. + $attributes = array(); + } + + $galleries[] = $attributes; + } + } + + return $galleries; + } + + /** + * Get image item array with filters applied. + * + * @param WP_Post $post Post object for the context. + * @param string $src Image URL. + * @param string $title Optional image title. + * @param string $alt Optional image alt text. + * + * @return array + */ + protected function get_image_item( $post, $src, $title = '', $alt = '' ) { + + $image = array(); + + /** + * Filter image URL to be included in XML sitemap for the post. + * + * @param string $src Image URL. + * @param object $post Post object. + */ + $image['src'] = apply_filters( 'wpseo_xml_sitemap_img_src', $src, $post ); + + if ( ! empty( $title ) ) { + $image['title'] = $title; + } + + if ( ! empty( $alt ) ) { + $image['alt'] = $alt; + } + + /** + * Filter image data to be included in XML sitemap for the post. + * + * @param array $image { + * Array of image data. + * + * @type string $src Image URL. + * @type string $title Image title attribute (optional). + * @type string $alt Image alt attribute (optional). + * } + * + * @param object $post Post object. + */ + return apply_filters( 'wpseo_xml_sitemap_img', $image, $post ); + } + + /** + * Get attached image URL. Adapted from core for speed. + * + * @param int $post_id ID of the post. + * + * @return string + */ + private function image_url( $post_id ) { + + static $uploads; + + if ( empty( $uploads ) ) { + $uploads = wp_upload_dir(); + } + + if ( false !== $uploads['error'] ) { + return ''; + } + + $file = get_post_meta( $post_id, '_wp_attached_file', true ); + + if ( empty( $file ) ) { + return ''; + } + + // Check that the upload base exists in the file location. + if ( 0 === strpos( $file, $uploads['basedir'] ) ) { + return str_replace( $uploads['basedir'], $uploads['baseurl'], $file ); + } + + // Replace file location with url location. + if ( false !== strpos( $file, 'wp-content/uploads' ) ) { + return $uploads['baseurl'] . substr( $file, ( strpos( $file, 'wp-content/uploads' ) + 18 ) ); + } + + // It's a newly uploaded file, therefore $file is relative to the baseurl. + return $uploads['baseurl'] . "/$file"; + } + + /** + * Make absolute URL for domain or protocol-relative one. + * + * @param string $src URL to process. + * + * @return string + */ + protected function get_absolute_url( $src ) { + + if ( empty( $src ) || ! is_string( $src ) ) { + return $src; + } + + if ( WPSEO_Utils::is_url_relative( $src ) === true ) { + + if ( $src[0] !== '/' ) { + return $src; + } + + // The URL is relative, we'll have to make it absolute. + return $this->home_url . $src; + } + + if ( strpos( $src, 'http' ) !== 0 ) { + // Protocol relative url, we add the scheme as the standard requires a protocol. + return $this->scheme . ':' . $src; + } + + return $src; + } + + /** + * Cache attached images and thumbnails for a set of posts. + * + * @deprecated 3.3 Blanket caching no longer makes sense with modern galleries. R. + */ + public function cache_attachments() { + + _deprecated_function( __FUNCTION__, '3.3' ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-timezone.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-timezone.php new file mode 100644 index 0000000..15f8cc1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-timezone.php @@ -0,0 +1,116 @@ +get_datetime_with_timezone( $datetime_string ); + + if ( is_null( $date_time ) ) { + return ''; + } + + return $date_time->format( $format ); + } + /** + * Get the datetime object, in site's time zone, if the datetime string was valid + * + * @param string $datetime_string The datetime string in UTC time zone, that needs to be converted to a DateTime object. + * + * @return DateTime|null in site's time zone + */ + public function get_datetime_with_timezone( $datetime_string ) { + + static $utc_timezone, $local_timezone; + + if ( ! isset( $utc_timezone ) ) { + $utc_timezone = new DateTimeZone( 'UTC' ); + $local_timezone = new DateTimeZone( $this->get_timezone_string() ); + } + + if ( ! empty( $datetime_string ) && WPSEO_Utils::is_valid_datetime( $datetime_string ) ) { + $datetime = new DateTime( $datetime_string, $utc_timezone ); + $datetime->setTimezone( $local_timezone ); + + return $datetime; + } + + return null; + } + + /** + * Returns the timezone string for a site, even if it's set to a UTC offset + * + * Adapted from http://www.php.net/manual/en/function.timezone-name-from-abbr.php#89155 + * + * @return string valid PHP timezone string + */ + private function determine_timezone_string() { + + // If site timezone string exists, return it. + if ( $timezone = get_option( 'timezone_string' ) ) { + return $timezone; + } + + // Get UTC offset, if it isn't set then return UTC. + if ( 0 === ( $utc_offset = (int) get_option( 'gmt_offset', 0 ) ) ) { + return 'UTC'; + } + + // Adjust UTC offset from hours to seconds. + $utc_offset *= HOUR_IN_SECONDS; + + // Attempt to guess the timezone string from the UTC offset. + $timezone = timezone_name_from_abbr( '', $utc_offset ); + + if ( false !== $timezone ) { + return $timezone; + } + + // Last try, guess timezone string manually. + foreach ( timezone_abbreviations_list() as $abbr ) { + foreach ( $abbr as $city ) { + if ( $city['offset'] == $utc_offset ) { + return $city['timezone_id']; + } + } + } + + // Fallback to UTC. + return 'UTC'; + } + + /** + * Returns the correct timezone string + * + * @return string + */ + private function get_timezone_string() { + if ( '' == $this->timezone_string ) { + $this->timezone_string = $this->determine_timezone_string(); + } + + return $this->timezone_string; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-admin.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-admin.php new file mode 100644 index 0000000..760b811 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-admin.php @@ -0,0 +1,191 @@ +detect_blocking_filesystem_sitemaps(); + } + + /** + * Find sitemaps residing on disk as they will block our rewrite. + * + * @since 3.1 + */ + public function detect_blocking_filesystem_sitemaps() { + $wpseo_xml_options = WPSEO_Options::get_option( 'wpseo_xml' ); + if ( $wpseo_xml_options['enablexmlsitemap'] !== true ) { + return; + } + unset( $wpseo_xml_options ); + + // Find all files and directories containing 'sitemap' and are post-fixed .xml. + $blocking_files = glob( ABSPATH . '*sitemap*.xml', ( GLOB_NOSORT | GLOB_MARK ) ); + + if ( false === $blocking_files ) { // Some systems might return error on no matches. + $blocking_files = array(); + } + + // Save if we have changes. + $wpseo_options = WPSEO_Options::get_option( 'wpseo' ); + + if ( $wpseo_options['blocking_files'] !== $blocking_files ) { + $wpseo_options['blocking_files'] = $blocking_files; + + update_option( 'wpseo', $wpseo_options ); + } + } + + /** + * Hooked into transition_post_status. Will initiate search engine pings + * if the post is being published, is a post type that a sitemap is built for + * and is a post that is included in sitemaps. + * + * @param string $new_status New post status. + * @param string $old_status Old post status. + * @param \WP_Post $post Post object. + */ + public function status_transition( $new_status, $old_status, $post ) { + if ( $new_status !== 'publish' ) { + return; + } + + if ( defined( 'WP_IMPORTING' ) ) { + $this->status_transition_bulk( $new_status, $old_status, $post ); + + return; + } + + $post_type = get_post_type( $post ); + + wp_cache_delete( 'lastpostmodified:gmt:' . $post_type, 'timeinfo' ); // #17455. + + // None of our interest.. + if ( 'nav_menu_item' === $post_type ) { + return; + } + + $options = WPSEO_Options::get_options( array( 'wpseo_xml', 'wpseo_titles' ) ); + + // If the post type is excluded in options, we can stop. + $option = sprintf( 'post_types-%s-not_in_sitemap', $post_type ); + if ( isset( $options[ $option ] ) && $options[ $option ] === true ) { + return; + } + + if ( WP_CACHE ) { + wp_schedule_single_event( ( time() + 300 ), 'wpseo_hit_sitemap_index' ); + } + + /** + * Filter: 'wpseo_allow_xml_sitemap_ping' - Check if pinging is not allowed (allowed by default) + * + * @api boolean $allow_ping The boolean that is set to true by default. + */ + if ( apply_filters( 'wpseo_allow_xml_sitemap_ping', true ) === false ) { + return; + } + + // Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens. + $excluded_posts = explode( ',', $options['excluded-posts'] ); + + if ( ! in_array( $post->ID, $excluded_posts ) ) { + + if ( defined( 'YOAST_SEO_PING_IMMEDIATELY' ) && YOAST_SEO_PING_IMMEDIATELY ) { + WPSEO_Sitemaps::ping_search_engines(); + } + elseif ( ! wp_next_scheduled( 'wpseo_ping_search_engines' ) ) { + wp_schedule_single_event( ( time() + 300 ), 'wpseo_ping_search_engines' ); + } + } + } + + /** + * While bulk importing, just save unique post_types + * + * When importing is done, if we have a post_type that is saved in the sitemap + * try to ping the search engines + * + * @param string $new_status New post status. + * @param string $old_status Old post status. + * @param \WP_Post $post Post object. + */ + private function status_transition_bulk( $new_status, $old_status, $post ) { + $this->importing_post_types[] = get_post_type( $post ); + $this->importing_post_types = array_unique( $this->importing_post_types ); + } + + /** + * After import finished, walk through imported post_types and update info. + */ + public function status_transition_bulk_finished() { + if ( ! defined( 'WP_IMPORTING' ) ) { + return; + } + + if ( empty( $this->importing_post_types ) ) { + return; + } + + $options = WPSEO_Options::get_option( 'wpseo_xml' ); + + $ping_search_engines = false; + + foreach ( $this->importing_post_types as $post_type ) { + wp_cache_delete( 'lastpostmodified:gmt:' . $post_type, 'timeinfo' ); // #17455. + + // Just have the cache deleted for nav_menu_item. + if ( 'nav_menu_item' === $post_type ) { + continue; + } + + $option = sprintf( 'post_types-%s-not_in_sitemap', $post_type ); + if ( ! isset( $options[ $option ] ) || $options[ $option ] === false ) { + $ping_search_engines = true; + } + } + + // Nothing to do. + if ( false === $ping_search_engines ) { + return; + } + + if ( WP_CACHE ) { + do_action( 'wpseo_hit_sitemap_index' ); + } + + WPSEO_Sitemaps::ping_search_engines(); + } +} /* End of class */ diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache-validator.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache-validator.php new file mode 100644 index 0000000..80f7be9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache-validator.php @@ -0,0 +1,292 @@ + $max_length ) { + + if ( $max_length < 15 ) { + /** + * If this happens the most likely cause is a page number that is too high. + * + * So this would not happen unintentionally.. + * Either by trying to cause a high server load, finding backdoors or misconfiguration. + */ + throw new OutOfRangeException( + __( + 'Trying to build the sitemap cache key, but the postfix and prefix combination leaves too little room to do this. You are probably requesting a page that is way out of the expected range.', + 'wordpress-seo' + ) + ); + } + + $half = ( $max_length / 2 ); + + $first_part = substr( $type, 0, ( ceil( $half ) - 1 ) ); + $last_part = substr( $type, ( 1 - floor( $half ) ) ); + + $type = $first_part . '..' . $last_part; + } + + return $type; + } + + /** + * Invalidate sitemap cache + * + * @param null|string $type The type to get the key for. Null for all caches. + * + * @return void + */ + public static function invalidate_storage( $type = null ) { + + // Global validator gets cleared when no type is provided. + $old_validator = null; + + // Get the current type validator. + if ( ! is_null( $type ) ) { + $old_validator = self::get_validator( $type ); + } + + // Refresh validator. + self::create_validator( $type ); + + if ( ! wp_using_ext_object_cache() ) { + // Clean up current cache from the database. + self::cleanup_database( $type, $old_validator ); + } + + // External object cache pushes old and unretrieved items out by itself so we don't have to do anything for that. + } + + /** + * Cleanup invalidated database cache + * + * @param null|string $type The type of sitemap to clear cache for. + * @param null|string $validator The validator to clear cache of. + * + * @return void + */ + public static function cleanup_database( $type = null, $validator = null ) { + + global $wpdb; + + if ( is_null( $type ) ) { + // Clear all cache if no type is provided. + $like = sprintf( '%s%%', self::STORAGE_KEY_PREFIX ); + } + else { + if ( ! is_null( $validator ) ) { + // Clear all cache for provided type-validator. + $like = sprintf( '%%_%s', $validator ); + } + else { + // Clear type cache for all type keys. + $like = sprintf( '%1$s%2$s_%%', self::STORAGE_KEY_PREFIX, $type ); + } + } + + /** + * Add slashes to the LIKE "_" single character wildcard. + * + * We can't use `esc_like` here because we need the % in the query. + */ + $where = array(); + $where[] = sprintf( "option_name LIKE '%s'", addcslashes( '_transient_' . $like, '_' ) ); + $where[] = sprintf( "option_name LIKE '%s'", addcslashes( '_transient_timeout_' . $like, '_' ) ); + + // Delete transients. + $query = sprintf( 'DELETE FROM %1$s WHERE %2$s', $wpdb->options, implode( ' OR ', $where ) ); + $wpdb->query( $query ); + } + + /** + * Get the current cache validator + * + * Without the type the global validator is returned. + * This can invalidate -all- keys in cache at once + * + * With the type parameter the validator for that specific + * type can be invalidated + * + * @param string $type Provide a type for a specific type validator, empty for global validator. + * + * @return null|string The validator for the supplied type. + */ + public static function get_validator( $type = '' ) { + + $key = self::get_validator_key( $type ); + + $current = get_option( $key, null ); + if ( ! is_null( $current ) ) { + return $current; + } + + if ( self::create_validator( $type ) ) { + return self::get_validator( $type ); + } + + return null; + } + + /** + * Get the cache validator option key for the specified type + * + * @param string $type Provide a type for a specific type validator, empty for global validator. + * + * @return string Validator to be used to generate the cache key. + */ + public static function get_validator_key( $type = '' ) { + + if ( empty( $type ) ) { + return self::VALIDATION_GLOBAL_KEY; + } + + return sprintf( self::VALIDATION_TYPE_KEY_FORMAT, $type ); + } + + /** + * Refresh the cache validator value + * + * @param string $type Provide a type for a specific type validator, empty for global validator. + * + * @return bool True if validator key has been saved as option. + */ + public static function create_validator( $type = '' ) { + + $key = self::get_validator_key( $type ); + + // Generate new validator. + $microtime = microtime(); + + // Remove space. + list( $milliseconds, $seconds ) = explode( ' ', $microtime ); + + // Transients are purged every 24h. + $seconds = ( $seconds % DAY_IN_SECONDS ); + $milliseconds = intval( substr( $milliseconds, 2, 3 ), 10 ); + + // Combine seconds and milliseconds and convert to integer. + $validator = intval( $seconds . '' . $milliseconds, 10 ); + + // Apply base 61 encoding. + $compressed = self::convert_base10_to_base61( $validator ); + + return update_option( $key, $compressed, false ); + } + + /** + * Encode to base61 format. + * + * This is base64 (numeric + alpha + alpha upper case) without the 0. + * + * @param int $base10 The number that has to be converted to base 61. + * + * @return string Base 61 converted string. + * + * @throws InvalidArgumentException When the input is not an integer. + */ + public static function convert_base10_to_base61( $base10 ) { + + if ( ! is_int( $base10 ) ) { + throw new InvalidArgumentException( __( 'Expected an integer as input.', 'wordpress-seo' ) ); + } + + // Characters that will be used in the conversion. + $characters = '123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $length = strlen( $characters ); + + $remainder = $base10; + $output = ''; + + do { + // Building from right to left in the result. + $index = ( $remainder % $length ); + + // Prepend the character to the output. + $output = $characters[ $index ] . $output; + + // Determine the remainder after removing the applied number. + $remainder = floor( $remainder / $length ); + + // Keep doing it until we have no remainder left. + } while ( $remainder ); + + return $output; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache.php new file mode 100644 index 0000000..84a007c --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-cache.php @@ -0,0 +1,292 @@ +is_enabled(); + } + + /** + * If cache is enabled. + * + * @return boolean + */ + public function is_enabled() { + + /** + * Filter if XML sitemap transient cache is enabled. + * + * @param bool $unsigned Enable cache or not, defaults to true + */ + return apply_filters( 'wpseo_enable_xml_sitemap_transient_caching', true ); + } + + + /** + * Retrieve the sitemap page from cache. + * + * @param string $type Sitemap type. + * @param int $page Page number to retrieve. + * + * @return string|boolean + */ + public function get_sitemap( $type, $page ) { + + $transient_key = WPSEO_Sitemaps_Cache_Validator::get_storage_key( $type, $page ); + if ( false === $transient_key ) { + return false; + } + + return get_transient( $transient_key ); + } + + /** + * Get the sitemap that is cached + * + * @param string $type Sitemap type. + * @param int $page Page number to retrieve. + * + * @return null|WPSEO_Sitemap_Cache_Data Null on no cache found otherwise object containing sitemap and meta data. + */ + public function get_sitemap_data( $type, $page ) { + + $sitemap = $this->get_sitemap( $type, $page ); + + if ( empty( $sitemap ) ) { + return null; + } + + // Unserialize Cache Data object (is_serialized doesn't recognize classes). + if ( is_string( $sitemap ) && 0 === strpos( $sitemap, 'C:24:"WPSEO_Sitemap_Cache_Data"' ) ) { + + $sitemap = unserialize( $sitemap ); + } + + // What we expect it to be if it is set. + if ( $sitemap instanceof WPSEO_Sitemap_Cache_Data_Interface ) { + return $sitemap; + } + + return null; + } + + /** + * Store the sitemap page from cache. + * + * @param string $type Sitemap type. + * @param int $page Page number to store. + * @param string $sitemap Sitemap body to store. + * @param bool $usable Is this a valid sitemap or a cache of an invalid sitemap. + * + * @return bool + */ + public function store_sitemap( $type, $page, $sitemap, $usable = true ) { + + $transient_key = WPSEO_Sitemaps_Cache_Validator::get_storage_key( $type, $page ); + + if ( false === $transient_key ) { + return false; + } + + $status = ( $usable ) ? WPSEO_Sitemap_Cache_Data::OK : WPSEO_Sitemap_Cache_Data::ERROR; + + $sitemap_data = new WPSEO_Sitemap_Cache_Data(); + $sitemap_data->set_sitemap( $sitemap ); + $sitemap_data->set_status( $status ); + + return set_transient( $transient_key, $sitemap_data, DAY_IN_SECONDS ); + } + + /** + * Delete cache transients for index and specific type. + * + * Always deletes the main index sitemaps cache, as that's always invalidated by any other change. + * + * @param string $type Sitemap type to invalidate. + * + * @return void + */ + public static function invalidate( $type ) { + + self::clear( array( $type ) ); + } + + /** + * Helper to invalidate in hooks where type is passed as second argument. + * + * @param int $unused Unused term ID value. + * @param string $type Taxonomy to invalidate. + * + * @return void + */ + public static function invalidate_helper( $unused, $type ) { + + self::invalidate( $type ); + } + + /** + * Invalidate sitemap cache for authors. + * + * @param int $user_id User ID. + */ + public static function invalidate_author( $user_id ) { + + $user = get_user_by( 'id', $user_id ); + + if ( 'user_register' === current_action() ) { + update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() ); + } + + if ( ! in_array( 'subscriber', $user->roles ) ) { + self::invalidate( 'author' ); + } + } + + /** + * Invalidate sitemap cache for the post type of a post. + * + * Don't invalidate for revisions. + * + * @param int $post_id Post ID to invalidate type for. + * + * @return void + */ + public static function invalidate_post( $post_id ) { + + if ( wp_is_post_revision( $post_id ) ) { + return; + } + + self::invalidate( get_post_type( $post_id ) ); + } + + /** + * Delete cache transients for given sitemaps types or all by default. + * + * @param array $types Set of sitemap types to delete cache transients for. + * + * @return void + */ + public static function clear( $types = array() ) { + + if ( ! self::$is_enabled ) { + return; + } + + // No types provided, clear all. + if ( empty( $types ) ) { + self::$clear_all = true; + + return; + } + + // Always invalidate the index sitemap as well. + if ( ! in_array( WPSEO_Sitemaps::SITEMAP_INDEX_TYPE, $types ) ) { + array_unshift( $types, WPSEO_Sitemaps::SITEMAP_INDEX_TYPE ); + } + + foreach ( $types as $type ) { + if ( ! in_array( $type, self::$clear_types ) ) { + self::$clear_types[] = $type; + } + } + } + + /** + * Invalidate storage for cache types queued to clear. + */ + public static function clear_queued() { + + if ( self::$clear_all ) { + + WPSEO_Sitemaps_Cache_Validator::invalidate_storage(); + self::$clear_all = false; + self::$clear_types = array(); + + return; + } + + foreach ( self::$clear_types as $type ) { + WPSEO_Sitemaps_Cache_Validator::invalidate_storage( $type ); + } + + self::$clear_types = array(); + } + + /** + * Adds a hook that when given option is updated, the cache is cleared + * + * @param string $option Option name. + * @param string $type Sitemap type. + */ + public static function register_clear_on_option_update( $option, $type = '' ) { + + self::$cache_clear[ $option ] = $type; + } + + /** + * Clears the transient cache when a given option is updated, if that option has been registered before + * + * @param string $option The option name that's being updated. + * + * @return void + */ + public static function clear_on_option_update( $option ) { + + if ( array_key_exists( $option, self::$cache_clear ) ) { + + if ( empty( self::$cache_clear[ $option ] ) ) { + // Clear all caches. + self::clear(); + } + else { + // Clear specific provided type(s). + $types = (array) self::$cache_clear[ $option ]; + self::clear( $types ); + } + } + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-renderer.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-renderer.php new file mode 100644 index 0000000..d5b1c29 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-renderer.php @@ -0,0 +1,322 @@ +stylesheet = ''; + $this->charset = get_bloginfo( 'charset' ); + $this->output_charset = $this->charset; + $this->timezone = new WPSEO_Sitemap_Timezone(); + + if ( + 'UTF-8' !== $this->charset + && function_exists( 'mb_list_encodings' ) + && in_array( $this->charset, mb_list_encodings(), true ) + ) { + $this->output_charset = 'UTF-8'; + } + + $this->needs_conversion = $this->output_charset !== $this->charset; + } + + /** + * @param array $links Set of sitemaps index links. + * + * @return string + */ + public function get_index( $links ) { + + $xml = '' . "\n"; + + foreach ( $links as $link ) { + $xml .= $this->sitemap_index_url( $link ); + } + + /** + * Filter to append sitemaps to the index. + * + * @param string $index String to append to sitemaps index, defaults to empty. + */ + $xml .= apply_filters( 'wpseo_sitemap_index', '' ); + $xml .= ''; + + return $xml; + } + + /** + * @param array $links Set of sitemap links. + * @param string $type Sitemap type. + * @param int $current_page Current sitemap page number. + * + * @return string + */ + public function get_sitemap( $links, $type, $current_page ) { + + $urlset = '' . "\n"; + + /** + * Filters the `urlset` for a sitemap by type. + * + * @api string $urlset The output for the sitemap's `urlset`. + */ + $xml = apply_filters( "wpseo_sitemap_{$type}_urlset", $urlset ); + + foreach ( $links as $url ) { + $xml .= $this->sitemap_url( $url ); + } + + /** + * Filter to add extra URLs to the XML sitemap by type. + * + * Only runs for the first page, not on all. + * + * @param string $content String content to add, defaults to empty. + */ + if ( $current_page === 1 ) { + $xml .= apply_filters( "wpseo_sitemap_{$type}_content", '' ); + } + + $xml .= ''; + + return $xml; + } + + /** + * Produce final XML output with debug information. + * + * @param string $sitemap Sitemap XML. + * @param boolean $transient Transient cache flag. + * + * @return string + */ + public function get_output( $sitemap, $transient ) { + + $output = 'output_charset ) . '"?>'; + + if ( $this->stylesheet ) { + /** + * Filter the stylesheet URL for the XML sitemap. + * + * @param string $stylesheet Stylesheet URL. + */ + $output .= apply_filters( 'wpseo_stylesheet_url', $this->stylesheet ) . "\n"; + } + + $output .= $sitemap; + $output .= "\n"; + + $debug = WP_DEBUG || ( defined( 'WPSEO_DEBUG' ) && true === WPSEO_DEBUG ); + + if ( ! WP_DEBUG_DISPLAY || ! $debug ) { + return $output; + } + + $memory_used = number_format( ( memory_get_peak_usage() / 1048576 ), 2 ); + $queries_run = ( $transient ) ? 'Served from transient cache' : 'Queries executed ' . absint( $GLOBALS['wpdb']->num_queries ); + + $output .= "\n"; + + if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { + + $queries = print_r( $GLOBALS['wpdb']->queries, true ); + $output .= "\n"; + } + + return $output; + } + + /** + * Get charset for the output. + * + * @return string + */ + public function get_output_charset() { + return $this->output_charset; + } + + /** + * Set a custom stylesheet for this sitemap. Set to empty to just remove the default stylesheet. + * + * @param string $stylesheet Full xml-stylesheet declaration. + */ + public function set_stylesheet( $stylesheet ) { + $this->stylesheet = $stylesheet; + } + + /** + * Build the `` tag for a given URL. + * + * @param array $url Array of parts that make up this entry. + * + * @return string + */ + protected function sitemap_index_url( $url ) { + + $date = null; + + if ( ! empty( $url['lastmod'] ) ) { + $date = $this->timezone->format_date( $url['lastmod'] ); + } + + $url['loc'] = htmlspecialchars( $url['loc'] ); + + $output = "\t\n"; + $output .= "\t\t" . $url['loc'] . "\n"; + $output .= empty( $date ) ? '' : "\t\t" . htmlspecialchars( $date ) . "\n"; + $output .= "\t\n"; + + return $output; + } + + /** + * Build the `` tag for a given URL. + * + * Public access for backwards compatibility reasons. + * + * @param array $url Array of parts that make up this entry. + * + * @return string + */ + public function sitemap_url( $url ) { + + $date = null; + + + if ( ! empty( $url['mod'] ) ) { + // Create a DateTime object date in the correct timezone. + $date = $this->timezone->format_date( $url['mod'] ); + } + + $url['loc'] = htmlspecialchars( $url['loc'] ); + + $output = "\t\n"; + $output .= "\t\t" . $this->encode_url_rfc3986( $url['loc'] ) . "\n"; + $output .= empty( $date ) ? '' : "\t\t" . htmlspecialchars( $date ) . "\n"; + + if ( empty( $url['images'] ) ) { + $url['images'] = array(); + } + + foreach ( $url['images'] as $img ) { + + if ( empty( $img['src'] ) ) { + continue; + } + + $output .= "\t\t\n"; + $output .= "\t\t\t" . esc_html( $this->encode_url_rfc3986( $img['src'] ) ) . "\n"; + + if ( ! empty( $img['title'] ) ) { + + $title = $img['title']; + + if ( $this->needs_conversion ) { + $title = mb_convert_encoding( $title, $this->output_charset, $this->charset ); + } + + $title = _wp_specialchars( html_entity_decode( $title, ENT_QUOTES, $this->output_charset ) ); + $output .= "\t\t\t\n"; + } + + if ( ! empty( $img['alt'] ) ) { + + $alt = $img['alt']; + + if ( $this->needs_conversion ) { + $alt = mb_convert_encoding( $alt, $this->output_charset, $this->charset ); + } + + $alt = _wp_specialchars( html_entity_decode( $alt, ENT_QUOTES, $this->output_charset ) ); + $output .= "\t\t\t\n"; + } + + $output .= "\t\t\n"; + } + unset( $img, $title, $alt ); + + $output .= "\t\n"; + + /** + * Filters the output for the sitemap url tag. + * + * @api string $output The output for the sitemap url tag. + * + * @param array $url The sitemap url array on which the output is based. + */ + return apply_filters( 'wpseo_sitemap_url', $output, $url ); + } + + /** + * Apply some best effort conversion to comply with RFC3986. + * + * @param string $url URL to encode. + * + * @return string + */ + protected function encode_url_rfc3986( $url ) { + + if ( filter_var( $url, FILTER_VALIDATE_URL ) ) { + return $url; + } + + $path = parse_url( $url, PHP_URL_PATH ); + + if ( ! empty( $path ) && '/' !== $path ) { + + $encoded_path = explode( '/', $path ); + $encoded_path = array_map( 'rawurlencode', $encoded_path ); + $encoded_path = implode( '/', $encoded_path ); + $encoded_path = str_replace( '%7E', '~', $encoded_path ); // PHP <5.3. + + $url = str_replace( $path, $encoded_path, $url ); + } + + $query = parse_url( $url, PHP_URL_QUERY ); + + if ( ! empty( $query ) ) { + + parse_str( $query, $parsed_query ); + + if ( defined( 'PHP_QUERY_RFC3986' ) ) { // PHP 5.4+. + $parsed_query = http_build_query( $parsed_query, null, '&', PHP_QUERY_RFC3986 ); + } + else { + $parsed_query = http_build_query( $parsed_query, null, '&' ); + $parsed_query = str_replace( '+', '%20', $parsed_query ); + $parsed_query = str_replace( '%7E', '~', $parsed_query ); + } + + $url = str_replace( $query, $parsed_query, $url ); + } + + return $url; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-router.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-router.php new file mode 100644 index 0000000..1c1d0de --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps-router.php @@ -0,0 +1,98 @@ +add_query_var( 'sitemap' ); + $wp->add_query_var( 'sitemap_n' ); + $wp->add_query_var( 'xsl' ); + + add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' ); + add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' ); + add_rewrite_rule( '([a-z]+)?-?sitemap\.xsl$', 'index.php?xsl=$matches[1]', 'top' ); + } + + /** + * Stop trailing slashes on sitemap.xml URLs. + * + * @param string $redirect The redirect URL currently determined. + * + * @return bool|string $redirect + */ + public function redirect_canonical( $redirect ) { + + if ( get_query_var( 'sitemap' ) || get_query_var( 'xsl' ) ) { + return false; + } + + return $redirect; + } + + /** + * Redirects sitemap.xml to sitemap_index.xml. + */ + public function template_redirect() { + + global $wp_query; + + $current_url = 'http://'; + + if ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ) { + $current_url = 'https://'; + } + + $current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ); + $current_url .= sanitize_text_field( $_SERVER['REQUEST_URI'] ); + + if ( home_url( '/sitemap.xml' ) === $current_url && $wp_query->is_404 ) { + wp_redirect( home_url( '/sitemap_index.xml' ), 301 ); + exit; + } + } + + /** + * Create base URL for the sitemap. + * + * @param string $page Page to append to the base URL. + * + * @return string base URL (incl page) + */ + public static function get_base_url( $page ) { + + global $wp_rewrite; + + $base = $wp_rewrite->using_index_permalinks() ? 'index.php/' : '/'; + + /** + * Filter the base URL of the sitemaps + * + * @param string $base The string that should be added to home_url() to make the full base URL. + */ + $base = apply_filters( 'wpseo_sitemaps_base_url', $base ); + + // Get the scheme from the configured home url instead of letting WordPress determine the scheme based on the requested URI. + return home_url( $base . $page, parse_url( get_option( 'home' ), PHP_URL_SCHEME ) ); + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php new file mode 100644 index 0000000..c84b440 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php @@ -0,0 +1,545 @@ +max_entries = $options['entries-per-page']; + $this->timezone = new WPSEO_Sitemap_Timezone(); + $this->router = new WPSEO_Sitemaps_Router(); + $this->renderer = new WPSEO_Sitemaps_Renderer(); + $this->cache = new WPSEO_Sitemaps_Cache(); + $this->providers = array( // TODO API for add/remove. R. + new WPSEO_Post_Type_Sitemap_Provider(), + new WPSEO_Taxonomy_Sitemap_Provider(), + new WPSEO_Author_Sitemap_Provider(), + ); + + if ( ! empty( $_SERVER['SERVER_PROTOCOL'] ) ) { + $this->http_protocol = sanitize_text_field( $_SERVER['SERVER_PROTOCOL'] ); + } + } + + /** + * Check the current request URI, if we can determine it's probably an XML sitemap, kill loading the widgets + */ + public function reduce_query_load() { + + if ( ! isset( $_SERVER['REQUEST_URI'] ) ) { + return; + } + + $request_uri = $_SERVER['REQUEST_URI']; + $extension = substr( $request_uri, -4 ); + + if ( false !== stripos( $request_uri, 'sitemap' ) && in_array( $extension, array( '.xml', '.xsl' ) ) ) { + remove_all_actions( 'widgets_init' ); + } + } + + /** + * Register your own sitemap. Call this during 'init'. + * + * @param string $name The name of the sitemap. + * @param callback $function Function to build your sitemap. + * @param string $rewrite Optional. Regular expression to match your sitemap with. + */ + public function register_sitemap( $name, $function, $rewrite = '' ) { + add_action( 'wpseo_do_sitemap_' . $name, $function ); + if ( ! empty( $rewrite ) ) { + add_rewrite_rule( $rewrite, 'index.php?sitemap=' . $name, 'top' ); + } + } + + /** + * Register your own XSL file. Call this during 'init'. + * + * @param string $name The name of the XSL file. + * @param callback $function Function to build your XSL file. + * @param string $rewrite Optional. Regular expression to match your sitemap with. + */ + public function register_xsl( $name, $function, $rewrite = '' ) { + add_action( 'wpseo_xsl_' . $name, $function ); + if ( ! empty( $rewrite ) ) { + add_rewrite_rule( $rewrite, 'index.php?xsl=' . $name, 'top' ); + } + } + + /** + * Set the sitemap current page to allow creating partial sitemaps with wp-cli + * in a one-off process. + * + * @param integer $current_page The part that should be generated. + */ + public function set_n( $current_page ) { + if ( is_scalar( $current_page ) && intval( $current_page ) > 0 ) { + $this->current_page = intval( $current_page ); + } + } + + /** + * Set the sitemap content to display after you have generated it. + * + * @param string $sitemap The generated sitemap to output. + */ + public function set_sitemap( $sitemap ) { + $this->sitemap = $sitemap; + } + + /** + * Set as true to make the request 404. Used stop the display of empty sitemaps or invalid requests. + * + * @param bool $bool Is this a bad request. True or false. + */ + public function set_bad_sitemap( $bool ) { + $this->bad_sitemap = (bool) $bool; + } + + /** + * Prevent stupid plugins from running shutdown scripts when we're obviously not outputting HTML. + * + * @since 1.4.16 + */ + public function sitemap_close() { + remove_all_actions( 'wp_footer' ); + die(); + } + + /** + * Hijack requests for potential sitemaps and XSL files. + * + * @param \WP_Query $query Main query instance. + */ + public function redirect( $query ) { + + if ( ! $query->is_main_query() ) { + return; + } + + $xsl = get_query_var( 'xsl' ); + + if ( ! empty( $xsl ) ) { + $this->xsl_output( $xsl ); + $this->sitemap_close(); + + return; + } + + $type = get_query_var( 'sitemap' ); + + if ( empty( $type ) ) { + return; + } + + $this->set_n( get_query_var( 'sitemap_n' ) ); + + if ( ! $this->get_sitemap_from_cache( $type, $this->current_page ) ) { + $this->build_sitemap( $type ); + } + + if ( $this->bad_sitemap ) { + $query->set_404(); + status_header( 404 ); + + return; + } + + $this->output(); + $this->sitemap_close(); + } + + /** + * Try to get the sitemap from cache + * + * @param string $type Sitemap type. + * @param int $page_number The page number to retrieve. + * + * @return bool If the sitemap has been retrieved from cache. + */ + private function get_sitemap_from_cache( $type, $page_number ) { + + $this->transient = false; + + if ( true !== $this->cache->is_enabled() ) { + return false; + } + + /** + * Fires before the attempt to retrieve XML sitemap from the transient cache. + * + * @param WPSEO_Sitemaps $sitemaps Sitemaps object. + */ + do_action( 'wpseo_sitemap_stylesheet_cache_' . $type, $this ); + + $sitemap_cache_data = $this->cache->get_sitemap_data( $type, $page_number ); + + // No cache was found, refresh it because cache is enabled. + if ( empty( $sitemap_cache_data ) ) { + return $this->refresh_sitemap_cache( $type, $page_number ); + } + + // Cache object was found, parse information. + $this->transient = true; + + $this->sitemap = $sitemap_cache_data->get_sitemap(); + $this->bad_sitemap = ! $sitemap_cache_data->is_usable(); + + return true; + } + + /** + * Build and save sitemap to cache. + * + * @param string $type Sitemap type. + * @param int $page_number The page number to save to. + * + * @return bool + */ + private function refresh_sitemap_cache( $type, $page_number ) { + $this->set_n( $page_number ); + $this->build_sitemap( $type ); + + return $this->cache->store_sitemap( $type, $page_number, $this->sitemap, ! $this->bad_sitemap ); + } + + /** + * Attempts to build the requested sitemap. + * + * Sets $bad_sitemap if this isn't for the root sitemap, a post type or taxonomy. + * + * @param string $type The requested sitemap's identifier. + */ + public function build_sitemap( $type ) { + + /** + * Filter the type of sitemap to build. + * + * @param string $type Sitemap type, determined by the request. + */ + $type = apply_filters( 'wpseo_build_sitemap_post_type', $type ); + + if ( $type === '1' ) { + $this->build_root_map(); + + return; + } + + foreach ( $this->providers as $provider ) { + if ( ! $provider->handles_type( $type ) ) { + continue; + } + + $links = $provider->get_sitemap_links( $type, $this->max_entries, $this->current_page ); + + if ( empty( $links ) ) { + $this->bad_sitemap = true; + + return; + } + + $this->sitemap = $this->renderer->get_sitemap( $links, $type, $this->current_page ); + + return; + } + + if ( has_action( 'wpseo_do_sitemap_' . $type ) ) { + /** + * Fires custom handler, if hooked to generate sitemap for the type. + */ + do_action( 'wpseo_do_sitemap_' . $type ); + + return; + } + + $this->bad_sitemap = true; + } + + /** + * Build the root sitemap (example.com/sitemap_index.xml) which lists sub-sitemaps for other content types. + */ + public function build_root_map() { + + $links = array(); + + foreach ( $this->providers as $provider ) { + $links = array_merge( $links, $provider->get_index_links( $this->max_entries ) ); + } + + if ( empty( $links ) ) { + $this->bad_sitemap = true; + $this->sitemap = ''; + + return; + } + + $this->sitemap = $this->renderer->get_index( $links ); + } + + /** + * Spits out the XSL for the XML sitemap. + * + * @param string $type Type to output. + * + * @since 1.4.13 + */ + public function xsl_output( $type ) { + + if ( $type !== 'main' ) { + + /** + * Fires for the output of XSL for XML sitemaps, other than type "main". + */ + do_action( 'wpseo_xsl_' . $type ); + + return; + } + + header( $this->http_protocol . ' 200 OK', true, 200 ); + // Prevent the search engines from indexing the XML Sitemap. + header( 'X-Robots-Tag: noindex, follow', true ); + header( 'Content-Type: text/xml' ); + + // Make the browser cache this file properly. + $expires = YEAR_IN_SECONDS; + header( 'Pragma: public' ); + header( 'Cache-Control: maxage=' . $expires ); + header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', ( time() + $expires ) ) . ' GMT' ); + + require_once( WPSEO_PATH . 'css/xml-sitemap-xsl.php' ); + } + + /** + * Spit out the generated sitemap and relevant headers and encoding information. + */ + public function output() { + + if ( ! headers_sent() ) { + header( $this->http_protocol . ' 200 OK', true, 200 ); + // Prevent the search engines from indexing the XML Sitemap. + header( 'X-Robots-Tag: noindex, follow', true ); + header( 'Content-Type: text/xml; charset=' . esc_attr( $this->renderer->get_output_charset() ) ); + } + + echo $this->renderer->get_output( $this->sitemap, $this->transient ); + } + + /** + * Make a request for the sitemap index so as to cache it before the arrival of the search engines. + */ + public function hit_sitemap_index() { + wp_remote_get( WPSEO_Sitemaps_Router::get_base_url( 'sitemap_index.xml' ) ); + } + + /** + * Get the GMT modification date for the last modified post in the post type. + * + * @param string|array $post_types Post type or array of types. + * @param bool $return_all Flag to return array of values. + * + * @return string|array|false + */ + static public function get_last_modified_gmt( $post_types, $return_all = false ) { + + global $wpdb; + + static $post_type_dates = null; + + if ( ! is_array( $post_types ) ) { + $post_types = array( $post_types ); + } + + foreach ( $post_types as $post_type ) { + if ( ! isset( $post_type_dates[ $post_type ] ) ) { // If we hadn't seen post type before. R. + $post_type_dates = null; + break; + } + } + + if ( is_null( $post_type_dates ) ) { + + $sql = " + SELECT post_type, MAX(post_modified_gmt) AS date + FROM $wpdb->posts + WHERE post_status IN ('publish','inherit') + AND post_type IN ('" . implode( "','", get_post_types( array( 'public' => true ) ) ) . "') + GROUP BY post_type + ORDER BY post_modified_gmt DESC + "; + + $post_type_dates = array(); + + foreach ( $wpdb->get_results( $sql ) as $obj ) { + $post_type_dates[ $obj->post_type ] = $obj->date; + } + } + + $dates = array_intersect_key( $post_type_dates, array_flip( $post_types ) ); + + if ( count( $dates ) > 0 ) { + + if ( $return_all ) { + return $dates; + } + + return max( $dates ); + } + + return false; + } + + /** + * Get the modification date for the last modified post in the post type. + * + * @param array $post_types Post types to get the last modification date for. + * + * @return string + */ + public function get_last_modified( $post_types ) { + + return $this->timezone->format_date( self::get_last_modified_gmt( $post_types ) ); + } + + /** + * Notify search engines of the updated sitemap. + * + * @param string|null $url Optional URL to make the ping for. + */ + public static function ping_search_engines( $url = null ) { + + /** + * Filter: 'wpseo_allow_xml_sitemap_ping' - Check if pinging is not allowed (allowed by default) + * + * @api boolean $allow_ping The boolean that is set to true by default. + */ + if ( apply_filters( 'wpseo_allow_xml_sitemap_ping', true ) === false ) { + return; + } + + if ( '0' === get_option( 'blog_public' ) ) { // Don't ping if blog is not public. + return; + } + + if ( empty( $url ) ) { + $url = urlencode( WPSEO_Sitemaps_Router::get_base_url( 'sitemap_index.xml' ) ); + } + + // Ping Google and Bing. + wp_remote_get( 'http://www.google.com/webmasters/tools/ping?sitemap=' . $url, array( 'blocking' => false ) ); + wp_remote_get( 'http://www.bing.com/ping?sitemap=' . $url, array( 'blocking' => false ) ); + } + + /** + * Build the `` tag for a given URL. + * + * @deprecated + * + * @param array $url Array of parts that make up this entry. + * + * @return string + */ + public function sitemap_url( $url ) { + + return $this->renderer->sitemap_url( $url ); + } + + /** + * Set a custom stylesheet for this sitemap. Set to empty to just remove the default stylesheet. + * + * @deprecated + * + * @param string $stylesheet Full xml-stylesheet declaration. + */ + public function set_stylesheet( $stylesheet ) { + $this->renderer->set_stylesheet( $stylesheet ); + } + + /** + * Function to dynamically filter the change frequency. + * + * @deprecated 3.5 Change frequency data dropped from sitemaps. + * + * @param string $filter Expands to wpseo_sitemap_$filter_change_freq, allowing for a change of the frequency for + * numerous specific URLs. + * @param string $default The default value for the frequency. + * @param string $url The URL of the current entry. + * + * @return mixed|void + */ + static public function filter_frequency( $filter, $default, $url ) { + /** + * Filter the specific change frequency + * + * @param string $default The default change frequency. + * @param string $url URL to filter frequency for. + */ + $change_freq = apply_filters( 'wpseo_sitemap_' . $filter . '_change_freq', $default, $url ); + + if ( ! in_array( $change_freq, array( + 'always', + 'hourly', + 'daily', + 'weekly', + 'monthly', + 'yearly', + 'never', + ) ) + ) { + $change_freq = $default; + } + + return $change_freq; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/class-taxonomy-sitemap-provider.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-taxonomy-sitemap-provider.php new file mode 100644 index 0000000..4d67f4a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/class-taxonomy-sitemap-provider.php @@ -0,0 +1,289 @@ + true ), 'objects' ); + + if ( empty( $taxonomies ) ) { + return array(); + } + + $taxonomy_names = array_filter( array_keys( $taxonomies ), array( $this, 'is_valid_taxonomy' ) ); + $taxonomies = array_intersect_key( $taxonomies, array_flip( $taxonomy_names ) ); + + // Retrieve all the taxonomies and their terms so we can do a proper count on them. + /** + * Filter the setting of excluding empty terms from the XML sitemap. + * + * @param boolean $exclude Defaults to true. + * @param array $taxonomy_names Array of names for the taxonomies being processed. + */ + $hide_empty = apply_filters( 'wpseo_sitemap_exclude_empty_terms', true, $taxonomy_names ); + + $all_taxonomies = array(); + + foreach ( $taxonomy_names as $taxonomy_name ) { + + $taxonomy_terms = get_terms( $taxonomy_name, array( + 'hide_empty' => $hide_empty, + 'fields' => 'ids', + ) ); + + if ( count( $taxonomy_terms ) > 0 ) { + $all_taxonomies[ $taxonomy_name ] = $taxonomy_terms; + } + } + + $index = array(); + + foreach ( $taxonomies as $tax_name => $tax ) { + + if ( ! isset( $all_taxonomies[ $tax_name ] ) ) { // No eligible terms found. + continue; + } + + $total_count = ( isset( $all_taxonomies[ $tax_name ] ) ) ? count( $all_taxonomies[ $tax_name ] ) : 1; + $max_pages = 1; + + if ( $total_count > $max_entries ) { + $max_pages = (int) ceil( $total_count / $max_entries ); + } + + $last_modified_gmt = WPSEO_Sitemaps::get_last_modified_gmt( $tax->object_type ); + + for ( $page_counter = 0; $page_counter < $max_pages; $page_counter++ ) { + + $current_page = ( $max_pages > 1 ) ? ( $page_counter + 1 ) : ''; + + if ( ! is_array( $tax->object_type ) || count( $tax->object_type ) == 0 ) { + continue; + } + + $terms = array_splice( $all_taxonomies[ $tax_name ], 0, $max_entries ); + + if ( ! $terms ) { + continue; + } + + $args = array( + 'post_type' => $tax->object_type, + 'tax_query' => array( + array( + 'taxonomy' => $tax_name, + 'terms' => $terms, + ), + ), + 'orderby' => 'modified', + 'order' => 'DESC', + 'posts_per_page' => 1, + ); + $query = new WP_Query( $args ); + + if ( $query->have_posts() ) { + $date = $query->posts[0]->post_modified_gmt; + } + else { + $date = $last_modified_gmt; + } + + $index[] = array( + 'loc' => WPSEO_Sitemaps_Router::get_base_url( $tax_name . '-sitemap' . $current_page . '.xml' ), + 'lastmod' => $date, + ); + } + } + + return $index; + } + + /** + * Get set of sitemap link data. + * + * @param string $type Sitemap type. + * @param int $max_entries Entries per sitemap. + * @param int $current_page Current page of the sitemap. + * + * @return array + */ + public function get_sitemap_links( $type, $max_entries, $current_page ) { + + global $wpdb; + + $links = array(); + $taxonomy = get_taxonomy( $type ); + + if ( $taxonomy === false || ! $this->is_valid_taxonomy( $taxonomy->name ) || ! $taxonomy->public ) { + return $links; + } + + $options = $this->get_options(); + + $steps = $max_entries; + $offset = ( $current_page > 1 ) ? ( ( $current_page - 1 ) * $max_entries ) : 0; + + /** This filter is documented in inc/sitemaps/class-taxonomy-sitemap-provider.php */ + $hide_empty = apply_filters( 'wpseo_sitemap_exclude_empty_terms', true, $taxonomy ); + $terms = get_terms( $taxonomy->name, array( 'hide_empty' => $hide_empty ) ); + $terms = array_splice( $terms, $offset, $steps ); + + if ( empty( $terms ) ) { + $terms = array(); + } + + // Grab last modified date. + $sql = " + SELECT MAX(p.post_modified_gmt) AS lastmod + FROM $wpdb->posts AS p + INNER JOIN $wpdb->term_relationships AS term_rel + ON term_rel.object_id = p.ID + INNER JOIN $wpdb->term_taxonomy AS term_tax + ON term_tax.term_taxonomy_id = term_rel.term_taxonomy_id + AND term_tax.taxonomy = %s + AND term_tax.term_id = %d + WHERE p.post_status IN ('publish','inherit') + AND p.post_password = '' + "; + + foreach ( $terms as $term ) { + + $url = array(); + + $tax_noindex = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'noindex' ); + $tax_sitemap_inc = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'sitemap_include' ); + + if ( $tax_noindex === 'noindex' && $tax_sitemap_inc !== 'always' ) { + continue; + } + + if ( $tax_sitemap_inc === 'never' ) { + continue; + } + + $url['loc'] = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'canonical' ); + + if ( ! is_string( $url['loc'] ) || $url['loc'] === '' ) { + + $url['loc'] = get_term_link( $term, $term->taxonomy ); + + if ( $options['trailingslash'] === true ) { + + $url['loc'] = trailingslashit( $url['loc'] ); + } + } + + $url['mod'] = $wpdb->get_var( $wpdb->prepare( $sql, $term->taxonomy, $term->term_id ) ); + $url['images'] = $this->get_image_parser()->get_term_images( $term ); + + // Deprecated, kept for backwards data compat. R. + $url['chf'] = 'daily'; + $url['pri'] = 1; + + /** This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php */ + $url = apply_filters( 'wpseo_sitemap_entry', $url, 'term', $term ); + + if ( ! empty( $url ) ) { + $links[] = $url; + } + } + + return $links; + } + + /** + * Check if taxonomy by name is valid to appear in sitemaps. + * + * @param string $taxonomy_name Taxonomy name to check. + * + * @return bool + */ + public function is_valid_taxonomy( $taxonomy_name ) { + + $options = $this->get_options(); + if ( ! empty( $options[ "taxonomies-{$taxonomy_name}-not_in_sitemap" ] ) ) { + return false; + } + + if ( in_array( $taxonomy_name, array( 'link_category', 'nav_menu' ) ) ) { + return false; + } + + if ( 'post_format' === $taxonomy_name && ! empty( $options['disable-post_format'] ) ) { + return false; + } + + /** + * Filter to exclude the taxonomy from the XML sitemap. + * + * @param boolean $exclude Defaults to false. + * @param string $taxonomy_name Name of the taxonomy to exclude.. + */ + if ( apply_filters( 'wpseo_sitemap_exclude_taxonomy', false, $taxonomy_name ) ) { + return false; + } + + return true; + } + + /** + * Get the Image Parser + * + * @return WPSEO_Sitemap_Image_Parser + */ + protected function get_image_parser() { + if ( ! isset( self::$image_parser ) ) { + self::$image_parser = new WPSEO_Sitemap_Image_Parser(); + } + + return self::$image_parser; + } +} diff --git a/wp-content/plugins/wordpress-seo/inc/sitemaps/interface-sitemap-cache-data.php b/wp-content/plugins/wordpress-seo/inc/sitemaps/interface-sitemap-cache-data.php new file mode 100644 index 0000000..a2b929b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/sitemaps/interface-sitemap-cache-data.php @@ -0,0 +1,56 @@ +get_terms( $id, $taxonomy, $return_single ); +} + +/** + * Generate an HTML sitemap + * + * @deprecated 1.5.5.4 + * @deprecated use plugin Yoast SEO Premium + * @see Yoast SEO Premium + * + * @param array $atts The attributes passed to the shortcode. + * + * @return string + */ +function wpseo_sitemap_handler( $atts ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.5.4', 'Functionality has been discontinued after being in beta, it\'ll be available in the Yoast SEO Premium plugin soon.' ); + + return ''; +} + +add_shortcode( 'wpseo_sitemap', 'wpseo_sitemap_handler' ); + +/** + * Strip out the shortcodes with a filthy regex, because people don't properly register their shortcodes. + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::strip_shortcode() + * @see WPSEO_Utils::strip_shortcode() + * + * @param string $text Input string that might contain shortcodes. + * + * @return string $text string without shortcodes + */ +function wpseo_strip_shortcode( $text ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::strip_shortcode()' ); + + return WPSEO_Utils::strip_shortcode( $text ); +} + +/** + * Do simple reliable math calculations without the risk of wrong results + * + * @see http://floating-point-gui.de/ + * @see the big red warning on http://php.net/language.types.float.php + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::calc() + * @see WPSEO_Utils::calc() + * + * In the rare case that the bcmath extension would not be loaded, it will return the normal calculation results + * + * @since 1.5.0 + * + * @param mixed $number1 Scalar (string/int/float/bool). + * @param string $action Calculation action to execute. + * @param mixed $number2 Scalar (string/int/float/bool). + * @param bool $round Whether or not to round the result. Defaults to false. + * @param int $decimals Decimals for rounding operation. Defaults to 0. + * @param int $precision Calculation precision. Defaults to 10. + * + * @return mixed Calculation Result or false if either or the numbers isn't scalar or + * an invalid operation was passed + */ +function wpseo_calc( $number1, $action, $number2, $round = false, $decimals = 0, $precision = 10 ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::calc()' ); + + return WPSEO_Utils::calc( $number1, $action, $number2, $round, $decimals, $precision ); +} + +/** + * Check if the web server is running on Apache + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::is_apache() + * @see WPSEO_Utils::is_apache() + * + * @return bool + */ +function wpseo_is_apache() { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::is_apache()' ); + + return WPSEO_Utils::is_apache(); +} + +/** + * Check if the web service is running on Nginx + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::is_nginx() + * @see WPSEO_Utils::is_nginx() + * + * @return bool + */ +function wpseo_is_nginx() { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::is_nginx()' ); + + return WPSEO_Utils::is_nginx(); +} + +/** + * List all the available user roles + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::get_roles() + * @see WPSEO_Utils::get_roles() + * + * @return array $roles + */ +function wpseo_get_roles() { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::get_roles()' ); + + return WPSEO_Utils::get_roles(); +} + +/** + * Check whether a url is relative + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::is_url_relative() + * @see WPSEO_Utils::is_url_relative() + * + * @param string $url URL input to check. + * + * @return bool + */ +function wpseo_is_url_relative( $url ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::is_url_relative()' ); + + return WPSEO_Utils::is_url_relative( $url ); +} + +/** + * Standardize whitespace in a string + * + * @deprecated 1.6.1 + * @deprecated use WPSEO_Utils::standardize_whitespace() + * @see WPSEO_Utils::standardize_whitespace() + * + * @since 1.6.0 + * + * @param string $string String input to standardize. + * + * @return string + */ +function wpseo_standardize_whitespace( $string ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::standardize_whitespace()' ); + + return WPSEO_Utils::standardize_whitespace( $string ); +} + +/** + * Initialize sitemaps. Add sitemap & XSL rewrite rules and query vars + * + * @deprecated 2.4 + * @see WPSEO_Sitemaps_Router + */ +function wpseo_xml_sitemaps_init() { + $options = get_option( 'wpseo_xml' ); + if ( $options['enablexmlsitemap'] !== true ) { + return; + } + + // Redirects sitemap.xml to sitemap_index.xml. + add_action( 'template_redirect', 'wpseo_xml_redirect_sitemap', 0 ); + + if ( ! is_object( $GLOBALS['wp'] ) ) { + return; + } + + $GLOBALS['wp']->add_query_var( 'sitemap' ); + $GLOBALS['wp']->add_query_var( 'sitemap_n' ); + $GLOBALS['wp']->add_query_var( 'xsl' ); + add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' ); + add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' ); + add_rewrite_rule( '([a-z]+)?-?sitemap\.xsl$', 'index.php?xsl=$matches[1]', 'top' ); +} + +/** + * Redirect /sitemap.xml to /sitemap_index.xml + * + * @deprecated 2.4 + * @see WPSEO_Sitemaps_Router + */ +function wpseo_xml_redirect_sitemap() { + $current_url = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://'; + $current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] ); + + // Must be 'sitemap.xml' and must be 404. + if ( home_url( '/sitemap.xml' ) == $current_url && $GLOBALS['wp_query']->is_404 ) { + wp_redirect( home_url( '/sitemap_index.xml' ), 301 ); + exit; + } +} + +/** + * This invalidates our XML Sitemaps cache. + * + * @deprecated + * @see WPSEO_Sitemaps_Cache + * + * @param string $type Type of sitemap to invalidate. + */ +function wpseo_invalidate_sitemap_cache( $type ) { + WPSEO_Sitemaps_Cache::invalidate( $type ); +} + +/** + * Invalidate XML sitemap cache for taxonomy / term actions + * + * @deprecated + * @see WPSEO_Sitemaps_Cache + * + * @param int $unused Unused term ID value. + * @param string $type Taxonomy to invalidate. + */ +function wpseo_invalidate_sitemap_cache_terms( $unused, $type ) { + WPSEO_Sitemaps_Cache::invalidate( $type ); +} + +/** + * Invalidate the XML sitemap cache for a post type when publishing or updating a post + * + * @deprecated + * @see WPSEO_Sitemaps_Cache + * + * @param int $post_id Post ID to determine post type for invalidation. + */ +function wpseo_invalidate_sitemap_cache_on_save_post( $post_id ) { + WPSEO_Sitemaps_Cache::invalidate_post( $post_id ); +} + +/** + * Notify search engines of the updated sitemap. + * + * @deprecated + * @see WPSEO_Sitemaps::ping_search_engines() + * + * @param string|null $sitemapurl Optional URL to make the ping for. + */ +function wpseo_ping_search_engines( $sitemapurl = null ) { + WPSEO_Sitemaps::ping_search_engines( $sitemapurl ); +} + +/** + * Create base URL for the sitemaps and applies filters + * + * @since 1.5.7 + * + * @deprecated + * @see WPSEO_Sitemaps_Router::get_base_url() + * + * @param string $page page to append to the base URL. + * + * @return string base URL (incl page) for the sitemaps + */ +function wpseo_xml_sitemaps_base_url( $page ) { + return WPSEO_Sitemaps_Router::get_base_url( $page ); +} diff --git a/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php b/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php new file mode 100644 index 0000000..535928b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php @@ -0,0 +1,294 @@ +ID ); + return $primary_term->get_primary_term(); + } +} + +if ( ! function_exists( 'yoast_get_primary_term' ) ) { + /** + * Get the primary term name + * + * @param string $taxonomy Optional. The taxonomy to get the primary term for. Defaults to category. + * @param null|int|WP_Post $post Optional. Post to get the primary term for. + * + * @return string Name of the primary term. + */ + function yoast_get_primary_term( $taxonomy = 'category', $post = null ) { + $primary_term_id = yoast_get_primary_term_id( $taxonomy, $post ); + + $term = get_term( $primary_term_id ); + if ( ! is_wp_error( $term ) && ! empty( $term ) ) { + return $term->name; + } + + return ''; + } +} + +/** + * Add the bulk edit capability to the proper default roles. + */ +function wpseo_add_capabilities() { + $roles = array( + 'administrator', + 'editor', + ); + + $roles = apply_filters( 'wpseo_bulk_edit_roles', $roles ); + + foreach ( $roles as $role ) { + $r = get_role( $role ); + if ( $r ) { + $r->add_cap( 'wpseo_bulk_edit' ); + } + } +} + + +/** + * Remove the bulk edit capability from the proper default roles. + * + * Contributor is still removed for legacy reasons. + */ +function wpseo_remove_capabilities() { + $roles = array( + 'administrator', + 'editor', + 'author', + 'contributor', + ); + + $roles = apply_filters( 'wpseo_bulk_edit_roles', $roles ); + + foreach ( $roles as $role ) { + $r = get_role( $role ); + if ( $r ) { + $r->remove_cap( 'wpseo_bulk_edit' ); + } + } +} + + +/** + * Replace `%%variable_placeholders%%` with their real value based on the current requested page/post/cpt + * + * @param string $string the string to replace the variables in. + * @param object $args the object some of the replacement values might come from, could be a post, taxonomy or term. + * @param array $omit variables that should not be replaced by this function. + * + * @return string + */ +function wpseo_replace_vars( $string, $args, $omit = array() ) { + $replacer = new WPSEO_Replace_Vars; + + return $replacer->replace( $string, $args, $omit ); +} + +/** + * Register a new variable replacement + * + * This function is for use by other plugins/themes to easily add their own additional variables to replace. + * This function should be called from a function on the 'wpseo_register_extra_replacements' action hook. + * The use of this function is preferred over the older 'wpseo_replacements' filter as a way to add new replacements. + * The 'wpseo_replacements' filter should still be used to adjust standard WPSEO replacement values. + * The function can not be used to replace standard WPSEO replacement value functions and will thrown a warning + * if you accidently try. + * To avoid conflicts with variables registered by WPSEO and other themes/plugins, try and make the + * name of your variable unique. Variable names also can not start with "%%cf_" or "%%ct_" as these are reserved + * for the standard WPSEO variable variables 'cf_', 'ct_' and + * 'ct_desc_'. + * The replacement function will be passed the undelimited name (i.e. stripped of the %%) of the variable + * to replace in case you need it. + * + * Example code: + * + * + * + * + * @since 1.5.4 + * + * @param string $var The name of the variable to replace, i.e. '%%var%%' + * - the surrounding %% are optional, name can only contain [A-Za-z0-9_-]. + * @param mixed $replace_function Function or method to call to retrieve the replacement value for the variable + * Uses the same format as add_filter/add_action function parameter and + * should *return* the replacement value. DON'T echo it. + * @param string $type Type of variable: 'basic' or 'advanced', defaults to 'advanced'. + * @param string $help_text Help text to be added to the help tab for this variable. + * + * @return bool Whether the replacement function was succesfully registered + */ +function wpseo_register_var_replacement( $var, $replace_function, $type = 'advanced', $help_text = '' ) { + return WPSEO_Replace_Vars::register_replacement( $var, $replace_function, $type, $help_text ); +} + +/** + * WPML plugin support: Set titles for custom types / taxonomies as translatable. + * It adds new keys to a wpml-config.xml file for a custom post type title, metadesc, title-ptarchive and metadesc-ptarchive fields translation. + * Documentation: http://wpml.org/documentation/support/language-configuration-files/ + * + * @global $sitepress + * + * @param array $config WPML configuration data to filter. + * + * @return array + */ +function wpseo_wpml_config( $config ) { + global $sitepress; + + if ( ( is_array( $config ) && isset( $config['wpml-config']['admin-texts']['key'] ) ) && ( is_array( $config['wpml-config']['admin-texts']['key'] ) && $config['wpml-config']['admin-texts']['key'] !== array() ) ) { + $admin_texts = $config['wpml-config']['admin-texts']['key']; + foreach ( $admin_texts as $k => $val ) { + if ( $val['attr']['name'] === 'wpseo_titles' ) { + $translate_cp = array_keys( $sitepress->get_translatable_documents() ); + if ( is_array( $translate_cp ) && $translate_cp !== array() ) { + foreach ( $translate_cp as $post_type ) { + $admin_texts[ $k ]['key'][]['attr']['name'] = 'title-' . $post_type; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metadesc-' . $post_type; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metakey-' . $post_type; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'title-ptarchive-' . $post_type; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metadesc-ptarchive-' . $post_type; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metakey-ptarchive-' . $post_type; + + $translate_tax = $sitepress->get_translatable_taxonomies( false, $post_type ); + if ( is_array( $translate_tax ) && $translate_tax !== array() ) { + foreach ( $translate_tax as $taxonomy ) { + $admin_texts[ $k ]['key'][]['attr']['name'] = 'title-tax-' . $taxonomy; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metadesc-tax-' . $taxonomy; + $admin_texts[ $k ]['key'][]['attr']['name'] = 'metakey-tax-' . $taxonomy; + } + } + } + } + break; + } + } + $config['wpml-config']['admin-texts']['key'] = $admin_texts; + } + + return $config; +} + +add_filter( 'icl_wpml_config_array', 'wpseo_wpml_config' ); + +/** + * Yoast SEO breadcrumb shortcode + * [wpseo_breadcrumb] + * + * @return string + */ +function wpseo_shortcode_yoast_breadcrumb() { + return yoast_breadcrumb( '', '', false ); +} + +add_shortcode( 'wpseo_breadcrumb', 'wpseo_shortcode_yoast_breadcrumb' ); + +/** + * Emulate PHP native ctype_digit() function for when the ctype extension would be disabled *sigh* + * Only emulates the behaviour for when the input is a string, does not handle integer input as ascii value + * + * @param string $string + * + * @return bool + */ +if ( ! extension_loaded( 'ctype' ) || ! function_exists( 'ctype_digit' ) ) { + + /** + * @param string $string String input to validate. + * + * @return bool + */ + function ctype_digit( $string ) { + $return = false; + if ( ( is_string( $string ) && $string !== '' ) && preg_match( '`^\d+$`', $string ) === 1 ) { + $return = true; + } + + return $return; + } +} + +/** + * Makes sure the taxonomy meta is updated when a taxonomy term is split. + * + * @link https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/ Article explaining the taxonomy term splitting in WP 4.2. + * + * @param string $old_term_id Old term id of the taxonomy term that was splitted. + * @param string $new_term_id New term id of the taxonomy term that was splitted. + * @param string $term_taxonomy_id Term taxonomy id for the taxonomy that was affected. + * @param string $taxonomy The taxonomy that the taxonomy term was splitted for. + */ +function wpseo_split_shared_term( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { + $tax_meta = get_option( 'wpseo_taxonomy_meta', array() ); + + if ( ! empty( $tax_meta[ $taxonomy ][ $old_term_id ] ) ) { + $tax_meta[ $taxonomy ][ $new_term_id ] = $tax_meta[ $taxonomy ][ $old_term_id ]; + unset( $tax_meta[ $taxonomy ][ $old_term_id ] ); + update_option( 'wpseo_taxonomy_meta', $tax_meta ); + } +} + +add_action( 'split_shared_term', 'wpseo_split_shared_term', 10, 4 ); diff --git a/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php b/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php new file mode 100644 index 0000000..272c9a1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php @@ -0,0 +1,538 @@ +ID ); + + if ( $analysis_seo->is_enabled() ) { + $score = wpseo_adminbar_seo_score(); + } + elseif ( $analysis_readability->is_enabled() ) { + $score = wpseo_adminbar_content_score(); + } + } + + if ( is_category() || is_tag() || (WPSEO_Taxonomy::is_term_edit( $GLOBALS['pagenow'] ) && ! WPSEO_Taxonomy::is_term_overview( $GLOBALS['pagenow'] ) ) || is_tax() ) { + if ( $analysis_seo->is_enabled() ) { + $score = wpseo_tax_adminbar_seo_score(); + } + elseif ( $analysis_readability->is_enabled() ) { + $score = wpseo_tax_adminbar_content_score(); + } + } + + // Never display notifications for network admin. + $counter = ''; + + // Set the top level menu item content for admins and network admins. + if ( $user_is_admin_or_networkadmin ) { + + // Link the top level menu item to the Yoast Dashboard page. + $seo_url = get_admin_url( null, 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ); + // Since admins will get a real link, there's no need for a tabindex attribute. + $top_level_link_tabindex = false; + + if ( '' === $score ) { + + // Notification information. + $notification_center = Yoast_Notification_Center::get(); + $notification_count = $notification_center->get_notification_count(); + $new_notifications = $notification_center->get_new_notifications(); + $new_notifications_count = count( $new_notifications ); + + if ( $notification_count > 0 ) { + // Always show Alerts page when clicking on the main link. + /* translators: %s: number of notifications */ + $counter_screen_reader_text = sprintf( _n( '%s notification', '%s notifications', $notification_count, 'wordpress-seo' ), number_format_i18n( $notification_count ) ); + $counter = sprintf( '
    %s
    ', $notification_count, $counter_screen_reader_text ); + } + + if ( $new_notifications_count ) { + $notification = sprintf( + /* translators: %d resolves to the number of alerts being added. */ + _n( 'You have a new issue concerning your SEO!', 'You have %d new issues concerning your SEO!', $new_notifications_count, 'wordpress-seo' ), + $new_notifications_count + ); + $counter .= '
    ' . $notification . '
    '; + } + } + } + + $title = ''; + + $wp_admin_bar->add_menu( array( + 'id' => 'wpseo-menu', + 'title' => $title . $score . $counter, + 'href' => $seo_url, + 'meta' => array( 'tabindex' => $top_level_link_tabindex ), + ) ); + if ( ! empty( $notification_count ) ) { + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-menu', + 'id' => 'wpseo-notifications', + 'title' => __( 'Notifications', 'wordpress-seo' ) . $counter, + 'href' => $seo_url, + 'meta' => array( 'tabindex' => $top_level_link_tabindex ), + ) ); + } + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-menu', + 'id' => 'wpseo-kwresearch', + 'title' => __( 'Keyword Research', 'wordpress-seo' ), + 'meta' => array( 'tabindex' => '0' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-kwresearch', + 'id' => 'wpseo-adwordsexternal', + 'title' => __( 'AdWords External', 'wordpress-seo' ), + 'href' => 'http://adwords.google.com/keywordplanner', + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-kwresearch', + 'id' => 'wpseo-googleinsights', + 'title' => __( 'Google Trends', 'wordpress-seo' ), + 'href' => 'https://www.google.com/trends/explore#q=' . urlencode( $focuskw ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-kwresearch', + 'id' => 'wpseo-wordtracker', + 'title' => __( 'SEO Book', 'wordpress-seo' ), + 'href' => 'http://tools.seobook.com/keyword-tools/seobook/?keyword=' . urlencode( $focuskw ), + 'meta' => array( 'target' => '_blank' ), + ) ); + + if ( ! is_admin() ) { + $url = WPSEO_Frontend::get_instance()->canonical( false ); + + if ( is_string( $url ) ) { + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-menu', + 'id' => 'wpseo-analysis', + 'title' => __( 'Analyze this page', 'wordpress-seo' ), + 'meta' => array( 'tabindex' => '0' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-inlinks-ose', + 'title' => __( 'Check Inlinks (OSE)', 'wordpress-seo' ), + 'href' => '//moz.com/researchtools/ose/links?site=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-kwdensity', + 'title' => __( 'Check Keyword Density', 'wordpress-seo' ), + // HTTPS not available. + 'href' => 'http://www.zippy.co.uk/keyworddensity/index.php?url=' . urlencode( $url ) . '&keyword=' . urlencode( $focuskw ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-cache', + 'title' => __( 'Check Google Cache', 'wordpress-seo' ), + 'href' => '//webcache.googleusercontent.com/search?strip=1&q=cache:' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-header', + 'title' => __( 'Check Headers', 'wordpress-seo' ), + 'href' => '//quixapp.com/headers/?r=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-structureddata', + 'title' => __( 'Google Structured Data Test', 'wordpress-seo' ), + 'href' => 'https://search.google.com/structured-data/testing-tool#url=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-facebookdebug', + 'title' => __( 'Facebook Debugger', 'wordpress-seo' ), + 'href' => '//developers.facebook.com/tools/debug/og/object?q=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-pinterestvalidator', + 'title' => __( 'Pinterest Rich Pins Validator', 'wordpress-seo' ), + 'href' => 'https://developers.pinterest.com/tools/url-debugger/?link=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-htmlvalidation', + 'title' => __( 'HTML Validator', 'wordpress-seo' ), + 'href' => '//validator.w3.org/check?uri=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-cssvalidation', + 'title' => __( 'CSS Validator', 'wordpress-seo' ), + 'href' => '//jigsaw.w3.org/css-validator/validator?uri=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-pagespeed', + 'title' => __( 'Google Page Speed Test', 'wordpress-seo' ), + 'href' => '//developers.google.com/speed/pagespeed/insights/?url=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-microsoftedge', + 'title' => __( 'Microsoft Edge Site Scan', 'wordpress-seo' ), + 'href' => 'https://developer.microsoft.com/en-us/microsoft-edge/tools/staticscan/?url=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-analysis', + 'id' => 'wpseo-google-mobile-friendly', + 'title' => __( 'Mobile-Friendly Test', 'wordpress-seo' ), + 'href' => 'https://www.google.com/webmasters/tools/mobile-friendly/?url=' . urlencode( $url ), + 'meta' => array( 'target' => '_blank' ), + ) ); + } + } + + // @todo: add links to bulk title and bulk description edit pages. + if ( $user_is_admin_or_networkadmin ) { + + $advanced_settings = wpseo_advanced_settings_enabled( $options ); + + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-menu', + 'id' => 'wpseo-settings', + 'title' => __( 'SEO Settings', 'wordpress-seo' ), + 'meta' => array( 'tabindex' => '0' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-general', + 'title' => __( 'Dashboard', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_dashboard' ), + ) ); + if ( $advanced_settings ) { + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-titles', + 'title' => __( 'Titles & Metas', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_titles' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-social', + 'title' => __( 'Social', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_social' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-xml', + 'title' => __( 'XML Sitemaps', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_xml' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-wpseo-advanced', + 'title' => __( 'Advanced', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_advanced' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-tools', + 'title' => __( 'Tools', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_tools' ), + ) ); + } + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-search-console', + 'title' => __( 'Search Console', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_search_console' ), + ) ); + $wp_admin_bar->add_menu( array( + 'parent' => 'wpseo-settings', + 'id' => 'wpseo-licenses', + 'title' => __( 'Go Premium', 'wordpress-seo' ), + 'href' => admin_url( 'admin.php?page=wpseo_licenses' ), + ) ); + } + +} + +/** + * Returns the SEO score element for the admin bar. + * + * @return string + */ +function wpseo_adminbar_seo_score() { + $rating = WPSEO_Meta::get_value( 'linkdex', get_the_ID() ); + + return wpseo_adminbar_score( $rating ); +} + +/** + * Returns the content score element for the adminbar. + * + * @return string + */ +function wpseo_adminbar_content_score() { + $rating = WPSEO_Meta::get_value( 'content_score', get_the_ID() ); + + return wpseo_adminbar_score( $rating ); +} + +/** + * Returns the SEO score element for the adminbar. + * + * @return string + */ +function wpseo_tax_adminbar_seo_score() { + $rating = 0; + + if ( is_tax() || is_category() || is_tag() ) { + $rating = WPSEO_Taxonomy_Meta::get_meta_without_term( 'linkdex' ); + } + + return wpseo_adminbar_score( $rating ); +} + +/** + * Returns the Content score element for the adminbar. + * + * @return string + */ +function wpseo_tax_adminbar_content_score() { + $rating = 0; + + if ( is_tax() || is_category() || is_tag() ) { + $rating = WPSEO_Taxonomy_Meta::get_meta_without_term( 'content_score' ); + } + + return wpseo_adminbar_score( $rating ); +} + +/** + * Takes The SEO score and makes the score icon for the adminbar with it. + * + * @param int $score The 0-100 rating of the score. Can be either SEO score or content score. + * + * @return string $score_adminbar_element + */ +function wpseo_adminbar_score( $score ) { + $score = WPSEO_Utils::translate_score( $score ); + + $score_adminbar_element = '
    '; + return $score_adminbar_element; +} + +add_action( 'admin_bar_menu', 'wpseo_admin_bar_menu', 95 ); + +/** + * Enqueue CSS to format the Yoast SEO adminbar item. + */ +function wpseo_admin_bar_style() { + + if ( ! is_admin_bar_showing() ) { + return; + } + + $asset_manager = new WPSEO_Admin_Asset_Manager(); + $asset_manager->register_assets(); + $asset_manager->enqueue_style( 'adminbar' ); +} + +add_action( 'wp_enqueue_scripts', 'wpseo_admin_bar_style' ); +add_action( 'admin_enqueue_scripts', 'wpseo_admin_bar_style' ); + +/** + * Allows editing of the meta fields through weblog editors like Marsedit. + * + * @param array $allcaps Capabilities that must all be true to allow action. + * @param array $cap Array of capabilities to be checked, unused here. + * @param array $args List of arguments for the specific cap to be checked. + * + * @return array $allcaps + */ +function allow_custom_field_edits( $allcaps, $cap, $args ) { + // $args[0] holds the capability. + // $args[2] holds the post ID. + // $args[3] holds the custom field. + // Make sure the request is to edit or add a post meta (this is usually also the second value in $cap, + // but this is safer to check). + if ( in_array( $args[0], array( 'edit_post_meta', 'add_post_meta' ) ) ) { + // Only allow editing rights for users who have the rights to edit this post and make sure + // the meta value starts with _yoast_wpseo (WPSEO_Meta::$meta_prefix). + if ( ( isset( $args[2] ) && current_user_can( 'edit_post', $args[2] ) ) && ( ( isset( $args[3] ) && $args[3] !== '' ) && strpos( $args[3], WPSEO_Meta::$meta_prefix ) === 0 ) ) { + $allcaps[ $args[0] ] = true; + } + } + + return $allcaps; +} + +add_filter( 'user_has_cap', 'allow_custom_field_edits', 0, 3 ); + +/** + * Detects if the advanced settings are enabled. + * + * @param array $wpseo_options The wpseo settings. + * + * @returns boolean True if the advanced settings are enabled, false if not. + */ +function wpseo_advanced_settings_enabled( $wpseo_options ) { + return ( $wpseo_options['enable_setting_pages'] === true ); +} + +/********************** DEPRECATED FUNCTIONS **********************/ + +/** + * Set the default settings. + * + * @deprecated 1.5.0 + * @deprecated use WPSEO_Options::initialize() + * @see WPSEO_Options::initialize() + */ +function wpseo_defaults() { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.0', 'WPSEO_Options::initialize()' ); + WPSEO_Options::initialize(); +} + +/** + * Translates a decimal analysis score into a textual one. + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::translate_score() + * @see WPSEO_Utils::translate_score() + * + * @param int $val The decimal score to translate. + * @param bool $css_value Whether to return the i18n translated score or the CSS class value. + * + * @return string + */ +function wpseo_translate_score( $val, $css_value = true ) { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::translate_score()' ); + + return WPSEO_Utils::translate_score(); +} + +/** + * Check whether file editing is allowed for the .htaccess and robots.txt files + * + * @deprecated 1.5.6.1 + * @deprecated use WPSEO_Utils::allow_system_file_edit() + * @see WPSEO_Utils::allow_system_file_edit() + * + * @internal current_user_can() checks internally whether a user is on wp-ms and adjusts accordingly. + * + * @return bool + */ +function wpseo_allow_system_file_edit() { + _deprecated_function( __FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::allow_system_file_edit()' ); + + return WPSEO_Utils::allow_system_file_edit(); +} + +/** + * Test whether force rewrite should be enabled or not. + * + * @deprecated 3.3 + * + * @return void + */ +function wpseo_title_test() { + _deprecated_function( __FUNCTION__, 'WPSEO 3.3.0' ); +} + +/** + * Test whether the active theme contains a description tag. + * + * @since 1.4.14 Moved from dashboard.php and adjusted - see changelog + * + * @deprecated 3.3 + * + * @return void + */ +function wpseo_description_test() { + _deprecated_function( __FUNCTION__, 'WPSEO 3.3.0' ); +} + +/** + * Check if the current theme was updated and if so, test the updated theme + * for the title and meta description tag + * + * @since 1.4.14 + * + * @deprecated 3.3 + * + * @param WP_Upgrader $upgrader_object Upgrader object instance. + * @param array $context_array Context data array. + * @param mixed $themes Optional themes set. + * + * @return void + */ +function wpseo_upgrader_process_complete( $upgrader_object, $context_array, $themes = null ) { + _deprecated_function( __FUNCTION__, 'WPSEO 3.3.0' ); +} + +/** + * Abuse a filter to check if the current theme was updated and if so, test the updated theme + * for the title and meta description tag + * + * @since 1.4.14 + * @deprecated 3.3 + * + * @param array $update_actions Updated actions set. + * @param WP_Theme|string $updated_theme Theme object instance or stylesheet name. + */ +function wpseo_update_theme_complete_actions( $update_actions, $updated_theme ) { + _deprecated_function( __FUNCTION__, 'WPSEO 3.3.0' ); +} diff --git a/wp-content/plugins/wordpress-seo/index.php b/wp-content/plugins/wordpress-seo/index.php new file mode 100644 index 0000000..e94d9a4 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/index.php @@ -0,0 +1,4 @@ +/,"")}},{key:"stripMessage",value:function(a){return a.endsWith("0 - ",4)?a.slice(4):a}},{key:"sendChangeEvent",value:function(){var a={target:{name:"mailchimpSignup",value:{hasSignup:this.state.successfulSignup}}};this.onChange(a)}},{key:"getLoadingIndicator",value:function(){return this.state.isLoading?j.default.createElement("div",{className:"yoast-wizard-overlay"},j.default.createElement(q.default,null)):null}},{key:"render",value:function(){if(this.skipRendering())return null;this.onChange=this.props.onChange;var a=j.default.createElement("input",{id:"mailchimpEmail",className:"yoast-wizard-text-input-field",ref:"emailInput",type:"text",name:this.props.name,defaultValue:this.props.properties.currentUserEmail}),b=j.default.createElement(n.default,{label:this.props.translate("Sign Up!"),onClick:this.signup.bind(this)}),c=this.getSignupMessage(),d=this.getLoadingIndicator();return j.default.createElement("div",null,j.default.createElement("h2",null,this.props.properties.title),j.default.createElement("p",null,this.props.properties.label),j.default.createElement("div",{className:"yoast-wizard-text-input"},j.default.createElement("label",{htmlFor:"mailchimpName",className:"yoast-wizard-text-input-label"},this.props.translate("Name")),j.default.createElement("input",{id:"mailchimpName",className:"yoast-wizard-text-input-field",ref:"nameInput",type:"text",name:"name",defaultValue:this.props.properties.userName})),j.default.createElement("div",{className:"yoast-wizard-text-input"},j.default.createElement("label",{htmlFor:"mailchimpEmail",className:"yoast-wizard-text-input-label"},this.props.translate("Email")),a),b,c,d)}},{key:"skipRendering",value:function(){var a=this.props.stepState,b="success"===a.currentStep,c=a.fieldValues.intro.mailchimpSignup.hasSignup===!0;return b&&c}},{key:"getSignupMessage",value:function(){return this.state.successfulSignup?j.default.createElement("p",{className:"yoast-wizard-mailchimp-message-success","aria-live":"assertive"},this.state.message):j.default.createElement("p",{className:"yoast-wizard-mailchimp-message-error","aria-live":"assertive"},this.state.message)}}]),b}(j.default.Component);r.propTypes={translate:j.default.PropTypes.func.isRequired,title:j.default.PropTypes.string,component:j.default.PropTypes.string,name:j.default.PropTypes.string.isRequired,properties:j.default.PropTypes.object,data:j.default.PropTypes.string,onChange:j.default.PropTypes.func,value:j.default.PropTypes.shape({hasSignup:j.default.PropTypes.bool}),stepState:j.default.PropTypes.object},r.defaultProps={title:"Mailchimp signup",component:"",properties:{},data:"",value:{hasSignup:!1}},c.default=(0,o.localize)(r)},{"material-ui/RaisedButton":469,react:677,"yoast-components/composites/OnboardingWizard/LoadingIndicator":693,"yoast-components/composites/OnboardingWizard/helpers/ajaxHelper":703,"yoast-components/utils/i18n":715}],3:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1&&c[1]||""}function c(b){var c=a.match(b);return c&&c.length>1&&c[2]||""}var d,e=b(/(ipod|iphone|ipad)/i).toLowerCase(),f=/like android/i.test(a),h=!f&&/android/i.test(a),i=/nexus\s*[0-6]\s*/i.test(a),j=!i&&/nexus\s*[0-9]+/i.test(a),k=/CrOS/.test(a),l=/silk/i.test(a),m=/sailfish/i.test(a),n=/tizen/i.test(a),o=/(web|hpw)os/i.test(a),p=/windows phone/i.test(a),q=(/SamsungBrowser/i.test(a),!p&&/windows/i.test(a)),r=!e&&!l&&/macintosh/i.test(a),s=!h&&!m&&!n&&!o&&/linux/i.test(a),t=b(/edge\/(\d+(\.\d+)?)/i),u=b(/version\/(\d+(\.\d+)?)/i),v=/tablet/i.test(a),w=!v&&/[^-]mobi/i.test(a),x=/xbox/i.test(a);/opera/i.test(a)?d={name:"Opera",opera:g,version:u||b(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr|opios/i.test(a)?d={name:"Opera",opera:g,version:b(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||u}:/SamsungBrowser/i.test(a)?d={name:"Samsung Internet for Android",samsungBrowser:g,version:u||b(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(a)?d={name:"Opera Coast",coast:g,version:u||b(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(a)?d={name:"Yandex Browser",yandexbrowser:g,version:u||b(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?d={name:"UC Browser",ucbrowser:g,version:b(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?d={name:"Maxthon",maxthon:g,version:b(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?d={name:"Epiphany",epiphany:g,version:b(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?d={name:"Puffin",puffin:g,version:b(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?d={name:"Sleipnir",sleipnir:g,version:b(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?d={name:"K-Meleon",kMeleon:g,version:b(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:p?(d={name:"Windows Phone",windowsphone:g},t?(d.msedge=g,d.version=t):(d.msie=g,d.version=b(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?d={name:"Internet Explorer",msie:g,version:b(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:k?d={name:"Chrome",chromeos:g,chromeBook:g,chrome:g,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(a)?d={name:"Microsoft Edge",msedge:g,version:t}:/vivaldi/i.test(a)?d={name:"Vivaldi",vivaldi:g,version:b(/vivaldi\/(\d+(\.\d+)?)/i)||u}:m?d={name:"Sailfish",sailfish:g,version:b(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?d={name:"SeaMonkey",seamonkey:g,version:b(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(d={name:"Firefox",firefox:g,version:b(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(d.firefoxos=g)):l?d={name:"Amazon Silk",silk:g,version:b(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?d={name:"PhantomJS",phantom:g,version:b(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?d={name:"SlimerJS",slimer:g,version:b(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?d={name:"BlackBerry",blackberry:g,version:u||b(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:o?(d={name:"WebOS",webos:g,version:u||b(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(d.touchpad=g)):/bada/i.test(a)?d={name:"Bada",bada:g,version:b(/dolfin\/(\d+(\.\d+)?)/i)}:n?d={name:"Tizen",tizen:g,version:b(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||u}:/qupzilla/i.test(a)?d={name:"QupZilla",qupzilla:g,version:b(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||u}:/chromium/i.test(a)?d={name:"Chromium",chromium:g,version:b(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||u}:/chrome|crios|crmo/i.test(a)?d={name:"Chrome",chrome:g,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:h?d={name:"Android",version:u}:/safari|applewebkit/i.test(a)?(d={name:"Safari",safari:g},u&&(d.version=u)):e?(d={name:"iphone"==e?"iPhone":"ipad"==e?"iPad":"iPod"},u&&(d.version=u)):d=/googlebot/i.test(a)?{name:"Googlebot",googlebot:g,version:b(/googlebot\/(\d+(\.\d+))/i)||u}:{name:b(/^(.*)\/(.*) /),version:c(/^(.*)\/(.*) /)},!d.msedge&&/(apple)?webkit/i.test(a)?(/(apple)?webkit\/537\.36/i.test(a)?(d.name=d.name||"Blink",d.blink=g):(d.name=d.name||"Webkit",d.webkit=g),!d.version&&u&&(d.version=u)):!d.opera&&/gecko\//i.test(a)&&(d.name=d.name||"Gecko",d.gecko=g,d.version=d.version||b(/gecko\/(\d+(\.\d+)?)/i)),d.windowsphone||d.msedge||!h&&!d.silk?d.windowsphone||d.msedge||!e?r?d.mac=g:x?d.xbox=g:q?d.windows=g:s&&(d.linux=g):(d[e]=g,d.ios=g):d.android=g;var y="";d.windowsphone?y=b(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):e?(y=b(/os (\d+([_\s]\d+)*) like mac os x/i),y=y.replace(/[_\s]/g,".")):h?y=b(/android[ \/-](\d+(\.\d+)*)/i):d.webos?y=b(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):d.blackberry?y=b(/rim\stablet\sos\s(\d+(\.\d+)*)/i):d.bada?y=b(/bada\/(\d+(\.\d+)*)/i):d.tizen&&(y=b(/tizen[\/\s](\d+(\.\d+)*)/i)),y&&(d.osversion=y);var z=y.split(".")[0];return v||j||"ipad"==e||h&&(3==z||z>=4&&!w)||d.silk?d.tablet=g:(w||"iphone"==e||"ipod"==e||h||i||d.blackberry||d.webos||d.bada)&&(d.mobile=g),d.msedge||d.msie&&d.version>=10||d.yandexbrowser&&d.version>=15||d.vivaldi&&d.version>=1||d.chrome&&d.version>=20||d.samsungBrowser&&d.version>=4||d.firefox&&d.version>=20||d.safari&&d.version>=6||d.opera&&d.version>=10||d.ios&&d.osversion&&d.osversion.split(".")[0]>=6||d.blackberry&&d.version>=10.1||d.chromium&&d.version>=20?d.a=g:d.msie&&d.version<10||d.chrome&&d.version<20||d.firefox&&d.version<20||d.safari&&d.version<6||d.opera&&d.version<10||d.ios&&d.osversion&&d.osversion.split(".")[0]<6||d.chromium&&d.version<20?d.c=g:d.x=g,d}function b(a){return a.split(".").length}function c(a,b){var c,d=[];if(Array.prototype.map)return Array.prototype.map.call(a,b);for(c=0;c=0;){if(e[0][d]>e[1][d])return 1;if(e[0][d]!==e[1][d])return-1;if(0===d)return 0}}function e(b,c,e){var f=h;"string"==typeof c&&(e=c,c=void 0),void 0===c&&(c=!1),e&&(f=a(e));var g=""+f.version;for(var i in b)if(b.hasOwnProperty(i)&&f[i]){if("string"!=typeof b[i])throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(b));return d([g,b[i]])<0}return c}function f(a,b,c){return!e(a,b,c)}var g=!0,h=a("undefined"!=typeof navigator?navigator.userAgent||"":"");return h.test=function(a){for(var b=0;b2?arguments[2]:void 0,k=Math.min((void 0===j?g:e(j,g))-i,g-h),l=1;for(i0;)i in c?c[h]=c[i]:delete c[h],h+=l,i+=l;return c}},{"./_to-index":110,"./_to-length":113,"./_to-object":114}],14:[function(a,b,c){"use strict";var d=a("./_to-object"),e=a("./_to-index"),f=a("./_to-length");b.exports=function(a){for(var b=d(this),c=f(b.length),g=arguments.length,h=e(g>1?arguments[1]:void 0,c),i=g>2?arguments[2]:void 0,j=void 0===i?c:e(i,c);j>h;)b[h++]=a;return b}},{"./_to-index":110,"./_to-length":113,"./_to-object":114}],15:[function(a,b,c){var d=a("./_for-of");b.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},{"./_for-of":42}],16:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_to-length"),f=a("./_to-index");b.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},{"./_to-index":110,"./_to-iobject":112,"./_to-length":113}],17:[function(a,b,c){var d=a("./_ctx"),e=a("./_iobject"),f=a("./_to-object"),g=a("./_to-length"),h=a("./_array-species-create");b.exports=function(a,b){var c=1==a,i=2==a,j=3==a,k=4==a,l=6==a,m=5==a||l,n=b||h;return function(b,h,o){for(var p,q,r=f(b),s=e(r),t=d(h,o,3),u=g(s.length),v=0,w=c?n(b,u):i?n(b,0):void 0;u>v;v++)if((m||v in s)&&(p=s[v],q=t(p,v,r),a))if(c)w[v]=q;else if(q)switch(a){case 3:return!0;case 5:return p;case 6:return v;case 2:w.push(p)}else if(k)return!1;return l?-1:j||k?k:w}}},{"./_array-species-create":20,"./_ctx":30,"./_iobject":50,"./_to-length":113,"./_to-object":114}],18:[function(a,b,c){var d=a("./_a-function"),e=a("./_to-object"),f=a("./_iobject"),g=a("./_to-length");b.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},{"./_a-function":8,"./_iobject":50,"./_to-length":113,"./_to-object":114}],19:[function(a,b,c){var d=a("./_is-object"),e=a("./_is-array"),f=a("./_wks")("species");b.exports=function(a){var b;return e(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!e(b.prototype)||(b=void 0),d(b)&&(b=b[f],null===b&&(b=void 0))),void 0===b?Array:b}},{"./_is-array":52,"./_is-object":54,"./_wks":122}],20:[function(a,b,c){var d=a("./_array-species-constructor");b.exports=function(a,b){return new(d(a))(b)}},{"./_array-species-constructor":19}],21:[function(a,b,c){"use strict";var d=a("./_a-function"),e=a("./_is-object"),f=a("./_invoke"),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e1?arguments[1]:void 0,3);b=b?b.n:this._f;)for(c(b.v,b.k,this);b&&b.r;)b=b.p},has:function(a){return!!q(this,a)}}),n&&d(l.prototype,"size",{get:function(){return i(this[p])}}),l},def:function(a,b,c){var d,e,f=q(a,b);return f?f.v=c:(a._l=f={i:e=o(b,!0),k:b,v:c,p:d=a._l,n:void 0,r:!1},a._f||(a._f=f),d&&(d.n=f),a[p]++,"F"!==e&&(a._i[e]=f)),a},getEntry:q,setStrong:function(a,b,c){k(a,b,function(a,b){this._t=a,this._k=b,this._l=void 0},function(){for(var a=this,b=a._k,c=a._l;c&&c.r;)c=c.p;return a._t&&(a._l=c=c?c.n:a._t._f)?"keys"==b?l(0,c.k):"values"==b?l(0,c.v):l(0,[c.k,c.v]):(a._t=void 0,l(1))},c?"entries":"values",!c,!0),m(b)}}},{"./_an-instance":11,"./_ctx":30,"./_defined":32,"./_descriptors":33,"./_for-of":42,"./_iter-define":58,"./_iter-step":60,"./_meta":67,"./_object-create":71,"./_object-dp":72,"./_redefine-all":91,"./_set-species":96}],25:[function(a,b,c){var d=a("./_classof"),e=a("./_array-from-iterable");b.exports=function(a){return function(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},{"./_array-from-iterable":15,"./_classof":22}],26:[function(a,b,c){"use strict";var d=a("./_redefine-all"),e=a("./_meta").getWeak,f=a("./_an-object"),g=a("./_is-object"),h=a("./_an-instance"),i=a("./_for-of"),j=a("./_array-methods"),k=a("./_has"),l=j(5),m=j(6),n=0,o=function(a){return a._l||(a._l=new p)},p=function(){this.a=[]},q=function(a,b){return l(a.a,function(a){return a[0]===b})};p.prototype={get:function(a){var b=q(this,a);if(b)return b[1]},has:function(a){return!!q(this,a)},set:function(a,b){var c=q(this,a);c?c[1]=b:this.a.push([a,b])},delete:function(a){var b=m(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},b.exports={getConstructor:function(a,b,c,f){var j=a(function(a,d){h(a,j,b,"_i"),a._i=n++,a._l=void 0,void 0!=d&&i(d,c,a[f],a)});return d(j.prototype,{delete:function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this).delete(a):b&&k(b,this._i)&&delete b[this._i]},has:function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this).has(a):b&&k(b,this._i)}}),j},def:function(a,b,c){var d=e(f(b),!0);return d===!0?o(a).set(b,c):d[a._i]=c,a},ufstore:o}},{"./_an-instance":11,"./_an-object":12,"./_array-methods":17,"./_for-of":42,"./_has":44,"./_is-object":54,"./_meta":67,"./_redefine-all":91}],27:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_export"),f=a("./_redefine"),g=a("./_redefine-all"),h=a("./_meta"),i=a("./_for-of"),j=a("./_an-instance"),k=a("./_is-object"),l=a("./_fails"),m=a("./_iter-detect"),n=a("./_set-to-string-tag"),o=a("./_inherit-if-required");b.exports=function(a,b,c,p,q,r){var s=d[a],t=s,u=q?"set":"add",v=t&&t.prototype,w={},x=function(a){var b=v[a];f(v,a,"delete"==a?function(a){return!(r&&!k(a))&&b.call(this,0===a?0:a)}:"has"==a?function(a){return!(r&&!k(a))&&b.call(this,0===a?0:a)}:"get"==a?function(a){return r&&!k(a)?void 0:b.call(this,0===a?0:a)}:"add"==a?function(a){return b.call(this,0===a?0:a),this}:function(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof t&&(r||v.forEach&&!l(function(){(new t).entries().next()}))){var y=new t,z=y[u](r?{}:-0,1)!=y,A=l(function(){y.has(1)}),B=m(function(a){new t(a)}),C=!r&&l(function(){for(var a=new t,b=5;b--;)a[u](b,b);return!a.has(-0)});B||(t=b(function(b,c){j(b,t,a);var d=o(new s,b,t);return void 0!=c&&i(c,q,d[u],d),d}),t.prototype=v,v.constructor=t),(A||C)&&(x("delete"),x("has"),q&&x("get")),(C||z)&&x(u),r&&v.clear&&delete v.clear}else t=p.getConstructor(b,a,q,u),g(t.prototype,c),h.NEED=!0;return n(t,a),w[a]=t,e(e.G+e.W+e.F*(t!=s),w),r||p.setStrong(t,a,q),t}},{"./_an-instance":11,"./_export":37,"./_fails":39,"./_for-of":42,"./_global":43,"./_inherit-if-required":48,"./_is-object":54,"./_iter-detect":59,"./_meta":67,"./_redefine":92,"./_redefine-all":91,"./_set-to-string-tag":97}],28:[function(a,b,c){var d=b.exports={version:"2.4.0"};"number"==typeof __e&&(__e=d)},{}],29:[function(a,b,c){"use strict";var d=a("./_object-dp"),e=a("./_property-desc");b.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},{"./_object-dp":72,"./_property-desc":90}],30:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":8}],31:[function(a,b,c){"use strict";var d=a("./_an-object"),e=a("./_to-primitive"),f="number";b.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},{"./_an-object":12,"./_to-primitive":115}],32:[function(a,b,c){b.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},{}],33:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":39}],34:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":43,"./_is-object":54}],35:[function(a,b,c){b.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],36:[function(a,b,c){var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie");b.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},{"./_object-gops":78,"./_object-keys":81,"./_object-pie":82}],37:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_hide"),g=a("./_redefine"),h=a("./_ctx"),i="prototype",j=function(a,b,c){var k,l,m,n,o=a&j.F,p=a&j.G,q=a&j.S,r=a&j.P,s=a&j.B,t=p?d:q?d[b]||(d[b]={}):(d[b]||{})[i],u=p?e:e[b]||(e[b]={}),v=u[i]||(u[i]={});p&&(c=b);for(k in c)l=!o&&t&&void 0!==t[k],m=(l?t:c)[k],n=s&&l?h(m,d):r&&"function"==typeof m?h(Function.call,m):m,t&&g(t,k,m,a&j.U),u[k]!=m&&f(u,k,n),r&&v[k]!=m&&(v[k]=m)};d.core=e,j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,b.exports=j},{"./_core":28,"./_ctx":30,"./_global":43,"./_hide":45,"./_redefine":92}],38:[function(a,b,c){var d=a("./_wks")("match");b.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(a){}}return!0}},{"./_wks":122}],39:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(a){return!0}}},{}],40:[function(a,b,c){"use strict";var d=a("./_hide"),e=a("./_redefine"),f=a("./_fails"),g=a("./_defined"),h=a("./_wks");b.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},{"./_defined":32,"./_fails":39,"./_hide":45,"./_redefine":92,"./_wks":122}],41:[function(a,b,c){"use strict";var d=a("./_an-object");b.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},{"./_an-object":12}],42:[function(a,b,c){var d=a("./_ctx"),e=a("./_iter-call"),f=a("./_is-array-iter"),g=a("./_an-object"),h=a("./_to-length"),i=a("./core.get-iterator-method"),j={},k={},c=b.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};c.BREAK=j,c.RETURN=k},{"./_an-object":12,"./_ctx":30,"./_is-array-iter":51,"./_iter-call":56,"./_to-length":113,"./core.get-iterator-method":123}],43:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],44:[function(a,b,c){var d={}.hasOwnProperty;b.exports=function(a,b){return d.call(a,b)}},{}],45:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":33,"./_object-dp":72,"./_property-desc":90}],46:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":43}],47:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":33,"./_dom-create":34,"./_fails":39}],48:[function(a,b,c){var d=a("./_is-object"),e=a("./_set-proto").set;b.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},{"./_is-object":54,"./_set-proto":95}],49:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],50:[function(a,b,c){var d=a("./_cof");b.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},{"./_cof":23}],51:[function(a,b,c){var d=a("./_iterators"),e=a("./_wks")("iterator"),f=Array.prototype;b.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},{"./_iterators":61,"./_wks":122}],52:[function(a,b,c){var d=a("./_cof");b.exports=Array.isArray||function(a){return"Array"==d(a)}},{"./_cof":23}],53:[function(a,b,c){var d=a("./_is-object"),e=Math.floor;b.exports=function(a){return!d(a)&&isFinite(a)&&e(a)===a}},{"./_is-object":54}],54:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],55:[function(a,b,c){var d=a("./_is-object"),e=a("./_cof"),f=a("./_wks")("match");b.exports=function(a){var b;return d(a)&&(void 0!==(b=a[f])?!!b:"RegExp"==e(a))}},{"./_cof":23,"./_is-object":54,"./_wks":122}],56:[function(a,b,c){var d=a("./_an-object");b.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},{"./_an-object":12}],57:[function(a,b,c){"use strict";var d=a("./_object-create"),e=a("./_property-desc"),f=a("./_set-to-string-tag"),g={};a("./_hide")(g,a("./_wks")("iterator"),function(){return this}),b.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},{"./_hide":45,"./_object-create":71,"./_property-desc":90,"./_set-to-string-tag":97,"./_wks":122}],58:[function(a,b,c){"use strict";var d=a("./_library"),e=a("./_export"),f=a("./_redefine"),g=a("./_hide"),h=a("./_has"),i=a("./_iterators"),j=a("./_iter-create"),k=a("./_set-to-string-tag"),l=a("./_object-gpo"),m=a("./_wks")("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};b.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y,z=function(a){if(!n&&a in D)return D[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},A=b+" Iterator",B=t==q,C=!1,D=a.prototype,E=D[m]||D[o]||t&&D[t],F=E||z(t),G=t?B?z("entries"):F:void 0,H="Array"==b?D.entries||E:E;if(H&&(y=l(H.call(new a)),y!==Object.prototype&&(k(y,A,!0),d||h(y,m)||g(y,m,r))),B&&E&&E.name!==q&&(C=!0,F=function(){return E.call(this)}),d&&!v||!n&&!C&&D[m]||g(D,m,F),i[b]=F,i[A]=r,t)if(w={values:B?F:z(q),keys:u?F:z(p),entries:G},v)for(x in w)x in D||f(D,x,w[x]);else e(e.P+e.F*(n||C),b,w);return w}},{"./_export":37,"./_has":44,"./_hide":45,"./_iter-create":57,"./_iterators":61,"./_library":63,"./_object-gpo":79,"./_redefine":92,"./_set-to-string-tag":97,"./_wks":122}],59:[function(a,b,c){var d=a("./_wks")("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}b.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},{"./_wks":122}],60:[function(a,b,c){b.exports=function(a,b){return{value:b,done:!!a}}},{}],61:[function(a,b,c){b.exports={}},{}],62:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject");b.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},{"./_object-keys":81,"./_to-iobject":112}],63:[function(a,b,c){b.exports=!1},{}],64:[function(a,b,c){var d=Math.expm1;b.exports=!d||d(10)>22025.465794806718||d(10)<22025.465794806718||d(-2e-17)!=-2e-17?function(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:d},{}],65:[function(a,b,c){b.exports=Math.log1p||function(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},{}],66:[function(a,b,c){b.exports=Math.sign||function(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},{}],67:[function(a,b,c){var d=a("./_uid")("meta"),e=a("./_is-object"),f=a("./_has"),g=a("./_object-dp").f,h=0,i=Object.isExtensible||function(){return!0},j=!a("./_fails")(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=b.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},{"./_fails":39,"./_has":44,"./_is-object":54,"./_object-dp":72,"./_uid":119}],68:[function(a,b,c){var d=a("./es6.map"),e=a("./_export"),f=a("./_shared")("metadata"),g=f.store||(f.store=new(a("./es6.weak-map"))),h=function(a,b,c){var e=g.get(a);if(!e){if(!c)return;g.set(a,e=new d)}var f=e.get(b);if(!f){if(!c)return;e.set(b,f=new d)}return f},i=function(a,b,c){var d=h(b,c,!1);return void 0!==d&&d.has(a)},j=function(a,b,c){var d=h(b,c,!1);return void 0===d?void 0:d.get(a)},k=function(a,b,c,d){h(c,d,!0).set(a,b)},l=function(a,b){var c=h(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},m=function(a){return void 0===a||"symbol"==typeof a?a:String(a)},n=function(a){e(e.S,"Reflect",a)};b.exports={store:g,map:h,has:i,get:j,set:k,keys:l,key:m,exp:n}},{"./_export":37,"./_shared":99,"./es6.map":154,"./es6.weak-map":260}],69:[function(a,b,c){var d=a("./_global"),e=a("./_task").set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==a("./_cof")(g);b.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},{"./_cof":23,"./_global":43,"./_task":109}],70:[function(a,b,c){"use strict";var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie"),g=a("./_to-object"),h=a("./_iobject"),i=Object.assign;b.exports=!i||a("./_fails")(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},{"./_fails":39,"./_iobject":50,"./_object-gops":78,"./_object-keys":81,"./_object-pie":82,"./_to-object":114}],71:[function(a,b,c){var d=a("./_an-object"),e=a("./_object-dps"),f=a("./_enum-bug-keys"),g=a("./_shared-key")("IE_PROTO"),h=function(){},i="prototype",j=function(){var b,c=a("./_dom-create")("iframe"),d=f.length,e="<",g=">";for(c.style.display="none",a("./_html").appendChild(c),c.src="javascript:",b=c.contentWindow.document,b.open(),b.write(e+"script"+g+"document.F=Object"+e+"/script"+g),b.close(),j=b.F;d--;)delete j[i][f[d]];return j()};b.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},{"./_an-object":12,"./_dom-create":34,"./_enum-bug-keys":35,"./_html":46,"./_object-dps":73,"./_shared-key":98}],72:[function(a,b,c){var d=a("./_an-object"),e=a("./_ie8-dom-define"),f=a("./_to-primitive"),g=Object.defineProperty;c.f=a("./_descriptors")?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},{"./_an-object":12,"./_descriptors":33,"./_ie8-dom-define":47,"./_to-primitive":115}],73:[function(a,b,c){var d=a("./_object-dp"),e=a("./_an-object"),f=a("./_object-keys");b.exports=a("./_descriptors")?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},{"./_an-object":12,"./_descriptors":33,"./_object-dp":72,"./_object-keys":81}],74:[function(a,b,c){b.exports=a("./_library")||!a("./_fails")(function(){var b=Math.random();__defineSetter__.call(null,b,function(){}),delete a("./_global")[b]})},{"./_fails":39,"./_global":43,"./_library":63}],75:[function(a,b,c){var d=a("./_object-pie"),e=a("./_property-desc"),f=a("./_to-iobject"),g=a("./_to-primitive"),h=a("./_has"),i=a("./_ie8-dom-define"),j=Object.getOwnPropertyDescriptor;c.f=a("./_descriptors")?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},{"./_descriptors":33,"./_has":44,"./_ie8-dom-define":47,"./_object-pie":82,"./_property-desc":90,"./_to-iobject":112,"./_to-primitive":115}],76:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopn").f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(a){return g.slice()}};b.exports.f=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},{"./_object-gopn":77,"./_to-iobject":112}],77:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(a){return d(a,e)}},{"./_enum-bug-keys":35,"./_object-keys-internal":80}],78:[function(a,b,c){c.f=Object.getOwnPropertySymbols},{}],79:[function(a,b,c){var d=a("./_has"),e=a("./_to-object"),f=a("./_shared-key")("IE_PROTO"),g=Object.prototype;b.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},{"./_has":44,"./_shared-key":98,"./_to-object":114}],80:[function(a,b,c){var d=a("./_has"),e=a("./_to-iobject"),f=a("./_array-includes")(!1),g=a("./_shared-key")("IE_PROTO");b.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},{"./_array-includes":16,"./_has":44,"./_shared-key":98,"./_to-iobject":112}],81:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys");b.exports=Object.keys||function(a){return d(a,e)}},{"./_enum-bug-keys":35,"./_object-keys-internal":80}],82:[function(a,b,c){c.f={}.propertyIsEnumerable},{}],83:[function(a,b,c){var d=a("./_export"),e=a("./_core"),f=a("./_fails");b.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},{"./_core":28,"./_export":37,"./_fails":39}],84:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject"),f=a("./_object-pie").f;b.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},{"./_object-keys":81, +"./_object-pie":82,"./_to-iobject":112}],85:[function(a,b,c){var d=a("./_object-gopn"),e=a("./_object-gops"),f=a("./_an-object"),g=a("./_global").Reflect;b.exports=g&&g.ownKeys||function(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},{"./_an-object":12,"./_global":43,"./_object-gopn":77,"./_object-gops":78}],86:[function(a,b,c){var d=a("./_global").parseFloat,e=a("./_string-trim").trim;b.exports=1/d(a("./_string-ws")+"-0")!==-(1/0)?function(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},{"./_global":43,"./_string-trim":107,"./_string-ws":108}],87:[function(a,b,c){var d=a("./_global").parseInt,e=a("./_string-trim").trim,f=a("./_string-ws"),g=/^[\-+]?0[xX]/;b.exports=8!==d(f+"08")||22!==d(f+"0x16")?function(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},{"./_global":43,"./_string-trim":107,"./_string-ws":108}],88:[function(a,b,c){"use strict";var d=a("./_path"),e=a("./_invoke"),f=a("./_a-function");b.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},{"./_a-function":8,"./_invoke":49,"./_path":89}],89:[function(a,b,c){b.exports=a("./_global")},{"./_global":43}],90:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],91:[function(a,b,c){var d=a("./_redefine");b.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},{"./_redefine":92}],92:[function(a,b,c){var d=a("./_global"),e=a("./_hide"),f=a("./_has"),g=a("./_uid")("src"),h="toString",i=Function[h],j=(""+i).split(h);a("./_core").inspectSource=function(a){return i.call(a)},(b.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function(){return"function"==typeof this&&this[g]||i.call(this)})},{"./_core":28,"./_global":43,"./_has":44,"./_hide":45,"./_uid":119}],93:[function(a,b,c){b.exports=function(a,b){var c=b===Object(b)?function(a){return b[a]}:b;return function(b){return String(b).replace(a,c)}}},{}],94:[function(a,b,c){b.exports=Object.is||function(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},{}],95:[function(a,b,c){var d=a("./_is-object"),e=a("./_an-object"),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};b.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c,d){try{d=a("./_ctx")(Function.call,a("./_object-gopd").f(Object.prototype,"__proto__").set,2),d(b,[]),c=!(b instanceof Array)}catch(a){c=!0}return function(a,b){return f(a,b),c?a.__proto__=b:d(a,b),a}}({},!1):void 0),check:f}},{"./_an-object":12,"./_ctx":30,"./_is-object":54,"./_object-gopd":75}],96:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_object-dp"),f=a("./_descriptors"),g=a("./_wks")("species");b.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},{"./_descriptors":33,"./_global":43,"./_object-dp":72,"./_wks":122}],97:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_has"),f=a("./_wks")("toStringTag");b.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},{"./_has":44,"./_object-dp":72,"./_wks":122}],98:[function(a,b,c){var d=a("./_shared")("keys"),e=a("./_uid");b.exports=function(a){return d[a]||(d[a]=e(a))}},{"./_shared":99,"./_uid":119}],99:[function(a,b,c){var d=a("./_global"),e="__core-js_shared__",f=d[e]||(d[e]={});b.exports=function(a){return f[a]||(f[a]={})}},{"./_global":43}],100:[function(a,b,c){var d=a("./_an-object"),e=a("./_a-function"),f=a("./_wks")("species");b.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},{"./_a-function":8,"./_an-object":12,"./_wks":122}],101:[function(a,b,c){var d=a("./_fails");b.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},{"./_fails":39}],102:[function(a,b,c){var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i),f<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},{"./_defined":32,"./_to-integer":111}],103:[function(a,b,c){var d=a("./_is-regexp"),e=a("./_defined");b.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},{"./_defined":32,"./_is-regexp":55}],104:[function(a,b,c){var d=a("./_export"),e=a("./_fails"),f=a("./_defined"),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};b.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},{"./_defined":32,"./_export":37,"./_fails":39}],105:[function(a,b,c){var d=a("./_to-length"),e=a("./_string-repeat"),f=a("./_defined");b.exports=function(a,b,c,g){var h=String(f(a)),i=h.length,j=void 0===c?" ":String(c),k=d(b);if(k<=i||""==j)return h;var l=k-i,m=e.call(j,Math.ceil(l/j.length));return m.length>l&&(m=m.slice(0,l)),g?m+h:h+m}},{"./_defined":32,"./_string-repeat":106,"./_to-length":113}],106:[function(a,b,c){"use strict";var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},{"./_defined":32,"./_to-integer":111}],107:[function(a,b,c){var d=a("./_export"),e=a("./_defined"),f=a("./_fails"),g=a("./_string-ws"),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};b.exports=l},{"./_defined":32,"./_export":37,"./_fails":39,"./_string-ws":108}],108:[function(a,b,c){b.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},{}],109:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":23,"./_ctx":30,"./_dom-create":34,"./_global":43,"./_html":46,"./_invoke":49}],110:[function(a,b,c){var d=a("./_to-integer"),e=Math.max,f=Math.min;b.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},{"./_to-integer":111}],111:[function(a,b,c){var d=Math.ceil,e=Math.floor;b.exports=function(a){return isNaN(a=+a)?0:(a>0?e:d)(a)}},{}],112:[function(a,b,c){var d=a("./_iobject"),e=a("./_defined");b.exports=function(a){return d(e(a))}},{"./_defined":32,"./_iobject":50}],113:[function(a,b,c){var d=a("./_to-integer"),e=Math.min;b.exports=function(a){return a>0?e(d(a),9007199254740991):0}},{"./_to-integer":111}],114:[function(a,b,c){var d=a("./_defined");b.exports=function(a){return Object(d(a))}},{"./_defined":32}],115:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":54}],116:[function(a,b,c){"use strict";if(a("./_descriptors")){var d=a("./_library"),e=a("./_global"),f=a("./_fails"),g=a("./_export"),h=a("./_typed"),i=a("./_typed-buffer"),j=a("./_ctx"),k=a("./_an-instance"),l=a("./_property-desc"),m=a("./_hide"),n=a("./_redefine-all"),o=a("./_to-integer"),p=a("./_to-length"),q=a("./_to-index"),r=a("./_to-primitive"),s=a("./_has"),t=a("./_same-value"),u=a("./_classof"),v=a("./_is-object"),w=a("./_to-object"),x=a("./_is-array-iter"),y=a("./_object-create"),z=a("./_object-gpo"),A=a("./_object-gopn").f,B=a("./core.get-iterator-method"),C=a("./_uid"),D=a("./_wks"),E=a("./_array-methods"),F=a("./_array-includes"),G=a("./_species-constructor"),H=a("./es6.array.iterator"),I=a("./_iterators"),J=a("./_iter-detect"),K=a("./_set-species"),L=a("./_array-fill"),M=a("./_array-copy-within"),N=a("./_object-dp"),O=a("./_object-gopd"),P=N.f,Q=O.f,R=e.RangeError,S=e.TypeError,T=e.Uint8Array,U="ArrayBuffer",V="Shared"+U,W="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],Z=i.ArrayBuffer,$=i.DataView,_=E(0),aa=E(2),ba=E(3),ca=E(4),da=E(5),ea=E(6),fa=F(!0),ga=F(!1),ha=H.values,ia=H.keys,ja=H.entries,ka=Y.lastIndexOf,la=Y.reduce,ma=Y.reduceRight,na=Y.join,oa=Y.sort,pa=Y.slice,qa=Y.toString,ra=Y.toLocaleString,sa=D("iterator"),ta=D("toStringTag"),ua=C("typed_constructor"),va=C("def_constructor"),wa=h.CONSTR,xa=h.TYPED,ya=h.VIEW,za="Wrong length!",Aa=E(1,function(a,b){return Ga(G(a,a[va]),b)}),Ba=f(function(){return 1===new T(new Uint16Array([1]).buffer)[0]}),Ca=!!T&&!!T[X].set&&f(function(){new T(1).set({})}),Da=function(a,b){if(void 0===a)throw S(za);var c=+a,d=p(a);if(b&&!t(c,d))throw R(za);return d},Ea=function(a,b){var c=o(a);if(c<0||c%b)throw R("Wrong offset!");return c},Fa=function(a){if(v(a)&&xa in a)return a;throw S(a+" is not a typed array!")},Ga=function(a,b){if(!(v(a)&&ua in a))throw S("It is not a typed array constructor!");return new a(b)},Ha=function(a,b){return Ia(G(a,a[va]),b)},Ia=function(a,b){for(var c=0,d=b.length,e=Ga(a,d);d>c;)e[c]=b[c++];return e},Ja=function(a,b,c){P(a,b,{get:function(){return this._d[c]}})},Ka=function(a){var b,c,d,e,f,g,h=w(a),i=arguments.length,k=i>1?arguments[1]:void 0,l=void 0!==k,m=B(h);if(void 0!=m&&!x(m)){for(g=m.call(h),d=[],b=0;!(f=g.next()).done;b++)d.push(f.value);h=d}for(l&&i>2&&(k=j(k,arguments[2],2)),b=0,c=p(h.length),e=Ga(this,c);c>b;b++)e[b]=l?k(h[b],b):h[b];return e},La=function(){for(var a=0,b=arguments.length,c=Ga(this,b);b>a;)c[a]=arguments[a++];return c},Ma=!!T&&f(function(){ra.call(new T(1))}),Na=function(){return ra.apply(Ma?pa.call(Fa(this)):Fa(this),arguments)},Oa={copyWithin:function(a,b){return M.call(Fa(this),a,b,arguments.length>2?arguments[2]:void 0)},every:function(a){return ca(Fa(this),a,arguments.length>1?arguments[1]:void 0)},fill:function(a){return L.apply(Fa(this),arguments)},filter:function(a){return Ha(this,aa(Fa(this),a,arguments.length>1?arguments[1]:void 0))},find:function(a){return da(Fa(this),a,arguments.length>1?arguments[1]:void 0)},findIndex:function(a){return ea(Fa(this),a,arguments.length>1?arguments[1]:void 0)},forEach:function(a){_(Fa(this),a,arguments.length>1?arguments[1]:void 0)},indexOf:function(a){return ga(Fa(this),a,arguments.length>1?arguments[1]:void 0)},includes:function(a){return fa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},join:function(a){return na.apply(Fa(this),arguments)},lastIndexOf:function(a){return ka.apply(Fa(this),arguments)},map:function(a){return Aa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},reduce:function(a){return la.apply(Fa(this),arguments)},reduceRight:function(a){return ma.apply(Fa(this),arguments)},reverse:function(){for(var a,b=this,c=Fa(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:void 0)},sort:function(a){return oa.call(Fa(this),a)},subarray:function(a,b){var c=Fa(this),d=c.length,e=q(a,d);return new(G(c,c[va]))(c.buffer,c.byteOffset+e*c.BYTES_PER_ELEMENT,p((void 0===b?d:q(b,d))-e))}},Pa=function(a,b){return Ha(this,pa.call(Fa(this),a,b))},Qa=function(a){Fa(this);var b=Ea(arguments[1],1),c=this.length,d=w(a),e=p(d.length),f=0;if(e+b>c)throw R(za);for(;f255?255:255&d),e.v[o](c*b+e.o,d,Ba)},D=function(a,b){P(a,b,{get:function(){return B(this,b)},set:function(a){return C(this,b,a)},enumerable:!0})};t?(q=c(function(a,c,d,e){k(a,q,j,"_d");var f,g,h,i,l=0,n=0;if(v(c)){if(!(c instanceof Z||(i=u(c))==U||i==V))return xa in c?Ia(q,c):Ka.call(q,c);f=c,n=Ea(d,b);var o=c.byteLength;if(void 0===e){if(o%b)throw R(za);if(g=o-n,g<0)throw R(za)}else if(g=p(e)*b,g+n>o)throw R(za);h=g/b}else h=Da(c,!0),g=h*b,f=new Z(g);for(m(a,"_d",{b:f,o:n,l:g,e:h,v:new $(f)});l>1,k=23===b?D(2,-24)-D(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=C(a),a!=a||a===A?(e=a!=a?1:0,d=i):(d=E(F(a)/G),a*(f=D(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*D(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*D(2,b),d+=j):(e=a*D(2,j-1)*D(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},O=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-A:A;d+=D(2,b),k-=g}return(j?-1:1)*d*D(2,k-b)},P=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},Q=function(a){return[255&a]},R=function(a){return[255&a,a>>8&255]},S=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},T=function(a){return N(a,52,8)},U=function(a){return N(a,23,4)},V=function(a,b,c){o(a[t],b,{get:function(){return this[c]}})},W=function(a,b,c,d){var e=+c,f=l(e);if(e!=f||f<0||f+b>a[L])throw z(v);var g=a[K]._b,h=f+a[M],i=g.slice(h,h+b);return d?i:i.reverse()},X=function(a,b,c,d,e,f){var g=+c,h=l(g);if(g!=h||h<0||h+b>a[L])throw z(v);for(var i=a[K]._b,j=h+a[M],k=d(+e),m=0;maa;)(Z=_[aa++])in w||h(w,Z,B[Z]);f||($.constructor=w)}var ba=new x(new w(2)),ca=x[t].setInt8;ba.setInt8(0,2147483648),ba.setInt8(1,2147483649),!ba.getInt8(0)&&ba.getInt8(1)||i(x[t],{setInt8:function(a,b){ca.call(this,a,b<<24>>24)},setUint8:function(a,b){ca.call(this,a,b<<24>>24)}},!0)}else w=function(a){var b=Y(this,a);this._b=p.call(Array(b),0),this[L]=b},x=function(a,b,c){k(this,x,s),k(a,w,s);var d=a[L],e=l(b);if(e<0||e>d)throw z("Wrong offset!");if(c=void 0===c?d-e:m(c),e+c>d)throw z(u);this[K]=a,this[M]=e,this[L]=c},e&&(V(w,I,"_l"),V(x,H,"_b"),V(x,I,"_l"),V(x,J,"_o")),i(x[t],{getInt8:function(a){return W(this,1,a)[0]<<24>>24},getUint8:function(a){return W(this,1,a)[0]},getInt16:function(a){var b=W(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function(a){var b=W(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function(a){return P(W(this,4,a,arguments[1]))},getUint32:function(a){return P(W(this,4,a,arguments[1]))>>>0},getFloat32:function(a){return O(W(this,4,a,arguments[1]),23,4)},getFloat64:function(a){return O(W(this,8,a,arguments[1]),52,8)},setInt8:function(a,b){X(this,1,a,Q,b)},setUint8:function(a,b){X(this,1,a,Q,b)},setInt16:function(a,b){X(this,2,a,R,b,arguments[2])},setUint16:function(a,b){X(this,2,a,R,b,arguments[2])},setInt32:function(a,b){X(this,4,a,S,b,arguments[2])},setUint32:function(a,b){X(this,4,a,S,b,arguments[2])},setFloat32:function(a,b){X(this,4,a,U,b,arguments[2])},setFloat64:function(a,b){X(this,8,a,T,b,arguments[2])}});q(w,r),q(x,s),h(x[t],g.VIEW,!0),c[r]=w,c[s]=x},{"./_an-instance":11,"./_array-fill":14,"./_descriptors":33,"./_fails":39,"./_global":43,"./_hide":45,"./_library":63,"./_object-dp":72,"./_object-gopn":77,"./_redefine-all":91,"./_set-to-string-tag":97,"./_to-integer":111,"./_to-length":113,"./_typed":118}],118:[function(a,b,c){for(var d,e=a("./_global"),f=a("./_hide"),g=a("./_uid"),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":10,"./_array-methods":17,"./_export":37}],130:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(5),f="find",g=!0;f in[]&&Array(1)[f](function(){g=!1}),d(d.P+d.F*g,"Array",{find:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":10,"./_array-methods":17,"./_export":37}],131:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(0),f=a("./_strict-method")([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":17,"./_export":37,"./_strict-method":101}],132:[function(a,b,c){"use strict";var d=a("./_ctx"),e=a("./_export"),f=a("./_to-object"),g=a("./_iter-call"),h=a("./_is-array-iter"),i=a("./_to-length"),j=a("./_create-property"),k=a("./core.get-iterator-method");e(e.S+e.F*!a("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(a){var b,c,e,l,m=f(a),n="function"==typeof this?this:Array,o=arguments.length,p=o>1?arguments[1]:void 0,q=void 0!==p,r=0,s=k(m);if(q&&(p=d(p,o>2?arguments[2]:void 0,2)),void 0==s||n==Array&&h(s))for(b=i(m.length),c=new n(b);b>r;r++)j(c,r,q?p(m[r],r):m[r]);else for(l=s.call(m),c=new n;!(e=l.next()).done;r++)j(c,r,q?g(l,p,[e.value,r],!0):e.value);return c.length=r,c}})},{"./_create-property":29,"./_ctx":30,"./_export":37,"./_is-array-iter":51,"./_iter-call":56,"./_iter-detect":59,"./_to-length":113,"./_to-object":114,"./core.get-iterator-method":123}],133:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!a("./_strict-method")(f)),"Array",{indexOf:function(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},{"./_array-includes":16,"./_export":37,"./_strict-method":101}],134:[function(a,b,c){var d=a("./_export");d(d.S,"Array",{isArray:a("./_is-array")})},{"./_export":37,"./_is-array":52}],135:[function(a,b,c){"use strict";var d=a("./_add-to-unscopables"),e=a("./_iter-step"),f=a("./_iterators"),g=a("./_to-iobject");b.exports=a("./_iter-define")(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},{"./_add-to-unscopables":10,"./_iter-define":58,"./_iter-step":60,"./_iterators":61,"./_to-iobject":112}],136:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=[].join;d(d.P+d.F*(a("./_iobject")!=Object||!a("./_strict-method")(f)),"Array",{join:function(a){return f.call(e(this),void 0===a?",":a)}})},{"./_export":37,"./_iobject":50,"./_strict-method":101,"./_to-iobject":112}],137:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-integer"),g=a("./_to-length"),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!a("./_strict-method")(h)),"Array",{lastIndexOf:function(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},{"./_export":37,"./_strict-method":101,"./_to-integer":111,"./_to-iobject":112,"./_to-length":113}],138:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(1);d(d.P+d.F*!a("./_strict-method")([].map,!0),"Array",{map:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":17,"./_export":37,"./_strict-method":101}],139:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_create-property");d(d.S+d.F*a("./_fails")(function(){function a(){}return!(Array.of.call(a)instanceof a)}),"Array",{of:function(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},{"./_create-property":29,"./_export":37,"./_fails":39}],140:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(a){return e(this,a,arguments.length,arguments[1],!0)}})},{"./_array-reduce":18,"./_export":37,"./_strict-method":101}],141:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduce,!0),"Array",{reduce:function(a){return e(this,a,arguments.length,arguments[1],!1)}})},{"./_array-reduce":18,"./_export":37,"./_strict-method":101}],142:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_html"),f=a("./_cof"),g=a("./_to-index"),h=a("./_to-length"),i=[].slice;d(d.P+d.F*a("./_fails")(function(){e&&i.call(e)}),"Array",{slice:function(a,b){var c=h(this.length),d=f(this);if(b=void 0===b?c:b,"Array"==d)return i.call(this,a,b);for(var e=g(a,c),j=g(b,c),k=h(j-e),l=Array(k),m=0;m9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},{"./_export":37,"./_fails":39}],148:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_to-primitive");d(d.P+d.F*a("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},{"./_export":37,"./_fails":39,"./_to-object":114,"./_to-primitive":115}],149:[function(a,b,c){var d=a("./_wks")("toPrimitive"),e=Date.prototype;d in e||a("./_hide")(e,d,a("./_date-to-primitive"))},{"./_date-to-primitive":31,"./_hide":45,"./_wks":122}],150:[function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&a("./_redefine")(d,f,function(){var a=h.call(this);return a===a?g.call(this):e})},{"./_redefine":92}],151:[function(a,b,c){var d=a("./_export");d(d.P,"Function",{bind:a("./_bind")})},{"./_bind":21,"./_export":37}],152:[function(a,b,c){"use strict";var d=a("./_is-object"),e=a("./_object-gpo"),f=a("./_wks")("hasInstance"),g=Function.prototype;f in g||a("./_object-dp").f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},{"./_is-object":54,"./_object-dp":72,"./_object-gpo":79,"./_wks":122}],153:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_property-desc"),f=a("./_has"),g=Function.prototype,h=/^\s*function ([^ (]*)/,i="name",j=Object.isExtensible||function(){return!0};i in g||a("./_descriptors")&&d(g,i,{configurable:!0,get:function(){try{var a=this,b=(""+a).match(h)[1];return f(a,i)||!j(a)||d(a,i,e(5,b)),b}catch(a){return""}}})},{"./_descriptors":33,"./_has":44,"./_object-dp":72,"./_property-desc":90}],154:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Map",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{get:function(a){var b=d.getEntry(this,a);return b&&b.v},set:function(a,b){return d.def(this,0===a?0:a,b)}},d,!0)},{"./_collection":27,"./_collection-strong":24}],155:[function(a,b,c){var d=a("./_export"),e=a("./_math-log1p"),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},{"./_export":37,"./_math-log1p":65}],156:[function(a,b,c){function d(a){return isFinite(a=+a)&&0!=a?a<0?-d(-a):Math.log(a+Math.sqrt(a*a+1)):a}var e=a("./_export"),f=Math.asinh;e(e.S+e.F*!(f&&1/f(0)>0),"Math",{asinh:d})},{"./_export":37}],157:[function(a,b,c){var d=a("./_export"),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},{"./_export":37}],158:[function(a,b,c){ +var d=a("./_export"),e=a("./_math-sign");d(d.S,"Math",{cbrt:function(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},{"./_export":37,"./_math-sign":66}],159:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{clz32:function(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},{"./_export":37}],160:[function(a,b,c){var d=a("./_export"),e=Math.exp;d(d.S,"Math",{cosh:function(a){return(e(a=+a)+e(-a))/2}})},{"./_export":37}],161:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1");d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},{"./_export":37,"./_math-expm1":64}],162:[function(a,b,c){var d=a("./_export"),e=a("./_math-sign"),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},{"./_export":37,"./_math-sign":66}],163:[function(a,b,c){var d=a("./_export"),e=Math.abs;d(d.S,"Math",{hypot:function(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},{"./_export":37}],164:[function(a,b,c){var d=a("./_export"),e=Math.imul;d(d.S+d.F*a("./_fails")(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},{"./_export":37,"./_fails":39}],165:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log10:function(a){return Math.log(a)/Math.LN10}})},{"./_export":37}],166:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log1p:a("./_math-log1p")})},{"./_export":37,"./_math-log1p":65}],167:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log2:function(a){return Math.log(a)/Math.LN2}})},{"./_export":37}],168:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{sign:a("./_math-sign")})},{"./_export":37,"./_math-sign":66}],169:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S+d.F*a("./_fails")(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},{"./_export":37,"./_fails":39,"./_math-expm1":64}],170:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S,"Math",{tanh:function(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},{"./_export":37,"./_math-expm1":64}],171:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{trunc:function(a){return(a>0?Math.floor:Math.ceil)(a)}})},{"./_export":37}],172:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_has"),f=a("./_cof"),g=a("./_inherit-if-required"),h=a("./_to-primitive"),i=a("./_fails"),j=a("./_object-gopn").f,k=a("./_object-gopd").f,l=a("./_object-dp").f,m=a("./_string-trim").trim,n="Number",o=d[n],p=o,q=o.prototype,r=f(a("./_object-create")(q))==n,s="trim"in String.prototype,t=function(a){var b=h(a,!1);if("string"==typeof b&&b.length>2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;je)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=a("./_descriptors")?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,a("./_redefine")(d,n,o)}},{"./_cof":23,"./_descriptors":33,"./_fails":39,"./_global":43,"./_has":44,"./_inherit-if-required":48,"./_object-create":71,"./_object-dp":72,"./_object-gopd":75,"./_object-gopn":77,"./_redefine":92,"./_string-trim":107,"./_to-primitive":115}],173:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":37}],174:[function(a,b,c){var d=a("./_export"),e=a("./_global").isFinite;d(d.S,"Number",{isFinite:function(a){return"number"==typeof a&&e(a)}})},{"./_export":37,"./_global":43}],175:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isInteger:a("./_is-integer")})},{"./_export":37,"./_is-integer":53}],176:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isNaN:function(a){return a!=a}})},{"./_export":37}],177:[function(a,b,c){var d=a("./_export"),e=a("./_is-integer"),f=Math.abs;d(d.S,"Number",{isSafeInteger:function(a){return e(a)&&f(a)<=9007199254740991}})},{"./_export":37,"./_is-integer":53}],178:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":37}],179:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":37}],180:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},{"./_export":37,"./_parse-float":86}],181:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},{"./_export":37,"./_parse-int":87}],182:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-integer"),f=a("./_a-number-value"),g=a("./_string-repeat"),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!a("./_fails")(function(){h.call({})})),"Number",{toFixed:function(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},{"./_a-number-value":9,"./_export":37,"./_fails":39,"./_string-repeat":106,"./_to-integer":111}],183:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_fails"),f=a("./_a-number-value"),g=1..toPrecision;d(d.P+d.F*(e(function(){return"1"!==g.call(1,void 0)})||!e(function(){g.call({})})),"Number",{toPrecision:function(a){var b=f(this,"Number#toPrecision: incorrect invocation!");return void 0===a?g.call(b):g.call(b,a)}})},{"./_a-number-value":9,"./_export":37,"./_fails":39}],184:[function(a,b,c){var d=a("./_export");d(d.S+d.F,"Object",{assign:a("./_object-assign")})},{"./_export":37,"./_object-assign":70}],185:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{create:a("./_object-create")})},{"./_export":37,"./_object-create":71}],186:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperties:a("./_object-dps")})},{"./_descriptors":33,"./_export":37,"./_object-dps":73}],187:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperty:a("./_object-dp").f})},{"./_descriptors":33,"./_export":37,"./_object-dp":72}],188:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("freeze",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":54,"./_meta":67,"./_object-sap":83}],189:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopd").f;a("./_object-sap")("getOwnPropertyDescriptor",function(){return function(a,b){return e(d(a),b)}})},{"./_object-gopd":75,"./_object-sap":83,"./_to-iobject":112}],190:[function(a,b,c){a("./_object-sap")("getOwnPropertyNames",function(){return a("./_object-gopn-ext").f})},{"./_object-gopn-ext":76,"./_object-sap":83}],191:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-gpo");a("./_object-sap")("getPrototypeOf",function(){return function(a){return e(d(a))}})},{"./_object-gpo":79,"./_object-sap":83,"./_to-object":114}],192:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isExtensible",function(a){return function(b){return!!d(b)&&(!a||a(b))}})},{"./_is-object":54,"./_object-sap":83}],193:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isFrozen",function(a){return function(b){return!d(b)||!!a&&a(b)}})},{"./_is-object":54,"./_object-sap":83}],194:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isSealed",function(a){return function(b){return!d(b)||!!a&&a(b)}})},{"./_is-object":54,"./_object-sap":83}],195:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{is:a("./_same-value")})},{"./_export":37,"./_same-value":94}],196:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-keys");a("./_object-sap")("keys",function(){return function(a){return e(d(a))}})},{"./_object-keys":81,"./_object-sap":83,"./_to-object":114}],197:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("preventExtensions",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":54,"./_meta":67,"./_object-sap":83}],198:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("seal",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":54,"./_meta":67,"./_object-sap":83}],199:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{setPrototypeOf:a("./_set-proto").set})},{"./_export":37,"./_set-proto":95}],200:[function(a,b,c){"use strict";var d=a("./_classof"),e={};e[a("./_wks")("toStringTag")]="z",e+""!="[object z]"&&a("./_redefine")(Object.prototype,"toString",function(){return"[object "+d(this)+"]"},!0)},{"./_classof":22,"./_redefine":92,"./_wks":122}],201:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},{"./_export":37,"./_parse-float":86}],202:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.G+d.F*(parseInt!=e),{parseInt:e})},{"./_export":37,"./_parse-int":87}],203:[function(a,b,c){"use strict";var d,e,f,g=a("./_library"),h=a("./_global"),i=a("./_ctx"),j=a("./_classof"),k=a("./_export"),l=a("./_is-object"),m=a("./_a-function"),n=a("./_an-instance"),o=a("./_for-of"),p=a("./_species-constructor"),q=a("./_task").set,r=a("./_microtask")(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var b=v.resolve(1),c=(b.constructor={})[a("./_wks")("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&b.then(x)instanceof c}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},d.prototype=a("./_redefine-all")(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+k.F*!y,{Promise:v}),a("./_set-to-string-tag")(v,s),a("./_set-species")(s),f=a("./_core")[s],k(k.S+k.F*!y,s,{reject:function(a){var b=B(this),c=b.reject;return c(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this),c=b.resolve;return c(a),b.promise}}),k(k.S+k.F*!(y&&a("./_iter-detect")(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},{"./_a-function":8,"./_an-instance":11,"./_classof":22,"./_core":28,"./_ctx":30,"./_export":37,"./_for-of":42,"./_global":43,"./_is-object":54,"./_iter-detect":59,"./_library":63,"./_microtask":69,"./_redefine-all":91,"./_set-species":96,"./_set-to-string-tag":97,"./_species-constructor":100,"./_task":109,"./_wks":122}],204:[function(a,b,c){var d=a("./_export"),e=a("./_a-function"),f=a("./_an-object"),g=(a("./_global").Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!a("./_fails")(function(){g(function(){})}),"Reflect",{apply:function(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},{"./_a-function":8,"./_an-object":12,"./_export":37,"./_fails":39,"./_global":43}],205:[function(a,b,c){var d=a("./_export"),e=a("./_object-create"),f=a("./_a-function"),g=a("./_an-object"),h=a("./_is-object"),i=a("./_fails"),j=a("./_bind"),k=(a("./_global").Reflect||{}).construct,l=i(function(){function a(){}return!(k(function(){},[],a)instanceof a)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},{"./_a-function":8,"./_an-object":12,"./_bind":21,"./_export":37,"./_fails":39,"./_global":43,"./_is-object":54,"./_object-create":71}],206:[function(a,b,c){var d=a("./_object-dp"),e=a("./_export"),f=a("./_an-object"),g=a("./_to-primitive");e(e.S+e.F*a("./_fails")(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(a){return!1}}})},{"./_an-object":12,"./_export":37,"./_fails":39,"./_object-dp":72,"./_to-primitive":115}],207:[function(a,b,c){var d=a("./_export"),e=a("./_object-gopd").f,f=a("./_an-object");d(d.S,"Reflect",{deleteProperty:function(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},{"./_an-object":12,"./_export":37,"./_object-gopd":75}],208:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_an-object"),f=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};a("./_iter-create")(f,"Object",function(){var a,b=this,c=b._k;do if(b._i>=c.length)return{value:void 0,done:!0};while(!((a=c[b._i++])in b._t));return{value:a,done:!1}}),d(d.S,"Reflect",{enumerate:function(a){return new f(a)}})},{"./_an-object":12,"./_export":37,"./_iter-create":57}],209:[function(a,b,c){var d=a("./_object-gopd"),e=a("./_export"),f=a("./_an-object");e(e.S,"Reflect",{getOwnPropertyDescriptor:function(a,b){return d.f(f(a),b)}})},{"./_an-object":12,"./_export":37,"./_object-gopd":75}],210:[function(a,b,c){var d=a("./_export"),e=a("./_object-gpo"),f=a("./_an-object");d(d.S,"Reflect",{getPrototypeOf:function(a){return e(f(a))}})},{"./_an-object":12,"./_export":37,"./_object-gpo":79}],211:[function(a,b,c){function d(a,b){var c,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(c=e.f(a,b))?g(c,"value")?c.value:void 0!==c.get?c.get.call(k):void 0:i(h=f(a))?d(h,b,k):void 0}var e=a("./_object-gopd"),f=a("./_object-gpo"),g=a("./_has"),h=a("./_export"),i=a("./_is-object"),j=a("./_an-object");h(h.S,"Reflect",{get:d})},{"./_an-object":12,"./_export":37,"./_has":44,"./_is-object":54,"./_object-gopd":75,"./_object-gpo":79}],212:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{has:function(a,b){return b in a}})},{"./_export":37}],213:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function(a){return e(a),!f||f(a)}})},{"./_an-object":12,"./_export":37}],214:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{ownKeys:a("./_own-keys")})},{"./_export":37,"./_own-keys":85}],215:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function(a){e(a);try{return f&&f(a),!0}catch(a){return!1}}})},{"./_an-object":12,"./_export":37}],216:[function(a,b,c){var d=a("./_export"),e=a("./_set-proto");e&&d(d.S,"Reflect",{setPrototypeOf:function(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(a){return!1}}})},{"./_export":37,"./_set-proto":95}],217:[function(a,b,c){function d(a,b,c){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return d(m,b,c,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=c,e.f(n,b,i),!0):void 0!==o.set&&(o.set.call(n,c),!0)}var e=a("./_object-dp"),f=a("./_object-gopd"),g=a("./_object-gpo"),h=a("./_has"),i=a("./_export"),j=a("./_property-desc"),k=a("./_an-object"),l=a("./_is-object");i(i.S,"Reflect",{set:d})},{"./_an-object":12,"./_export":37,"./_has":44,"./_is-object":54,"./_object-dp":72,"./_object-gopd":75,"./_object-gpo":79,"./_property-desc":90}],218:[function(a,b,c){var d=a("./_global"),e=a("./_inherit-if-required"),f=a("./_object-dp").f,g=a("./_object-gopn").f,h=a("./_is-regexp"),i=a("./_flags"),j=d.RegExp,k=j,l=j.prototype,m=/a/g,n=/a/g,o=new j(m)!==m;if(a("./_descriptors")&&(!o||a("./_fails")(function(){return n[a("./_wks")("match")]=!1,j(m)!=m||j(n)==n||"/a/i"!=j(m,"i")}))){j=function(a,b){var c=this instanceof j,d=h(a),f=void 0===b;return!c&&d&&a.constructor===j&&f?a:e(o?new k(d&&!f?a.source:a,b):k((d=a instanceof j)?a.source:a,d&&f?i.call(a):b),c?this:l,j)};for(var p=(function(a){a in j||f(j,a,{configurable:!0,get:function(){return k[a]},set:function(b){k[a]=b}})}),q=g(k),r=0;q.length>r;)p(q[r++]);l.constructor=j,j.prototype=l,a("./_redefine")(d,"RegExp",j)}a("./_set-species")("RegExp")},{"./_descriptors":33,"./_fails":39,"./_flags":41,"./_global":43,"./_inherit-if-required":48,"./_is-regexp":55,"./_object-dp":72,"./_object-gopn":77,"./_redefine":92,"./_set-species":96,"./_wks":122}],219:[function(a,b,c){a("./_descriptors")&&"g"!=/./g.flags&&a("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:a("./_flags")})},{"./_descriptors":33,"./_flags":41,"./_object-dp":72}],220:[function(a,b,c){a("./_fix-re-wks")("match",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":40}],221:[function(a,b,c){a("./_fix-re-wks")("replace",2,function(a,b,c){return[function(d,e){"use strict";var f=a(this),g=void 0==d?void 0:d[b];return void 0!==g?g.call(d,f,e):c.call(String(f),d,e)},c]})},{"./_fix-re-wks":40}],222:[function(a,b,c){a("./_fix-re-wks")("search",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":40}],223:[function(a,b,c){a("./_fix-re-wks")("split",2,function(b,c,d){"use strict";var e=a("./_is-regexp"),f=d,g=[].push,h="split",i="length",j="lastIndex";if("c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[i]||2!="ab"[h](/(?:ab)*/)[i]||4!="."[h](/(.?)(.?)/)[i]||"."[h](/()()/)[i]>1||""[h](/.?/)[i]){var k=void 0===/()??/.exec("")[1];d=function(a,b){var c=String(this);if(void 0===a&&0===b)return[];if(!e(a))return f.call(c,a,b);var d,h,l,m,n,o=[],p=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),q=0,r=void 0===b?4294967295:b>>>0,s=new RegExp(a.source,p+"g");for(k||(d=new RegExp("^"+s.source+"$(?!\\s)",p));(h=s.exec(c))&&(l=h.index+h[0][i],!(l>q&&(o.push(c.slice(q,h.index)),!k&&h[i]>1&&h[0].replace(d,function(){for(n=1;n1&&h.index=r)));)s[j]===h.index&&s[j]++;return q===c[i]?!m&&s.test("")||o.push(""):o.push(c.slice(q)),o[i]>r?o.slice(0,r):o}}else"0"[h](void 0,0)[i]&&(d=function(a,b){return void 0===a&&0===b?[]:f.call(this,a,b)});return[function(a,e){var f=b(this),g=void 0==a?void 0:a[c];return void 0!==g?g.call(a,f,e):d.call(String(f),a,e)},d]})},{"./_fix-re-wks":40,"./_is-regexp":55}],224:[function(a,b,c){"use strict";a("./es6.regexp.flags");var d=a("./_an-object"),e=a("./_flags"),f=a("./_descriptors"),g="toString",h=/./[g],i=function(b){a("./_redefine")(RegExp.prototype,g,b,!0)};a("./_fails")(function(){return"/a/b"!=h.call({source:"a",flags:"b"})})?i(function(){var a=d(this);return"/".concat(a.source,"/","flags"in a?a.flags:!f&&a instanceof RegExp?e.call(a):void 0)}):h.name!=g&&i(function(){return h.call(this)})},{"./_an-object":12,"./_descriptors":33,"./_fails":39,"./_flags":41,"./_redefine":92,"./es6.regexp.flags":219}],225:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Set",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a=0===a?0:a,a)}},d)},{"./_collection":27,"./_collection-strong":24}],226:[function(a,b,c){"use strict";a("./_string-html")("anchor",function(a){return function(b){return a(this,"a","name",b)}})},{"./_string-html":104}],227:[function(a,b,c){"use strict";a("./_string-html")("big",function(a){return function(){return a(this,"big","","")}})},{"./_string-html":104}],228:[function(a,b,c){"use strict";a("./_string-html")("blink",function(a){return function(){return a(this,"blink","","")}})},{"./_string-html":104}],229:[function(a,b,c){"use strict";a("./_string-html")("bold",function(a){return function(){return a(this,"b","","")}})},{"./_string-html":104}],230:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-at")(!1);d(d.P,"String",{codePointAt:function(a){return e(this,a)}})},{"./_export":37,"./_string-at":102}],231:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-length"),f=a("./_string-context"),g="endsWith",h=""[g];d(d.P+d.F*a("./_fails-is-regexp")(g),"String",{endsWith:function(a){var b=f(this,a,g),c=arguments.length>1?arguments[1]:void 0,d=e(b.length),i=void 0===c?d:Math.min(e(c),d),j=String(a);return h?h.call(b,j,i):b.slice(i-j.length,i)===j}})},{"./_export":37,"./_fails-is-regexp":38,"./_string-context":103,"./_to-length":113}],232:[function(a,b,c){"use strict";a("./_string-html")("fixed",function(a){return function(){return a(this,"tt","","")}})},{"./_string-html":104}],233:[function(a,b,c){"use strict";a("./_string-html")("fontcolor",function(a){return function(b){return a(this,"font","color",b)}})},{"./_string-html":104}],234:[function(a,b,c){"use strict";a("./_string-html")("fontsize",function(a){return function(b){return a(this,"font","size",b)}})},{"./_string-html":104}],235:[function(a,b,c){var d=a("./_export"),e=a("./_to-index"),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},{"./_export":37,"./_to-index":110}],236:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-context"),f="includes";d(d.P+d.F*a("./_fails-is-regexp")(f),"String",{includes:function(a){return!!~e(this,a,f).indexOf(a,arguments.length>1?arguments[1]:void 0)}})},{"./_export":37,"./_fails-is-regexp":38,"./_string-context":103}],237:[function(a,b,c){"use strict";a("./_string-html")("italics",function(a){return function(){return a(this,"i","","")}})},{"./_string-html":104}],238:[function(a,b,c){"use strict";var d=a("./_string-at")(!0);a("./_iter-define")(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},{"./_iter-define":58,"./_string-at":102}],239:[function(a,b,c){"use strict";a("./_string-html")("link",function(a){return function(b){return a(this,"a","href",b)}})},{"./_string-html":104}],240:[function(a,b,c){var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-length");d(d.S,"String",{raw:function(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h1?arguments[1]:void 0,b.length)),d=String(a);return h?h.call(b,d,c):b.slice(c,c+d.length)===d}})},{"./_export":37,"./_fails-is-regexp":38,"./_string-context":103,"./_to-length":113}],244:[function(a,b,c){"use strict";a("./_string-html")("strike",function(a){return function(){return a(this,"strike","","")}})},{"./_string-html":104}],245:[function(a,b,c){"use strict";a("./_string-html")("sub",function(a){return function(){return a(this,"sub","","")}})},{"./_string-html":104}],246:[function(a,b,c){"use strict";a("./_string-html")("sup",function(a){return function(){return a(this,"sup","","")}})},{"./_string-html":104}],247:[function(a,b,c){"use strict";a("./_string-trim")("trim",function(a){return function(){return a(this,3)}})},{"./_string-trim":107}],248:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_has"),f=a("./_descriptors"),g=a("./_export"),h=a("./_redefine"),i=a("./_meta").KEY,j=a("./_fails"),k=a("./_shared"),l=a("./_set-to-string-tag"),m=a("./_uid"),n=a("./_wks"),o=a("./_wks-ext"),p=a("./_wks-define"),q=a("./_keyof"),r=a("./_enum-keys"),s=a("./_is-array"),t=a("./_an-object"),u=a("./_to-iobject"),v=a("./_to-primitive"),w=a("./_property-desc"),x=a("./_object-create"),y=a("./_object-gopn-ext"),z=a("./_object-gopd"),A=a("./_object-dp"),B=a("./_object-keys"),C=z.f,D=A.f,E=y.f,F=d.Symbol,G=d.JSON,H=G&&G.stringify,I="prototype",J=n("_hidden"),K=n("toPrimitive"),L={}.propertyIsEnumerable,M=k("symbol-registry"),N=k("symbols"),O=k("op-symbols"),P=Object[I],Q="function"==typeof F,R=d.QObject,S=!R||!R[I]||!R[I].findChild,T=f&&j(function(){return 7!=x(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=C(P,b);d&&delete P[b],D(a,b,c),d&&a!==P&&D(P,b,d)}:D,U=function(a){var b=N[a]=x(F[I]);return b._k=a,b},V=Q&&"symbol"==typeof F.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof F},W=function(a,b,c){return a===P&&W(O,b,c),t(a),b=v(b,!0),t(c),e(N,b)?(c.enumerable?(e(a,J)&&a[J][b]&&(a[J][b]=!1),c=x(c,{enumerable:w(0,!1)})):(e(a,J)||D(a,J,w(1,{})),a[J][b]=!0),T(a,b,c)):D(a,b,c)},X=function(a,b){t(a);for(var c,d=r(b=u(b)),e=0,f=d.length;f>e;)W(a,c=d[e++],b[c]);return a},Y=function(a,b){return void 0===b?x(a):X(x(a),b)},Z=function(a){var b=L.call(this,a=v(a,!0));return!(this===P&&e(N,a)&&!e(O,a))&&(!(b||!e(this,a)||!e(N,a)||e(this,J)&&this[J][a])||b)},$=function(a,b){if(a=u(a),b=v(b,!0),a!==P||!e(N,b)||e(O,b)){var c=C(a,b);return!c||!e(N,b)||e(a,J)&&a[J][b]||(c.enumerable=!0),c}},_=function(a){for(var b,c=E(u(a)),d=[],f=0;c.length>f;)e(N,b=c[f++])||b==J||b==i||d.push(b);return d},aa=function(a){for(var b,c=a===P,d=E(c?O:u(a)),f=[],g=0;d.length>g;)!e(N,b=d[g++])||c&&!e(P,b)||f.push(N[b]);return f};Q||(F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var a=m(arguments.length>0?arguments[0]:void 0),b=function(c){this===P&&b.call(O,c),e(this,J)&&e(this[J],a)&&(this[J][a]=!1),T(this,a,w(1,c))};return f&&S&&T(P,a,{configurable:!0,set:b}),U(a)},h(F[I],"toString",function(){return this._k}),z.f=$,A.f=W,a("./_object-gopn").f=y.f=_,a("./_object-pie").f=Z,a("./_object-gops").f=aa,f&&!a("./_library")&&h(P,"propertyIsEnumerable",Z,!0),o.f=function(a){return U(n(a))}),g(g.G+g.W+g.F*!Q,{Symbol:F});for(var ba="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ca=0;ba.length>ca;)n(ba[ca++]);for(var ba=B(n.store),ca=0;ba.length>ca;)p(ba[ca++]);g(g.S+g.F*!Q,"Symbol",{for:function(a){return e(M,a+="")?M[a]:M[a]=F(a)},keyFor:function(a){if(V(a))return q(M,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){S=!0},useSimple:function(){S=!1}}),g(g.S+g.F*!Q,"Object",{create:Y,defineProperty:W,defineProperties:X,getOwnPropertyDescriptor:$,getOwnPropertyNames:_,getOwnPropertySymbols:aa}),G&&g(g.S+g.F*(!Q||j(function(){var a=F();return"[null]"!=H([a])||"{}"!=H({a:a})||"{}"!=H(Object(a))})),"JSON",{stringify:function(a){if(void 0!==a&&!V(a)){for(var b,c,d=[a],e=1;arguments.length>e;)d.push(arguments[e++]);return b=d[1],"function"==typeof b&&(c=b),!c&&s(b)||(b=function(a,b){if(c&&(b=c.call(this,a,b)),!V(b))return b}),d[1]=b,H.apply(G,d)}}}),F[I][K]||a("./_hide")(F[I],K,F[I].valueOf),l(F,"Symbol"),l(Math,"Math",!0),l(d.JSON,"JSON",!0)},{"./_an-object":12,"./_descriptors":33,"./_enum-keys":36,"./_export":37,"./_fails":39,"./_global":43,"./_has":44,"./_hide":45,"./_is-array":52,"./_keyof":62,"./_library":63,"./_meta":67,"./_object-create":71,"./_object-dp":72,"./_object-gopd":75,"./_object-gopn":77,"./_object-gopn-ext":76,"./_object-gops":78,"./_object-keys":81,"./_object-pie":82,"./_property-desc":90,"./_redefine":92,"./_set-to-string-tag":97,"./_shared":99,"./_to-iobject":112,"./_to-primitive":115,"./_uid":119,"./_wks":122,"./_wks-define":120,"./_wks-ext":121}],249:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_typed"),f=a("./_typed-buffer"),g=a("./_an-object"),h=a("./_to-index"),i=a("./_to-length"),j=a("./_is-object"),k=a("./_global").ArrayBuffer,l=a("./_species-constructor"),m=f.ArrayBuffer,n=f.DataView,o=e.ABV&&k.isView,p=m.prototype.slice,q=e.VIEW,r="ArrayBuffer"; +d(d.G+d.W+d.F*(k!==m),{ArrayBuffer:m}),d(d.S+d.F*!e.CONSTR,r,{isView:function(a){return o&&o(a)||j(a)&&q in a}}),d(d.P+d.U+d.F*a("./_fails")(function(){return!new m(2).slice(1,void 0).byteLength}),r,{slice:function(a,b){if(void 0!==p&&void 0===b)return p.call(g(this),a);for(var c=g(this).byteLength,d=h(a,c),e=h(void 0===b?c:b,c),f=new(l(this,m))(i(e-d)),j=new n(this),k=new n(f),o=0;d0?arguments[0]:void 0)}},p={get:function(a){if(j(a)){var b=k(a);return b===!0?m(this).get(a):b?b[this._i]:void 0}},set:function(a,b){return i.def(this,a,b)}},q=b.exports=a("./_collection")("WeakMap",o,p,i,!0,!0);7!=(new q).set((Object.freeze||Object)(n),7).get(n)&&(d=i.getConstructor(o),h(d.prototype,p),g.NEED=!0,e(["delete","has","get","set"],function(a){var b=q.prototype,c=b[a];f(b,a,function(b,e){if(j(b)&&!l(b)){this._f||(this._f=new d);var f=this._f[a](b,e);return"set"==a?this:f}return c.call(this,b,e)})}))},{"./_array-methods":17,"./_collection":27,"./_collection-weak":26,"./_is-object":54,"./_meta":67,"./_object-assign":70,"./_redefine":92}],261:[function(a,b,c){"use strict";var d=a("./_collection-weak");a("./_collection")("WeakSet",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a,!0)}},d,!1,!0)},{"./_collection":27,"./_collection-weak":26}],262:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!0);d(d.P,"Array",{includes:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":10,"./_array-includes":16,"./_export":37}],263:[function(a,b,c){var d=a("./_export"),e=a("./_microtask")(),f=a("./_global").process,g="process"==a("./_cof")(f);d(d.G,{asap:function(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},{"./_cof":23,"./_export":37,"./_global":43,"./_microtask":69}],264:[function(a,b,c){var d=a("./_export"),e=a("./_cof");d(d.S,"Error",{isError:function(a){return"Error"===e(a)}})},{"./_cof":23,"./_export":37}],265:[function(a,b,c){var d=a("./_export");d(d.P+d.R,"Map",{toJSON:a("./_collection-to-json")("Map")})},{"./_collection-to-json":25,"./_export":37}],266:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{iaddh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},{"./_export":37}],267:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{imulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},{"./_export":37}],268:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{isubh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},{"./_export":37}],269:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{umulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},{"./_export":37}],270:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_a-function"),g=a("./_object-dp");a("./_descriptors")&&d(d.P+a("./_object-forced-pam"),"Object",{__defineGetter__:function(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},{"./_a-function":8,"./_descriptors":33,"./_export":37,"./_object-dp":72,"./_object-forced-pam":74,"./_to-object":114}],271:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_a-function"),g=a("./_object-dp");a("./_descriptors")&&d(d.P+a("./_object-forced-pam"),"Object",{__defineSetter__:function(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},{"./_a-function":8,"./_descriptors":33,"./_export":37,"./_object-dp":72,"./_object-forced-pam":74,"./_to-object":114}],272:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!0);d(d.S,"Object",{entries:function(a){return e(a)}})},{"./_export":37,"./_object-to-array":84}],273:[function(a,b,c){var d=a("./_export"),e=a("./_own-keys"),f=a("./_to-iobject"),g=a("./_object-gopd"),h=a("./_create-property");d(d.S,"Object",{getOwnPropertyDescriptors:function(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},{"./_create-property":29,"./_export":37,"./_object-gopd":75,"./_own-keys":85,"./_to-iobject":112}],274:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_to-primitive"),g=a("./_object-gpo"),h=a("./_object-gopd").f;a("./_descriptors")&&d(d.P+a("./_object-forced-pam"),"Object",{__lookupGetter__:function(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},{"./_descriptors":33,"./_export":37,"./_object-forced-pam":74,"./_object-gopd":75,"./_object-gpo":79,"./_to-object":114,"./_to-primitive":115}],275:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_to-primitive"),g=a("./_object-gpo"),h=a("./_object-gopd").f;a("./_descriptors")&&d(d.P+a("./_object-forced-pam"),"Object",{__lookupSetter__:function(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},{"./_descriptors":33,"./_export":37,"./_object-forced-pam":74,"./_object-gopd":75,"./_object-gpo":79,"./_to-object":114,"./_to-primitive":115}],276:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!1);d(d.S,"Object",{values:function(a){return e(a)}})},{"./_export":37,"./_object-to-array":84}],277:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_global"),f=a("./_core"),g=a("./_microtask")(),h=a("./_wks")("observable"),i=a("./_a-function"),j=a("./_an-object"),k=a("./_an-instance"),l=a("./_redefine-all"),m=a("./_hide"),n=a("./_for-of"),o=n.RETURN,p=function(a){return null==a?void 0:i(a)},q=function(a){var b=a._c;b&&(a._c=void 0,b())},r=function(a){return void 0===a._o},s=function(a){r(a)||(a._o=void 0,q(a))},t=function(a,b){j(a),this._c=void 0,this._o=a,a=new u(this);try{var c=b(a),d=c;null!=c&&("function"==typeof c.unsubscribe?c=function(){d.unsubscribe()}:i(c),this._c=c)}catch(b){return void a.error(b)}r(this)&&q(this)};t.prototype=l({},{unsubscribe:function(){s(this)}});var u=function(a){this._s=a};u.prototype=l({},{next:function(a){var b=this._s;if(!r(b)){var c=b._o;try{var d=p(c.next);if(d)return d.call(c,a)}catch(a){try{s(b)}finally{throw a}}}},error:function(a){var b=this._s;if(r(b))throw a;var c=b._o;b._o=void 0;try{var d=p(c.error);if(!d)throw a;a=d.call(c,a)}catch(a){try{q(b)}finally{throw a}}return q(b),a},complete:function(a){var b=this._s;if(!r(b)){var c=b._o;b._o=void 0;try{var d=p(c.complete);a=d?d.call(c,a):void 0}catch(a){try{q(b)}finally{throw a}}return q(b),a}}});var v=function(a){k(this,v,"Observable","_f")._f=i(a)};l(v.prototype,{subscribe:function(a){return new t(a,this._f)},forEach:function(a){var b=this;return new(f.Promise||e.Promise)(function(c,d){i(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(a){d(a),e.unsubscribe()}},error:d,complete:c})})}}),l(v,{from:function(a){var b="function"==typeof this?this:v,c=p(j(a)[h]);if(c){var d=j(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return g(function(){if(!c){try{if(n(a,!1,function(a){if(b.next(a),c)return o})===o)return}catch(a){if(c)throw a;return void b.error(a)}b.complete()}}),function(){c=!0}})},of:function(){for(var a=0,b=arguments.length,c=Array(b);a1?arguments[1]:void 0,!1)}})},{"./_export":37,"./_string-pad":105}],291:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-pad");d(d.P,"String",{padStart:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":37,"./_string-pad":105}],292:[function(a,b,c){"use strict";a("./_string-trim")("trimLeft",function(a){return function(){return a(this,1)}},"trimStart")},{"./_string-trim":107}],293:[function(a,b,c){"use strict";a("./_string-trim")("trimRight",function(a){return function(){return a(this,2)}},"trimEnd")},{"./_string-trim":107}],294:[function(a,b,c){a("./_wks-define")("asyncIterator")},{"./_wks-define":120}],295:[function(a,b,c){a("./_wks-define")("observable")},{"./_wks-define":120}],296:[function(a,b,c){var d=a("./_export");d(d.S,"System",{global:a("./_global")})},{"./_export":37,"./_global":43}],297:[function(a,b,c){for(var d=a("./es6.array.iterator"),e=a("./_redefine"),f=a("./_global"),g=a("./_hide"),h=a("./_iterators"),i=a("./_wks"),j=i("iterator"),k=i("toStringTag"),l=h.Array,m=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],n=0;n<5;n++){var o,p=m[n],q=f[p],r=q&&q.prototype;if(r){r[j]||g(r,j,l),r[k]||g(r,k,p),h[p]=l;for(o in d)r[o]||e(r,o,d[o],!0)}}},{"./_global":43,"./_hide":45,"./_iterators":61,"./_redefine":92,"./_wks":122,"./es6.array.iterator":135}],298:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":37,"./_task":109}],299:[function(a,b,c){var d=a("./_global"),e=a("./_export"),f=a("./_invoke"),g=a("./_partial"),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},{"./_export":37,"./_global":43,"./_invoke":49,"./_partial":88}],300:[function(a,b,c){a("./modules/es6.symbol"),a("./modules/es6.object.create"),a("./modules/es6.object.define-property"),a("./modules/es6.object.define-properties"),a("./modules/es6.object.get-own-property-descriptor"),a("./modules/es6.object.get-prototype-of"),a("./modules/es6.object.keys"),a("./modules/es6.object.get-own-property-names"),a("./modules/es6.object.freeze"),a("./modules/es6.object.seal"),a("./modules/es6.object.prevent-extensions"),a("./modules/es6.object.is-frozen"),a("./modules/es6.object.is-sealed"),a("./modules/es6.object.is-extensible"),a("./modules/es6.object.assign"),a("./modules/es6.object.is"),a("./modules/es6.object.set-prototype-of"),a("./modules/es6.object.to-string"),a("./modules/es6.function.bind"),a("./modules/es6.function.name"),a("./modules/es6.function.has-instance"),a("./modules/es6.parse-int"),a("./modules/es6.parse-float"),a("./modules/es6.number.constructor"),a("./modules/es6.number.to-fixed"),a("./modules/es6.number.to-precision"),a("./modules/es6.number.epsilon"),a("./modules/es6.number.is-finite"),a("./modules/es6.number.is-integer"),a("./modules/es6.number.is-nan"),a("./modules/es6.number.is-safe-integer"),a("./modules/es6.number.max-safe-integer"),a("./modules/es6.number.min-safe-integer"),a("./modules/es6.number.parse-float"),a("./modules/es6.number.parse-int"),a("./modules/es6.math.acosh"),a("./modules/es6.math.asinh"),a("./modules/es6.math.atanh"),a("./modules/es6.math.cbrt"),a("./modules/es6.math.clz32"),a("./modules/es6.math.cosh"),a("./modules/es6.math.expm1"),a("./modules/es6.math.fround"),a("./modules/es6.math.hypot"),a("./modules/es6.math.imul"),a("./modules/es6.math.log10"),a("./modules/es6.math.log1p"),a("./modules/es6.math.log2"),a("./modules/es6.math.sign"),a("./modules/es6.math.sinh"),a("./modules/es6.math.tanh"),a("./modules/es6.math.trunc"),a("./modules/es6.string.from-code-point"),a("./modules/es6.string.raw"),a("./modules/es6.string.trim"),a("./modules/es6.string.iterator"),a("./modules/es6.string.code-point-at"),a("./modules/es6.string.ends-with"),a("./modules/es6.string.includes"),a("./modules/es6.string.repeat"),a("./modules/es6.string.starts-with"),a("./modules/es6.string.anchor"),a("./modules/es6.string.big"),a("./modules/es6.string.blink"),a("./modules/es6.string.bold"),a("./modules/es6.string.fixed"),a("./modules/es6.string.fontcolor"),a("./modules/es6.string.fontsize"),a("./modules/es6.string.italics"),a("./modules/es6.string.link"),a("./modules/es6.string.small"),a("./modules/es6.string.strike"),a("./modules/es6.string.sub"),a("./modules/es6.string.sup"),a("./modules/es6.date.now"),a("./modules/es6.date.to-json"),a("./modules/es6.date.to-iso-string"),a("./modules/es6.date.to-string"),a("./modules/es6.date.to-primitive"),a("./modules/es6.array.is-array"),a("./modules/es6.array.from"),a("./modules/es6.array.of"),a("./modules/es6.array.join"),a("./modules/es6.array.slice"),a("./modules/es6.array.sort"),a("./modules/es6.array.for-each"),a("./modules/es6.array.map"),a("./modules/es6.array.filter"),a("./modules/es6.array.some"),a("./modules/es6.array.every"),a("./modules/es6.array.reduce"),a("./modules/es6.array.reduce-right"),a("./modules/es6.array.index-of"),a("./modules/es6.array.last-index-of"),a("./modules/es6.array.copy-within"),a("./modules/es6.array.fill"),a("./modules/es6.array.find"),a("./modules/es6.array.find-index"),a("./modules/es6.array.species"),a("./modules/es6.array.iterator"),a("./modules/es6.regexp.constructor"),a("./modules/es6.regexp.to-string"),a("./modules/es6.regexp.flags"),a("./modules/es6.regexp.match"),a("./modules/es6.regexp.replace"),a("./modules/es6.regexp.search"),a("./modules/es6.regexp.split"),a("./modules/es6.promise"),a("./modules/es6.map"),a("./modules/es6.set"),a("./modules/es6.weak-map"),a("./modules/es6.weak-set"),a("./modules/es6.typed.array-buffer"),a("./modules/es6.typed.data-view"),a("./modules/es6.typed.int8-array"),a("./modules/es6.typed.uint8-array"),a("./modules/es6.typed.uint8-clamped-array"),a("./modules/es6.typed.int16-array"),a("./modules/es6.typed.uint16-array"),a("./modules/es6.typed.int32-array"),a("./modules/es6.typed.uint32-array"),a("./modules/es6.typed.float32-array"),a("./modules/es6.typed.float64-array"),a("./modules/es6.reflect.apply"),a("./modules/es6.reflect.construct"),a("./modules/es6.reflect.define-property"),a("./modules/es6.reflect.delete-property"),a("./modules/es6.reflect.enumerate"),a("./modules/es6.reflect.get"),a("./modules/es6.reflect.get-own-property-descriptor"),a("./modules/es6.reflect.get-prototype-of"),a("./modules/es6.reflect.has"),a("./modules/es6.reflect.is-extensible"),a("./modules/es6.reflect.own-keys"),a("./modules/es6.reflect.prevent-extensions"),a("./modules/es6.reflect.set"),a("./modules/es6.reflect.set-prototype-of"),a("./modules/es7.array.includes"),a("./modules/es7.string.at"),a("./modules/es7.string.pad-start"),a("./modules/es7.string.pad-end"),a("./modules/es7.string.trim-left"),a("./modules/es7.string.trim-right"),a("./modules/es7.string.match-all"),a("./modules/es7.symbol.async-iterator"),a("./modules/es7.symbol.observable"),a("./modules/es7.object.get-own-property-descriptors"),a("./modules/es7.object.values"),a("./modules/es7.object.entries"),a("./modules/es7.object.define-getter"),a("./modules/es7.object.define-setter"),a("./modules/es7.object.lookup-getter"),a("./modules/es7.object.lookup-setter"),a("./modules/es7.map.to-json"),a("./modules/es7.set.to-json"),a("./modules/es7.system.global"),a("./modules/es7.error.is-error"),a("./modules/es7.math.iaddh"),a("./modules/es7.math.isubh"),a("./modules/es7.math.imulh"),a("./modules/es7.math.umulh"),a("./modules/es7.reflect.define-metadata"),a("./modules/es7.reflect.delete-metadata"),a("./modules/es7.reflect.get-metadata"),a("./modules/es7.reflect.get-metadata-keys"),a("./modules/es7.reflect.get-own-metadata"),a("./modules/es7.reflect.get-own-metadata-keys"),a("./modules/es7.reflect.has-metadata"),a("./modules/es7.reflect.has-own-metadata"),a("./modules/es7.reflect.metadata"),a("./modules/es7.asap"),a("./modules/es7.observable"),a("./modules/web.timers"),a("./modules/web.immediate"),a("./modules/web.dom.iterable"),b.exports=a("./modules/_core")},{"./modules/_core":28,"./modules/es6.array.copy-within":125,"./modules/es6.array.every":126,"./modules/es6.array.fill":127,"./modules/es6.array.filter":128,"./modules/es6.array.find":130,"./modules/es6.array.find-index":129,"./modules/es6.array.for-each":131,"./modules/es6.array.from":132,"./modules/es6.array.index-of":133,"./modules/es6.array.is-array":134,"./modules/es6.array.iterator":135,"./modules/es6.array.join":136,"./modules/es6.array.last-index-of":137,"./modules/es6.array.map":138,"./modules/es6.array.of":139,"./modules/es6.array.reduce":141,"./modules/es6.array.reduce-right":140,"./modules/es6.array.slice":142,"./modules/es6.array.some":143,"./modules/es6.array.sort":144,"./modules/es6.array.species":145,"./modules/es6.date.now":146,"./modules/es6.date.to-iso-string":147,"./modules/es6.date.to-json":148,"./modules/es6.date.to-primitive":149,"./modules/es6.date.to-string":150,"./modules/es6.function.bind":151,"./modules/es6.function.has-instance":152,"./modules/es6.function.name":153,"./modules/es6.map":154,"./modules/es6.math.acosh":155,"./modules/es6.math.asinh":156,"./modules/es6.math.atanh":157,"./modules/es6.math.cbrt":158,"./modules/es6.math.clz32":159,"./modules/es6.math.cosh":160,"./modules/es6.math.expm1":161,"./modules/es6.math.fround":162,"./modules/es6.math.hypot":163,"./modules/es6.math.imul":164,"./modules/es6.math.log10":165,"./modules/es6.math.log1p":166,"./modules/es6.math.log2":167,"./modules/es6.math.sign":168,"./modules/es6.math.sinh":169,"./modules/es6.math.tanh":170,"./modules/es6.math.trunc":171,"./modules/es6.number.constructor":172,"./modules/es6.number.epsilon":173,"./modules/es6.number.is-finite":174,"./modules/es6.number.is-integer":175,"./modules/es6.number.is-nan":176,"./modules/es6.number.is-safe-integer":177,"./modules/es6.number.max-safe-integer":178,"./modules/es6.number.min-safe-integer":179,"./modules/es6.number.parse-float":180,"./modules/es6.number.parse-int":181,"./modules/es6.number.to-fixed":182,"./modules/es6.number.to-precision":183,"./modules/es6.object.assign":184,"./modules/es6.object.create":185,"./modules/es6.object.define-properties":186,"./modules/es6.object.define-property":187,"./modules/es6.object.freeze":188,"./modules/es6.object.get-own-property-descriptor":189,"./modules/es6.object.get-own-property-names":190,"./modules/es6.object.get-prototype-of":191,"./modules/es6.object.is":195,"./modules/es6.object.is-extensible":192,"./modules/es6.object.is-frozen":193,"./modules/es6.object.is-sealed":194,"./modules/es6.object.keys":196,"./modules/es6.object.prevent-extensions":197,"./modules/es6.object.seal":198,"./modules/es6.object.set-prototype-of":199,"./modules/es6.object.to-string":200,"./modules/es6.parse-float":201,"./modules/es6.parse-int":202,"./modules/es6.promise":203,"./modules/es6.reflect.apply":204,"./modules/es6.reflect.construct":205,"./modules/es6.reflect.define-property":206,"./modules/es6.reflect.delete-property":207,"./modules/es6.reflect.enumerate":208,"./modules/es6.reflect.get":211,"./modules/es6.reflect.get-own-property-descriptor":209,"./modules/es6.reflect.get-prototype-of":210,"./modules/es6.reflect.has":212,"./modules/es6.reflect.is-extensible":213,"./modules/es6.reflect.own-keys":214,"./modules/es6.reflect.prevent-extensions":215,"./modules/es6.reflect.set":217,"./modules/es6.reflect.set-prototype-of":216,"./modules/es6.regexp.constructor":218,"./modules/es6.regexp.flags":219,"./modules/es6.regexp.match":220,"./modules/es6.regexp.replace":221,"./modules/es6.regexp.search":222,"./modules/es6.regexp.split":223,"./modules/es6.regexp.to-string":224,"./modules/es6.set":225,"./modules/es6.string.anchor":226,"./modules/es6.string.big":227,"./modules/es6.string.blink":228,"./modules/es6.string.bold":229,"./modules/es6.string.code-point-at":230,"./modules/es6.string.ends-with":231,"./modules/es6.string.fixed":232,"./modules/es6.string.fontcolor":233,"./modules/es6.string.fontsize":234,"./modules/es6.string.from-code-point":235,"./modules/es6.string.includes":236,"./modules/es6.string.italics":237,"./modules/es6.string.iterator":238,"./modules/es6.string.link":239,"./modules/es6.string.raw":240,"./modules/es6.string.repeat":241,"./modules/es6.string.small":242,"./modules/es6.string.starts-with":243,"./modules/es6.string.strike":244,"./modules/es6.string.sub":245,"./modules/es6.string.sup":246,"./modules/es6.string.trim":247,"./modules/es6.symbol":248,"./modules/es6.typed.array-buffer":249,"./modules/es6.typed.data-view":250,"./modules/es6.typed.float32-array":251,"./modules/es6.typed.float64-array":252,"./modules/es6.typed.int16-array":253,"./modules/es6.typed.int32-array":254,"./modules/es6.typed.int8-array":255,"./modules/es6.typed.uint16-array":256,"./modules/es6.typed.uint32-array":257,"./modules/es6.typed.uint8-array":258,"./modules/es6.typed.uint8-clamped-array":259,"./modules/es6.weak-map":260,"./modules/es6.weak-set":261,"./modules/es7.array.includes":262,"./modules/es7.asap":263,"./modules/es7.error.is-error":264,"./modules/es7.map.to-json":265,"./modules/es7.math.iaddh":266,"./modules/es7.math.imulh":267,"./modules/es7.math.isubh":268,"./modules/es7.math.umulh":269,"./modules/es7.object.define-getter":270,"./modules/es7.object.define-setter":271,"./modules/es7.object.entries":272,"./modules/es7.object.get-own-property-descriptors":273,"./modules/es7.object.lookup-getter":274,"./modules/es7.object.lookup-setter":275,"./modules/es7.object.values":276,"./modules/es7.observable":277,"./modules/es7.reflect.define-metadata":278,"./modules/es7.reflect.delete-metadata":279,"./modules/es7.reflect.get-metadata":281,"./modules/es7.reflect.get-metadata-keys":280,"./modules/es7.reflect.get-own-metadata":283,"./modules/es7.reflect.get-own-metadata-keys":282,"./modules/es7.reflect.has-metadata":284,"./modules/es7.reflect.has-own-metadata":285,"./modules/es7.reflect.metadata":286,"./modules/es7.set.to-json":287,"./modules/es7.string.at":288,"./modules/es7.string.match-all":289,"./modules/es7.string.pad-end":290,"./modules/es7.string.pad-start":291,"./modules/es7.string.trim-left":292,"./modules/es7.string.trim-right":293,"./modules/es7.symbol.async-iterator":294,"./modules/es7.symbol.observable":295,"./modules/es7.system.global":296,"./modules/web.dom.iterable":297,"./modules/web.immediate":298,"./modules/web.timers":299}],301:[function(a,b,c){"use strict";var d=a("./emptyFunction"),e={listen:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,c,!1)}}):a.attachEvent?(a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+b,c)}}):void 0},capture:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!0),{remove:function(){a.removeEventListener(b,c,!0)}}):{remove:d}},registerDefault:function(){}};b.exports=e},{"./emptyFunction":308}],302:[function(a,b,c){"use strict";var d=!("undefined"==typeof window||!window.document||!window.document.createElement),e={canUseDOM:d,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:d&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:d&&!!window.screen,isInWorker:!d};b.exports=e},{}],303:[function(a,b,c){"use strict";function d(a){return a.replace(e,function(a,b){return b.toUpperCase()})}var e=/-(.)/g;b.exports=d},{}],304:[function(a,b,c){"use strict";function d(a){return e(a.replace(f,"ms-"))}var e=a("./camelize"),f=/^-ms-/;b.exports=d},{"./camelize":303}],305:[function(a,b,c){"use strict";function d(a,b){return!(!a||!b)&&(a===b||!e(a)&&(e(b)?d(a,b.parentNode):"contains"in a?a.contains(b):!!a.compareDocumentPosition&&!!(16&a.compareDocumentPosition(b))))}var e=a("./isTextNode");b.exports=d},{"./isTextNode":318}],306:[function(a,b,c){"use strict";function d(a){var b=a.length;if(Array.isArray(a)||"object"!=typeof a&&"function"!=typeof a?g(!1):void 0,"number"!=typeof b?g(!1):void 0,0===b||b-1 in a?void 0:g(!1),"function"==typeof a.callee?g(!1):void 0,a.hasOwnProperty)try{return Array.prototype.slice.call(a)}catch(a){}for(var c=Array(b),d=0;d":g.innerHTML="<"+a+">",h[a]=!g.firstChild),h[a]?m[a]:null}var e=a("./ExecutionEnvironment"),f=a("./invariant"),g=e.canUseDOM?document.createElement("div"):null,h={},i=[1,'"],j=[1,"","
    "],k=[3,"","
    "],l=[1,'',""],m={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:i,option:i,caption:j,colgroup:j,tbody:j,tfoot:j,thead:j,td:k,th:k},n=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"]; +n.forEach(function(a){m[a]=l,h[a]=!0}),b.exports=d},{"./ExecutionEnvironment":302,"./invariant":316}],313:[function(a,b,c){"use strict";function d(a){return a===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:a.scrollLeft,y:a.scrollTop}}b.exports=d},{}],314:[function(a,b,c){"use strict";function d(a){return a.replace(e,"-$1").toLowerCase()}var e=/([A-Z])/g;b.exports=d},{}],315:[function(a,b,c){"use strict";function d(a){return e(a).replace(f,"-ms-")}var e=a("./hyphenate"),f=/^ms-/;b.exports=d},{"./hyphenate":314}],316:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){if(!a){var i;if(void 0===b)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var j=[c,d,e,f,g,h],k=0;i=new Error(b.replace(/%s/g,function(){return j[k++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}b.exports=d},{}],317:[function(a,b,c){"use strict";function d(a){return!(!a||!("function"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName))}b.exports=d},{}],318:[function(a,b,c){"use strict";function d(a){return e(a)&&3==a.nodeType}var e=a("./isNode");b.exports=d},{"./isNode":317}],319:[function(a,b,c){"use strict";var d=function(a){var b;for(b in a)if(a.hasOwnProperty(b))return b;return null};b.exports=d},{}],320:[function(a,b,c){"use strict";function d(a){var b={};return function(c){return b.hasOwnProperty(c)||(b[c]=a.call(this,c)),b[c]}}b.exports=d},{}],321:[function(a,b,c){"use strict";var d,e=a("./ExecutionEnvironment");e.canUseDOM&&(d=window.performance||window.msPerformance||window.webkitPerformance),b.exports=d||{}},{"./ExecutionEnvironment":302}],322:[function(a,b,c){"use strict";var d,e=a("./performance");d=e.now?function(){return e.now()}:function(){return Date.now()},b.exports=d},{"./performance":321}],323:[function(a,b,c){"use strict";function d(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}function e(a,b){if(d(a,b))return!0;if("object"!=typeof a||null===a||"object"!=typeof b||null===b)return!1;var c=Object.keys(a),e=Object.keys(b);if(c.length!==e.length)return!1;for(var g=0;g=b._browserInfo.version}).reduce(function(a,b){return a[b]=!0,a},{}),this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0):this._usePrefixAllFallback=!0}return g(a,[{key:"prefix",value:function(a){var b=this;return this._usePrefixAllFallback?(0,i.default)(a):this._hasPropsRequiringPrefix?(Object.keys(a).forEach(function(c){var d=a[c];d instanceof Object&&!Array.isArray(d)?a[c]=b.prefix(d):b._requiresPrefix[c]&&(a[b.jsPrefix+(0,o.default)(c)]=d,b._keepUnprefixed||delete a[c])}),Object.keys(a).forEach(function(c){[].concat(a[c]).forEach(function(d){N.forEach(function(e){f(a,e({property:c,value:d,styles:a,browserInfo:b._browserInfo,prefix:{js:b.jsPrefix,css:b.cssPrefix,keyframes:b.prefixedKeyframes},keepUnprefixed:b._keepUnprefixed,requiresPrefix:b._requiresPrefix}),d,b._keepUnprefixed)})})}),(0,q.default)(a)):a}}],[{key:"prefixAll",value:function(a){return(0,i.default)(a)}}]),a}();c.default=O,b.exports=c.default},{"./plugins/calc":327,"./plugins/flex":328,"./plugins/flexboxIE":329,"./plugins/flexboxOld":330,"./plugins/grabCursor":331,"./plugins/gradient":332,"./plugins/position":333,"./plugins/sizing":334,"./plugins/transition":335,"./plugins/zoomCursor":336,"./prefixProps":337,"./static/prefixAll":347,"./utils/capitalizeString":349,"./utils/getBrowserInformation":350,"./utils/getPrefixedKeyframes":351,"./utils/sortPrefixedStyle":356}],327:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.browserInfo,f=d.browser,g=d.version,i=a.prefix.css,j=a.keepUnprefixed;if("string"==typeof c&&c.indexOf("calc(")>-1&&("firefox"===f&&g<15||"chrome"===f&&g<25||"safari"===f&&g<6.1||"ios_saf"===f&&g<7))return e({},b,(0,h.default)(c.replace(/calc\(/g,i+"calc("),c,j))}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g);b.exports=c.default},{"../utils/getPrefixedValue":352}],328:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){var b=a.property,c=a.value,d=a.browserInfo,e=d.browser,f=d.version,i=a.prefix.css,j=a.keepUnprefixed;if("display"===b&&h[c]&&("chrome"===e&&f<29&&f>20||("safari"===e||"ios_saf"===e)&&f<9&&f>6||"opera"===e&&(15==f||16==f)))return{display:(0,g.default)(i+c,c,j)}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../utils/getPrefixedValue"),g=d(f),h={flex:!0,"inline-flex":!0};b.exports=c.default},{"../utils/getPrefixedValue":352}],329:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.styles,f=a.browserInfo,g=f.browser,k=f.version,l=a.prefix.css,m=a.keepUnprefixed;if((j[b]||"display"===b&&"string"==typeof c&&c.indexOf("flex")>-1)&&("ie_mob"===g||"ie"===g)&&10==k){if(m||Array.isArray(d[b])||delete d[b],"display"===b&&i[c])return{display:(0,h.default)(l+i[c],c,m)};if(j[b])return e({},j[b],i[c]||c)}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g),i={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},j={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};b.exports=c.default},{"../utils/getPrefixedValue":352}],330:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.styles,f=a.browserInfo,g=f.browser,k=f.version,m=a.prefix.css,n=a.keepUnprefixed;if((l.indexOf(b)>-1||"display"===b&&"string"==typeof c&&c.indexOf("flex")>-1)&&("firefox"===g&&k<22||"chrome"===g&&k<21||("safari"===g||"ios_saf"===g)&&k<=6.1||"android"===g&&k<4.4||"and_uc"===g)){if(n||Array.isArray(d[b])||delete d[b],"flexDirection"===b&&"string"==typeof c)return{WebkitBoxOrient:c.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:c.indexOf("reverse")>-1?"reverse":"normal"};if("display"===b&&i[c])return{display:(0,h.default)(m+i[c],c,n)};if(j[b])return e({},j[b],i[c]||c)}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g),i={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},j={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"},k=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],l=Object.keys(j).concat(k);b.exports=c.default},{"../utils/getPrefixedValue":352}],331:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){var b=a.property,c=a.value,d=a.browserInfo.browser,e=a.prefix.css,f=a.keepUnprefixed;if("cursor"===b&&h[c]&&("firefox"===d||"chrome"===d||"safari"===d||"opera"===d))return{cursor:(0,g.default)(e+c,c,f)}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../utils/getPrefixedValue"),g=d(f),h={grab:!0,grabbing:!0};b.exports=c.default},{"../utils/getPrefixedValue":352}],332:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.browserInfo,f=d.browser,g=d.version,j=a.prefix.css,k=a.keepUnprefixed;if("string"==typeof c&&null!==c.match(i)&&("firefox"===f&&g<16||"chrome"===f&&g<26||("safari"===f||"ios_saf"===f)&&g<7||("opera"===f||"op_mini"===f)&&g<12.1||"android"===f&&g<4.4||"and_uc"===f))return e({},b,(0,h.default)(j+c,c,k))}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g),i=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;b.exports=c.default},{"../utils/getPrefixedValue":352}],333:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.browserInfo.browser,f=a.prefix.css,g=a.keepUnprefixed;if("position"===b&&"sticky"===c&&("safari"===d||"ios_saf"===d))return e({},b,(0,h.default)(f+c,c,g))}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g);b.exports=c.default},{"../utils/getPrefixedValue":352}],334:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.prefix.css,f=a.keepUnprefixed;if(i[b]&&j[c])return e({},b,(0,h.default)(d+c,c,f))}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var g=a("../utils/getPrefixedValue"),h=d(g),i={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},j={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};b.exports=c.default},{"../utils/getPrefixedValue":352}],335:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){var b=a.property,c=a.value,d=a.prefix.css,f=a.requiresPrefix,h=a.keepUnprefixed,j=(0,k.default)(b);if("string"==typeof c&&l[j]){var m=function(){var a=Object.keys(f).map(function(a){return(0,i.default)(a)}),g=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return a.forEach(function(a){g.forEach(function(b,c){b.indexOf(a)>-1&&"order"!==a&&(g[c]=b.replace(a,d+a)+(h?","+b:""))})}),{v:e({},b,g.join(","))}}();if("object"===("undefined"==typeof m?"undefined":g(m)))return m.v}}Object.defineProperty(c,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};c.default=f;var h=a("hyphenate-style-name"),i=d(h),j=a("../utils/unprefixProperty"),k=d(j),l={transition:!0,transitionProperty:!0};b.exports=c.default},{"../utils/unprefixProperty":357,"hyphenate-style-name":325}],336:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){var b=a.property,c=a.value,d=a.browserInfo,e=d.browser,f=d.version,i=a.prefix.css,j=a.keepUnprefixed;if("cursor"===b&&h[c]&&("firefox"===e&&f<24||"chrome"===e&&f<37||"safari"===e&&f<9||"opera"===e&&f<24))return{cursor:(0,g.default)(i+c,c,j)}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../utils/getPrefixedValue"),g=d(f),h={"zoom-in":!0,"zoom-out":!0};b.exports=c.default},{"../utils/getPrefixedValue":352}],337:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default={chrome:{transform:35,transformOrigin:35,transformOriginX:35,transformOriginY:35,backfaceVisibility:35,perspective:35,perspectiveOrigin:35,transformStyle:35,transformOriginZ:35,animation:42,animationDelay:42,animationDirection:42,animationFillMode:42,animationDuration:42,animationIterationCount:42,animationName:42,animationPlayState:42,animationTimingFunction:42,appearance:55,userSelect:55,fontKerning:32,textEmphasisPosition:55,textEmphasis:55,textEmphasisStyle:55,textEmphasisColor:55,boxDecorationBreak:55,clipPath:55,maskImage:55,maskMode:55,maskRepeat:55,maskPosition:55,maskClip:55,maskOrigin:55,maskSize:55,maskComposite:55,mask:55,maskBorderSource:55,maskBorderMode:55,maskBorderSlice:55,maskBorderWidth:55,maskBorderOutset:55,maskBorderRepeat:55,maskBorder:55,maskType:55,textDecorationStyle:55,textDecorationSkip:55,textDecorationLine:55,textDecorationColor:55,filter:52,fontFeatureSettings:47,breakAfter:49,breakBefore:49,breakInside:49,columnCount:49,columnFill:49,columnGap:49,columnRule:49,columnRuleColor:49,columnRuleStyle:49,columnRuleWidth:49,columns:49,columnSpan:49,columnWidth:49},safari:{flex:8,flexBasis:8,flexDirection:8,flexGrow:8,flexFlow:8,flexShrink:8,flexWrap:8,alignContent:8,alignItems:8,alignSelf:8,justifyContent:8,order:8,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8,transformOrigin:8,transformOriginX:8,transformOriginY:8,backfaceVisibility:8,perspective:8,perspectiveOrigin:8,transformStyle:8,transformOriginZ:8,animation:8,animationDelay:8,animationDirection:8,animationFillMode:8,animationDuration:8,animationIterationCount:8,animationName:8,animationPlayState:8,animationTimingFunction:8,appearance:10,userSelect:10,backdropFilter:10,fontKerning:9,scrollSnapType:10,scrollSnapPointsX:10,scrollSnapPointsY:10,scrollSnapDestination:10,scrollSnapCoordinate:10,textEmphasisPosition:7,textEmphasis:7,textEmphasisStyle:7,textEmphasisColor:7,boxDecorationBreak:10,clipPath:10,maskImage:10,maskMode:10,maskRepeat:10,maskPosition:10,maskClip:10,maskOrigin:10,maskSize:10,maskComposite:10,mask:10,maskBorderSource:10,maskBorderMode:10,maskBorderSlice:10,maskBorderWidth:10,maskBorderOutset:10,maskBorderRepeat:10,maskBorder:10,maskType:10,textDecorationStyle:10,textDecorationSkip:10,textDecorationLine:10,textDecorationColor:10,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:10,flowInto:10,flowFrom:10,breakBefore:8,breakAfter:8,breakInside:8,regionFragment:10,columnCount:8,columnFill:8,columnGap:8,columnRule:8,columnRuleColor:8,columnRuleStyle:8,columnRuleWidth:8,columns:8,columnSpan:8,columnWidth:8},firefox:{appearance:51,userSelect:51,boxSizing:28,textAlignLast:48,textDecorationStyle:35,textDecorationSkip:35,textDecorationLine:35,textDecorationColor:35,tabSize:51,hyphens:42,fontFeatureSettings:33,breakAfter:51,breakBefore:51,breakInside:51,columnCount:51,columnFill:51,columnGap:51,columnRule:51,columnRuleColor:51,columnRuleStyle:51,columnRuleWidth:51,columns:51,columnSpan:51,columnWidth:51},opera:{flex:16,flexBasis:16,flexDirection:16,flexGrow:16,flexFlow:16,flexShrink:16,flexWrap:16,alignContent:16,alignItems:16,alignSelf:16,justifyContent:16,order:16,transform:22,transformOrigin:22,transformOriginX:22,transformOriginY:22,backfaceVisibility:22,perspective:22,perspectiveOrigin:22,transformStyle:22,transformOriginZ:22,animation:29,animationDelay:29,animationDirection:29,animationFillMode:29,animationDuration:29,animationIterationCount:29,animationName:29,animationPlayState:29,animationTimingFunction:29,appearance:41,userSelect:41,fontKerning:19,textEmphasisPosition:41,textEmphasis:41,textEmphasisStyle:41,textEmphasisColor:41,boxDecorationBreak:41,clipPath:41,maskImage:41,maskMode:41,maskRepeat:41,maskPosition:41,maskClip:41,maskOrigin:41,maskSize:41,maskComposite:41,mask:41,maskBorderSource:41,maskBorderMode:41,maskBorderSlice:41,maskBorderWidth:41,maskBorderOutset:41,maskBorderRepeat:41,maskBorder:41,maskType:41,textDecorationStyle:41,textDecorationSkip:41,textDecorationLine:41,textDecorationColor:41,filter:39,fontFeatureSettings:34,breakAfter:36,breakBefore:36,breakInside:36,columnCount:36,columnFill:36,columnGap:36,columnRule:36,columnRuleColor:36,columnRuleStyle:36,columnRuleWidth:36,columns:36,columnSpan:36,columnWidth:36},ie:{flex:10,flexDirection:10,flexFlow:10,flexWrap:10,transform:9,transformOrigin:9,transformOriginX:9,transformOriginY:9,userSelect:11,wrapFlow:11,wrapThrough:11,wrapMargin:11,scrollSnapType:11,scrollSnapPointsX:11,scrollSnapPointsY:11,scrollSnapDestination:11,scrollSnapCoordinate:11,touchAction:10,hyphens:11,flowInto:11,flowFrom:11,breakBefore:11,breakAfter:11,breakInside:11,regionFragment:11,gridTemplateColumns:11,gridTemplateRows:11,gridTemplateAreas:11,gridTemplate:11,gridAutoColumns:11,gridAutoRows:11,gridAutoFlow:11,grid:11,gridRowStart:11,gridColumnStart:11,gridRowEnd:11,gridRow:11,gridColumn:11,gridColumnEnd:11,gridColumnGap:11,gridRowGap:11,gridArea:11,gridGap:11,textSizeAdjust:11},edge:{userSelect:14,wrapFlow:14,wrapThrough:14,wrapMargin:14,scrollSnapType:14,scrollSnapPointsX:14,scrollSnapPointsY:14,scrollSnapDestination:14,scrollSnapCoordinate:14,hyphens:14,flowInto:14,flowFrom:14,breakBefore:14,breakAfter:14,breakInside:14,regionFragment:14,gridTemplateColumns:14,gridTemplateRows:14,gridTemplateAreas:14,gridTemplate:14,gridAutoColumns:14,gridAutoRows:14,gridAutoFlow:14,grid:14,gridRowStart:14,gridColumnStart:14,gridRowEnd:14,gridRow:14,gridColumn:14,gridColumnEnd:14,gridColumnGap:14,gridRowGap:14,gridArea:14,gridGap:14},ios_saf:{flex:8.1,flexBasis:8.1,flexDirection:8.1,flexGrow:8.1,flexFlow:8.1,flexShrink:8.1,flexWrap:8.1,alignContent:8.1,alignItems:8.1,alignSelf:8.1,justifyContent:8.1,order:8.1,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8.1,transformOrigin:8.1,transformOriginX:8.1,transformOriginY:8.1,backfaceVisibility:8.1,perspective:8.1,perspectiveOrigin:8.1,transformStyle:8.1,transformOriginZ:8.1,animation:8.1,animationDelay:8.1,animationDirection:8.1,animationFillMode:8.1,animationDuration:8.1,animationIterationCount:8.1,animationName:8.1,animationPlayState:8.1,animationTimingFunction:8.1,appearance:9.3,userSelect:9.3,backdropFilter:9.3,fontKerning:9.3,scrollSnapType:9.3,scrollSnapPointsX:9.3,scrollSnapPointsY:9.3,scrollSnapDestination:9.3,scrollSnapCoordinate:9.3,boxDecorationBreak:9.3,clipPath:9.3,maskImage:9.3,maskMode:9.3,maskRepeat:9.3,maskPosition:9.3,maskClip:9.3,maskOrigin:9.3,maskSize:9.3,maskComposite:9.3,mask:9.3,maskBorderSource:9.3,maskBorderMode:9.3,maskBorderSlice:9.3,maskBorderWidth:9.3,maskBorderOutset:9.3,maskBorderRepeat:9.3,maskBorder:9.3,maskType:9.3,textSizeAdjust:9.3,textDecorationStyle:9.3,textDecorationSkip:9.3,textDecorationLine:9.3,textDecorationColor:9.3,shapeImageThreshold:9.3,shapeImageMargin:9.3,shapeImageOutside:9.3,filter:9,hyphens:9.3,flowInto:9.3,flowFrom:9.3,breakBefore:8.1,breakAfter:8.1,breakInside:8.1,regionFragment:9.3,columnCount:8.1,columnFill:8.1,columnGap:8.1,columnRule:8.1,columnRuleColor:8.1,columnRuleStyle:8.1,columnRuleWidth:8.1,columns:8.1,columnSpan:8.1,columnWidth:8.1},android:{flex:4.2,flexBasis:4.2,flexDirection:4.2,flexGrow:4.2,flexFlow:4.2,flexShrink:4.2,flexWrap:4.2,alignContent:4.2,alignItems:4.2,alignSelf:4.2,justifyContent:4.2,order:4.2,transition:4.2,transitionDelay:4.2,transitionDuration:4.2,transitionProperty:4.2,transitionTimingFunction:4.2,transform:4.4,transformOrigin:4.4,transformOriginX:4.4,transformOriginY:4.4,backfaceVisibility:4.4,perspective:4.4,perspectiveOrigin:4.4,transformStyle:4.4,transformOriginZ:4.4,animation:4.4,animationDelay:4.4,animationDirection:4.4,animationFillMode:4.4,animationDuration:4.4,animationIterationCount:4.4,animationName:4.4,animationPlayState:4.4,animationTimingFunction:4.4,appearance:51,userSelect:51,fontKerning:4.4,textEmphasisPosition:51,textEmphasis:51,textEmphasisStyle:51,textEmphasisColor:51,boxDecorationBreak:51,clipPath:51,maskImage:51,maskMode:51,maskRepeat:51,maskPosition:51,maskClip:51,maskOrigin:51,maskSize:51,maskComposite:51,mask:51,maskBorderSource:51,maskBorderMode:51,maskBorderSlice:51,maskBorderWidth:51,maskBorderOutset:51,maskBorderRepeat:51,maskBorder:51,maskType:51,filter:51,fontFeatureSettings:4.4,breakAfter:51,breakBefore:51,breakInside:51,columnCount:51,columnFill:51,columnGap:51,columnRule:51,columnRuleColor:51,columnRuleStyle:51,columnRuleWidth:51,columns:51,columnSpan:51,columnWidth:51},and_chr:{appearance:51,userSelect:51,textEmphasisPosition:51,textEmphasis:51,textEmphasisStyle:51,textEmphasisColor:51,boxDecorationBreak:51,clipPath:51,maskImage:51,maskMode:51,maskRepeat:51,maskPosition:51,maskClip:51,maskOrigin:51,maskSize:51,maskComposite:51,mask:51,maskBorderSource:51,maskBorderMode:51,maskBorderSlice:51,maskBorderWidth:51,maskBorderOutset:51,maskBorderRepeat:51,maskBorder:51,maskType:51,textDecorationStyle:51,textDecorationSkip:51,textDecorationLine:51,textDecorationColor:51,filter:51},and_uc:{flex:9.9,flexBasis:9.9,flexDirection:9.9,flexGrow:9.9,flexFlow:9.9,flexShrink:9.9,flexWrap:9.9,alignContent:9.9,alignItems:9.9,alignSelf:9.9,justifyContent:9.9,order:9.9,transition:9.9,transitionDelay:9.9,transitionDuration:9.9,transitionProperty:9.9,transitionTimingFunction:9.9,transform:9.9,transformOrigin:9.9,transformOriginX:9.9,transformOriginY:9.9,backfaceVisibility:9.9,perspective:9.9,perspectiveOrigin:9.9,transformStyle:9.9,transformOriginZ:9.9,animation:9.9,animationDelay:9.9,animationDirection:9.9,animationFillMode:9.9,animationDuration:9.9,animationIterationCount:9.9,animationName:9.9,animationPlayState:9.9,animationTimingFunction:9.9,appearance:9.9,userSelect:9.9,fontKerning:9.9,textEmphasisPosition:9.9,textEmphasis:9.9,textEmphasisStyle:9.9,textEmphasisColor:9.9,maskImage:9.9,maskMode:9.9,maskRepeat:9.9,maskPosition:9.9,maskClip:9.9,maskOrigin:9.9,maskSize:9.9,maskComposite:9.9,mask:9.9,maskBorderSource:9.9,maskBorderMode:9.9,maskBorderSlice:9.9,maskBorderWidth:9.9,maskBorderOutset:9.9,maskBorderRepeat:9.9,maskBorder:9.9,maskType:9.9,textSizeAdjust:9.9,filter:9.9,hyphens:9.9,flowInto:9.9,flowFrom:9.9,breakBefore:9.9,breakAfter:9.9,breakInside:9.9,regionFragment:9.9,fontFeatureSettings:9.9,columnCount:9.9,columnFill:9.9,columnGap:9.9,columnRule:9.9,columnRuleColor:9.9,columnRuleStyle:9.9,columnRuleWidth:9.9,columns:9.9,columnSpan:9.9,columnWidth:9.9},op_mini:{}},b.exports=c.default},{}],338:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if("string"==typeof b&&!(0,i.default)(b)&&b.indexOf("calc(")>-1)return(0,g.default)(a,b,function(a,b){return b.replace(/calc\(/g,a+"calc(")})}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../../utils/joinPrefixedValue"),g=d(f),h=a("../../utils/isPrefixedValue"),i=d(h);b.exports=c.default},{"../../utils/isPrefixedValue":354,"../../utils/joinPrefixedValue":355}],339:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if("cursor"===a&&h[b])return(0,g.default)(a,b)}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../../utils/joinPrefixedValue"),g=d(f),h={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};b.exports=c.default},{"../../utils/joinPrefixedValue":355}],340:[function(a,b,c){"use strict";function d(a,b){if("display"===a&&e[b])return{display:["-webkit-box","-moz-box","-ms-"+b+"box","-webkit-"+b,b]}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d;var e={flex:!0,"inline-flex":!0};b.exports=c.default},{}],341:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(g[a])return d({},g[a],f[b]||b)}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},g={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};b.exports=c.default},{}],342:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){return"flexDirection"===a&&"string"==typeof b?{WebkitBoxOrient:b.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:b.indexOf("reverse")>-1?"reverse":"normal"}:g[a]?d({},g[a],f[b]||b):void 0}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},g={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};b.exports=c.default},{}],343:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if("string"==typeof b&&!(0,i.default)(b)&&null!==b.match(j))return(0,g.default)(a,b)}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../../utils/joinPrefixedValue"),g=d(f),h=a("../../utils/isPrefixedValue"),i=d(h),j=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;b.exports=c.default},{"../../utils/isPrefixedValue":354,"../../utils/joinPrefixedValue":355}],344:[function(a,b,c){"use strict";function d(a,b){if("position"===a&&"sticky"===b)return{position:["-webkit-sticky","sticky"]}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],345:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(h[a]&&i[b])return(0,g.default)(a,b)}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("../../utils/joinPrefixedValue"),g=d(f),h={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},i={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};b.exports=c.default},{"../../utils/joinPrefixedValue":355}],346:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a,b){if("string"==typeof b&&p[a]){var c,d=g(b),f=d.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(a){return null===a.match(/-moz-|-ms-/)}).join(",");return a.indexOf("Webkit")>-1?e({},a,f):(c={},e(c,"Webkit"+(0,k.default)(a),f),e(c,a,d),c)}}function g(a){if((0,m.default)(a))return a;var b=a.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return b.forEach(function(a,c){b[c]=Object.keys(o.default).reduce(function(b,c){var d="-"+c.toLowerCase()+"-";return Object.keys(o.default[c]).forEach(function(c){var e=(0,i.default)(c);a.indexOf(e)>-1&&"order"!==e&&(b=a.replace(e,d+e)+","+b)}),b},a)}),b.join(",")}Object.defineProperty(c,"__esModule",{value:!0}),c.default=f;var h=a("hyphenate-style-name"),i=d(h),j=a("../../utils/capitalizeString"),k=d(j),l=a("../../utils/isPrefixedValue"),m=d(l),n=a("../prefixProps"),o=d(n),p={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0};b.exports=c.default},{"../../utils/capitalizeString":349,"../../utils/isPrefixedValue":354,"../prefixProps":348,"hyphenate-style-name":325}],347:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){return Object.keys(a).forEach(function(b){var c=a[b];c instanceof Object&&!Array.isArray(c)?a[b]=e(c):Object.keys(h.default).forEach(function(d){var e=h.default[d];e[b]&&(a[d+(0,j.default)(b)]=c)})}),Object.keys(a).forEach(function(b){[].concat(a[b]).forEach(function(c,d){E.forEach(function(d){return f(a,d(b,c))})})}),(0,l.default)(a)}function f(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];Object.keys(b).forEach(function(c){var d=a[c];Array.isArray(d)?[].concat(b[c]).forEach(function(b){var e=d.indexOf(b);e>-1&&a[c].splice(e,1),a[c].push(b)}):a[c]=b[c]})}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var g=a("./prefixProps"),h=d(g),i=a("../utils/capitalizeString"),j=d(i),k=a("../utils/sortPrefixedStyle"),l=d(k),m=a("./plugins/position"),n=d(m),o=a("./plugins/calc"),p=d(o),q=a("./plugins/cursor"),r=d(q),s=a("./plugins/flex"),t=d(s),u=a("./plugins/sizing"),v=d(u),w=a("./plugins/gradient"),x=d(w),y=a("./plugins/transition"),z=d(y),A=a("./plugins/flexboxIE"),B=d(A),C=a("./plugins/flexboxOld"),D=d(C),E=[n.default,p.default,r.default,v.default,x.default,z.default,B.default,D.default,t.default];b.exports=c.default},{"../utils/capitalizeString":349,"../utils/sortPrefixedStyle":356,"./plugins/calc":338,"./plugins/cursor":339,"./plugins/flex":340,"./plugins/flexboxIE":341,"./plugins/flexboxOld":342,"./plugins/gradient":343,"./plugins/position":344,"./plugins/sizing":345,"./plugins/transition":346,"./prefixProps":348}],348:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default={Webkit:{transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,backfaceVisibility:!0,perspective:!0,perspectiveOrigin:!0,transformStyle:!0,transformOriginZ:!0,animation:!0,animationDelay:!0,animationDirection:!0,animationFillMode:!0,animationDuration:!0,animationIterationCount:!0,animationName:!0,animationPlayState:!0,animationTimingFunction:!0,appearance:!0,userSelect:!0,fontKerning:!0,textEmphasisPosition:!0,textEmphasis:!0,textEmphasisStyle:!0,textEmphasisColor:!0,boxDecorationBreak:!0,clipPath:!0,maskImage:!0,maskMode:!0,maskRepeat:!0,maskPosition:!0,maskClip:!0,maskOrigin:!0,maskSize:!0,maskComposite:!0,mask:!0,maskBorderSource:!0,maskBorderMode:!0,maskBorderSlice:!0,maskBorderWidth:!0,maskBorderOutset:!0,maskBorderRepeat:!0,maskBorder:!0,maskType:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,filter:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0, +breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexFlow:!0,flexShrink:!0,flexWrap:!0,alignContent:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,order:!0,transition:!0,transitionDelay:!0,transitionDuration:!0,transitionProperty:!0,transitionTimingFunction:!0,backdropFilter:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,shapeImageThreshold:!0,shapeImageMargin:!0,shapeImageOutside:!0,hyphens:!0,flowInto:!0,flowFrom:!0,regionFragment:!0,textSizeAdjust:!0},Moz:{appearance:!0,userSelect:!0,boxSizing:!0,textAlignLast:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,tabSize:!0,hyphens:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0},ms:{flex:!0,flexBasis:!1,flexDirection:!0,flexGrow:!1,flexFlow:!0,flexShrink:!1,flexWrap:!0,alignContent:!1,alignItems:!1,alignSelf:!1,justifyContent:!1,order:!1,transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,userSelect:!0,wrapFlow:!0,wrapThrough:!0,wrapMargin:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,touchAction:!0,hyphens:!0,flowInto:!0,flowFrom:!0,breakBefore:!0,breakAfter:!0,breakInside:!0,regionFragment:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridTemplate:!0,gridAutoColumns:!0,gridAutoRows:!0,gridAutoFlow:!0,grid:!0,gridRowStart:!0,gridColumnStart:!0,gridRowEnd:!0,gridRow:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridRowGap:!0,gridArea:!0,gridGap:!0,textSizeAdjust:!0}},b.exports=c.default},{}],349:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},b.exports=c.default},{}],350:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a("bowser"),f=d(e),g={Webkit:["chrome","safari","ios","android","phantom","opera","webos","blackberry","bada","tizen","chromium","vivaldi"],Moz:["firefox","seamonkey","sailfish"],ms:["msie","msedge"]},h={chrome:[["chrome"],["chromium"]],safari:[["safari"]],firefox:[["firefox"]],edge:[["msedge"]],opera:[["opera"],["vivaldi"]],ios_saf:[["ios","mobile"],["ios","tablet"]],ie:[["msie"]],op_mini:[["opera","mobile"],["opera","tablet"]],and_uc:[["android","mobile"],["android","tablet"]],android:[["android","mobile"],["android","tablet"]]},i=function(a){if(a.firefox)return"firefox";var b="";return Object.keys(h).forEach(function(c){h[c].forEach(function(d){var e=0;d.forEach(function(b){a[b]&&(e+=1)}),d.length===e&&(b=c)})}),b};c.default=function(a){if(!a)return!1;var b=f.default._detect(a);return Object.keys(g).forEach(function(a){g[a].forEach(function(c){b[c]&&(b.prefix={inline:a,css:"-"+a.toLowerCase()+"-"})})}),b.browser=i(b),b.version=b.version?parseFloat(b.version):parseInt(parseFloat(b.osversion),10),b.osversion=parseFloat(b.osversion),"ios_saf"===b.browser&&b.version>b.osversion&&(b.version=b.osversion,b.safari=!0),"android"===b.browser&&b.chrome&&b.version>37&&(b.browser="and_chr"),"android"===b.browser&&b.osversion<5&&(b.version=b.osversion),b},b.exports=c.default},{bowser:6}],351:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a){var b=a.browser,c=a.version,d=a.prefix,e="keyframes";return("chrome"===b&&c<43||("safari"===b||"ios_saf"===b)&&c<9||"opera"===b&&c<30||"android"===b&&c<=4.4||"and_uc"===b)&&(e=d.css+e),e},b.exports=c.default},{}],352:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a,b,c){return c?[a,b]:a},b.exports=c.default},{}],353:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a){return null!==a.match(/^(Webkit|Moz|O|ms)/)},b.exports=c.default},{}],354:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a){return Array.isArray(a)&&(a=a.join(",")),null!==a.match(/-webkit-|-moz-|-ms-/)},b.exports=c.default},{}],355:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a,b){return a+b}:arguments[2];return d({},a,["-webkit-","-moz-",""].map(function(a){return c(a,b)}))},b.exports=c.default},{}],356:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){return Object.keys(a).sort(function(a,b){return(0,g.default)(a)&&!(0,g.default)(b)?-1:!(0,g.default)(a)&&(0,g.default)(b)?1:0}).reduce(function(b,c){return b[c]=a[c],b},{})}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./isPrefixedProperty"),g=d(f);b.exports=c.default},{"./isPrefixedProperty":353}],357:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a){var b=a.replace(/^(ms|Webkit|Moz|O)/,"");return b.charAt(0).toLowerCase()+b.slice(1)},b.exports=c.default},{}],358:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){var c,d,e=b[a],f=0;for(d=a+1;d "+o);if("componentClose"===k.type)throw new Error("Missing opening component token: `"+k.value+"`");if("componentOpen"===k.type){c=b[k.value],g=m;break}s.push(b[k.value])}else s.push(k.value);return c&&(i=e(g,a),n=a.slice(g+1,i),p=f(n,b),d=j.default.cloneElement(c,{},p),s.push(d),ih.length?(this.options.missing_key_callback&&this.options.missing_key_callback(k,a),i=[c,d],this.options.debug===!0&&console.log(i[e(p)(f)]),i[e()(f)]):(i=h[j],i?i:(i=[c,d],i[e()(f)]))}});var o=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",p=[];for(f=0;f=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",p.push(h[5]?e+i:i+e)}return p.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),p=function(a,b){return b.unshift(a),o.apply(null,b)};n.parse_plural=function(a,b){return a=a.replace(/n/g,b),n.parse_expression(a)},n.sprintf=function(a,b){return"[object Array]"=={}.toString.call(b)?p(a,[].slice.call(b)):o.apply(this,[].slice.call(arguments))},n.prototype.sprintf=function(){return n.sprintf.apply(this,arguments)},n.PF={},n.PF.parse=function(a){var b=n.PF.extractPluralExpr(a);return n.PF.parser.parse.call(n.PF.parser,b)},n.PF.compile=function(a){function b(a){return a===!0?1:a?a:0}var c=n.PF.parse(a);return function(a){return b(n.PF.interpreter(c)(a))}},n.PF.interpreter=function(a){return function(b){switch(a.type){case"GROUP":return n.PF.interpreter(a.expr)(b);case"TERNARY":return n.PF.interpreter(a.expr)(b)?n.PF.interpreter(a.truthy)(b):n.PF.interpreter(a.falsey)(b);case"OR":return n.PF.interpreter(a.left)(b)||n.PF.interpreter(a.right)(b);case"AND":return n.PF.interpreter(a.left)(b)&&n.PF.interpreter(a.right)(b);case"LT":return n.PF.interpreter(a.left)(b)n.PF.interpreter(a.right)(b);case"LTE":return n.PF.interpreter(a.left)(b)<=n.PF.interpreter(a.right)(b);case"GTE":return n.PF.interpreter(a.left)(b)>=n.PF.interpreter(a.right)(b);case"EQ":return n.PF.interpreter(a.left)(b)==n.PF.interpreter(a.right)(b);case"NEQ":return n.PF.interpreter(a.left)(b)!=n.PF.interpreter(a.right)(b);case"MOD":return n.PF.interpreter(a.left)(b)%n.PF.interpreter(a.right)(b);case"VAR":return b;case"NUM":return a.val;default:throw new Error("Invalid Token found.")}}},n.PF.extractPluralExpr=function(a){a=a.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(a)||(a=a.concat(";"));var b,c=/nplurals\=(\d+);/,d=/plural\=(.*);/,e=a.match(c),f={};if(!(e.length>1))throw new Error("nplurals not found in plural_forms string: "+a);if(f.nplurals=e[1],a=a.replace(c,""),b=a.match(d),!(b&&b.length>1))throw new Error("`plural` expression not found: "+a);return b[1]},n.PF.parser=function(){var a={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return{type:"GROUP",expr:f[h-1]};case 2:this.$={type:"TERNARY",expr:f[h-4],truthy:f[h-2],falsey:f[h]};break;case 3:this.$={type:"OR",left:f[h-2],right:f[h]};break;case 4:this.$={type:"AND",left:f[h-2],right:f[h]};break;case 5:this.$={type:"LT",left:f[h-2],right:f[h]};break;case 6:this.$={type:"LTE",left:f[h-2],right:f[h]};break;case 7:this.$={type:"GT",left:f[h-2],right:f[h]};break;case 8:this.$={type:"GTE",left:f[h-2],right:f[h]};break;case 9:this.$={type:"NEQ",left:f[h-2],right:f[h]};break;case 10:this.$={type:"EQ",left:f[h-2],right:f[h]};break;case 11:this.$={type:"MOD",left:f[h-2],right:f[h]};break;case 12:this.$={type:"GROUP",expr:f[h-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(a)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(a){e.length=e.length-2*a,f.length=f.length-a,g.length=g.length-a}function c(){var a;return a=d.lexer.lex()||1,"number"!=typeof a&&(a=d.symbols_[a]||a),a}var d=this,e=[0],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=2,n=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var o=this.lexer.yylloc;g.push(o),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,q,r,s,t,u,v,w,x,y={};;){if(r=e[e.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(null==p&&(p=c()),s=h[r]&&h[r][p]),"undefined"==typeof s||!s.length||!s[0]){if(!l){x=[];for(u in h[r])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var z="";z=this.lexer.showPosition?"Parse error on line "+(j+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(z,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:o,expected:x})}if(3==l){if(p==n)throw new Error(z||"Parsing halted.");k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,p=c()}for(;;){if(m.toString()in h[r])break;if(0==r)throw new Error(z||"Parsing halted.");b(1),r=e[e.length-1]}q=p,p=m,r=e[e.length-1],s=h[r]&&h[r][m],l=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:e.push(p),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),e.push(s[1]),p=null,q?(p=q,q=null):(k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[s[1]][1],y.$=f[f.length-v],y._$={first_line:g[g.length-(v||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(v||1)].first_column,last_column:g[g.length-1].last_column},t=this.performAction.call(y,i,k,j,this.yy,s[1],f,g),"undefined"!=typeof t)return t;v&&(e=e.slice(0,-1*v*2),f=f.slice(0,-1*v),g=g.slice(0,-1*v)),e.push(this.productions_[s[1]][0]),f.push(y.$),g.push(y._$),w=h[e[e.length-2]][e[e.length-1]],e.push(w);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parseError)throw new Error(a);this.yy.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),e=0;e=/,/^/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}},a}();return a.lexer=b,a}(),"undefined"!=typeof c?("undefined"!=typeof b&&b.exports&&(c=b.exports=n),c.Jed=n):("function"==typeof define&&define.amd&&define(function(){return n}),a.Jed=n)}(this)},{}],361:[function(a,b,c){c=b.exports=function(a){if(a&&"object"==typeof a){var b=a.which||a.keyCode||a.charCode;b&&(a=b)}if("number"==typeof a)return g[a];var c=String(a),f=d[c.toLowerCase()];if(f)return f;var f=e[c.toLowerCase()];return f?f:1===c.length?c.charCodeAt(0):void 0};var d=c.code=c.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},e=c.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! + * Programatically add the following + */ +for(f=97;f<123;f++)d[String.fromCharCode(f)]=f-32;for(var f=48;f<58;f++)d[f-48]=f;for(f=1;f<13;f++)d["f"+f]=f+111;for(f=0;f<10;f++)d["numpad "+f]=f+96;var g=c.names=c.title={};for(f in d)g[d[f]]=f;for(var h in e)d[h]=e[h]},{}],362:[function(a,b,c){function d(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b1?c[e-1]:void 0,h=e>2?c[2]:void 0;for(g=a.length>3&&"function"==typeof g?(e--,g):void 0,h&&f(c[0],c[1],h)&&(g=e<3?void 0:g,e=1),b=Object(b);++d-1&&a%1==0&&a-1}var e=a("./_assocIndexOf");b.exports=d},{"./_assocIndexOf":373}],419:[function(a,b,c){function d(a,b){var c=this.__data__,d=e(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}var e=a("./_assocIndexOf");b.exports=d},{"./_assocIndexOf":373}],420:[function(a,b,c){function d(){this.size=0,this.__data__={hash:new e,map:new(g||f),string:new e}}var e=a("./_Hash"),f=a("./_ListCache"),g=a("./_Map");b.exports=d},{"./_Hash":362,"./_ListCache":363,"./_Map":364}],421:[function(a,b,c){function d(a){var b=e(this,a).delete(a);return this.size-=b?1:0,b}var e=a("./_getMapData");b.exports=d},{"./_getMapData":399}],422:[function(a,b,c){function d(a){return e(this,a).get(a)}var e=a("./_getMapData");b.exports=d},{"./_getMapData":399}],423:[function(a,b,c){function d(a){return e(this,a).has(a)}var e=a("./_getMapData");b.exports=d},{"./_getMapData":399}],424:[function(a,b,c){function d(a,b){var c=e(this,a),d=c.size;return c.set(a,b),this.size+=c.size==d?0:1,this}var e=a("./_getMapData");b.exports=d},{"./_getMapData":399}],425:[function(a,b,c){var d=a("./_getNative"),e=d(Object,"create");b.exports=e},{"./_getNative":400}],426:[function(a,b,c){var d=a("./_overArg"),e=d(Object.keys,Object);b.exports=e},{"./_overArg":430}],427:[function(a,b,c){function d(a){var b=[];if(null!=a)for(var c in Object(a))b.push(c);return b}b.exports=d},{}],428:[function(a,b,c){var d=a("./_freeGlobal"),e="object"==typeof c&&c&&!c.nodeType&&c,f=e&&"object"==typeof b&&b&&!b.nodeType&&b,g=f&&f.exports===e,h=g&&d.process,i=function(){try{return h&&h.binding&&h.binding("util")}catch(a){}}();b.exports=i},{"./_freeGlobal":398}],429:[function(a,b,c){function d(a){return f.call(a)}var e=Object.prototype,f=e.toString;b.exports=d},{}],430:[function(a,b,c){function d(a,b){return function(c){return a(b(c))}}b.exports=d},{}],431:[function(a,b,c){function d(a,b,c){return b=f(void 0===b?a.length-1:b,0),function(){for(var d=arguments,g=-1,h=f(d.length-b,0),i=Array(h);++g0){if(++b>=e)return arguments[0]}else b=0;return a.apply(void 0,arguments)}}var e=800,f=16,g=Date.now;b.exports=d},{}],435:[function(a,b,c){function d(){this.__data__=new e,this.size=0}var e=a("./_ListCache");b.exports=d},{"./_ListCache":363}],436:[function(a,b,c){function d(a){var b=this.__data__,c=b.delete(a);return this.size=b.size,c}b.exports=d},{}],437:[function(a,b,c){function d(a){return this.__data__.get(a)}b.exports=d},{}],438:[function(a,b,c){function d(a){return this.__data__.has(a)}b.exports=d},{}],439:[function(a,b,c){function d(a,b){var c=this.__data__;if(c instanceof e){var d=c.__data__;if(!f||d.length-1&&a%1==0&&a<=e}var e=9007199254740991;b.exports=d},{}],452:[function(a,b,c){function d(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}b.exports=d},{}],453:[function(a,b,c){function d(a){return null!=a&&"object"==typeof a}b.exports=d},{}],454:[function(a,b,c){function d(a){if(!g(a)||e(a)!=h)return!1;var b=f(a);if(null===b)return!0;var c=l.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&k.call(c)==m}var e=a("./_baseGetTag"),f=a("./_getPrototype"),g=a("./isObjectLike"),h="[object Object]",i=Function.prototype,j=Object.prototype,k=i.toString,l=j.hasOwnProperty,m=k.call(Object);b.exports=d},{"./_baseGetTag":377,"./_getPrototype":401,"./isObjectLike":453}],455:[function(a,b,c){var d=a("./_baseIsTypedArray"),e=a("./_baseUnary"),f=a("./_nodeUtil"),g=f&&f.isTypedArray,h=g?e(g):d;b.exports=h},{"./_baseIsTypedArray":380,"./_baseUnary":388,"./_nodeUtil":428}],456:[function(a,b,c){function d(a){return void 0===a}b.exports=d},{}],457:[function(a,b,c){function d(a){return g(a)?e(a):f(a)}var e=a("./_arrayLikeKeys"),f=a("./_baseKeys"),g=a("./isArrayLike");b.exports=d},{"./_arrayLikeKeys":370,"./_baseKeys":381,"./isArrayLike":447}],458:[function(a,b,c){function d(a){return g(a)?e(a,!0):f(a)}var e=a("./_arrayLikeKeys"),f=a("./_baseKeysIn"),g=a("./isArrayLike");b.exports=d},{"./_arrayLikeKeys":370,"./_baseKeysIn":382,"./isArrayLike":447}],459:[function(a,b,c){var d=a("./_baseMerge"),e=a("./_createAssigner"),f=e(function(a,b,c){d(a,b,c)});b.exports=f},{"./_baseMerge":383,"./_createAssigner":395}],460:[function(a,b,c){function d(){return!1}b.exports=d},{}],461:[function(a,b,c){function d(a){return e(a,f(a))}var e=a("./_copyObject"),f=a("./keysIn");b.exports=d},{"./_copyObject":393,"./keysIn":458}],462:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){var c={};for(var d in a)b.indexOf(d)>=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b,c){var d=a.color,e=a.hoverColor,f=b.muiTheme.baseTheme,g=d||f.palette.textColor,h=e||g;return{root:{color:c.hovered?h:g,position:"relative",fontSize:f.spacing.iconSize,display:"inline-block",userSelect:"none",transition:q.default.easeOut()}}}Object.defineProperty(c,"__esModule",{value:!0});var j=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c=b.muiTheme.baseTheme;return{root:{position:"relative",boxSizing:"border-box",overflow:"visible",transition:q.default.easeOut(),padding:c.spacing.iconSize/2,width:2*c.spacing.iconSize,height:2*c.spacing.iconSize,fontSize:0},tooltip:{boxSizing:"border-box"},overlay:{position:"relative",top:0,width:"100%",height:"100%",background:c.palette.disabledColor},disabled:{color:c.palette.disabledColor,fill:c.palette.disabledColor,cursor:"not-allowed"}}}Object.defineProperty(c,"__esModule",{value:!0});var j=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c=a.rounded,d=a.circle,e=a.transitionEnabled,f=a.zDepth,g=b.muiTheme,h=g.baseTheme,i=g.paper;return{root:{color:i.color,backgroundColor:i.backgroundColor,transition:e&&s.default.easeOut(),boxSizing:"border-box",fontFamily:h.fontFamily,WebkitTapHighlightColor:"rgba(0,0,0,0)",boxShadow:i.zDepthShadows[f-1],borderRadius:d?"50%":c?"2px":"0px"}}}Object.defineProperty(c,"__esModule",{value:!0});var j=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b,c){}function j(a,b,c){var d=b.muiTheme,e=d.baseTheme,f=d.button,g=d.raisedButton,h=a.disabled,i=a.disabledBackgroundColor,j=a.disabledLabelColor,k=a.fullWidth,l=a.icon,m=a.label,n=a.labelPosition,o=a.primary,p=a.secondary,q=a.style,t=o||p?.4:.08,u=g.color,v=g.textColor;h?(u=i||g.disabledColor,v=j||g.disabledTextColor):o?(u=g.primaryColor,v=g.primaryTextColor):p?(u=g.secondaryColor,v=g.secondaryTextColor):(a.backgroundColor&&(u=a.backgroundColor),a.labelColor&&(v=a.labelColor));var w=q&&q.height||f.height,x=2;return{root:{display:"inline-block",transition:r.default.easeOut(),minWidth:k?"100%":f.minWidth},button:{position:"relative",height:w,lineHeight:w+"px",width:"100%",padding:0,borderRadius:x,transition:r.default.easeOut(),backgroundColor:u,textAlign:"center"},label:{position:"relative",opacity:1,fontSize:g.fontSize,letterSpacing:0,textTransform:g.textTransform||f.textTransform||"uppercase",fontWeight:g.fontWeight,margin:0,userSelect:"none",paddingLeft:l&&"before"!==n?8:e.spacing.desktopGutterLess,paddingRight:l&&"before"===n?8:e.spacing.desktopGutterLess,color:v},icon:{verticalAlign:"middle",marginLeft:m&&"before"!==n?12:0,marginRight:m&&"before"===n?12:0},overlay:{height:w,borderRadius:x,backgroundColor:(c.keyboardFocused||c.hovered)&&!h&&(0,s.fade)(v,t),transition:r.default.easeOut(),top:0},ripple:{color:v,opacity:o||p?.16:.1}}}Object.defineProperty(c,"__esModule",{value:!0});var k=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b0&&("horizontal"===e?f.root.marginLeft=-6:"vertical"===e&&(f.root.marginTop=-14)),f},p=function(a){function b(){var a,c,d,e;f(this,b);for(var h=arguments.length,i=Array(h),j=0;j=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return o.default.createElement(q.default,a)}Object.defineProperty(c,"__esModule",{value:!0});var j=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;be?f.completed=!0:d&&b0&&l.default.createElement(n.default,null),l.default.cloneElement(a,(0,j.default)(f,a.props))]});return l.default.createElement("div",{style:f((0,j.default)(g.root,e))},h)}}]),b}(k.Component);p.propTypes={activeStep:k.PropTypes.number,children:k.PropTypes.arrayOf(k.PropTypes.element),linear:k.PropTypes.bool,orientation:k.PropTypes.oneOf(["horizontal","vertical"]),style:k.PropTypes.object},p.defaultProps={orientation:"horizontal",linear:!0},p.contextTypes={muiTheme:k.PropTypes.object.isRequired},p.childContextTypes={stepper:k.PropTypes.object},c.default=p},{"./StepConnector":474,react:677,"simple-assign":690}],478:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.Stepper=c.StepLabel=c.StepContent=c.StepButton=c.Step=void 0;var e=a("./Step"),f=d(e),g=a("./StepButton"),h=d(g),i=a("./StepContent"),j=d(i),k=a("./StepLabel"),l=d(k),m=a("./Stepper"),n=d(m);c.Step=f.default,c.StepButton=h.default,c.StepContent=j.default,c.StepLabel=l.default,c.Stepper=n.default},{"./Step":472,"./StepButton":473,"./StepContent":475,"./StepLabel":476,"./Stepper":477}],479:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){var c={};for(var d in a)b.indexOf(d)>=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b); +a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(){if(!B){var a=document.createElement("style");a.innerHTML="\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n ",document.body.appendChild(a),B=!0}}function j(){C||(s.default.on(window,"keydown",function(a){D="tab"===(0,u.default)(a)}),C=!0)}Object.defineProperty(c,"__esModule",{value:!0});var k=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b=0||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b,c){var d=a.verticalPosition,e=a.horizontalPosition,f=a.touch?10:0,g=a.touch?-20:-10,h="bottom"===d?14+f:-14-f,i=b.muiTheme,j=i.baseTheme,k=i.zIndex,l=i.tooltip,m={root:{position:"absolute",fontFamily:j.fontFamily,fontSize:"10px",lineHeight:"22px",padding:"0 8px",zIndex:k.tooltip,color:l.color,overflow:"hidden",top:-1e4,borderRadius:2,userSelect:"none",opacity:0,right:"left"===e?12:null,left:"center"===e?(c.offsetWidth-48)/2*-1:null,transition:q.default.easeOut("0ms","top","450ms")+", "+q.default.easeOut("450ms","transform","0ms")+", "+q.default.easeOut("450ms","opacity","0ms")},label:{position:"relative",whiteSpace:"nowrap"},ripple:{position:"absolute",left:"center"===e?"50%":"left"===e?"100%":"0%",top:"bottom"===d?0:"100%",transform:"translate(-50%, -50%)",borderRadius:"50%",backgroundColor:"transparent",transition:q.default.easeOut("0ms","width","450ms")+", "+q.default.easeOut("0ms","height","450ms")+", "+q.default.easeOut("450ms","backgroundColor","0ms")},rootWhenShown:{top:"top"===d?g:36,opacity:.9,transform:"translate(0px, "+h+"px)",transition:q.default.easeOut("0ms","top","0ms")+", "+q.default.easeOut("450ms","transform","0ms")+", "+q.default.easeOut("450ms","opacity","0ms")},rootWhenTouched:{fontSize:"14px",lineHeight:"32px",padding:"0 16px"},rippleWhenShown:{backgroundColor:l.rippleBackgroundColor,transition:q.default.easeOut("450ms","width","0ms")+", "+q.default.easeOut("450ms","height","0ms")+", "+q.default.easeOut("450ms","backgroundColor","0ms")}};return m}Object.defineProperty(c,"__esModule",{value:!0});var j=Object.assign||function(a){for(var b=1;b300)return void d.stopListeningForScrollAbort();var c=Math.abs(a.touches[0].clientY-d.firstTouchY),f=Math.abs(a.touches[0].clientX-d.firstTouchX);if(c>6||f>6){var g=d.state.ripples,h=g[0],i=n.default.cloneElement(h,{aborted:!0});g=w(g),g=[].concat(e(g),[i]),d.setState({ripples:g},function(){d.end()})}},d.ignoreNextMouseDown=!1,d.state={hasRipples:!1,nextKey:0,ripples:[]},d}return h(b,a),j(b,[{key:"start",value:function(a,b){var c=this.context.muiTheme.ripple;if(this.ignoreNextMouseDown&&!b)return void(this.ignoreNextMouseDown=!1);var d=this.state.ripples;d=[].concat(e(d),[n.default.createElement(v.default,{key:this.state.nextKey,style:this.props.centerRipple?{}:this.getRippleStyle(a),color:this.props.color||c.color,opacity:this.props.opacity,touchGenerated:b})]),this.ignoreNextMouseDown=b,this.setState({hasRipples:!0,nextKey:this.state.nextKey+1,ripples:d})}},{key:"end",value:function(){var a=this.state.ripples;this.setState({ripples:w(a)}),this.props.abortOnScroll&&this.stopListeningForScrollAbort()}},{key:"startListeningForScrollAbort",value:function(a){this.firstTouchY=a.touches[0].clientY,this.firstTouchX=a.touches[0].clientX,document.body.addEventListener("touchmove",this.handleTouchMove)}},{key:"stopListeningForScrollAbort",value:function(){document.body.removeEventListener("touchmove",this.handleTouchMove)}},{key:"getRippleStyle",value:function(a){var b={},c=p.default.findDOMNode(this),d=c.offsetHeight,e=c.offsetWidth,f=t.default.offset(c),g=a.touches&&a.touches.length,h=g?a.touches[0].pageX:a.pageX,i=g?a.touches[0].pageY:a.pageY,j=h-f.left,k=i-f.top,l=this.calcDiag(j,k),m=this.calcDiag(e-j,k),n=this.calcDiag(e-j,d-k),o=this.calcDiag(j,d-k),q=Math.max(l,m,n,o),r=2*q,s=j-q,u=k-q;return b.height=r+"px",b.width=r+"px",b.top=u+"px",b.left=s+"px",b}},{key:"calcDiag",value:function(a,b){return Math.sqrt(a*a+b*b)}},{key:"render",value:function(){var a=this.props,b=a.children,c=a.style,d=this.state,e=d.hasRipples,f=d.ripples,g=this.context.muiTheme.prepareStyles,h=void 0;if(e){var i=(0,l.default)({height:"100%",width:"100%",position:"absolute",top:0,left:0,overflow:"hidden"},c);h=n.default.createElement(r.default,{style:g(i)},f)}return n.default.createElement("div",{onMouseUp:this.handleMouseUp,onMouseDown:this.handleMouseDown,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h,b)}}]),b}(m.Component);x.propTypes={abortOnScroll:m.PropTypes.bool,centerRipple:m.PropTypes.bool,children:m.PropTypes.node,color:m.PropTypes.string,opacity:m.PropTypes.number,style:m.PropTypes.object},x.defaultProps={abortOnScroll:!0},x.contextTypes={muiTheme:m.PropTypes.object.isRequired},c.default=x},{"../utils/dom":505,"./CircleRipple":481,react:677,"react-addons-transition-group":512,"react-dom":513,"simple-assign":690}],490:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1?b-1:0),d=1;dc?c:a}function e(a){var b=a.type,c=a.values;if(b.indexOf("rgb")>-1)for(var d=0;d<3;d++)c[d]=parseInt(c[d]);var e=void 0;return e=b.indexOf("hsl")>-1?a.type+"("+c[0]+", "+c[1]+"%, "+c[2]+"%":a.type+"("+c[0]+", "+c[1]+", "+c[2],e+=4===c.length?", "+a.values[3]+")":")"}function f(a){if(4===a.length){for(var b="#",c=1;c-1){var b=a.values.map(function(a){return a/=255,a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)});return Number((.2126*b[0]+.7152*b[1]+.0722*b[2]).toFixed(3))}if(a.type.indexOf("hsl")>-1)return a.values[2]/100}function j(a){var b=arguments.length<=1||void 0===arguments[1]?.15:arguments[1];return i(a)>.5?l(a,b):m(a,b)}function k(a,b){return a=g(a),b=d(b,0,1),"rgb"!==a.type&&"hsl"!==a.type||(a.type+="a"),a.values[3]=b,e(a)}function l(a,b){if(a=g(a),b=d(b,0,1),a.type.indexOf("hsl")>-1)a.values[2]*=1-b;else if(a.type.indexOf("rgb")>-1)for(var c=0;c<3;c++)a.values[c]*=1-b;return e(a)}function m(a,b){if(a=g(a),b=d(b,0,1),a.type.indexOf("hsl")>-1)a.values[2]+=(100-a.values[2])*b;else if(a.type.indexOf("rgb")>-1)for(var c=0;c<3;c++)a.values[c]+=(255-a.values[c])*b;return e(a)}Object.defineProperty(c,"__esModule",{value:!0}),c.convertColorToString=e,c.convertHexToRGB=f,c.decomposeColor=g,c.getContrastRatio=h,c.getLuminance=i,c.emphasize=j,c.fade=k,c.darken=l,c.lighten=m},{}],504:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){return function(b,c,d,e,f){if(null!=b[c]){var h=d+"."+c;g[h]=!0}for(var i=arguments.length,j=Array(i>5?i-5:0),k=5;k=0;f--)this.on(a,d[f],e)},on:function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent("on"+b,function(){c.call(a)})},off:function(a,b,c){a.removeEventListener?a.removeEventListener(b,c):a.detachEvent("on"+b,c)},isKeyboard:function(a){return["keydown","keypress","keyup"].indexOf(a.type)!==-1}}},{}],507:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=a("react"),e=d.PropTypes.oneOf(["left","middle","right"]),f=d.PropTypes.oneOf(["top","center","bottom"]);c.default={corners:d.PropTypes.oneOf(["bottom-left","bottom-right","top-left","top-right"]),horizontal:e,vertical:f,origin:d.PropTypes.shape({horizontal:e,vertical:f}),cornersAndCenter:d.PropTypes.oneOf(["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"]),stringOrNumber:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.number]),zDepth:d.PropTypes.oneOf([0,1,2,3,4,5])}},{react:677}],508:[function(a,b,c){"use strict";function d(a){if(a.isRtl)return function(a){var b={right:"left",left:"right",marginRight:"marginLeft",marginLeft:"marginRight",paddingRight:"paddingLeft",paddingLeft:"paddingRight",borderRight:"borderLeft",borderLeft:"borderRight"},c={};return Object.keys(a).forEach(function(d){var g=a[d],h=d;switch(b.hasOwnProperty(d)&&(h=b[d]),d){case"float":case"textAlign":"right"===g?g="left":"left"===g&&(g="right");break;case"direction":"ltr"===g?g="rtl":"rtl"===g&&(g="ltr");break;case"transform":if(!g)break;var i=void 0;(i=g.match(e))&&(g=g.replace(i[0],i[1]+-parseFloat(i[4]))),(i=g.match(f))&&(g=g.replace(i[0],i[1]+-parseFloat(i[4])+i[5]+i[6]?", "+(-parseFloat(i[7])+i[8]):""));break;case"transformOrigin":if(!g)break;g.indexOf("right")>-1?g=g.replace("right","left"):g.indexOf("left")>-1&&(g=g.replace("left","right"))}c[h]=g}),c}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d;var e=/((^|\s)translate(3d|X)?\()(\-?[\d]+)/,f=/((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/},{}],509:[function(a,b,c){"use strict";function d(a){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function e(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de","5"===Object.getOwnPropertyNames(a)[0])return!1;for(var b={},c=0;c<10;c++)b["_"+String.fromCharCode(c)]=c; +var d=Object.getOwnPropertyNames(b).map(function(a){return b[a]});if("0123456789"!==d.join(""))return!1;var e={};return"abcdefghijklmnopqrst".split("").forEach(function(a){e[a]=a}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},e)).join("")}catch(a){return!1}}var f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;b.exports=e()?Object.assign:function(a,b){for(var c,e,h=d(a),i=1;i1)for(var c=1;c8&&v<=11),y=32,z=String.fromCharCode(y),A={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,C=null,D={eventTypes:A,extractEvents:function(a,b,c,d){return[j(a,b,c,d),m(a,b,c,d)]}};b.exports=D},{"./EventPropagators":533,"./FallbackCompositionState":534,"./SyntheticCompositionEvent":601,"./SyntheticInputEvent":605,"fbjs/lib/ExecutionEnvironment":302}],517:[function(a,b,c){"use strict";function d(a,b){return a+b.charAt(0).toUpperCase()+b.substring(1)}var e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},f=["Webkit","ms","Moz","O"];Object.keys(e).forEach(function(a){f.forEach(function(b){e[d(b,a)]=e[a]})});var g={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},h={isUnitlessNumber:e,shorthandPropertyExpansions:g};b.exports=h},{}],518:[function(a,b,c){"use strict";var d=a("./CSSProperty"),e=a("fbjs/lib/ExecutionEnvironment"),f=(a("./ReactInstrumentation"),a("fbjs/lib/camelizeStyleName"),a("./dangerousStyleValue")),g=a("fbjs/lib/hyphenateStyleName"),h=a("fbjs/lib/memoizeStringOnly"),i=(a("fbjs/lib/warning"),h(function(a){return g(a)})),j=!1,k="cssFloat";if(e.canUseDOM){var l=document.createElement("div").style;try{l.font=""}catch(a){j=!0}void 0===document.documentElement.style.cssFloat&&(k="styleFloat")}var m={createMarkupForStyles:function(a,b){var c="";for(var d in a)if(a.hasOwnProperty(d)){var e=a[d];null!=e&&(c+=i(d)+":",c+=f(d,e,b)+";")}return c||null},setValueForStyles:function(a,b,c){var e=a.style;for(var g in b)if(b.hasOwnProperty(g)){var h=f(g,b[g],c);if("float"!==g&&"cssFloat"!==g||(g=k),h)e[g]=h;else{var i=j&&d.shorthandPropertyExpansions[g];if(i)for(var l in i)e[l]="";else e[g]=""}}}};b.exports=m},{"./CSSProperty":517,"./ReactInstrumentation":576,"./dangerousStyleValue":618,"fbjs/lib/ExecutionEnvironment":302,"fbjs/lib/camelizeStyleName":304,"fbjs/lib/hyphenateStyleName":315,"fbjs/lib/memoizeStringOnly":320,"fbjs/lib/warning":324}],519:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=a("./reactProdInvariant"),f=a("./PooledClass"),g=(a("fbjs/lib/invariant"),function(){function a(b){d(this,a),this._callbacks=null,this._contexts=null,this._arg=b}return a.prototype.enqueue=function(a,b){this._callbacks=this._callbacks||[],this._callbacks.push(a),this._contexts=this._contexts||[],this._contexts.push(b)},a.prototype.notifyAll=function(){var a=this._callbacks,b=this._contexts,c=this._arg;if(a&&b){a.length!==b.length?e("24"):void 0,this._callbacks=null,this._contexts=null;for(var d=0;d8));var H=!1;u.canUseDOM&&(H=z("input")&&(!document.documentMode||document.documentMode>11));var I={get:function(){return F.get.call(this)},set:function(a){E=""+a,F.set.call(this,a)}},J={eventTypes:B,extractEvents:function(a,b,c,e){var f,g,h=b?v.getNodeFromInstance(b):window;if(d(h)?G?f=i:g=j:A(h)?H?f=n:(f=p,g=o):q(h)&&(f=r),f){var k=f(a,b);if(k){var l=x.getPooled(B.change,k,c,e);return l.type="change",t.accumulateTwoPhaseDispatches(l),l}}g&&g(a,h,b)}};b.exports=J},{"./EventPluginHub":530,"./EventPropagators":533,"./ReactDOMComponentTree":547,"./ReactUpdates":594,"./SyntheticEvent":603,"./getEventTarget":626,"./isEventSupported":634,"./isTextInputElement":635,"fbjs/lib/ExecutionEnvironment":302}],521:[function(a,b,c){"use strict";function d(a,b){return Array.isArray(b)&&(b=b[1]),b?b.nextSibling:a.firstChild}function e(a,b,c){k.insertTreeBefore(a,b,c)}function f(a,b,c){Array.isArray(b)?h(a,b[0],b[1],c):p(a,b,c)}function g(a,b){if(Array.isArray(b)){var c=b[1];b=b[0],i(a,b,c),a.removeChild(c)}a.removeChild(b)}function h(a,b,c,d){for(var e=b;;){var f=e.nextSibling;if(p(a,e,d),e===c)break;e=f}}function i(a,b,c){for(;;){var d=b.nextSibling;if(d===c)break;a.removeChild(d)}}function j(a,b,c){var d=a.parentNode,e=a.nextSibling;e===b?c&&p(d,document.createTextNode(c),e):c?(o(e,c),i(d,e,b)):i(d,a,b)}var k=a("./DOMLazyTree"),l=a("./Danger"),m=(a("./ReactDOMComponentTree"),a("./ReactInstrumentation"),a("./createMicrosoftUnsafeLocalFunction")),n=a("./setInnerHTML"),o=a("./setTextContent"),p=m(function(a,b,c){a.insertBefore(b,c)}),q=l.dangerouslyReplaceNodeWithMarkup,r={dangerouslyReplaceNodeWithMarkup:q,replaceDelimitedText:j,processUpdates:function(a,b){for(var c=0;c-1?void 0:g("96",a),!j.plugins[c]){b.extractEvents?void 0:g("97",a),j.plugins[c]=b;var d=b.eventTypes;for(var f in d)e(d[f],b,f)?void 0:g("98",f,a)}}}function e(a,b,c){j.eventNameDispatchConfigs.hasOwnProperty(c)?g("99",c):void 0,j.eventNameDispatchConfigs[c]=a;var d=a.phasedRegistrationNames;if(d){for(var e in d)if(d.hasOwnProperty(e)){var h=d[e];f(h,b,c)}return!0}return!!a.registrationName&&(f(a.registrationName,b,c),!0)}function f(a,b,c){j.registrationNameModules[a]?g("100",a):void 0,j.registrationNameModules[a]=b,j.registrationNameDependencies[a]=b.eventTypes[c].dependencies}var g=a("./reactProdInvariant"),h=(a("fbjs/lib/invariant"),null),i={},j={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(a){h?g("101"):void 0,h=Array.prototype.slice.call(a),d()},injectEventPluginsByName:function(a){var b=!1;for(var c in a)if(a.hasOwnProperty(c)){var e=a[c];i.hasOwnProperty(c)&&i[c]===e||(i[c]?g("102",c):void 0,i[c]=e,b=!0)}b&&d()},getPluginModuleForEvent:function(a){var b=a.dispatchConfig;if(b.registrationName)return j.registrationNameModules[b.registrationName]||null;if(void 0!==b.phasedRegistrationNames){var c=b.phasedRegistrationNames;for(var d in c)if(c.hasOwnProperty(d)){var e=j.registrationNameModules[c[d]];if(e)return e}}return null},_resetEventPlugins:function(){h=null;for(var a in i)i.hasOwnProperty(a)&&delete i[a];j.plugins.length=0;var b=j.eventNameDispatchConfigs;for(var c in b)b.hasOwnProperty(c)&&delete b[c];var d=j.registrationNameModules;for(var e in d)d.hasOwnProperty(e)&&delete d[e]}};b.exports=j},{"./reactProdInvariant":637,"fbjs/lib/invariant":316}],532:[function(a,b,c){"use strict";function d(a){return"topMouseUp"===a||"topTouchEnd"===a||"topTouchCancel"===a}function e(a){return"topMouseMove"===a||"topTouchMove"===a}function f(a){return"topMouseDown"===a||"topTouchStart"===a}function g(a,b,c,d){var e=a.type||"unknown-event";a.currentTarget=r.getNodeFromInstance(d),b?p.invokeGuardedCallbackWithCatch(e,c,a):p.invokeGuardedCallback(e,c,a),a.currentTarget=null}function h(a,b){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e1?1-b:void 0;return this._fallbackText=e.slice(a,h),this._fallbackText}}),f.addPoolingTo(d),b.exports=d},{"./PooledClass":538,"./getTextContentAccessor":631,"object-assign":509}],535:[function(a,b,c){"use strict";var d=a("./DOMProperty"),e=d.injection.MUST_USE_PROPERTY,f=d.injection.HAS_BOOLEAN_VALUE,g=d.injection.HAS_NUMERIC_VALUE,h=d.injection.HAS_POSITIVE_NUMERIC_VALUE,i=d.injection.HAS_OVERLOADED_BOOLEAN_VALUE,j={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+d.ATTRIBUTE_NAME_CHAR+"]*$")), +Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:f,allowTransparency:0,alt:0,as:0,async:f,autoComplete:0,autoPlay:f,capture:f,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:e|f,cite:0,classID:0,className:0,cols:h,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:f,coords:0,crossOrigin:0,data:0,dateTime:0,default:f,defer:f,dir:0,disabled:f,download:i,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:f,formTarget:0,frameBorder:0,headers:0,height:0,hidden:f,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:f,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:e|f,muted:e|f,name:0,nonce:0,noValidate:f,open:f,optimum:0,pattern:0,placeholder:0,playsInline:f,poster:0,preload:0,profile:0,radioGroup:0,readOnly:f,referrerPolicy:0,rel:0,required:f,reversed:f,role:0,rows:h,rowSpan:g,sandbox:0,scope:0,scoped:f,scrolling:0,seamless:f,selected:e|f,shape:0,size:h,sizes:0,span:h,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:g,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:f,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};b.exports=j},{"./DOMProperty":524}],536:[function(a,b,c){"use strict";function d(a){var b=/[=:]/g,c={"=":"=0",":":"=2"},d=(""+a).replace(b,function(a){return c[a]});return"$"+d}function e(a){var b=/(=0|=2)/g,c={"=0":"=","=2":":"},d="."===a[0]&&"$"===a[1]?a.substring(2):a.substring(1);return(""+d).replace(b,function(a){return c[a]})}var f={escape:d,unescape:e};b.exports=f},{}],537:[function(a,b,c){"use strict";function d(a){null!=a.checkedLink&&null!=a.valueLink?h("87"):void 0}function e(a){d(a),null!=a.value||null!=a.onChange?h("88"):void 0}function f(a){d(a),null!=a.checked||null!=a.onChange?h("89"):void 0}function g(a){if(a){var b=a.getName();if(b)return" Check the render method of `"+b+"`."}return""}var h=a("./reactProdInvariant"),i=a("react/lib/React"),j=a("./ReactPropTypesSecret"),k=(a("fbjs/lib/invariant"),a("fbjs/lib/warning"),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),l={value:function(a,b,c){return!a[b]||k[a.type]||a.onChange||a.readOnly||a.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(a,b,c){return!a[b]||a.onChange||a.readOnly||a.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.PropTypes.func},m={},n={checkPropTypes:function(a,b,c){for(var d in l){if(l.hasOwnProperty(d))var e=l[d](b,d,a,"prop",null,j);if(e instanceof Error&&!(e.message in m)){m[e.message]=!0;g(c)}}},getValue:function(a){return a.valueLink?(e(a),a.valueLink.value):a.value},getChecked:function(a){return a.checkedLink?(f(a),a.checkedLink.value):a.checked},executeOnChange:function(a,b){return a.valueLink?(e(a),a.valueLink.requestChange(b.target.value)):a.checkedLink?(f(a),a.checkedLink.requestChange(b.target.checked)):a.onChange?a.onChange.call(void 0,b):void 0}};b.exports=n},{"./ReactPropTypesSecret":585,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"react/lib/React":650}],538:[function(a,b,c){"use strict";var d=a("./reactProdInvariant"),e=(a("fbjs/lib/invariant"),function(a){var b=this;if(b.instancePool.length){var c=b.instancePool.pop();return b.call(c,a),c}return new b(a)}),f=function(a,b){var c=this;if(c.instancePool.length){var d=c.instancePool.pop();return c.call(d,a,b),d}return new c(a,b)},g=function(a,b,c){var d=this;if(d.instancePool.length){var e=d.instancePool.pop();return d.call(e,a,b,c),e}return new d(a,b,c)},h=function(a,b,c,d){var e=this;if(e.instancePool.length){var f=e.instancePool.pop();return e.call(f,a,b,c,d),f}return new e(a,b,c,d)},i=function(a,b,c,d,e){var f=this;if(f.instancePool.length){var g=f.instancePool.pop();return f.call(g,a,b,c,d,e),g}return new f(a,b,c,d,e)},j=function(a){var b=this;a instanceof b?void 0:d("25"),a.destructor(),b.instancePool.length=0||null!=b.is}function o(a){var b=a.type;m(b),this._currentElement=a,this._tag=b.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=a("./reactProdInvariant"),q=a("object-assign"),r=a("./AutoFocusUtils"),s=a("./CSSPropertyOperations"),t=a("./DOMLazyTree"),u=a("./DOMNamespaces"),v=a("./DOMProperty"),w=a("./DOMPropertyOperations"),x=a("./EventPluginHub"),y=a("./EventPluginRegistry"),z=a("./ReactBrowserEventEmitter"),A=a("./ReactDOMComponentFlags"),B=a("./ReactDOMComponentTree"),C=a("./ReactDOMInput"),D=a("./ReactDOMOption"),E=a("./ReactDOMSelect"),F=a("./ReactDOMTextarea"),G=(a("./ReactInstrumentation"),a("./ReactMultiChild")),H=a("./ReactServerRenderingTransaction"),I=(a("fbjs/lib/emptyFunction"),a("./escapeTextContentForBrowser")),J=(a("fbjs/lib/invariant"),a("./isEventSupported"),a("fbjs/lib/shallowEqual"),a("./validateDOMNesting"),a("fbjs/lib/warning"),A),K=x.deleteListener,L=B.getNodeFromInstance,M=z.listenTo,N=y.registrationNameModules,O={string:!0,number:!0},P="style",Q="__html",R={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},S=11,T={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},U={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},V={listing:!0,pre:!0,textarea:!0},W=q({menuitem:!0},U),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Y={},Z={}.hasOwnProperty,$=1;o.displayName="ReactDOMComponent",o.Mixin={mountComponent:function(a,b,c,d){this._rootNodeID=$++,this._domID=c._idCounter++,this._hostParent=b,this._hostContainerInfo=c;var f=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},a.getReactMountReady().enqueue(k,this);break;case"input":C.mountWrapper(this,f,b),f=C.getHostProps(this,f),a.getReactMountReady().enqueue(k,this);break;case"option":D.mountWrapper(this,f,b),f=D.getHostProps(this,f);break;case"select":E.mountWrapper(this,f,b),f=E.getHostProps(this,f),a.getReactMountReady().enqueue(k,this);break;case"textarea":F.mountWrapper(this,f,b),f=F.getHostProps(this,f),a.getReactMountReady().enqueue(k,this)}e(this,f);var g,l;null!=b?(g=b._namespaceURI,l=b._tag):c._tag&&(g=c._namespaceURI,l=c._tag),(null==g||g===u.svg&&"foreignobject"===l)&&(g=u.html),g===u.html&&("svg"===this._tag?g=u.svg:"math"===this._tag&&(g=u.mathml)),this._namespaceURI=g;var m;if(a.useCreateElement){var n,o=c._ownerDocument;if(g===u.html)if("script"===this._tag){var p=o.createElement("div"),q=this._currentElement.type;p.innerHTML="<"+q+">",n=p.removeChild(p.firstChild)}else n=f.is?o.createElement(this._currentElement.type,f.is):o.createElement(this._currentElement.type);else n=o.createElementNS(g,this._currentElement.type);B.precacheNode(this,n),this._flags|=J.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(n),this._updateDOMProperties(null,f,a);var s=t(n);this._createInitialChildren(a,f,d,s),m=s}else{var v=this._createOpenTagMarkupAndPutListeners(a,f),x=this._createContentMarkup(a,f,d);m=!x&&U[this._tag]?v+"/>":v+">"+x+""}switch(this._tag){case"input":a.getReactMountReady().enqueue(h,this),f.autoFocus&&a.getReactMountReady().enqueue(r.focusDOMComponent,this);break;case"textarea":a.getReactMountReady().enqueue(i,this),f.autoFocus&&a.getReactMountReady().enqueue(r.focusDOMComponent,this);break;case"select":f.autoFocus&&a.getReactMountReady().enqueue(r.focusDOMComponent,this);break;case"button":f.autoFocus&&a.getReactMountReady().enqueue(r.focusDOMComponent,this);break;case"option":a.getReactMountReady().enqueue(j,this)}return m},_createOpenTagMarkupAndPutListeners:function(a,b){var c="<"+this._currentElement.type;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d];if(null!=e)if(N.hasOwnProperty(d))e&&f(this,d,e,a);else{d===P&&(e&&(e=this._previousStyleCopy=q({},b.style)),e=s.createMarkupForStyles(e,this));var g=null;null!=this._tag&&n(this._tag,b)?R.hasOwnProperty(d)||(g=w.createMarkupForCustomAttribute(d,e)):g=w.createMarkupForProperty(d,e),g&&(c+=" "+g)}}return a.renderToStaticMarkup?c:(this._hostParent||(c+=" "+w.createMarkupForRoot()),c+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(a,b,c){var d="",e=b.dangerouslySetInnerHTML;if(null!=e)null!=e.__html&&(d=e.__html);else{var f=O[typeof b.children]?b.children:null,g=null!=f?null:b.children;if(null!=f)d=I(f);else if(null!=g){var h=this.mountChildren(g,a,c);d=h.join("")}}return V[this._tag]&&"\n"===d.charAt(0)?"\n"+d:d},_createInitialChildren:function(a,b,c,d){var e=b.dangerouslySetInnerHTML;if(null!=e)null!=e.__html&&t.queueHTML(d,e.__html);else{var f=O[typeof b.children]?b.children:null,g=null!=f?null:b.children;if(null!=f)t.queueText(d,f);else if(null!=g)for(var h=this.mountChildren(g,a,c),i=0;i"},receiveComponent:function(){},getHostNode:function(){return f.getNodeFromInstance(this)},unmountComponent:function(){f.uncacheNode(this)}}),b.exports=g},{"./DOMLazyTree":522,"./ReactDOMComponentTree":547,"object-assign":509}],550:[function(a,b,c){"use strict";var d={useCreateElement:!0,useFiber:!1};b.exports=d},{}],551:[function(a,b,c){"use strict";var d=a("./DOMChildrenOperations"),e=a("./ReactDOMComponentTree"),f={dangerouslyProcessChildrenUpdates:function(a,b){var c=e.getNodeFromInstance(a);d.processUpdates(c,b)}};b.exports=f},{"./DOMChildrenOperations":521,"./ReactDOMComponentTree":547}],552:[function(a,b,c){"use strict";function d(){this._rootNodeID&&l.updateWrapper(this)}function e(a){var b=this._currentElement.props,c=i.executeOnChange(b,a);k.asap(d,this);var e=b.name;if("radio"===b.type&&null!=e){for(var g=j.getNodeFromInstance(this),h=g;h.parentNode;)h=h.parentNode;for(var l=h.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),m=0;mb.end?(c=b.end,d=b.start):(c=b.start,d=b.end),e.moveToElementText(a),e.moveStart("character",c),e.setEndPoint("EndToStart",e),e.moveEnd("character",d-c),e.select()}function h(a,b){if(window.getSelection){var c=window.getSelection(),d=a[k()].length,e=Math.min(b.start,d),f=void 0===b.end?e:Math.min(b.end,d);if(!c.extend&&e>f){var g=f;f=e,e=g}var h=j(a,e),i=j(a,f);if(h&&i){var l=document.createRange();l.setStart(h.node,h.offset),c.removeAllRanges(),e>f?(c.addRange(l),c.extend(i.node,i.offset)):(l.setEnd(i.node,i.offset),c.addRange(l))}}}var i=a("fbjs/lib/ExecutionEnvironment"),j=a("./getNodeForCharacterOffset"),k=a("./getTextContentAccessor"),l=i.canUseDOM&&"selection"in document&&!("getSelection"in window),m={getOffsets:l?e:f,setOffsets:l?g:h};b.exports=m},{"./getNodeForCharacterOffset":630,"./getTextContentAccessor":631,"fbjs/lib/ExecutionEnvironment":302}],558:[function(a,b,c){"use strict";var d=a("./reactProdInvariant"),e=a("object-assign"),f=a("./DOMChildrenOperations"),g=a("./DOMLazyTree"),h=a("./ReactDOMComponentTree"),i=a("./escapeTextContentForBrowser"),j=(a("fbjs/lib/invariant"),a("./validateDOMNesting"),function(a){this._currentElement=a,this._stringText=""+a,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});e(j.prototype,{mountComponent:function(a,b,c,d){var e=c._idCounter++,f=" react-text: "+e+" ",j=" /react-text ";if(this._domID=e,this._hostParent=b,a.useCreateElement){var k=c._ownerDocument,l=k.createComment(f),m=k.createComment(j),n=g(k.createDocumentFragment());return g.queueChild(n,g(l)),this._stringText&&g.queueChild(n,g(k.createTextNode(this._stringText))),g.queueChild(n,g(m)),h.precacheNode(this,l),this._closingComment=m,n}var o=i(this._stringText);return a.renderToStaticMarkup?o:""+o+""},receiveComponent:function(a,b){if(a!==this._currentElement){this._currentElement=a;var c=""+a;if(c!==this._stringText){this._stringText=c;var d=this.getHostNode();f.replaceDelimitedText(d[0],d[1],c)}}},getHostNode:function(){var a=this._commentNodes;if(a)return a;if(!this._closingComment)for(var b=h.getNodeFromInstance(this),c=b.nextSibling;;){if(null==c?d("67",this._domID):void 0,8===c.nodeType&&" /react-text "===c.nodeValue){this._closingComment=c;break}c=c.nextSibling}return a=[this._hostNode,this._closingComment],this._commentNodes=a,a},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,h.uncacheNode(this)}}),b.exports=j},{"./DOMChildrenOperations":521,"./DOMLazyTree":522,"./ReactDOMComponentTree":547,"./escapeTextContentForBrowser":619,"./reactProdInvariant":637,"./validateDOMNesting":643,"fbjs/lib/invariant":316,"object-assign":509}],559:[function(a,b,c){"use strict";function d(){this._rootNodeID&&k.updateWrapper(this)}function e(a){var b=this._currentElement.props,c=h.executeOnChange(b,a);return j.asap(d,this),c}var f=a("./reactProdInvariant"),g=a("object-assign"),h=a("./LinkedValueUtils"),i=a("./ReactDOMComponentTree"),j=a("./ReactUpdates"),k=(a("fbjs/lib/invariant"),a("fbjs/lib/warning"),{getHostProps:function(a,b){null!=b.dangerouslySetInnerHTML?f("91"):void 0;var c=g({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue,onChange:a._wrapperState.onChange});return c},mountWrapper:function(a,b){var c=h.getValue(b),d=c;if(null==c){var g=b.defaultValue,i=b.children;null!=i&&(null!=g?f("92"):void 0,Array.isArray(i)&&(i.length<=1?void 0:f("93"),i=i[0]),g=""+i),null==g&&(g=""),d=g}a._wrapperState={initialValue:""+d,listeners:null,onChange:e.bind(a)}},updateWrapper:function(a){var b=a._currentElement.props,c=i.getNodeFromInstance(a),d=h.getValue(b);if(null!=d){var e=""+d;e!==c.value&&(c.value=e),null==b.defaultValue&&(c.defaultValue=e)}null!=b.defaultValue&&(c.defaultValue=b.defaultValue)},postMountWrapper:function(a){var b=i.getNodeFromInstance(a);b.value=b.textContent}});b.exports=k},{"./LinkedValueUtils":537,"./ReactDOMComponentTree":547,"./ReactUpdates":594,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"object-assign":509}],560:[function(a,b,c){"use strict";function d(a,b){"_hostNode"in a?void 0:i("33"),"_hostNode"in b?void 0:i("33");for(var c=0,d=a;d;d=d._hostParent)c++;for(var e=0,f=b;f;f=f._hostParent)e++;for(;c-e>0;)a=a._hostParent,c--;for(;e-c>0;)b=b._hostParent,e--;for(var g=c;g--;){if(a===b)return a;a=a._hostParent,b=b._hostParent}return null}function e(a,b){"_hostNode"in a?void 0:i("35"),"_hostNode"in b?void 0:i("35");for(;b;){if(b===a)return!0;b=b._hostParent}return!1}function f(a){return"_hostNode"in a?void 0:i("36"),a._hostParent}function g(a,b,c){for(var d=[];a;)d.push(a),a=a._hostParent;var e;for(e=d.length;e-- >0;)b(d[e],"captured",c);for(e=0;e0;)c(i[j],"captured",f)}var i=a("./reactProdInvariant");a("fbjs/lib/invariant");b.exports={isAncestor:e,getLowestCommonAncestor:d,getParentInstance:f,traverseTwoPhase:g,traverseEnterLeave:h}},{"./reactProdInvariant":637,"fbjs/lib/invariant":316}],561:[function(a,b,c){"use strict";function d(a,b){null!=b&&"string"==typeof b.type&&(b.type.indexOf("-")>=0||b.props.is||f(a,b))}var e,f=(a("./DOMProperty"),a("./EventPluginRegistry"),a("react/lib/ReactComponentTreeHook"),a("fbjs/lib/warning"),function(a,b){var c=[];for(var d in b.props){var f=e(b.type,d,a);f||c.push(d)}c.map(function(a){return"`"+a+"`"}).join(", ");1===c.length||c.length>1}),g={onBeforeMountComponent:function(a,b){d(a,b)},onBeforeUpdateComponent:function(a,b){d(a,b)}};b.exports=g},{"./DOMProperty":524,"./EventPluginRegistry":531,"fbjs/lib/warning":324,"react/lib/ReactComponentTreeHook":655}],562:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g,h){try{b.call(c,d,e,f,g,h)}catch(b){w[a]=!0}}function e(a,b,c,e,f,g){for(var h=0;h1&&void 0!==arguments[1]&&arguments[1]}function j(a,b){0!==A&&(G&&!H&&(H=!0),E=u(),F=0,D=a,G=b)}function k(a,b){0!==A&&(G===b||H||(H=!0),x&&B.push({timerType:b,instanceID:a,duration:u()-E-F}),E=0,F=0,D=null,G=null)}function l(){var a={startTime:E,nestedFlushStartTime:u(),debugID:D,timerType:G};z.push(a),E=0,F=0,D=null,G=null}function m(){var a=z.pop(),b=a.startTime,c=a.nestedFlushStartTime,d=a.debugID,e=a.timerType,f=u()-c;E=b,F+=f,D=d,G=e}function n(a){if(!x||!J)return!1;var b=s.getElement(a);if(null==b||"object"!=typeof b)return!1;var c="string"==typeof b.type;return!c}function o(a,b){if(n(a)){var c=a+"::"+b;I=u(),performance.mark(c)}}function p(a,b){if(n(a)){var c=a+"::"+b,d=s.getDisplayName(a)||"Unknown",e=u();if(e-I>.1){var f=d+" ["+b+"]";performance.measure(f,c)}performance.clearMarks(c),performance.clearMeasures(f)}}var q=a("./ReactInvalidSetStateWarningHook"),r=a("./ReactHostOperationHistoryHook"),s=a("react/lib/ReactComponentTreeHook"),t=a("fbjs/lib/ExecutionEnvironment"),u=a("fbjs/lib/performanceNow"),v=(a("fbjs/lib/warning"),[]),w={},x=!1,y=[],z=[],A=0,B=[],C=0,D=null,E=0,F=0,G=null,H=!1,I=0,J="undefined"!=typeof performance&&"function"==typeof performance.mark&&"function"==typeof performance.clearMarks&&"function"==typeof performance.measure&&"function"==typeof performance.clearMeasures,K={addHook:function(a){v.push(a)},removeHook:function(a){for(var b=0;b/,f=/^<\!\-\-/,g={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(a){var b=d(a);return f.test(a)?a:a.replace(e," "+g.CHECKSUM_ATTR_NAME+'="'+b+'"$&')},canReuseMarkup:function(a,b){var c=b.getAttribute(g.CHECKSUM_ATTR_NAME);c=c&&parseInt(c,10);var e=d(a);return e===c}};b.exports=g},{"./adler32":615}],579:[function(a,b,c){"use strict";function d(a,b){for(var c=Math.min(a.length,b.length),d=0;d.":"function"==typeof b?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=b&&void 0!==b.props?" This may be caused by unintentionally loading two independent copies of React.":"");var g,h=q.createElement(M,{child:b});if(a){var i=w.get(a);g=i._processChildContext(i._context)}else g=B;var k=m(c);if(k){var l=k._currentElement,o=l.props.child;if(E(o,b)){var p=k._renderedComponent.getPublicInstance(),r=d&&function(){d.call(p)};return N._updateRootComponent(k,h,g,c,r), +p}N.unmountComponentAtNode(c)}var s=e(c),t=s&&!!f(s),u=j(c),v=t&&!k&&!u,x=N._renderNewRootComponent(h,c,v,g)._renderedComponent.getPublicInstance();return d&&d.call(x),x},render:function(a,b,c){return N._renderSubtreeIntoContainer(null,a,b,c)},unmountComponentAtNode:function(a){k(a)?void 0:n("40");var b=m(a);if(!b){j(a),1===a.nodeType&&a.hasAttribute(G);return!1}return delete K[b._instance.rootID],A.batchedUpdates(i,b,a,!1),!0},_mountImageIntoNode:function(a,b,c,f,g){if(k(b)?void 0:n("41"),f){var h=e(b);if(x.canReuseMarkup(a,h))return void s.precacheNode(c,h);var i=h.getAttribute(x.CHECKSUM_ATTR_NAME);h.removeAttribute(x.CHECKSUM_ATTR_NAME);var j=h.outerHTML;h.setAttribute(x.CHECKSUM_ATTR_NAME,i);var l=a,m=d(l,j),p=" (client) "+l.substring(m-20,m+20)+"\n (server) "+j.substring(m-20,m+20);b.nodeType===I?n("42",p):void 0}if(b.nodeType===I?n("43"):void 0,g.useCreateElement){for(;b.lastChild;)b.removeChild(b.lastChild);o.insertTreeBefore(b,a,null)}else D(b,a),s.precacheNode(c,b.firstChild)}};b.exports=N},{"./DOMLazyTree":522,"./DOMProperty":524,"./ReactBrowserEventEmitter":539,"./ReactDOMComponentTree":547,"./ReactDOMContainerInfo":548,"./ReactDOMFeatureFlags":550,"./ReactFeatureFlags":570,"./ReactInstanceMap":575,"./ReactInstrumentation":576,"./ReactMarkupChecksum":578,"./ReactReconciler":587,"./ReactUpdateQueue":593,"./ReactUpdates":594,"./instantiateReactComponent":633,"./reactProdInvariant":637,"./setInnerHTML":639,"./shouldUpdateReactComponent":641,"fbjs/lib/emptyObject":309,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"react/lib/React":650,"react/lib/ReactCurrentOwner":656}],580:[function(a,b,c){"use strict";function d(a,b,c){return{type:"INSERT_MARKUP",content:a,fromIndex:null,fromNode:null,toIndex:c,afterNode:b}}function e(a,b,c){return{type:"MOVE_EXISTING",content:null,fromIndex:a._mountIndex,fromNode:m.getHostNode(a),toIndex:c,afterNode:b}}function f(a,b){return{type:"REMOVE_NODE",content:null,fromIndex:a._mountIndex,fromNode:b,toIndex:null,afterNode:null}}function g(a){return{type:"SET_MARKUP",content:a,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function h(a){return{type:"TEXT_CONTENT",content:a,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function i(a,b){return b&&(a=a||[],a.push(b)),a}function j(a,b){l.processChildrenUpdates(a,b)}var k=a("./reactProdInvariant"),l=a("./ReactComponentEnvironment"),m=(a("./ReactInstanceMap"),a("./ReactInstrumentation"),a("react/lib/ReactCurrentOwner"),a("./ReactReconciler")),n=a("./ReactChildReconciler"),o=(a("fbjs/lib/emptyFunction"),a("./flattenChildren")),p=(a("fbjs/lib/invariant"),{Mixin:{_reconcilerInstantiateChildren:function(a,b,c){return n.instantiateChildren(a,b,c)},_reconcilerUpdateChildren:function(a,b,c,d,e,f){var g,h=0;return g=o(b,h),n.updateChildren(a,g,c,d,e,this,this._hostContainerInfo,f,h),g},mountChildren:function(a,b,c){var d=this._reconcilerInstantiateChildren(a,b,c);this._renderedChildren=d;var e=[],f=0;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g],i=0,j=m.mountComponent(h,b,this,this._hostContainerInfo,c,i);h._mountIndex=f++,e.push(j)}return e},updateTextContent:function(a){var b=this._renderedChildren;n.unmountChildren(b,!1);for(var c in b)b.hasOwnProperty(c)&&k("118");var d=[h(a)];j(this,d)},updateMarkup:function(a){var b=this._renderedChildren;n.unmountChildren(b,!1);for(var c in b)b.hasOwnProperty(c)&&k("118");var d=[g(a)];j(this,d)},updateChildren:function(a,b,c){this._updateChildren(a,b,c)},_updateChildren:function(a,b,c){var d=this._renderedChildren,e={},f=[],g=this._reconcilerUpdateChildren(d,a,f,e,b,c);if(g||d){var h,k=null,l=0,n=0,o=0,p=null;for(h in g)if(g.hasOwnProperty(h)){var q=d&&d[h],r=g[h];q===r?(k=i(k,this.moveChild(q,p,l,n)),n=Math.max(q._mountIndex,n),q._mountIndex=l):(q&&(n=Math.max(q._mountIndex,n)),k=i(k,this._mountChildAtIndex(r,f[o],p,l,b,c)),o++),l++,p=m.getHostNode(r)}for(h in e)e.hasOwnProperty(h)&&(k=i(k,this._unmountChild(d[h],e[h])));k&&j(this,k),this._renderedChildren=g}},unmountChildren:function(a){var b=this._renderedChildren;n.unmountChildren(b,a),this._renderedChildren=null},moveChild:function(a,b,c,d){if(a._mountIndex0&&void 0!==arguments[0]?arguments[0]:e();return d(),[]}function g(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:e();return d(),[]}function h(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:e();return d(),[]}function i(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:e();return d(),[]}function j(a){return void d()}function k(a){return void d()}function l(a){return void d()}function m(a){return void d()}function n(a){return t=!0,m(a)}function o(a){return u=!0,h(a)}function p(){return void d()}function q(){return void d()}function r(){return d(),!1}var s=(a("object-assign"),a("./ReactDebugTool"),a("fbjs/lib/warning"),!1),t=!1,u=!1,v={getLastMeasurements:e,getExclusive:f,getInclusive:g,getWasted:h,getOperations:i,printExclusive:j,printInclusive:k,printWasted:l,printOperations:m,start:p,stop:q,isRunning:r,printDOM:n,getMeasurementsSummaryMap:o};b.exports=v},{"./ReactDebugTool":562,"fbjs/lib/warning":324,"object-assign":509}],584:[function(a,b,c){"use strict";var d={};b.exports=d},{}],585:[function(a,b,c){"use strict";var d="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";b.exports=d},{}],586:[function(a,b,c){"use strict";function d(a){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=f.getPooled(null),this.useCreateElement=a}var e=a("object-assign"),f=a("./CallbackQueue"),g=a("./PooledClass"),h=a("./ReactBrowserEventEmitter"),i=a("./ReactInputSelection"),j=(a("./ReactInstrumentation"),a("./Transaction")),k=a("./ReactUpdateQueue"),l={initialize:i.getSelectionInformation,close:i.restoreSelection},m={initialize:function(){var a=h.isEnabled();return h.setEnabled(!1),a},close:function(a){h.setEnabled(a)}},n={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},o=[l,m,n],p={getTransactionWrappers:function(){return o},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return k},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(a){this.reactMountReady.rollback(a)},destructor:function(){f.release(this.reactMountReady),this.reactMountReady=null}};e(d.prototype,j,p),g.addPoolingTo(d),b.exports=d},{"./CallbackQueue":519,"./PooledClass":538,"./ReactBrowserEventEmitter":539,"./ReactInputSelection":574,"./ReactInstrumentation":576,"./ReactUpdateQueue":593,"./Transaction":612,"object-assign":509}],587:[function(a,b,c){"use strict";function d(){e.attachRefs(this,this._currentElement)}var e=a("./ReactRef"),f=(a("./ReactInstrumentation"),a("fbjs/lib/warning"),{mountComponent:function(a,b,c,e,f,g){var h=a.mountComponent(b,c,e,f,g);return a._currentElement&&null!=a._currentElement.ref&&b.getReactMountReady().enqueue(d,a),h},getHostNode:function(a){return a.getHostNode()},unmountComponent:function(a,b){e.detachRefs(a,a._currentElement),a.unmountComponent(b)},receiveComponent:function(a,b,c,f){var g=a._currentElement;if(b!==g||f!==a._context){var h=e.shouldUpdateRefs(g,b);h&&e.detachRefs(a,g),a.receiveComponent(b,c,f),h&&a._currentElement&&null!=a._currentElement.ref&&c.getReactMountReady().enqueue(d,a)}},performUpdateIfNecessary:function(a,b,c){a._updateBatchNumber===c&&a.performUpdateIfNecessary(b)}});b.exports=f},{"./ReactInstrumentation":576,"./ReactRef":588,"fbjs/lib/warning":324}],588:[function(a,b,c){"use strict";function d(a,b,c){"function"==typeof a?a(b.getPublicInstance()):f.addComponentAsRefTo(b,a,c)}function e(a,b,c){"function"==typeof a?a(null):f.removeComponentAsRefFrom(b,a,c)}var f=a("./ReactOwner"),g={};g.attachRefs=function(a,b){if(null!==b&&"object"==typeof b){var c=b.ref;null!=c&&d(c,a,b._owner)}},g.shouldUpdateRefs=function(a,b){var c=null,d=null;null!==a&&"object"==typeof a&&(c=a.ref,d=a._owner);var e=null,f=null;return null!==b&&"object"==typeof b&&(e=b.ref,f=b._owner),c!==e||"string"==typeof e&&f!==d},g.detachRefs=function(a,b){if(null!==b&&"object"==typeof b){var c=b.ref;null!=c&&e(c,a,b._owner)}},b.exports=g},{"./ReactOwner":582}],589:[function(a,b,c){"use strict";function d(a){this.reinitializeTransaction(),this.renderToStaticMarkup=a,this.useCreateElement=!1,this.updateQueue=new h(this)}var e=a("object-assign"),f=a("./PooledClass"),g=a("./Transaction"),h=(a("./ReactInstrumentation"),a("./ReactServerUpdateQueue")),i=[],j={enqueue:function(){}},k={getTransactionWrappers:function(){return i},getReactMountReady:function(){return j},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};e(d.prototype,g,k),f.addPoolingTo(d),b.exports=d},{"./PooledClass":538,"./ReactInstrumentation":576,"./ReactServerUpdateQueue":590,"./Transaction":612,"object-assign":509}],590:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){}var f=a("./ReactUpdateQueue"),g=(a("fbjs/lib/warning"),function(){function a(b){d(this,a),this.transaction=b}return a.prototype.isMounted=function(a){return!1},a.prototype.enqueueCallback=function(a,b,c){this.transaction.isInTransaction()&&f.enqueueCallback(a,b,c)},a.prototype.enqueueForceUpdate=function(a){this.transaction.isInTransaction()?f.enqueueForceUpdate(a):e(a,"forceUpdate")},a.prototype.enqueueReplaceState=function(a,b){this.transaction.isInTransaction()?f.enqueueReplaceState(a,b):e(a,"replaceState")},a.prototype.enqueueSetState=function(a,b){this.transaction.isInTransaction()?f.enqueueSetState(a,b):e(a,"setState")},a}());b.exports=g},{"./ReactUpdateQueue":593,"fbjs/lib/warning":324}],591:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){var d=l.ReactReconcileTransaction.getPooled(!0);a._render(b,d,c),l.ReactReconcileTransaction.release(d)}var f=a("./reactProdInvariant"),g=a("object-assign"),h=a("react/lib/React"),i=a("./ReactDefaultInjection"),j=a("./ReactCompositeComponent"),k=a("./ReactReconciler"),l=a("./ReactUpdates"),m=a("fbjs/lib/emptyObject"),n=(a("./getNextDebugID"),a("fbjs/lib/invariant"),function(){function a(b){d(this,a),this._renderedOutput=b,this._currentElement=b}return a.prototype.mountComponent=function(){},a.prototype.receiveComponent=function(a){this._renderedOutput=a,this._currentElement=a},a.prototype.unmountComponent=function(){},a.prototype.getHostNode=function(){},a.prototype.getPublicInstance=function(){return null},a}()),o=function(a){this.construct(a)};g(o.prototype,j,{_constructComponent:j._constructComponentWithoutOwner,_instantiateReactComponent:function(a){return new n(a)},_replaceNodeWithMarkup:function(){},_renderValidatedComponent:j._renderValidatedComponentWithoutOwnerOrContext});var p=function(){function a(){d(this,a),this._instance=null}return a.prototype.getMountedInstance=function(){return this._instance?this._instance._instance:null},a.prototype.render=function(a,b){return i.inject(),h.isValidElement(a)?void 0:f("12","function"==typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":""),"string"==typeof a.type?f("13",a.type):void 0,b||(b=m),l.batchedUpdates(e,this,a,b),this.getRenderOutput()},a.prototype.getRenderOutput=function(){return this._instance&&this._instance._renderedComponent&&this._instance._renderedComponent._renderedOutput||null},a.prototype.unmount=function(){this._instance&&k.unmountComponent(this._instance,!1)},a.prototype._render=function(a,b,c){if(this._instance)k.receiveComponent(this._instance,a,b,c);else{var d=new o(a);k.mountComponent(d,b,null,null,c,0),this._instance=d}},a}();b.exports=p},{"./ReactCompositeComponent":543,"./ReactDefaultInjection":564,"./ReactReconciler":587,"./ReactUpdates":594,"./getNextDebugID":629,"./reactProdInvariant":637,"fbjs/lib/emptyObject":309,"fbjs/lib/invariant":316,"object-assign":509,"react/lib/React":650}],592:[function(a,b,c){"use strict";function d(a){}function e(a,b){if(!a||!a.getPublicInstance)return[];var c=a.getPublicInstance(),d=b(c)?[c]:[],f=a._currentElement;if(y.isDOMComponent(c)){var g,h=a._renderedChildren;for(g in h)h.hasOwnProperty(g)&&(d=d.concat(e(h[g],b)))}else o.isValidElement(f)&&"function"==typeof f.type&&(d=d.concat(e(a._renderedComponent,b)));return d}function f(a){return function(b,c){var e;o.isValidElement(b)?i("14"):void 0,y.isDOMComponent(b)?e=w(b):b.tagName&&(e=b);var f=m.eventNameDispatchConfigs[a],g=new d;g.target=e,g.type=a.toLowerCase();var h=new u(f,q.getInstanceFromNode(e),g,e);h.persist(),j(h,c),f.phasedRegistrationNames?n.accumulateTwoPhaseDispatches(h):n.accumulateDirectDispatches(h),t.batchedUpdates(function(){l.enqueueEvents(h),l.processEventQueue(!0)})}}function g(){y.Simulate={};var a;for(a in m.eventNameDispatchConfigs)y.Simulate[a]=f(a)}function h(a){return function(b,c){var e=new d(a);j(e,c),y.isDOMComponent(b)?y.simulateNativeEventOnDOMComponent(a,b,e):b.tagName&&y.simulateNativeEventOnNode(a,b,e)}}var i=a("./reactProdInvariant"),j=a("object-assign"),k=a("./EventConstants"),l=a("./EventPluginHub"),m=a("./EventPluginRegistry"),n=a("./EventPropagators"),o=a("react/lib/React"),p=a("./ReactDOM"),q=a("./ReactDOMComponentTree"),r=a("./ReactBrowserEventEmitter"),s=a("./ReactInstanceMap"),t=a("./ReactUpdates"),u=a("./SyntheticEvent"),v=a("./ReactShallowRenderer"),w=a("./findDOMNode"),x=(a("fbjs/lib/invariant"),k.topLevelTypes),y={renderIntoDocument:function(a){var b=document.createElement("div");return p.render(a,b)},isElement:function(a){return o.isValidElement(a)},isElementOfType:function(a,b){return o.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&o.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return!y.isDOMComponent(a)&&(null!=a&&"function"==typeof a.render&&"function"==typeof a.setState)},isCompositeComponentWithType:function(a,b){if(!y.isCompositeComponent(a))return!1;var c=s.get(a),d=c._currentElement.type;return d===b},isCompositeComponentElement:function(a){if(!o.isValidElement(a))return!1;var b=a.type.prototype;return"function"==typeof b.render&&"function"==typeof b.setState},isCompositeComponentElementWithType:function(a,b){var c=s.get(a),d=c._currentElement.type;return!(!y.isCompositeComponentElement(a)||d!==b)},getRenderedChildOfCompositeComponent:function(a){if(!y.isCompositeComponent(a))return null;var b=s.get(a);return b._renderedComponent.getPublicInstance()},findAllInRenderedTree:function(a,b){return a?(y.isCompositeComponent(a)?void 0:i("10"),e(s.get(a),b)):[]},scryRenderedDOMComponentsWithClass:function(a,b){return y.findAllInRenderedTree(a,function(a){if(y.isDOMComponent(a)){var c=a.className;"string"!=typeof c&&(c=a.getAttribute("class")||"");var d=c.split(/\s+/);return Array.isArray(b)||(void 0===b?i("11"):void 0,b=b.split(/\s+/)),b.every(function(a){return d.indexOf(a)!==-1})}return!1})},findRenderedDOMComponentWithClass:function(a,b){var c=y.scryRenderedDOMComponentsWithClass(a,b);if(1!==c.length)throw new Error("Did not find exactly one match (found: "+c.length+") for class:"+b);return c[0]},scryRenderedDOMComponentsWithTag:function(a,b){return y.findAllInRenderedTree(a,function(a){return y.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){var c=y.scryRenderedDOMComponentsWithTag(a,b);if(1!==c.length)throw new Error("Did not find exactly one match (found: "+c.length+") for tag:"+b);return c[0]},scryRenderedComponentsWithType:function(a,b){return y.findAllInRenderedTree(a,function(a){return y.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,b){var c=y.scryRenderedComponentsWithType(a,b);if(1!==c.length)throw new Error("Did not find exactly one match (found: "+c.length+") for componentType:"+b);return c[0]},mockComponent:function(a,b){return b=b||a.mockTagName||"div",a.prototype.render.mockImplementation(function(){return o.createElement(b,null,this.props.children)}),this},simulateNativeEventOnNode:function(a,b,c){c.target=b,r.ReactEventListener.dispatchEvent(a,c)},simulateNativeEventOnDOMComponent:function(a,b,c){y.simulateNativeEventOnNode(a,w(b),c)},nativeTouchData:function(a,b){return{touches:[{pageX:a,pageY:b}]}},createRenderer:function(){return new v},Simulate:null,SimulateNative:{}},z=l.injection.injectEventPluginOrder;l.injection.injectEventPluginOrder=function(){z.apply(this,arguments),g()};var A=l.injection.injectEventPluginsByName;l.injection.injectEventPluginsByName=function(){A.apply(this,arguments),g()},g(),Object.keys(x).forEach(function(a){var b=0===a.indexOf("top")?a.charAt(3).toLowerCase()+a.substr(4):a;y.SimulateNative[b]=h(a)}),b.exports=y},{"./EventConstants":529,"./EventPluginHub":530,"./EventPluginRegistry":531,"./EventPropagators":533,"./ReactBrowserEventEmitter":539,"./ReactDOM":544,"./ReactDOMComponentTree":547,"./ReactInstanceMap":575,"./ReactShallowRenderer":591,"./ReactUpdates":594,"./SyntheticEvent":603,"./findDOMNode":620,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"object-assign":509,"react/lib/React":650}],593:[function(a,b,c){"use strict";function d(a){i.enqueueUpdate(a)}function e(a){var b=typeof a;if("object"!==b)return b;var c=a.constructor&&a.constructor.name||b,d=Object.keys(a);return d.length>0&&d.length<20?c+" (keys: "+d.join(", ")+")":c}function f(a,b){var c=h.get(a);if(!c){return null}return c}var g=a("./reactProdInvariant"),h=(a("react/lib/ReactCurrentOwner"),a("./ReactInstanceMap")),i=(a("./ReactInstrumentation"),a("./ReactUpdates")),j=(a("fbjs/lib/invariant"),a("fbjs/lib/warning"),{isMounted:function(a){var b=h.get(a);return!!b&&!!b._renderedComponent},enqueueCallback:function(a,b,c){j.validateCallback(b,c);var e=f(a);return e?(e._pendingCallbacks?e._pendingCallbacks.push(b):e._pendingCallbacks=[b],void d(e)):null},enqueueCallbackInternal:function(a,b){a._pendingCallbacks?a._pendingCallbacks.push(b):a._pendingCallbacks=[b],d(a)},enqueueForceUpdate:function(a){var b=f(a,"forceUpdate");b&&(b._pendingForceUpdate=!0,d(b))},enqueueReplaceState:function(a,b){var c=f(a,"replaceState");c&&(c._pendingStateQueue=[b],c._pendingReplaceState=!0,d(c))},enqueueSetState:function(a,b){var c=f(a,"setState");if(c){var e=c._pendingStateQueue||(c._pendingStateQueue=[]);e.push(b),d(c)}},enqueueElementInternal:function(a,b,c){a._pendingElement=b,a._context=c,d(a)},validateCallback:function(a,b){a&&"function"!=typeof a?g("122",b,e(a)):void 0}});b.exports=j},{"./ReactInstanceMap":575,"./ReactInstrumentation":576,"./ReactUpdates":594,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"react/lib/ReactCurrentOwner":656}],594:[function(a,b,c){"use strict";function d(){B.ReactReconcileTransaction&&v?void 0:k("123")}function e(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=m.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function f(a,b,c,e,f,g){return d(),v.batchedUpdates(a,b,c,e,f,g)}function g(a,b){return a._mountOrder-b._mountOrder}function h(a){var b=a.dirtyComponentsLength;b!==r.length?k("124",b,r.length):void 0,r.sort(g),s++;for(var c=0;c]/;b.exports=e},{}],620:[function(a,b,c){"use strict";function d(a){if(null==a)return null;if(1===a.nodeType)return a;var b=g.get(a);return b?(b=h(b),b?f.getNodeFromInstance(b):null):void("function"==typeof a.render?e("44"):e("45",Object.keys(a)))}var e=a("./reactProdInvariant"),f=(a("react/lib/ReactCurrentOwner"),a("./ReactDOMComponentTree")),g=a("./ReactInstanceMap"),h=a("./getHostComponentFromComposite");a("fbjs/lib/invariant"),a("fbjs/lib/warning");b.exports=d},{"./ReactDOMComponentTree":547,"./ReactInstanceMap":575,"./getHostComponentFromComposite":627,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"react/lib/ReactCurrentOwner":656}],621:[function(a,b,c){(function(c){"use strict";function d(a,b,c,d){if(a&&"object"==typeof a){var e=a,f=void 0===e[c];f&&null!=b&&(e[c]=b)}}function e(a,b){if(null==a)return a;var c={};return f(a,d,c),c}var f=(a("./KeyEscapeUtils"),a("./traverseAllChildren"));a("fbjs/lib/warning");"undefined"!=typeof c&&c.env,1,b.exports=e}).call(this,a("_process"))},{"./KeyEscapeUtils":536,"./traverseAllChildren":642,_process:510,"fbjs/lib/warning":324,"react/lib/ReactComponentTreeHook":655}],622:[function(a,b,c){"use strict";function d(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}b.exports=d},{}],623:[function(a,b,c){"use strict";function d(a){var b,c=a.keyCode;return"charCode"in a?(b=a.charCode,0===b&&13===c&&(b=13)):b=c,b>=32||13===b?b:0}b.exports=d},{}],624:[function(a,b,c){"use strict";function d(a){if(a.key){var b=f[a.key]||a.key;if("Unidentified"!==b)return b}if("keypress"===a.type){var c=e(a);return 13===c?"Enter":String.fromCharCode(c)}return"keydown"===a.type||"keyup"===a.type?g[a.keyCode]||"Unidentified":""}var e=a("./getEventCharCode"),f={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};b.exports=d},{"./getEventCharCode":623}],625:[function(a,b,c){"use strict";function d(a){var b=this,c=b.nativeEvent;if(c.getModifierState)return c.getModifierState(a);var d=f[a];return!!d&&!!c[d]}function e(a){return d}var f={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};b.exports=e},{}],626:[function(a,b,c){"use strict";function d(a){var b=a.target||a.srcElement||window;return b.correspondingUseElement&&(b=b.correspondingUseElement),3===b.nodeType?b.parentNode:b}b.exports=d},{}],627:[function(a,b,c){"use strict";function d(a){for(var b;(b=a._renderedNodeType)===e.COMPOSITE;)a=a._renderedComponent;return b===e.HOST?a._renderedComponent:b===e.EMPTY?null:void 0}var e=a("./ReactNodeTypes");b.exports=d},{"./ReactNodeTypes":581}],628:[function(a,b,c){"use strict";function d(a){var b=a&&(e&&a[e]||a[f]);if("function"==typeof b)return b}var e="function"==typeof Symbol&&Symbol.iterator,f="@@iterator";b.exports=d},{}],629:[function(a,b,c){"use strict";function d(){return e++}var e=1;b.exports=d},{}],630:[function(a,b,c){"use strict";function d(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function e(a){for(;a;){if(a.nextSibling)return a.nextSibling;a=a.parentNode}}function f(a,b){for(var c=d(a),f=0,g=0;c;){if(3===c.nodeType){if(g=f+c.textContent.length,f<=b&&g>=b)return{node:c,offset:b-f};f=g}c=d(e(c))}}b.exports=f},{}],631:[function(a,b,c){"use strict";function d(){return!f&&e.canUseDOM&&(f="textContent"in document.documentElement?"textContent":"innerText"),f}var e=a("fbjs/lib/ExecutionEnvironment"),f=null;b.exports=d},{"fbjs/lib/ExecutionEnvironment":302}],632:[function(a,b,c){"use strict";function d(a,b){var c={};return c[a.toLowerCase()]=b.toLowerCase(),c["Webkit"+a]="webkit"+b,c["Moz"+a]="moz"+b,c["ms"+a]="MS"+b,c["O"+a]="o"+b.toLowerCase(),c}function e(a){if(h[a])return h[a];if(!g[a])return a;var b=g[a];for(var c in b)if(b.hasOwnProperty(c)&&c in i)return h[a]=b[c];return""}var f=a("fbjs/lib/ExecutionEnvironment"),g={animationend:d("Animation","AnimationEnd"),animationiteration:d("Animation","AnimationIteration"),animationstart:d("Animation","AnimationStart"),transitionend:d("Transition","TransitionEnd")},h={},i={};f.canUseDOM&&(i=document.createElement("div").style,"AnimationEvent"in window||(delete g.animationend.animation,delete g.animationiteration.animation,delete g.animationstart.animation),"TransitionEvent"in window||delete g.transitionend.transition),b.exports=e},{"fbjs/lib/ExecutionEnvironment":302}],633:[function(a,b,c){"use strict";function d(a){if(a){var b=a.getName();if(b)return" Check the render method of `"+b+"`."}return""}function e(a){return"function"==typeof a&&"undefined"!=typeof a.prototype&&"function"==typeof a.prototype.mountComponent&&"function"==typeof a.prototype.receiveComponent}function f(a,b){var c;if(null===a||a===!1)c=j.create(f);else if("object"==typeof a){var h=a;!h||"function"!=typeof h.type&&"string"!=typeof h.type?g("130",null==h.type?h.type:typeof h.type,d(h._owner)):void 0,"string"==typeof h.type?c=k.createInternalComponent(h):e(h.type)?(c=new h.type(h),c.getHostNode||(c.getHostNode=c.getNativeNode)):c=new l(h)}else"string"==typeof a||"number"==typeof a?c=k.createInstanceForText(a):g("131",typeof a);return c._mountIndex=0,c._mountImage=null,c}var g=a("./reactProdInvariant"),h=a("object-assign"),i=a("./ReactCompositeComponent"),j=a("./ReactEmptyComponent"),k=a("./ReactHostComponent"),l=(a("./getNextDebugID"),a("fbjs/lib/invariant"),a("fbjs/lib/warning"),function(a){this.construct(a)});h(l.prototype,i,{_instantiateReactComponent:f}),b.exports=f},{"./ReactCompositeComponent":543,"./ReactEmptyComponent":566,"./ReactHostComponent":571,"./getNextDebugID":629,"./reactProdInvariant":637,"fbjs/lib/invariant":316,"fbjs/lib/warning":324,"object-assign":509}],634:[function(a,b,c){"use strict";/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function d(a,b){if(!f.canUseDOM||b&&!("addEventListener"in document))return!1;var c="on"+a,d=c in document;if(!d){var g=document.createElement("div");g.setAttribute(c,"return;"),d="function"==typeof g[c]}return!d&&e&&"wheel"===a&&(d=document.implementation.hasFeature("Events.wheel","3.0")),d}var e,f=a("fbjs/lib/ExecutionEnvironment");f.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),b.exports=d},{"fbjs/lib/ExecutionEnvironment":302}],635:[function(a,b,c){"use strict";function d(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!e[a.type]:"textarea"===b}var e={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};b.exports=d},{}],636:[function(a,b,c){"use strict";function d(a){return'"'+e(a)+'"'}var e=a("./escapeTextContentForBrowser");b.exports=d},{"./escapeTextContentForBrowser":619}],637:[function(a,b,c){"use strict";function d(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+a,d=0;d]/,i=a("./createMicrosoftUnsafeLocalFunction"),j=i(function(a,b){if(a.namespaceURI!==f.svg||"innerHTML"in a)a.innerHTML=b;else{d=d||document.createElement("div"),d.innerHTML=""+b+"";for(var c=d.firstChild;c.firstChild;)a.appendChild(c.firstChild)}});if(e.canUseDOM){var k=document.createElement("div");k.innerHTML=" ",""===k.innerHTML&&(j=function(a,b){if(a.parentNode&&a.parentNode.replaceChild(a,a),g.test(b)||"<"===b[0]&&h.test(b)){a.innerHTML=String.fromCharCode(65279)+b;var c=a.firstChild;1===c.data.length?a.removeChild(c):c.deleteData(0,1)}else a.innerHTML=b}),k=null}b.exports=j},{"./DOMNamespaces":523,"./createMicrosoftUnsafeLocalFunction":617,"fbjs/lib/ExecutionEnvironment":302}],640:[function(a,b,c){"use strict";var d=a("fbjs/lib/ExecutionEnvironment"),e=a("./escapeTextContentForBrowser"),f=a("./setInnerHTML"),g=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType)return void(c.nodeValue=b)}a.textContent=b};d.canUseDOM&&("textContent"in document.documentElement||(g=function(a,b){return 3===a.nodeType?void(a.nodeValue=b):void f(a,e(b))})),b.exports=g},{"./escapeTextContentForBrowser":619,"./setInnerHTML":639,"fbjs/lib/ExecutionEnvironment":302}],641:[function(a,b,c){"use strict";function d(a,b){var c=null===a||a===!1,d=null===b||b===!1;if(c||d)return c===d;var e=typeof a,f=typeof b;return"string"===e||"number"===e?"string"===f||"number"===f:"object"===f&&a.type===b.type&&a.key===b.key}b.exports=d},{}],642:[function(a,b,c){"use strict";function d(a,b){return a&&"object"==typeof a&&null!=a.key?j.escape(a.key):b.toString(36)}function e(a,b,c,f){var m=typeof a;if("undefined"!==m&&"boolean"!==m||(a=null),null===a||"string"===m||"number"===m||"object"===m&&a.$$typeof===h)return c(f,a,""===b?k+d(a,0):b),1;var n,o,p=0,q=""===b?k:b+l;if(Array.isArray(a))for(var r=0;r=0},q=10,r=750,s={x:null,y:null},t=null,u={x:{page:"pageX",client:"clientX",envScroll:"currentPageScrollLeft"},y:{page:"pageY",client:"clientY",envScroll:"currentPageScrollTop"}},v=["topTouchStart","topTouchCancel","topTouchEnd","topTouchMove"],w=["topMouseDown","topMouseMove","topMouseUp"].concat(v),x={touchTap:{phasedRegistrationNames:{bubbled:m({onTouchTap:null}),captured:m({onTouchTapCapture:null})},dependencies:w}},y=function(){return Date.now?Date.now:function(){return+new Date}}();b.exports=f},{"./TouchEventUtils":645,"fbjs/lib/keyOf":319,"react-dom/lib/EventConstants":529,"react-dom/lib/EventPluginUtils":532,"react-dom/lib/EventPropagators":533,"react-dom/lib/SyntheticUIEvent":610,"react-dom/lib/ViewportMetrics":613}],645:[function(a,b,c){var d={extractSingleTouch:function(a){var b=a.touches,c=a.changedTouches,d=b&&b.length>0,e=c&&c.length>0;return!d&&e?c[0]:d?b[0]:a}};b.exports=d},{}],646:[function(a,b,c){b.exports=function(a,b){if(a&&b-a<750)return!0}},{}],647:[function(a,b,c){var d=(a("fbjs/lib/invariant"),a("./defaultClickRejectionStrategy")),e=!1;b.exports=function(b){b=b||{};var c=b.shouldRejectClick||d;e=!0,a("react-dom/lib/EventPluginHub").injection.injectEventPluginsByName({TapEventPlugin:a("./TapEventPlugin.js")(c)})}},{"./TapEventPlugin.js":644,"./defaultClickRejectionStrategy":646,"fbjs/lib/invariant":316,"react-dom/lib/EventPluginHub":530}],648:[function(a,b,c){arguments[4][536][0].apply(c,arguments)},{dup:536}],649:[function(a,b,c){arguments[4][538][0].apply(c,arguments)},{"./reactProdInvariant":675,dup:538,"fbjs/lib/invariant":316}],650:[function(a,b,c){"use strict";var d=a("object-assign"),e=a("./ReactChildren"),f=a("./ReactComponent"),g=a("./ReactPureComponent"),h=a("./ReactClass"),i=a("./ReactDOMFactories"),j=a("./ReactElement"),k=a("./ReactPropTypes"),l=a("./ReactVersion"),m=a("./onlyChild"),n=(a("fbjs/lib/warning"),j.createElement),o=j.createFactory,p=j.cloneElement,q=d,r={Children:{map:e.map,forEach:e.forEach,count:e.count,toArray:e.toArray,only:m},Component:f,PureComponent:g,createElement:n,cloneElement:p,isValidElement:j.isValidElement,PropTypes:k,createClass:h.createClass,createFactory:o,createMixin:function(a){return a},DOM:i,version:l,__spread:q};b.exports=r},{"./ReactChildren":652,"./ReactClass":653,"./ReactComponent":654,"./ReactDOMFactories":657,"./ReactElement":658,"./ReactElementValidator":660,"./ReactPropTypes":664,"./ReactPureComponent":666,"./ReactVersion":669,"./onlyChild":674,"fbjs/lib/warning":324,"object-assign":509}],651:[function(a,b,c){"use strict";var d=a("react-dom/lib/ReactDOM"),e=a("react-dom/lib/ReactInstanceMap");c.getReactDOM=function(){return d},c.getReactInstanceMap=function(){return e}},{"react-dom/lib/ReactDOM":544,"react-dom/lib/ReactInstanceMap":575,"react-dom/lib/ReactPerf":583,"react-dom/lib/ReactTestUtils":592}],652:[function(a,b,c){"use strict";function d(a){return(""+a).replace(u,"$&/")}function e(a,b){this.func=a,this.context=b,this.count=0}function f(a,b,c){var d=a.func,e=a.context;d.call(e,b,a.count++)}function g(a,b,c){if(null==a)return a;var d=e.getPooled(b,c);r(a,f,d),e.release(d)}function h(a,b,c,d){this.result=a,this.keyPrefix=b,this.func=c,this.context=d,this.count=0}function i(a,b,c){var e=a.result,f=a.keyPrefix,g=a.func,h=a.context,i=g.call(h,b,a.count++);Array.isArray(i)?j(i,e,c,q.thatReturnsArgument):null!=i&&(p.isValidElement(i)&&(i=p.cloneAndReplaceKey(i,f+(!i.key||b&&b.key===i.key?"":d(i.key)+"/")+c)),e.push(i))}function j(a,b,c,e,f){var g="";null!=c&&(g=d(c)+"/");var j=h.getPooled(b,g,e,f);r(a,i,j),h.release(j)}function k(a,b,c){if(null==a)return a;var d=[];return j(a,d,null,b,c),d}function l(a,b,c){return null}function m(a,b){return r(a,l,null)}function n(a){var b=[];return j(a,b,null,q.thatReturnsArgument),b}var o=a("./PooledClass"),p=a("./ReactElement"),q=a("fbjs/lib/emptyFunction"),r=a("./traverseAllChildren"),s=o.twoArgumentPooler,t=o.fourArgumentPooler,u=/\/+/g;e.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},o.addPoolingTo(e,s),h.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},o.addPoolingTo(h,t);var v={forEach:g,map:k,mapIntoWithKeyPrefixInternal:j,count:m,toArray:n};b.exports=v},{"./PooledClass":649,"./ReactElement":658,"./traverseAllChildren":676,"fbjs/lib/emptyFunction":308}],653:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){var c=u.hasOwnProperty(b)?u[b]:null;w.hasOwnProperty(b)&&("OVERRIDE_BASE"!==c?m("73",b):void 0),a&&("DEFINE_MANY"!==c&&"DEFINE_MANY_MERGED"!==c?m("74",b):void 0)}function f(a,b){if(b){"function"==typeof b?m("75"):void 0,p.isValidElement(b)?m("76"):void 0;var c=a.prototype,d=c.__reactAutoBindPairs;b.hasOwnProperty(s)&&v.mixins(a,b.mixins);for(var f in b)if(b.hasOwnProperty(f)&&f!==s){var g=b[f],h=c.hasOwnProperty(f);if(e(h,f),v.hasOwnProperty(f))v[f](a,g);else{var k=u.hasOwnProperty(f),l="function"==typeof g,n=l&&!k&&!h&&b.autobind!==!1;if(n)d.push(f,g),c[f]=g;else if(h){var o=u[f];!k||"DEFINE_MANY_MERGED"!==o&&"DEFINE_MANY"!==o?m("77",o,f):void 0,"DEFINE_MANY_MERGED"===o?c[f]=i(c[f],g):"DEFINE_MANY"===o&&(c[f]=j(c[f],g))}else c[f]=g}}}else;}function g(a,b){if(b)for(var c in b){var d=b[c];if(b.hasOwnProperty(c)){var e=c in v;e?m("78",c):void 0;var f=c in a;f?m("79",c):void 0,a[c]=d}}}function h(a,b){a&&b&&"object"==typeof a&&"object"==typeof b?void 0:m("80");for(var c in b)b.hasOwnProperty(c)&&(void 0!==a[c]?m("81",c):void 0,a[c]=b[c]);return a}function i(a,b){return function(){var c=a.apply(this,arguments),d=b.apply(this,arguments);if(null==c)return d;if(null==d)return c;var e={};return h(e,c),h(e,d),e}}function j(a,b){return function(){a.apply(this,arguments),b.apply(this,arguments)}}function k(a,b){var c=b.bind(a);return c}function l(a){for(var b=a.__reactAutoBindPairs,c=0;c1){for(var q=Array(p),r=0;r1){for(var t=Array(s),u=0;u.")}return b}function f(a,b){if(a._store&&!a._store.validated&&null==a.key){a._store.validated=!0;var c=m.uniqueKey||(m.uniqueKey={}),d=e(b);if(!c[d]){c[d]=!0;var f="";a&&a._owner&&a._owner!==i.current&&(f=" It was passed a child from "+a._owner.getName()+".")}}}function g(a,b){if("object"==typeof a)if(Array.isArray(a))for(var c=0;c>"),B={array:g("array"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:h(),arrayOf:i,element:j(),instanceOf:k,node:o(),objectOf:m,oneOf:l,oneOfType:n,shape:p};e.prototype=Error.prototype,b.exports=B},{"./ReactElement":658,"./ReactPropTypeLocationNames":663,"./ReactPropTypesSecret":665,"./getIteratorFn":673,"fbjs/lib/emptyFunction":308,"fbjs/lib/warning":324}],665:[function(a,b,c){arguments[4][585][0].apply(c,arguments)},{dup:585}],666:[function(a,b,c){"use strict";function d(a,b,c){this.props=a,this.context=b,this.refs=i,this.updater=c||h}function e(){}var f=a("object-assign"),g=a("./ReactComponent"),h=a("./ReactNoopUpdateQueue"),i=a("fbjs/lib/emptyObject");e.prototype=g.prototype,d.prototype=new e,d.prototype.constructor=d,f(d.prototype,g.prototype),d.prototype.isPureReactComponent=!0,b.exports=d},{"./ReactComponent":654,"./ReactNoopUpdateQueue":662,"fbjs/lib/emptyObject":309,"object-assign":509}],667:[function(a,b,c){"use strict";var d=a("./flattenChildren"),e={getChildMapping:function(a,b){return a?d(a):a},mergeChildMappings:function(a,b){function c(c){return b.hasOwnProperty(c)?b[c]:a[c]}a=a||{},b=b||{};var d={},e=[];for(var f in a)b.hasOwnProperty(f)?e.length&&(d[f]=e,e=[]):e.push(f);var g,h={};for(var i in b){if(d.hasOwnProperty(i))for(g=0;g=0;c--){var e=b[c];a=e(a)}return a}}c.__esModule=!0,c.default=d},{}],679:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c.__esModule=!0;var e=a("./utils/createEagerElementUtil"),f=d(e),g=a("./isReferentiallyTransparentFunctionComponent"),h=d(g),i=function(a){var b=(0,h.default)(a);return function(c,d){return(0,f.default)(!1,b,a,c,d)}};c.default=i},{"./isReferentiallyTransparentFunctionComponent":683,"./utils/createEagerElementUtil":687}],680:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a,b){arguments.length<=2||void 0===arguments[2]||arguments[2],!(arguments.length<=3||void 0===arguments[3])&&arguments[3];return a};c.default=d},{"./wrapDisplayName":688}],681:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a){if("string"==typeof a)return a;if(a)return a.displayName||a.name||"Component"};c.default=d},{}],682:[function(a,b,c){"use strict";c.__esModule=!0;var d=function(a){return Boolean(a&&a.prototype&&"object"==typeof a.prototype.isReactComponent)};c.default=d},{}],683:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c.__esModule=!0;var e=a("./isClassComponent.js"),f=d(e),g=function(a){return Boolean(!("function"!=typeof a||(0,f.default)(a)||a.defaultProps||a.contextTypes||a.propTypes))};c.default=g},{"./isClassComponent.js":682}],684:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c.__esModule=!0;var e=a("./shouldUpdate"),f=d(e),g=a("./shallowEqual"),h=d(g),i=a("./createHelper"),j=d(i),k=(0,f.default)(function(a,b){return!(0,h.default)(a,b)});c.default=(0,j.default)(k,"pure",!0,!0)},{"./createHelper":680,"./shallowEqual":685,"./shouldUpdate":686}],685:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c.__esModule=!0;var e=a("fbjs/lib/shallowEqual"),f=d(e);c.default=f.default},{"fbjs/lib/shallowEqual":323}],686:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("react"),i=a("./createHelper"),j=d(i),k=a("./createEagerFactory"),l=d(k),m=function(a){return function(b){var c=(0,l.default)(b);return function(b){function d(){return e(this,d),f(this,b.apply(this,arguments))}return g(d,b),d.prototype.shouldComponentUpdate=function(b){return a(this.props,b)},d.prototype.render=function(){return c(this.props)},d}(h.Component)}};c.default=(0,j.default)(m,"shouldUpdate")},{"./createEagerFactory":679,"./createHelper":680,react:677}],687:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c.__esModule=!0;var e=Object.assign||function(a){for(var b=1;b=0;--d){var e=this.tryEntries[d],f=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var g=s.call(e,"catchLoc"),h=s.call(e,"finallyLoc");if(g&&h){if(this.prev=0;--c){var d=this.tryEntries[c];if(d.tryLoc<=this.prev&&s.call(d,"finallyLoc")&&this.prev=0;--b){var c=this.tryEntries[b];if(c.finallyLoc===a)return this.complete(c.completion,c.afterLoc),n(c),C}},catch:function(a){for(var b=this.tryEntries.length-1;b>=0;--b){var c=this.tryEntries[b];if(c.tryLoc===a){var d=c.completion;if("throw"===d.type){var e=d.arg;n(c)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(a,b,c){return this.delegate={iterator:p(a),resultName:b,nextLoc:c},C}}}("object"==typeof c?c:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:510}],690:[function(a,b,c){b.exports=function(a){for(var b=1;b-1?b:a}function n(a,b){b=b||{};var c=b.body;if("string"==typeof a)this.url=a;else{if(a.bodyUsed)throw new TypeError("Already read");this.url=a.url,this.credentials=a.credentials,b.headers||(this.headers=new e(a.headers)),this.method=a.method,this.mode=a.mode,c||null==a._bodyInit||(c=a._bodyInit,a.bodyUsed=!0)}if(this.credentials=b.credentials||this.credentials||"omit",!b.headers&&this.headers||(this.headers=new e(b.headers)),this.method=m(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&c)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(c)}function o(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function p(a){var b=new e;return a.split("\r\n").forEach(function(a){var c=a.split(":"),d=c.shift().trim();if(d){var e=c.join(":").trim();b.append(d,e)}}),b}function q(a,b){b||(b={}),this.type="default",this.status="status"in b?b.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new e(b.headers),this.url=b.url||"",this._initBody(a)}if(!a.fetch){var r={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(a){return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};if(r.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],t=function(a){return a&&DataView.prototype.isPrototypeOf(a)},u=ArrayBuffer.isView||function(a){return a&&s.indexOf(Object.prototype.toString.call(a))>-1};e.prototype.append=function(a,d){a=b(a),d=c(d);var e=this.map[a];e||(e=[],this.map[a]=e),e.push(d)},e.prototype.delete=function(a){delete this.map[b(a)]},e.prototype.get=function(a){var c=this.map[b(a)];return c?c[0]:null},e.prototype.getAll=function(a){return this.map[b(a)]||[]},e.prototype.has=function(a){return this.map.hasOwnProperty(b(a))},e.prototype.set=function(a,d){this.map[b(a)]=[c(d)]},e.prototype.forEach=function(a,b){Object.getOwnPropertyNames(this.map).forEach(function(c){this.map[c].forEach(function(d){a.call(b,d,c,this)},this)},this)},e.prototype.keys=function(){var a=[];return this.forEach(function(b,c){a.push(c)}),d(a)},e.prototype.values=function(){var a=[];return this.forEach(function(b){a.push(b)}),d(a)},e.prototype.entries=function(){var a=[];return this.forEach(function(b,c){a.push([c,b])}),d(a)},r.iterable&&(e.prototype[Symbol.iterator]=e.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];n.prototype.clone=function(){return new n(this,{body:this._bodyInit})},l.call(n.prototype),l.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new e(this.headers),url:this.url})},q.error=function(){var a=new q(null,{status:0,statusText:""});return a.type="error",a};var w=[301,302,303,307,308];q.redirect=function(a,b){if(w.indexOf(b)===-1)throw new RangeError("Invalid status code");return new q(null,{status:b,headers:{location:a}})},a.Headers=e,a.Request=n,a.Response=q,a.fetch=function(a,b){return new Promise(function(c,d){var e=new n(a,b),f=new XMLHttpRequest;f.onload=function(){var a={status:f.status,statusText:f.statusText,headers:p(f.getAllResponseHeaders()||"")};a.url="responseURL"in f?f.responseURL:a.headers.get("X-Request-URL");var b="response"in f?f.response:f.responseText;c(new q(b,a))},f.onerror=function(){d(new TypeError("Network request failed"))},f.ontimeout=function(){d(new TypeError("Network request failed"))},f.open(e.method,e.url,!0),"include"===e.credentials&&(f.withCredentials=!0),"responseType"in f&&r.blob&&(f.responseType="blob"),e.headers.forEach(function(a,b){f.setRequestHeader(b,a)}),f.send("undefined"==typeof e._bodyInit?null:e._bodyInit)})},a.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}],693:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a("react"),f=d(e),g=a("material-ui/RefreshIndicator"),h=d(g),i={refresh:{display:"inline-block",position:"relative"}},j=function(){return f.default.createElement("div",{className:"yoast-wizard-overlay-loader"},f.default.createElement(h.default,{size:40,left:10,top:100,status:"loading",style:i.refresh,"justify-content":"center","z-index":11}))};c.default=j},{"material-ui/RefreshIndicator":471,react:677}],694:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=Object.assign||function(a){for(var b=1;b0&&(a[e].previous=b[d-1]),d>-1&&d0&&void 0!==arguments[0]?arguments[0]:[],c={};return b.forEach(function(b){a.props.fields[b]&&(c[b]=a.props.fields[b])}),c}},{key:"postStep",value:function(a,b){a&&(this.setState({isLoading:!0,errorMessage:""}),this.clickedButton=b.currentTarget,(0,u.default)(this.props.endpoint.url,{data:this.refs.step.state.fieldValues[this.state.currentStepId],headers:this.props.endpoint.headers}).then(this.handleSuccessful.bind(this,a)).catch(this.handleFailure.bind(this)))}},{key:"getFirstStep",value:function(a){return Object.getOwnPropertyNames(a)[0]}},{key:"handleSuccessful",value:function(a){this.setState({isLoading:!1,currentStepId:a}),-1===this.clickedButton.className.indexOf("step")&&m.default.findDOMNode(this.refs.step.refs.stepContainer).focus()}},{key:"handleFailure",value:function(){this.setState({isLoading:!1,errorMessage:(0,F.default)({mixedString:this.props.translate("A problem occurred when saving the current step, {{link}}please file a bug report{{/link}} describing what step you are on and which changes you want to make (if any)."),components:{link:k.default.createElement("a",{href:"https://yoa.st/bugreport",target:"_blank"})}})})}},{key:"setNextStep",value:function(a){var b=this.getCurrentStep();this.postStep(b.next,a)}},{key:"setPreviousStep",value:function(a){var b=this.getCurrentStep();this.postStep(b.previous,a)}},{key:"getCurrentStep",value:function(){return this.state.steps[this.state.currentStepId]}},{key:"getCurrentStepNumber",value:function(){var a=this.state.currentStepId,b=Object.keys(this.state.steps),c=b.indexOf(a);return c>-1?c+1:0}},{key:"getNavigationbutton",value:function(a,b,c,d){var e=this,f=!1;return"next"!==a||c.next||(b.label=this.props.translate("Close"),b["aria-label"]=this.props.translate("Close the Wizard"),b.onClick=function(){return""!==e.props.finishUrl?void(window.location.href=e.props.finishUrl):void history.go(-1)}),"previous"!==a||c.previous||(f=!0),f?"":k.default.createElement(w.default,h({className:d},b))}},{key:"render",value:function(){var a=this,b=this.getCurrentStep(),c=this.getNavigationbutton("previous",{label:this.props.translate("Previous"),"aria-label":this.props.translate("Previous step"),onClick:this.setPreviousStep.bind(this),disableFocusRipple:!0,disableTouchRipple:!0,disableKeyboardFocus:!0},b,"yoast-wizard--button yoast-wizard--button__previous"),d=this.getNavigationbutton("next",{label:this.props.translate("Next"),"aria-label":this.props.translate("Next step"),primary:!0,onClick:this.setNextStep.bind(this),disableFocusRipple:!0,disableTouchRipple:!0,disableKeyboardFocus:!0},b,"yoast-wizard--button yoast-wizard--button__next");return k.default.createElement(A.default,{muiTheme:D.default},k.default.createElement("div",{className:"yoast-wizard-body"},k.default.createElement(y.default,{height:93,width:200}),k.default.createElement(q.default,{steps:this.props.steps,stepIndex:this.getCurrentStepNumber()-1,onClick:function(b,c){return a.postStep(b,c)}}),k.default.createElement("div",{className:"yoast-wizard-container"},k.default.createElement("div",{className:"yoast-wizard"},this.renderErrorMessage(),k.default.createElement(o.default,{ref:"step",currentStep:this.state.currentStepId,title:b.title,fields:b.fields,customComponents:this.props.customComponents}),k.default.createElement("div",{className:"yoast-wizard--navigation"},c,d)),this.state.isLoading?k.default.createElement("div",{className:"yoast-wizard-overlay"},k.default.createElement(s.default,null)):"")))}},{key:"renderErrorMessage",value:function(){return""===this.state.errorMessage?"":k.default.createElement("div",{className:"yoast-wizard-notice yoast-wizard-notice__error"},this.state.errorMessage)}}]),b}(k.default.Component);G.propTypes={endpoint:k.default.PropTypes.object.isRequired,steps:k.default.PropTypes.object.isRequired,fields:k.default.PropTypes.object.isRequired,customComponents:k.default.PropTypes.object,finishUrl:k.default.PropTypes.string,translate:k.default.PropTypes.any},G.defaultProps={customComponents:{},finishUrl:""},c.default=(0,B.localize)(G)},{"../../utils/i18n":715,"../basic/YoastLogo":705,"./LoadingIndicator":693,"./Step":695,"./StepIndicator":697,"./config/yoast-theme":702,"./helpers/ajaxHelper":703,"interpolate-components":358,"material-ui/RaisedButton":469,"material-ui/styles/MuiThemeProvider":490,react:677,"react-dom":513}],695:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,d=g();return""===b?d.gettext(a):d.ngettext(a,b,c)}function i(a){var b=a.displayName||a.name||"",c={translate:h};return m.default.createClass({displayName:"Localized"+b,render:function(){var b=(0,o.default)({},this.props,c);return m.default.createElement(a,b)}})}Object.defineProperty(c,"__esModule",{value:!0}),c.setTranslations=f,c.getGlobalJed=g,c.translate=h,c.localize=i;var j=a("jed"),k=d(j),l=a("react"),m=d(l),n=a("lodash/assign"),o=d(n),p=null},{jed:360,"lodash/assign":441,react:677}]},{},[4]); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/jquery.tablesorter.min.js b/wp-content/plugins/wordpress-seo/js/dist/jquery.tablesorter.min.js new file mode 100644 index 0000000..8ca383e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/jquery.tablesorter.min.js @@ -0,0 +1,3 @@ +(function($){$.extend({tablesorter:new +function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ca.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ca.js new file mode 100644 index 0000000..cd854e3 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ca.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/cs.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/cs.js new file mode 100644 index 0000000..6f139d7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/cs.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/da.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/da.js new file mode 100644 index 0000000..112eaaf --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/da.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/de.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/de.js new file mode 100644 index 0000000..7e6e944 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/de.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/el.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/el.js new file mode 100644 index 0000000..9440588 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/el.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/en.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/en.js new file mode 100644 index 0000000..2dd1790 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/en.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/es.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/es.js new file mode 100644 index 0000000..677a7c0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/es.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/et.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/et.js new file mode 100644 index 0000000..fbe61bd --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/et.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/eu.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/eu.js new file mode 100644 index 0000000..08703d9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/eu.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fa.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fa.js new file mode 100644 index 0000000..a516fd7 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fa.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fi.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fi.js new file mode 100644 index 0000000..5f25d4e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fr.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fr.js new file mode 100644 index 0000000..520f30f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/fr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/gl.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/gl.js new file mode 100644 index 0000000..35c6a98 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/gl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/he.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/he.js new file mode 100644 index 0000000..6c958c9 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/he.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hi.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hi.js new file mode 100644 index 0000000..6a2096e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hr.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hr.js new file mode 100644 index 0000000..6606445 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hu.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hu.js new file mode 100644 index 0000000..fec1e0a --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/hu.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/id.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/id.js new file mode 100644 index 0000000..d5fa650 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/id.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/is.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/is.js new file mode 100644 index 0000000..5266e42 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/is.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/it.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/it.js new file mode 100644 index 0000000..42c8c31 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/it.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ja.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ja.js new file mode 100644 index 0000000..2e27197 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ja.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/km.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/km.js new file mode 100644 index 0000000..875b461 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/km.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ko.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ko.js new file mode 100644 index 0000000..8bad406 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ko.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lt.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lt.js new file mode 100644 index 0000000..fc83694 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lt.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lv.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lv.js new file mode 100644 index 0000000..7746e79 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/lv.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/mk.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/mk.js new file mode 100644 index 0000000..58ae6ad --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/mk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ms.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ms.js new file mode 100644 index 0000000..8323d55 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ms.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nb.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nb.js new file mode 100644 index 0000000..1c4e333 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nb.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nl.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nl.js new file mode 100644 index 0000000..46f987d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/nl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pl.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pl.js new file mode 100644 index 0000000..f2407a1 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt-BR.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt-BR.js new file mode 100644 index 0000000..3db40b6 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt-BR.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt.js new file mode 100644 index 0000000..0befe03 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/pt.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ro.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ro.js new file mode 100644 index 0000000..e8ebb35 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ro.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ru.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ru.js new file mode 100644 index 0000000..6db6893 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ru.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sk.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sk.js new file mode 100644 index 0000000..1fefd70 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr-Cyrl.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr-Cyrl.js new file mode 100644 index 0000000..7f037b8 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr-Cyrl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr.js new file mode 100644 index 0000000..90c141b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sv.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sv.js new file mode 100644 index 0000000..2194e13 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sv.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/th.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/th.js new file mode 100644 index 0000000..456520b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/th.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/tr.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/tr.js new file mode 100644 index 0000000..ff4a591 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/tr.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/uk.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/uk.js new file mode 100644 index 0000000..66a1a8e --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/uk.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/vi.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/vi.js new file mode 100644 index 0000000..750fa9d --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/vi.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-CN.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-CN.js new file mode 100644 index 0000000..fdea008 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-CN.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-TW.js b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-TW.js new file mode 100644 index 0000000..33eba48 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/i18n/zh-TW.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/select2/select2.min.js b/wp-content/plugins/wordpress-seo/js/dist/select2/select2.min.js new file mode 100644 index 0000000..43f0a65 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/select2/select2.min.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
      ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
    • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
        '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
      • ×
      • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change"); +if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
      • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null; +},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}); \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-400.min.js b/wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-400.min.js new file mode 100644 index 0000000..7640c29 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-400.min.js @@ -0,0 +1,27 @@ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0){var d=this.state.results.map(function(a,c){return j.default.createElement(s,{key:a.objectID,post:a,showDetail:b.showDetail.bind(b,c)})});a=j.default.createElement("ul",{role:"list",className:"wpseo-kb-search-results"},d),(0,p.default)(this.props.foundResultsText.replace("%d",c))}else""!==this.state.searchString&&(a=j.default.createElement("p",null,this.props.noResultsText),(0,p.default)(this.props.noResultsText));return a}},{key:"renderDetail",value:function(){var a=this.state.showDetail,b=this.state.results[a];return j.default.createElement("div",{className:"wpseo-kb-search-detail"},j.default.createElement("div",{className:"wpseo-kb-search-navigation"},j.default.createElement("button",{className:"button dashicon-button wpseo-kb-search-back-button","aria-label":this.props.backLabel,onClick:this.hideDetail},this.props.back),j.default.createElement("a",{href:b.permalink,className:"button dashicon-button wpseo-kb-search-ext-link ","aria-label":this.props.openLabel,target:"_blank"},this.props.open)),j.default.createElement(t,{post:b,iframeTitle:this.props.iframeTitle}))}},{key:"renderError",value:function(a){return console.error(a),(0,p.default)(this.props.errorMessage),j.default.createElement("p",null,this.props.errorMessage)}},{key:"render",value:function(){var a="",b=j.default.createElement(r,{headingText:this.props.headingText,submitAction:this.searchButtonClicked,searchString:this.state.searchString,searchButtonText:this.props.searchButtonText});return a=this.state.errorMessage?j.default.createElement("div",null,b,this.renderError(this.state.errorMessage)):this.state.searching?j.default.createElement("div",null,b,j.default.createElement(u,{loadingPlaceholder:this.props.loadingPlaceholder})):this.state.showDetail===!1?j.default.createElement("div",null,b,this.state.results.length>0?j.default.createElement("h2",{className:"screen-reader-text"},this.props.searchResultsHeading):"",this.renderSearchResults()):this.renderDetail(),j.default.createElement("div",{className:"wpseo-kb-search-container"},a)}}]),b}(j.default.Component);q.propTypes={foundResultsText:j.default.PropTypes.string,noResultsText:j.default.PropTypes.string,headingText:j.default.PropTypes.string,searchButtonText:j.default.PropTypes.string,searchResultsHeading:j.default.PropTypes.string,iframeTitle:j.default.PropTypes.string,algoliaApplicationId:j.default.PropTypes.string.isRequired,algoliaApiKey:j.default.PropTypes.string.isRequired,algoliaIndexName:j.default.PropTypes.string.isRequired,errorMessage:j.default.PropTypes.string.isRequired,loadingPlaceholder:j.default.PropTypes.string.isRequired,open:j.default.PropTypes.string.isRequired,openLabel:j.default.PropTypes.string.isRequired,back:j.default.PropTypes.string.isRequired,backLabel:j.default.PropTypes.string.isRequired},q.defaultProps={foundResultsText:"Number of search results: %d",noResultsText:"No results found.",headingText:"Search the Yoast knowledge base",searchButtonText:"Search",searchResultsHeading:"Search results",iframeTitle:"Knowledge base article",algoliaApplicationId:"RC8G2UCWJK",algoliaApiKey:"459903434a7963f83e7d4cd9bfe89c0d",algoliaIndexName:"knowledge_base_all",errorMessage:"Something went wrong. Please try again later.",loadingPlaceholder:"Loading...",back:"Back",backLabel:"Back to search results",open:"Open",openLabel:"Open the knowledge base article in a new window or read it in the iframe below"};var r=function(a){return j.default.createElement("div",{className:"wpseo-kb-search-search-bar"},j.default.createElement("h2",{id:"wpseo-kb-search-heading"},a.headingText),j.default.createElement("form",{onSubmit:function(b){b.preventDefault(),a.submitAction(b)}},j.default.createElement("input",{type:"text","aria-labelledby":"wpseo-kb-search-heading",defaultValue:a.searchString}),j.default.createElement("button",{type:"submit",className:"button wpseo-kb-search-search-button"},a.searchButtonText)))},s=function(a){var b=a.post,c=b.excerpt||b.metadesc;return j.default.createElement("li",null,j.default.createElement("a",{href:b.permalink,onClick:function(b){b.preventDefault(),a.showDetail()},className:"wpseo-kb-search-result-link"},j.default.createElement("div",{className:"wpseo-kb-search-result"},j.default.createElement("h3",{className:"wpseo-kb-search-result-title"},b.post_title),c&&j.default.createElement("p",null,c))))},t=function(a){var b=a.post.permalink+"amp?source=wpseo-kb-search";return j.default.createElement("iframe",{src:b,className:"kb-search-content-frame",title:a.iframeTitle})},u=function(a){return j.default.createElement("div",{className:"wpseo-kb-loader"},a.loadingPlaceholder)};c.default=q},{"a11y-speak":4,algoliasearch:13,"lodash/isUndefined":58,react:215}],3:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./kb-search/wp-seo-kb-search-init"),f=d(e),g=a("a11y-speak"),h=d(g);!function(){function a(a){var b=!1,c="",d=[],e=["userid","name","user_description"],f=["date"],g=["title","parent_title","excerpt","excerpt_only","caption","focuskw","pt_single","pt_plural","modified","id"],i=["term404","searchphrase"],j=["term_title","term_description"],k=["category","category_description","tag","tag_description"];a.hasClass("posttype-template")?d=d.concat(i,j):a.hasClass("homepage-template")?d=d.concat(e,f,g,i,j,k):a.hasClass("taxonomy-template")?d=d.concat(e,f,g,i):a.hasClass("author-template")?d=d.concat(g,f,i,j,k):a.hasClass("date-template")?d=d.concat(e,g,i,j,k):a.hasClass("search-template")?d=d.concat(e,f,g,j,k,["term404"]):a.hasClass("error404-template")&&(d=d.concat(e,f,g,j,k,["searchphrase"])),jQuery.each(d,function(d,e){if(c=a.attr("id")+"-"+e+"-warning",a.val().search("%%"+e+"%%")!==-1){a.addClass("wpseo-variable-warning-element");var f=wpseoAdminL10n.variable_warning.replace("%s","%%"+e+"%%");jQuery("#"+c).length?jQuery("#"+c).html(f):a.after('
        '+f+"
        "),(0,h.default)(wpseoAdminL10n.variable_warning.replace("%s",e),"assertive"),b=!0}else jQuery("#"+c).length&&jQuery("#"+c).remove()}),b===!1&&a.removeClass("wpseo-variable-warning-element")}function b(a,b,c,d){jQuery.post(ajaxurl,{action:"wpseo_set_option",option:a,newval:b,_wpnonce:d},function(a){a&&jQuery("#"+c).hide()})}function c(a){jQuery.post(ajaxurl,{action:"wpseo_kill_blocking_files",_ajax_nonce:a}).done(function(a){var b=jQuery(".yoast-notice-blocking-files"),c=jQuery("#blocking_files");c.html(a.data.message),b.attr("tabindex","-1").focus(),a.success?b.removeClass("notice-error").addClass("notice-success"):b.addClass("yoast-blocking-files-error")})}function d(){jQuery("#og_frontpage_desc").val(jQuery("#meta_description").val())}function e(){var a=jQuery("#wpseo-conf");if(a.length){var b=a.attr("action").split("#")[0];a.attr("action",b+window.location.hash)}}function g(){var a=jQuery("#TB_ajaxContent");jQuery.post(ajaxurl,{_wpnonce:a.find("input[name=fb_admin_nonce]").val(),admin_name:a.find("input[name=fb_admin_name]").val(),admin_id:a.find("input[name=fb_admin_id]").val(),action:"wpseo_add_fb_admin"},function(b){var c=jQuery.parseJSON(b);switch(a.find("p.notice").remove(),c.success){case 1:a.find("input[type=text]").val(""),jQuery("#user_admin").append(c.html),jQuery("#connected_fb_admins").show(),tb_remove();break;case 0:a.find(".form-wrap").prepend(c.html)}})}function i(){var a="400px";jQuery("#company_or_person").select2({width:a,language:wpseoSelect2Locale}),jQuery("#twitter_card_type").select2({width:a,language:wpseoSelect2Locale}),jQuery("#post_types-post-maintax").select2({width:a,language:wpseoSelect2Locale}),jQuery("#profile").select2({width:a,language:wpseoSelect2Locale})}function j(){var a=window.location.hash.replace("#top#","");""!==a&&"#"!==a.charAt(0)||(a=jQuery(".wpseotab").attr("id")),jQuery("#"+a).addClass("active"),jQuery("#"+a+"-tab").addClass("nav-tab-active").click()}jQuery(window).on("hashchange",e),jQuery(document).on("ready",e),window.wpseoDetectWrongVariables=a,window.setWPOption=b,window.wpseoKillBlockingFiles=c,window.wpseoCopyHomeMeta=d,window.wpseo_add_fb_admin=g,window.wpseoSetTabHash=e,jQuery(document).ready(function(){(0,f.default)(),jQuery("#enablexmlsitemap").change(function(){jQuery("#sitemapinfo").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#disable-author input[type='radio']").change(function(){jQuery(this).is(":checked")&&jQuery("#author-archives-titles-metas-content").toggle("off"===jQuery(this).val())}).change(),jQuery("#disable-date input[type='radio']").change(function(){jQuery(this).is(":checked")&&jQuery("#date-archives-titles-metas-content").toggle("off"===jQuery(this).val())}).change(),jQuery("#disable-post_format").change(function(){jQuery("#post_format-titles-metas").toggle(jQuery(this).is(":not(:checked)"))}).change(),jQuery("#breadcrumbs-enable").change(function(){jQuery("#breadcrumbsinfo").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#disable_author_sitemap").find("input:radio").change(function(){jQuery(this).is(":checked")&&jQuery("#xml_user_block").toggle("off"===jQuery(this).val())}).change(),jQuery("#cleanpermalinks").change(function(){jQuery("#cleanpermalinksdiv").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#wpseo-tabs").find("a").click(function(){jQuery("#wpseo-tabs").find("a").removeClass("nav-tab-active"),jQuery(".wpseotab").removeClass("active");var a=jQuery(this).attr("id").replace("-tab","");jQuery("#"+a).addClass("active"),jQuery(this).addClass("nav-tab-active")}),jQuery("#company_or_person").change(function(){var a=jQuery(this).val();"company"===a?(jQuery("#knowledge-graph-company").show(),jQuery("#knowledge-graph-person").hide()):"person"===a?(jQuery("#knowledge-graph-company").hide(),jQuery("#knowledge-graph-person").show()):(jQuery("#knowledge-graph-company").hide(),jQuery("#knowledge-graph-person").hide())}).change(),jQuery(".template").change(function(){a(jQuery(this))}).change(),jQuery("#blocking_files .button").on("click",function(){c(jQuery(this).data("nonce"))}),jQuery(".switch-yoast-seo input").on("keydown",function(a){"keydown"===a.type&&13===a.which&&a.preventDefault()}),j(),i()})}()},{"./kb-search/wp-seo-kb-search-init":1,"a11y-speak":4}],4:[function(a,b,c){var d,e,f=function(a){a=a||"polite";var b=document.createElement("div");b.id="a11y-speak-"+a,b.className="a11y-speak-region";var c="clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden;";return b.setAttribute("style",c),b.setAttribute("aria-live",a),b.setAttribute("aria-relevant","additions text"),b.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(b),b},g=function(a){return"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?a():void document.addEventListener("DOMContentLoaded",a)};g(function(){d=document.getElementById("a11y-speak-polite"),e=document.getElementById("a11y-speak-assertive"),null===d&&(d=f("polite")),null===e&&(e=f("assertive"))});var h=function(){for(var a=document.querySelectorAll(".a11y-speak-region"),b=0;b]+>/g," "),e&&"assertive"===b?e.textContent=a:d&&(d.textContent=a)};b.exports=i},{}],5:[function(a,b,c){(function(d){function e(){return"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function f(){var a=arguments,b=this.useColors;if(a[0]=(b?"%c":"")+this.namespace+(b?" %c":" ")+a[0]+(b?"%c ":" ")+"+"+c.humanize(this.diff),!b)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function g(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(a){try{null==a?c.storage.removeItem("debug"):c.storage.debug=a}catch(a){}}function i(){try{return c.storage.debug}catch(a){}if("undefined"!=typeof d&&"env"in d)return d.env.DEBUG}function j(){try{return window.localStorage}catch(a){}}c=b.exports=a("./debug"),c.log=g,c.formatArgs=f,c.save=h,c.load=i,c.useColors=e,c.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:j(),c.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],c.formatters.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}},c.enable(i())}).call(this,a("_process"))},{"./debug":6,_process:62}],6:[function(a,b,c){function d(){return c.colors[k++%c.colors.length]}function e(a){function b(){}function e(){var a=e,b=+new Date,f=b-(j||b);a.diff=f,a.prev=j,a.curr=b,j=b,null==a.useColors&&(a.useColors=c.useColors()),null==a.color&&a.useColors&&(a.color=d());for(var g=new Array(arguments.length),h=0;h1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a0)return d(a);if("number"===c&&isNaN(a)===!1)return b.long?f(a):e(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},{}],8:[function(a,b,c){function d(){i.apply(this,arguments)}function e(){var a="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new k.AlgoliaSearchError(a)}b.exports=d;var f=a("./Index.js"),g=a("./deprecate.js"),h=a("./deprecatedMessage.js"),i=a("./AlgoliaSearchCore.js"),j=a("inherits"),k=a("./errors");j(d,i),d.prototype.deleteIndex=function(a,b){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:b})},d.prototype.moveIndex=function(a,b,c){var d={operation:"move",destination:b};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:c})},d.prototype.copyIndex=function(a,b,c){var d={operation:"copy",destination:b};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:c})},d.prototype.getLogs=function(b,c,d){var e=a("./clone.js"),f={};return"object"==typeof b?(f=e(b),d=c):0===arguments.length||"function"==typeof b?d=b:1===arguments.length||"function"==typeof c?(d=c,f.offset=b):(f.offset=b,f.length=c),void 0===f.offset&&(f.offset=0),void 0===f.length&&(f.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(f,""),hostType:"read",callback:d})},d.prototype.listIndexes=function(a,b){var c="";return void 0===a||"function"==typeof a?b=a:c="?page="+a,this._jsonRequest({method:"GET",url:"/1/indexes"+c,hostType:"read",callback:b})},d.prototype.initIndex=function(a){return new f(this,a)},d.prototype.listUserKeys=function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},d.prototype.getUserKeyACL=function(a,b){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:b})},d.prototype.deleteUserKey=function(a,b){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:b})},d.prototype.addUserKey=function(b,c,d){var e=a("isarray"),f="Usage: client.addUserKey(arrayOfAcls[, params, callback])";if(!e(b))throw new Error(f);1!==arguments.length&&"function"!=typeof c||(d=c,c=null);var g={acl:b};return c&&(g.validity=c.validity,g.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,g.maxHitsPerQuery=c.maxHitsPerQuery,g.indexes=c.indexes,g.description=c.description,c.queryParameters&&(g.queryParameters=this._getSearchParams(c.queryParameters,"")),g.referers=c.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:g,hostType:"write",callback:d})},d.prototype.addUserKeyWithValidity=g(function(a,b,c){return this.addUserKey(a,b,c)},h("client.addUserKeyWithValidity()","client.addUserKey()")),d.prototype.updateUserKey=function(b,c,d,e){var f=a("isarray"),g="Usage: client.updateUserKey(key, arrayOfAcls[, params, callback])";if(!f(c))throw new Error(g);2!==arguments.length&&"function"!=typeof d||(e=d,d=null);var h={acl:c};return d&&(h.validity=d.validity,h.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,h.maxHitsPerQuery=d.maxHitsPerQuery,h.indexes=d.indexes,h.description=d.description,d.queryParameters&&(h.queryParameters=this._getSearchParams(d.queryParameters,"")),h.referers=d.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+b,body:h,hostType:"write",callback:e})},d.prototype.startQueriesBatch=g(function(){this._batch=[]},h("client.startQueriesBatch()","client.search()")),d.prototype.addQueryInBatch=g(function(a,b,c){this._batch.push({indexName:a,query:b,params:c})},h("client.addQueryInBatch()","client.search()")),d.prototype.sendQueriesBatch=g(function(a){return this.search(this._batch,a)},h("client.sendQueriesBatch()","client.search()")),d.prototype.batch=function(b,c){var d=a("isarray"),e="Usage: client.batch(operations[, callback])";if(!d(b))throw new Error(e);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:b},hostType:"write",callback:c})},d.prototype.destroy=e,d.prototype.enableRateLimitForward=e,d.prototype.disableRateLimitForward=e,d.prototype.useSecuredAPIKey=e,d.prototype.disableSecuredAPIKey=e,d.prototype.generateSecuredApiKey=e},{"./AlgoliaSearchCore.js":9,"./Index.js":10,"./clone.js":19,"./deprecate.js":20,"./deprecatedMessage.js":21,"./errors":22,inherits:56,isarray:57}],9:[function(a,b,c){function d(b,c,d){var f=a("debug")("algoliasearch"),h=a("./clone.js"),j=a("isarray"),k=a("./map.js"),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(d._allowEmptyCredentials!==!0&&!b)throw new i.AlgoliaSearchError("Please provide an application ID. "+l);if(d._allowEmptyCredentials!==!0&&!c)throw new i.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=b,this.apiKey=c;var m=g([this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"]);this.hosts={read:[],write:[]},this.hostIndex={read:0,write:0},d=d||{};var n=d.protocol||"https:",o=void 0===d.timeout?2e3:d.timeout;if(/:$/.test(n)||(n+=":"),"http:"!==d.protocol&&"https:"!==d.protocol)throw new i.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+d.protocol+"`)");d.hosts?j(d.hosts)?(this.hosts.read=h(d.hosts),this.hosts.write=h(d.hosts)):(this.hosts.read=h(d.hosts.read),this.hosts.write=h(d.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(m),this.hosts.write=[this.applicationID+".algolia.net"].concat(m)),this.hosts.read=k(this.hosts.read,e(n)),this.hosts.write=k(this.hosts.write,e(n)),this.requestTimeout=o,this.extraHeaders=[],this.cache=d._cache||{},this._ua=d._ua,this._useCache=!(void 0!==d._useCache&&!d._cache)||d._useCache,this._useFallback=void 0===d.useFallback||d.useFallback,this._setTimeout=d._setTimeout,f("init done, %j",this)}function e(a){return function(b){return a+"//"+b.toLowerCase()}}function f(a){if(void 0===Array.prototype.toJSON)return JSON.stringify(a);var b=Array.prototype.toJSON;delete Array.prototype.toJSON;var c=JSON.stringify(a);return Array.prototype.toJSON=b,c}function g(a){for(var b,c,d=a.length;0!==d;)c=Math.floor(Math.random()*d),d-=1,b=a[d],a[d]=a[c],a[c]=b;return a}function h(a){var b={};for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d;d="x-algolia-api-key"===c||"x-algolia-application-id"===c?"**hidden for security purposes**":a[c],b[c]=d}return b}b.exports=d;var i=a("./errors"),j=a("./exitPromise.js"),k=a("./IndexCore.js"),l=500;d.prototype.initIndex=function(a){return new k(this,a)},d.prototype.setExtraHeader=function(a,b){this.extraHeaders.push({name:a.toLowerCase(),value:b})},d.prototype.addAlgoliaAgent=function(a){this._ua+=";"+a},d.prototype._jsonRequest=function(b){function c(a,j){function l(a){var b=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200;g("received response: statusCode: %s, computed statusCode: %d, headers: %j",a.statusCode,b,a.headers);var c=2===Math.floor(b/100),f=new Date;if(q.push({currentHost:w,headers:h(e),content:d||null,contentLength:void 0!==d?d.length:null,method:j.method,timeout:j.timeout,url:j.url,startTime:v,endTime:f,duration:f-v,statusCode:b}),c)return m._useCache&&k&&(k[u]=a.responseText),a.body;var l=4!==Math.floor(b/100);if(l)return n+=1,s();g("unrecoverable error");var o=new i.AlgoliaSearchError(a.body&&a.body.message,{debugData:q,statusCode:b});return m._promise.reject(o)}function r(a){g("error: %s, stack: %s",a.message,a.stack);var c=new Date;return q.push({currentHost:w,headers:h(e),content:d||null,contentLength:void 0!==d?d.length:null,method:j.method,timeout:j.timeout,url:j.url,startTime:v,endTime:c,duration:c-v}),a instanceof i.AlgoliaSearchError||(a=new i.Unknown(a&&a.message,a)),n+=1,a instanceof i.Unknown||a instanceof i.UnparsableJSON||n>=m.hosts[b.hostType].length&&(o||!p)?(a.debugData=q,m._promise.reject(a)):a instanceof i.RequestTimeout?t():s()}function s(){return g("retrying request"),m.hostIndex[b.hostType]=(m.hostIndex[b.hostType]+1)%m.hosts[b.hostType].length,c(a,j)}function t(){return g("retrying request with higher timeout"),m.hostIndex[b.hostType]=(m.hostIndex[b.hostType]+1)%m.hosts[b.hostType].length,j.timeout=m.requestTimeout*(n+1),c(a,j)}var u,v=new Date;if(m._useCache&&(u=b.url),m._useCache&&d&&(u+="_body_"+j.body),m._useCache&&k&&void 0!==k[u])return g("serving response from cache"),m._promise.resolve(JSON.parse(k[u]));if(n>=m.hosts[b.hostType].length)return!p||o?(g("could not get any response"),m._promise.reject(new i.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+m.applicationID,{debugData:q}))):(g("switching to fallback"),n=0,j.method=b.fallback.method,j.url=b.fallback.url,j.jsonBody=b.fallback.body,j.jsonBody&&(j.body=f(j.jsonBody)),e=m._computeRequestHeaders(),j.timeout=m.requestTimeout*(n+1),m.hostIndex[b.hostType]=0,o=!0,c(m._request.fallback,j));var w=m.hosts[b.hostType][m.hostIndex[b.hostType]],x=w+j.url,y={body:j.body,jsonBody:j.jsonBody,method:j.method,headers:e,timeout:j.timeout,debug:g};return g("method: %s, url: %s, headers: %j, timeout: %d",y.method,x,y.headers,y.timeout),a===m._request.fallback&&g("using fallback"),a.call(m,x,y).then(l,r)}var d,e,g=a("debug")("algoliasearch:"+b.url),k=b.cache,m=this,n=0,o=!1,p=m._useFallback&&m._request.fallback&&b.fallback;this.apiKey.length>l&&void 0!==b.body&&(void 0!==b.body.params||void 0!==b.body.requests)?(b.body.apiKey=this.apiKey,e=this._computeRequestHeaders(!1)):e=this._computeRequestHeaders(),void 0!==b.body&&(d=f(b.body)),g("request start");var q=[],r=c(m._request,{url:b.url,method:b.method,body:d,jsonBody:b.body,timeout:m.requestTimeout*(n+1)});return b.callback?void r.then(function(a){j(function(){b.callback(null,a)},m._setTimeout||setTimeout)},function(a){j(function(){b.callback(a)},m._setTimeout||setTimeout)}):r},d.prototype._getSearchParams=function(a,b){if(void 0===a||null===a)return b;for(var c in a)null!==c&&void 0!==a[c]&&a.hasOwnProperty(c)&&(b+=""===b?"":"&",b+=c+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[c])?f(a[c]):a[c]));return b},d.prototype._computeRequestHeaders=function(b){var c=a("foreach"),d={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return b!==!1&&(d["x-algolia-api-key"]=this.apiKey),this.userToken&&(d["x-algolia-usertoken"]=this.userToken),this.securityTags&&(d["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&c(this.extraHeaders,function(a){d[a.name]=a.value}),d},d.prototype.search=function(b,c,d){var e=a("isarray"),f=a("./map.js"),g="Usage: client.search(arrayOfQueries[, callback])";if(!e(b))throw new Error(g);"function"==typeof c?(d=c,c={}):void 0===c&&(c={});var h=this,i={requests:f(b,function(a){var b="";return void 0!==a.query&&(b+="query="+encodeURIComponent(a.query)),{indexName:a.indexName,params:h._getSearchParams(a.params,b)}})},j=f(i.requests,function(a,b){return b+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(a.indexName)+"?"+a.params)}).join("&"),k="/1/indexes/*/queries";return void 0!==c.strategy&&(k+="?strategy="+c.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:k,body:i,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:j}},callback:d})},d.prototype.setSecurityTags=function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var b=[],c=0;cg&&(b=g),"published"!==a.status?k._promise.delay(b).then(c):a})}function d(a){i(function(){b(null,a)},k._setTimeout||setTimeout)}function e(a){i(function(){b(a)},k._setTimeout||setTimeout)}var f=100,g=5e3,h=0,j=this,k=j.as,l=c();return b?void l.then(d,e):l},d.prototype.clearIndex=function(a){var b=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/clear",hostType:"write",callback:a})},d.prototype.getSettings=function(a){var b=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/settings?getVersion=2",hostType:"read",callback:a})},d.prototype.searchSynonyms=function(a,b){return"function"==typeof a?(b=a,a={}):void 0===a&&(a={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:a,hostType:"read",callback:b})},d.prototype.saveSynonym=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a.objectID)+"?forwardToSlaves="+(b.forwardToSlaves?"true":"false"),body:a,hostType:"write",callback:c})},d.prototype.getSynonym=function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a),hostType:"read",callback:b})},d.prototype.deleteSynonym=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a)+"?forwardToSlaves="+(b.forwardToSlaves?"true":"false"),hostType:"write",callback:c})},d.prototype.clearSynonyms=function(a,b){return"function"==typeof a?(b=a,a={}):void 0===a&&(a={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToSlaves="+(a.forwardToSlaves?"true":"false"),hostType:"write",callback:b})},d.prototype.batchSynonyms=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToSlaves="+(b.forwardToSlaves?"true":"false")+"&replaceExistingSynonyms="+(b.replaceExistingSynonyms?"true":"false"),hostType:"write",body:a,callback:c})},d.prototype.setSettings=function(a,b,c){1!==arguments.length&&"function"!=typeof b||(c=b,b={});var d=b.forwardToSlaves||!1,e=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(e.indexName)+"/settings?forwardToSlaves="+(d?"true":"false"),hostType:"write",body:a,callback:c})},d.prototype.listUserKeys=function(a){var b=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/keys",hostType:"read",callback:a})},d.prototype.getUserKeyACL=function(a,b){var c=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/keys/"+a,hostType:"read",callback:b})},d.prototype.deleteUserKey=function(a,b){var c=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/keys/"+a,hostType:"write",callback:b})},d.prototype.addUserKey=function(b,c,d){var e=a("isarray"),f="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!e(b))throw new Error(f);1!==arguments.length&&"function"!=typeof c||(d=c,c=null);var g={acl:b};return c&&(g.validity=c.validity,g.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,g.maxHitsPerQuery=c.maxHitsPerQuery,g.description=c.description,c.queryParameters&&(g.queryParameters=this.as._getSearchParams(c.queryParameters,"")),g.referers=c.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:g,hostType:"write",callback:d})},d.prototype.addUserKeyWithValidity=g(function(a,b,c){return this.addUserKey(a,b,c)},h("index.addUserKeyWithValidity()","index.addUserKey()")),d.prototype.updateUserKey=function(b,c,d,e){var f=a("isarray"),g="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!f(c))throw new Error(g);2!==arguments.length&&"function"!=typeof d||(e=d,d=null);var h={acl:c};return d&&(h.validity=d.validity,h.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,h.maxHitsPerQuery=d.maxHitsPerQuery,h.description=d.description,d.queryParameters&&(h.queryParameters=this.as._getSearchParams(d.queryParameters,"")),h.referers=d.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+b,body:h,hostType:"write",callback:e})}},{"./IndexBrowser":11,"./IndexCore.js":12,"./clone.js":19,"./deprecate.js":20,"./deprecatedMessage.js":21,"./errors":22,"./exitPromise.js":23,"./map.js":24,"./merge.js":25,inherits:56,isarray:57}],11:[function(a,b,c){"use strict";function d(){}b.exports=d;var e=a("inherits"),f=a("events").EventEmitter;e(d,f),d.prototype.stop=function(){this._stopped=!0,this._clean()},d.prototype._end=function(){this.emit("end"),this._clean()},d.prototype._error=function(a){this.emit("error",a),this._clean()},d.prototype._result=function(a){this.emit("result",a)},d.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{events:30,inherits:56}],12:[function(a,b,c){function d(a,b){this.indexName=b,this.as=a,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var e=a("./buildSearchMethod.js"),f=a("./deprecate.js"),g=a("./deprecatedMessage.js");b.exports=d,d.prototype.clearCache=function(){this.cache={}},d.prototype.search=e("query"),d.prototype.similarSearch=e("similarQuery"),d.prototype.browse=function(b,c,d){var e,f,g=a("./merge.js"),h=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(e=0,d=arguments[0],b=void 0):"number"==typeof arguments[0]?(e=arguments[0],"number"==typeof arguments[1]?f=arguments[1]:"function"==typeof arguments[1]&&(d=arguments[1],f=void 0),b=void 0,c=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(d=arguments[1]),c=arguments[0],b=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(d=arguments[1],c=void 0),c=g({},c||{},{page:e,hitsPerPage:f,query:b});var i=this.as._getSearchParams(c,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(h.indexName)+"/browse?"+i,hostType:"read",callback:d})},d.prototype.browseFrom=function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(a),hostType:"read",callback:b})},d.prototype.searchForFacetValues=function(b,c){var d=a("./clone.js"),e=a("./omit.js"),f="Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])";if(void 0===b.facetName||void 0===b.facetQuery)throw new Error(f);var g=b.facetName,h=e(d(b),function(a){return"facetName"===a}),i=this.as._getSearchParams(h,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(g)+"/query",hostType:"read",body:{params:i},callback:c})},d.prototype.searchFacet=f(function(a,b){return this.searchForFacetValues(a,b)},g("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),d.prototype._search=function(a,b,c){return this.as._jsonRequest({cache:this.cache,method:"POST",url:b||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:c})},d.prototype.getObject=function(a,b,c){var d=this;1!==arguments.length&&"function"!=typeof b||(c=b,b=void 0);var e="";if(void 0!==b){e="?attributes=";for(var f=0;f was loaded but did not call our provided callback"),JSONPScriptError:e("JSONPScriptError"," \ No newline at end of file diff --git a/wp-content/plugins/wordpress-seo/wp-seo-main.php b/wp-content/plugins/wordpress-seo/wp-seo-main.php new file mode 100644 index 0000000..01d45b0 --- /dev/null +++ b/wp-content/plugins/wordpress-seo/wp-seo-main.php @@ -0,0 +1,493 @@ + ABSPATH . 'wp-admin/includes/class-wp-list-table.php', + 'walker_category' => ABSPATH . 'wp-includes/category-template.php', + 'pclzip' => ABSPATH . 'wp-admin/includes/class-pclzip.php', + ); + } + + $cn = strtolower( $class ); + + if ( ! class_exists( $class ) && isset( $classes[ $cn ] ) ) { + require_once( $classes[ $cn ] ); + } +} + +if ( file_exists( WPSEO_PATH . '/vendor/autoload_52.php' ) ) { + require WPSEO_PATH . '/vendor/autoload_52.php'; +} +elseif ( ! class_exists( 'WPSEO_Options' ) ) { // Still checking since might be site-level autoload R. + add_action( 'admin_init', 'yoast_wpseo_missing_autoload', 1 ); + + return; +} + +if ( function_exists( 'spl_autoload_register' ) ) { + spl_autoload_register( 'wpseo_auto_load' ); +} + +/* ********************* DEFINES DEPENDING ON AUTOLOADED CODE ********************* */ + +/** + * Defaults to production, for safety + */ +if ( ! defined( 'YOAST_ENVIRONMENT' ) ) { + define( 'YOAST_ENVIRONMENT', 'production' ); +} + +/** + * Only use minified assets when we are in a production environment + */ +if ( ! defined( 'WPSEO_CSSJS_SUFFIX' ) ) { + define( 'WPSEO_CSSJS_SUFFIX', ( 'development' !== YOAST_ENVIRONMENT ) ? '.min' : '' ); +} + +/* ***************************** PLUGIN (DE-)ACTIVATION *************************** */ + +/** + * Run single site / network-wide activation of the plugin. + * + * @param bool $networkwide Whether the plugin is being activated network-wide. + */ +function wpseo_activate( $networkwide = false ) { + if ( ! is_multisite() || ! $networkwide ) { + _wpseo_activate(); + } + else { + /* Multi-site network activation - activate the plugin for all blogs */ + wpseo_network_activate_deactivate( true ); + } +} + +/** + * Run single site / network-wide de-activation of the plugin. + * + * @param bool $networkwide Whether the plugin is being de-activated network-wide. + */ +function wpseo_deactivate( $networkwide = false ) { + if ( ! is_multisite() || ! $networkwide ) { + _wpseo_deactivate(); + } + else { + /* Multi-site network activation - de-activate the plugin for all blogs */ + wpseo_network_activate_deactivate( false ); + } +} + +/** + * Run network-wide (de-)activation of the plugin + * + * @param bool $activate True for plugin activation, false for de-activation. + */ +function wpseo_network_activate_deactivate( $activate = true ) { + global $wpdb; + + $network_blogs = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE site_id = %d", $wpdb->siteid ) ); + + if ( is_array( $network_blogs ) && $network_blogs !== array() ) { + foreach ( $network_blogs as $blog_id ) { + switch_to_blog( $blog_id ); + + if ( $activate === true ) { + _wpseo_activate(); + } + else { + _wpseo_deactivate(); + } + + restore_current_blog(); + } + } +} + +/** + * Runs on activation of the plugin. + */ +function _wpseo_activate() { + require_once( WPSEO_PATH . 'inc/wpseo-functions.php' ); + require_once( WPSEO_PATH . 'inc/class-wpseo-installation.php' ); + + wpseo_load_textdomain(); // Make sure we have our translations available for the defaults. + + new WPSEO_Installation(); + + WPSEO_Options::get_instance(); + if ( ! is_multisite() ) { + WPSEO_Options::initialize(); + } + else { + WPSEO_Options::maybe_set_multisite_defaults( true ); + } + WPSEO_Options::ensure_options_exist(); + + if ( is_multisite() && ms_is_switched() ) { + delete_option( 'rewrite_rules' ); + } + else { + $wpseo_rewrite = new WPSEO_Rewrite(); + $wpseo_rewrite->schedule_flush(); + } + + wpseo_add_capabilities(); + + // Clear cache so the changes are obvious. + WPSEO_Utils::clear_cache(); + + do_action( 'wpseo_activate' ); +} + +/** + * On deactivation, flush the rewrite rules so XML sitemaps stop working. + */ +function _wpseo_deactivate() { + require_once( WPSEO_PATH . 'inc/wpseo-functions.php' ); + + if ( is_multisite() && ms_is_switched() ) { + delete_option( 'rewrite_rules' ); + } + else { + add_action( 'shutdown', 'flush_rewrite_rules' ); + } + + wpseo_remove_capabilities(); + + // Clear cache so the changes are obvious. + WPSEO_Utils::clear_cache(); + + do_action( 'wpseo_deactivate' ); +} + +/** + * Run wpseo activation routine on creation / activation of a multisite blog if WPSEO is activated + * network-wide. + * + * Will only be called by multisite actions. + * + * @internal Unfortunately will fail if the plugin is in the must-use directory + * @see https://core.trac.wordpress.org/ticket/24205 + * + * @param int $blog_id Blog ID. + */ +function wpseo_on_activate_blog( $blog_id ) { + if ( ! function_exists( 'is_plugin_active_for_network' ) ) { + require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); + } + + if ( is_plugin_active_for_network( plugin_basename( WPSEO_FILE ) ) ) { + switch_to_blog( $blog_id ); + wpseo_activate( false ); + restore_current_blog(); + } +} + + +/* ***************************** PLUGIN LOADING *************************** */ + +/** + * Load translations + */ +function wpseo_load_textdomain() { + $wpseo_path = str_replace( '\\', '/', WPSEO_PATH ); + $mu_path = str_replace( '\\', '/', WPMU_PLUGIN_DIR ); + + if ( false !== stripos( $wpseo_path, $mu_path ) ) { + load_muplugin_textdomain( 'wordpress-seo', dirname( WPSEO_BASENAME ) . '/languages/' ); + } + else { + load_plugin_textdomain( 'wordpress-seo', false, dirname( WPSEO_BASENAME ) . '/languages/' ); + } +} + +add_action( 'plugins_loaded', 'wpseo_load_textdomain' ); + + +/** + * On plugins_loaded: load the minimum amount of essential files for this plugin + */ +function wpseo_init() { + require_once( WPSEO_PATH . 'inc/wpseo-functions.php' ); + require_once( WPSEO_PATH . 'inc/wpseo-functions-deprecated.php' ); + + // Make sure our option and meta value validation routines and default values are always registered and available. + WPSEO_Options::get_instance(); + WPSEO_Meta::init(); + + $options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_permalinks', 'wpseo_xml' ) ); + if ( version_compare( $options['version'], WPSEO_VERSION, '<' ) ) { + new WPSEO_Upgrade(); + // Get a cleaned up version of the $options. + $options = WPSEO_Options::get_options( array( 'wpseo', 'wpseo_permalinks', 'wpseo_xml' ) ); + } + + if ( $options['stripcategorybase'] === true ) { + $GLOBALS['wpseo_rewrite'] = new WPSEO_Rewrite; + } + + if ( $options['enablexmlsitemap'] === true ) { + $GLOBALS['wpseo_sitemaps'] = new WPSEO_Sitemaps; + } + + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + require_once( WPSEO_PATH . 'inc/wpseo-non-ajax-functions.php' ); + } + + // Init it here because the filter must be present on the frontend as well or it won't work in the customizer. + new WPSEO_Customizer(); +} + +/** + * Loads the rest api endpoints. + */ +function wpseo_init_rest_api() { + // We can't do anything when requirements are not met. + if ( WPSEO_Utils::is_api_available() ) { + // Boot up REST API. + $configuration_service = new WPSEO_Configuration_Service(); + $configuration_service->initialize(); + } +} + +/** + * Used to load the required files on the plugins_loaded hook, instead of immediately. + */ +function wpseo_frontend_init() { + add_action( 'init', 'initialize_wpseo_front' ); + + $options = WPSEO_Options::get_option( 'wpseo_internallinks' ); + if ( $options['breadcrumbs-enable'] === true ) { + /** + * If breadcrumbs are active (which they supposedly are if the users has enabled this settings, + * there's no reason to have bbPress breadcrumbs as well. + * + * @internal The class itself is only loaded when the template tag is encountered via + * the template tag function in the wpseo-functions.php file + */ + add_filter( 'bbp_get_breadcrumb', '__return_false' ); + } + + add_action( 'template_redirect', 'wpseo_frontend_head_init', 999 ); +} + +/** + * Instantiate the different social classes on the frontend + */ +function wpseo_frontend_head_init() { + $options = WPSEO_Options::get_option( 'wpseo_social' ); + if ( $options['twitter'] === true ) { + add_action( 'wpseo_head', array( 'WPSEO_Twitter', 'get_instance' ), 40 ); + } + + if ( $options['opengraph'] === true ) { + $GLOBALS['wpseo_og'] = new WPSEO_OpenGraph; + } + +} + +/** + * Used to load the required files on the plugins_loaded hook, instead of immediately. + */ +function wpseo_admin_init() { + new WPSEO_Admin_Init(); +} + + +/* ***************************** BOOTSTRAP / HOOK INTO WP *************************** */ +$spl_autoload_exists = function_exists( 'spl_autoload_register' ); +$filter_exists = function_exists( 'filter_input' ); + +if ( ! $spl_autoload_exists ) { + add_action( 'admin_init', 'yoast_wpseo_missing_spl', 1 ); +} + +if ( ! $filter_exists ) { + add_action( 'admin_init', 'yoast_wpseo_missing_filter', 1 ); +} + +if ( ! function_exists( 'wp_installing' ) ) { + /** + * We need to define wp_installing in WordPress versions older than 4.4 + * + * @return bool + */ + function wp_installing() { + return defined( 'WP_INSTALLING' ); + } +} + +if ( ! wp_installing() && ( $spl_autoload_exists && $filter_exists ) ) { + add_action( 'plugins_loaded', 'wpseo_init', 14 ); + add_action( 'rest_api_init', 'wpseo_init_rest_api' ); + + if ( is_admin() ) { + + new Yoast_Alerts(); + + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + require_once( WPSEO_PATH . 'admin/ajax.php' ); + + // Plugin conflict ajax hooks. + new Yoast_Plugin_Conflict_Ajax(); + + if ( filter_input( INPUT_POST, 'action' ) === 'inline-save' ) { + add_action( 'plugins_loaded', 'wpseo_admin_init', 15 ); + } + } + else { + add_action( 'plugins_loaded', 'wpseo_admin_init', 15 ); + } + } + else { + add_action( 'plugins_loaded', 'wpseo_frontend_init', 15 ); + } + + add_action( 'plugins_loaded', 'load_yoast_notifications' ); +} + +// Activation and deactivation hook. +register_activation_hook( WPSEO_FILE, 'wpseo_activate' ); +register_deactivation_hook( WPSEO_FILE, 'wpseo_deactivate' ); +add_action( 'wpmu_new_blog', 'wpseo_on_activate_blog' ); +add_action( 'activate_blog', 'wpseo_on_activate_blog' ); + +// Loading OnPage integration. +new WPSEO_OnPage(); + + +/** + * Wraps for notifications center class. + */ +function load_yoast_notifications() { + // Init Yoast_Notification_Center class. + Yoast_Notification_Center::get(); +} + + +/** + * Throw an error if the PHP SPL extension is disabled (prevent white screens) and self-deactivate plugin + * + * @since 1.5.4 + * + * @return void + */ +function yoast_wpseo_missing_spl() { + if ( is_admin() ) { + add_action( 'admin_notices', 'yoast_wpseo_missing_spl_notice' ); + + yoast_wpseo_self_deactivate(); + } +} + +/** + * Returns the notice in case of missing spl extension + */ +function yoast_wpseo_missing_spl_notice() { + $message = esc_html__( 'The Standard PHP Library (SPL) extension seem to be unavailable. Please ask your web host to enable it.', 'wordpress-seo' ); + yoast_wpseo_activation_failed_notice( $message ); +} + +/** + * Throw an error if the Composer autoload is missing and self-deactivate plugin + * + * @return void + */ +function yoast_wpseo_missing_autoload() { + if ( is_admin() ) { + add_action( 'admin_notices', 'yoast_wpseo_missing_autoload_notice' ); + + yoast_wpseo_self_deactivate(); + } +} + +/** + * Returns the notice in case of missing Composer autoload + */ +function yoast_wpseo_missing_autoload_notice() { + /* translators: %1$s expands to Yoast SEO, %2$s / %3$s: links to the installation manual in the Readme for the Yoast SEO code repository on GitHub */ + $message = esc_html__( 'The %1$s plugin installation is incomplete. Please refer to %2$sinstallation instructions%3$s.', 'wordpress-seo' ); + $message = sprintf( $message, 'Yoast SEO', '', '' ); + yoast_wpseo_activation_failed_notice( $message ); +} + +/** + * Throw an error if the filter extension is disabled (prevent white screens) and self-deactivate plugin + * + * @since 2.0 + * + * @return void + */ +function yoast_wpseo_missing_filter() { + if ( is_admin() ) { + add_action( 'admin_notices', 'yoast_wpseo_missing_filter_notice' ); + + yoast_wpseo_self_deactivate(); + } +} + +/** + * Returns the notice in case of missing filter extension + */ +function yoast_wpseo_missing_filter_notice() { + $message = esc_html__( 'The filter extension seem to be unavailable. Please ask your web host to enable it.', 'wordpress-seo' ); + yoast_wpseo_activation_failed_notice( $message ); +} + +/** + * Echo's the Activation failed notice with any given message. + * + * @param string $message Message string. + */ +function yoast_wpseo_activation_failed_notice( $message ) { + echo '

        ' . __( 'Activation failed:', 'wordpress-seo' ) . ' ' . $message . '

        '; +} + +/** + * The method will deactivate the plugin, but only once, done by the static $is_deactivated + */ +function yoast_wpseo_self_deactivate() { + static $is_deactivated; + + if ( $is_deactivated === null ) { + $is_deactivated = true; + deactivate_plugins( plugin_basename( WPSEO_FILE ) ); + if ( isset( $_GET['activate'] ) ) { + unset( $_GET['activate'] ); + } + } +} diff --git a/wp-content/plugins/wordpress-seo/wp-seo.php b/wp-content/plugins/wordpress-seo/wp-seo.php new file mode 100644 index 0000000..1bf9f5f --- /dev/null +++ b/wp-content/plugins/wordpress-seo/wp-seo.php @@ -0,0 +1,47 @@ +. + */ + +if ( ! function_exists( 'add_filter' ) ) { + header( 'Status: 403 Forbidden' ); + header( 'HTTP/1.1 403 Forbidden' ); + exit(); +} + +if ( ! defined( 'WPSEO_FILE' ) ) { + define( 'WPSEO_FILE', __FILE__ ); +} + +// Load the Yoast SEO plugin. +require_once( dirname( WPSEO_FILE ) . '/wp-seo-main.php' ); diff --git a/wp-content/plugins/wordpress-seo/wpml-config.xml b/wp-content/plugins/wordpress-seo/wpml-config.xml new file mode 100644 index 0000000..cc4c61b --- /dev/null +++ b/wp-content/plugins/wordpress-seo/wpml-config.xml @@ -0,0 +1,57 @@ + + + _yoast_wpseo_title + _yoast_wpseo_bctitle + _yoast_wpseo_metadesc + _yoast_wpseo_metakeywords + _yoast_wpseo_focuskw + _yoast_wpseo_meta-robots-noindex + _yoast_wpseo_meta-robots-nofollow + _yoast_wpseo_meta-robots-adv + _yoast_wpseo_canonical + _yoast_wpseo_redirect + _yoast_wpseo_opengraph-description + _yoast_wpseo_google-plus-description + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +