Changeset 3440912
- Timestamp:
- 01/16/2026 10:47:45 AM (2 months ago)
- Location:
- wp-perfect-plugin/trunk
- Files:
-
- 3 deleted
- 8 edited
-
assets/css/ui.css (modified) (2 diffs)
-
assets/js/html5sortable.js (deleted)
-
assets/js/ui.js (deleted)
-
includes/functions.php (modified) (16 diffs)
-
includes/meta.php (modified) (3 diffs)
-
includes/schema-breadcrumbs.php (modified) (9 diffs)
-
modules/w3p-search-console.php (modified) (3 diffs)
-
modules/w3p-settings-links.php (deleted)
-
modules/w3p-settings.php (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
-
wp-perfect-plugin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-perfect-plugin/trunk/assets/css/ui.css
r3353167 r3440912 177 177 } 178 178 179 #w3p_meta_box meter {180 display: block;181 width: 100%;182 height: 12px;183 margin: 0;184 padding: 0;185 }186 187 179 .jtable table { 188 180 table-layout: auto; … … 193 185 margin-left: 8px; 194 186 vertical-align: middle; 195 }196 .meter-current.meter-green {197 color: #27ae60;198 }199 .meter-current.meter-yellow {200 color: #f1c40f;201 }202 .meter-current.meter-red {203 color: #e74c3c;204 187 } 205 188 -
wp-perfect-plugin/trunk/includes/functions.php
r3434570 r3440912 84 84 'wp_sitemaps_max_urls', 85 85 function ( $limit ) { 86 return ( (int) get_option( 'w3p_sitemap_links' ) ) ? (int) get_option( 'w3p_sitemap_links' ) : 2000; 86 $sitemap_links = (int) get_option( 'w3p_sitemap_links' ); 87 return $sitemap_links ? $sitemap_links : 2000; 87 88 }, 88 89 10, … … 95 96 96 97 function w3p_remove_post_type_from_wp_sitemap( $post_types ) { 97 if ( $post_types ) { 98 foreach ( $post_types as $type ) { 99 if ( (int) get_option( 'w3p_enable_sitemap_' . strtolower( $type->name ) ) === 0 ) { 100 unset( $post_types[ $type->name ] ); 101 } 102 } 103 } 104 105 return $post_types; 98 if ( empty( $post_types ) ) { 99 return $post_types; 100 } 101 102 // Cache options to avoid repeated queries if function is called multiple times 103 static $cached_options = []; 104 105 $filtered_post_types = []; 106 foreach ( $post_types as $type ) { 107 $option_name = 'w3p_enable_sitemap_' . strtolower( $type->name ); 108 if ( ! isset( $cached_options[ $option_name ] ) ) { 109 $cached_options[ $option_name ] = (int) get_option( $option_name, 1 ); 110 } 111 if ( $cached_options[ $option_name ] !== 0 ) { 112 $filtered_post_types[ $type->name ] = $type; 113 } 114 } 115 116 return $filtered_post_types; 106 117 } 107 118 108 119 function w3p_remove_tax_from_sitemap( $taxonomies ) { 109 if ( $taxonomies ) { 110 foreach ( $taxonomies as $taxonomy ) { 111 if ( (int) get_option( 'w3p_enable_sitemap_' . $taxonomy->name ) === 0 ) { 112 unset( $taxonomies[ $taxonomy->name ] ); 113 } 114 } 115 } 116 117 return $taxonomies; 120 if ( empty( $taxonomies ) ) { 121 return $taxonomies; 122 } 123 124 // Cache options to avoid repeated queries if function is called multiple times 125 static $cached_options = []; 126 127 $filtered_taxonomies = []; 128 foreach ( $taxonomies as $taxonomy ) { 129 $option_name = 'w3p_enable_sitemap_' . $taxonomy->name; 130 if ( ! isset( $cached_options[ $option_name ] ) ) { 131 $cached_options[ $option_name ] = (int) get_option( $option_name, 1 ); 132 } 133 if ( $cached_options[ $option_name ] !== 0 ) { 134 $filtered_taxonomies[ $taxonomy->name ] = $taxonomy; 135 } 136 } 137 138 return $filtered_taxonomies; 118 139 } 119 140 … … 145 166 $exclude_ids = []; 146 167 168 // Cache function_exists() results to avoid repeated checks 169 static $has_edd = null; 170 static $has_wc = null; 171 static $has_mepr = null; 172 173 if ( $has_edd === null ) { 174 $has_edd = function_exists( 'edd_get_option' ); 175 } 176 if ( $has_wc === null ) { 177 $has_wc = function_exists( 'wc_get_page_id' ); 178 } 179 if ( $has_mepr === null ) { 180 $has_mepr = function_exists( 'mepr_get_option' ); 181 } 182 147 183 // Easy Digital Downloads 148 if ( function_exists( 'edd_get_option' )) {184 if ( $has_edd ) { 149 185 $edd_noindex_pages = [ 150 186 edd_get_option( 'purchase_page', 0 ), … … 162 198 163 199 // WooCommerce 164 if ( function_exists( 'wc_get_page_id' )) {200 if ( $has_wc ) { 165 201 $wc_noindex_pages = [ 166 202 wc_get_page_id( 'checkout' ), … … 177 213 178 214 // MemberPress 179 if ( function_exists( 'mepr_get_option' )) {215 if ( $has_mepr ) { 180 216 $mepr_noindex_pages = [ 181 217 mepr_get_option( 'account_page_id' ), … … 214 250 } 215 251 216 if ( (string) get_post_meta( $post->ID, '_w3p_title', true ) !== '' ) { 217 $title = get_post_meta( $post->ID, '_w3p_title', true ); 252 $custom_title = get_post_meta( $post->ID, '_w3p_title', true ); 253 if ( (string) $custom_title !== '' ) { 254 $title = $custom_title; 218 255 } 219 256 … … 224 261 225 262 function w3p_get_excerpt( $post_id ) { 226 $ excerpt = esc_attr( wp_strip_all_tags( get_the_excerpt( $post_id ) ));227 228 if ( (string) get_post_meta( $post_id, '_w3p_excerpt', true )!== '' ) {229 $excerpt = get_post_meta( $post_id, '_w3p_excerpt', true );230 } 231 232 return $excerpt;263 $custom_excerpt = get_post_meta( $post_id, '_w3p_excerpt', true ); 264 265 if ( (string) $custom_excerpt !== '' ) { 266 return $custom_excerpt; 267 } 268 269 return esc_attr( wp_strip_all_tags( get_the_excerpt( $post_id ) ) ); 233 270 } 234 271 … … 262 299 263 300 if ( (int) get_option( 'w3p_og' ) === 1 ) { 264 add_action( 'wp_head', 'w3p_head_og');301 w3p_head_og(); 265 302 } 266 303 … … 281 318 $canonical_url = ''; 282 319 283 if ( is_singular() ) { 320 // Check front page first (most common case, no queries needed) 321 if ( is_front_page() ) { 322 $canonical_url = home_url( '/' ); 323 } elseif ( is_singular() ) { 284 324 // Posts and pages 285 325 $canonical_url = get_permalink(); … … 291 331 // For categories, use the current URL to preserve custom URL structures 292 332 // This handles cases where categories are siblings or have custom permalink structures 293 $current_url = home_url( $_SERVER['REQUEST_URI'] ); 333 $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; 334 $current_url = home_url( $request_uri ); 294 335 $canonical_url = strtok( $current_url, '?' ); // Remove query parameters 295 336 } else { … … 299 340 // Fallback: if the term link fails, use the current URL without query parameters 300 341 if ( is_wp_error( $canonical_url ) ) { 301 $current_url = home_url( $_SERVER['REQUEST_URI'] ); 342 $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; 343 $current_url = home_url( $request_uri ); 302 344 $canonical_url = strtok( $current_url, '?' ); // Remove query parameters 303 345 } 304 346 } 305 347 } elseif ( is_author() ) { 306 // Author pages 307 $canonical_url = get_author_posts_url( get_the_author_meta( 'ID' ) ); 348 // Author pages - use queried object ID instead of get_the_author_meta 349 $author_id = get_queried_object_id(); 350 if ( $author_id ) { 351 $canonical_url = get_author_posts_url( $author_id ); 352 } 308 353 } elseif ( is_date() ) { 309 // Date archive pages 354 // Date archive pages - cache query vars to avoid multiple calls 355 $year = get_query_var( 'year' ); 310 356 if ( is_year() ) { 311 $canonical_url = get_year_link( get_query_var( 'year' ));357 $canonical_url = get_year_link( $year ); 312 358 } elseif ( is_month() ) { 313 $canonical_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) ); 359 $monthnum = get_query_var( 'monthnum' ); 360 $canonical_url = get_month_link( $year, $monthnum ); 314 361 } elseif ( is_day() ) { 315 $canonical_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) ); 362 $monthnum = get_query_var( 'monthnum' ); 363 $day = get_query_var( 'day' ); 364 $canonical_url = get_day_link( $year, $monthnum, $day ); 316 365 } 317 366 } elseif ( is_home() && ! is_front_page() ) { 318 367 // Blog posts page 319 $ canonical_url = get_permalink( get_option( 'page_for_posts' ));320 } elseif ( is_front_page()) {321 // Front page322 $canonical_url = home_url( '/' );368 $page_for_posts = get_option( 'page_for_posts' ); 369 if ( $page_for_posts ) { 370 $canonical_url = get_permalink( $page_for_posts ); 371 } 323 372 } elseif ( is_search() ) { 324 373 // Search results page … … 362 411 $website_description = get_bloginfo( 'description' ); 363 412 364 // Get logo details 413 // Get logo details from attachment metadata (database) instead of file system 414 $w3p_kg_logo_width = 0; 415 $w3p_kg_logo_height = 0; 365 416 if ( $w3p_kg_logo ) { 366 $logo_path = str_replace( home_url( '/' ), ABSPATH, $w3p_kg_logo ); 367 if ( file_exists( $logo_path ) ) { 368 $logo_dimensions = getimagesize( $logo_path ); 369 if ( $logo_dimensions ) { 370 $w3p_kg_logo_width = $logo_dimensions[0]; 371 $w3p_kg_logo_height = $logo_dimensions[1]; 417 // Try to get attachment ID from URL 418 $attachment_id = attachment_url_to_postid( $w3p_kg_logo ); 419 if ( $attachment_id ) { 420 // Get dimensions from attachment metadata (stored in database) 421 $metadata = wp_get_attachment_metadata( $attachment_id ); 422 if ( $metadata && isset( $metadata['width'] ) && isset( $metadata['height'] ) ) { 423 $w3p_kg_logo_width = (int) $metadata['width']; 424 $w3p_kg_logo_height = (int) $metadata['height']; 372 425 } 373 426 } … … 629 682 } 630 683 631 632 633 /**634 * Link Whisper635 */636 function w3p_replace_words_with_links( $content ) {637 if ( is_main_query() && in_the_loop() && is_singular( [ 'post', 'page', 'property', 'faq' ] ) ) {638 $words = get_option( 'w3p_link_repeater' );639 640 if ( $words ) {641 foreach ( $words as $word_data ) {642 $word = $word_data['title'];643 $link = $word_data['url'];644 $rel = isset( $word_data['rel'] ) ? $word_data['rel'] : '';645 646 // Create a regular expression pattern to match the word but avoid existing links and HTML attributes647 $pattern = '/(\b' . preg_quote( $word, '/' ) . '\b)(?![^<]*>|[^<>]*<\/a>)/i';648 649 $link_html = '<a href="' . esc_url( $link ) . '"';650 if ( ! empty( $rel ) ) {651 $link_html .= ' rel="' . esc_attr( $rel ) . '"';652 }653 $link_html .= '>' . $word . '</a>';654 655 // Use preg_replace_callback to replace only full words not already linked and not within attributes656 $content = preg_replace_callback(657 '/(<[^>]+>)|(\b' . preg_quote( $word, '/' ) . '\b(?![^<]*>|[^<>]*<\/a>))/i',658 function ( $matches ) use ( $link_html ) {659 // If this is an HTML tag, return it unchanged660 if ( ! empty( $matches[1] ) ) {661 return $matches[1];662 }663 // Otherwise, replace the word with the link664 return $link_html;665 },666 $content667 );668 }669 }670 }671 672 return $content;673 }674 675 676 677 if ( (int) get_option( 'w3p_enable_link_whisper' ) === 1 ) {678 add_filter( 'the_content', 'w3p_replace_words_with_links', 10 );679 }680 681 684 /** 682 685 * Robots meta handling using WordPress 5.7+ native filter. … … 705 708 global $post; 706 709 707 // Resolve post type robustly (ID, queried object, or global $post) 708 $post_type = get_post_type( get_queried_object_id() ); 709 if ( ! $post_type ) { 710 $qo = get_queried_object(); 711 if ( $qo && ! is_wp_error( $qo ) && ! empty( $qo->post_type ) ) { 712 $post_type = $qo->post_type; 713 } elseif ( isset( $post ) && isset( $post->post_type ) ) { 714 $post_type = $post->post_type; 715 } 710 if ( ! isset( $post->ID ) ) { 711 return $robots; 712 } 713 714 // Use post type directly from $post object, fallback to get_post_type() if needed 715 $post_type = $post->post_type; 716 if ( empty( $post_type ) ) { 717 $post_type = get_post_type( $post->ID ); 716 718 } 717 719 … … 728 730 } 729 731 730 // WooCommerce noindex 731 if ( function_exists( 'WC' ) ) {732 // WooCommerce noindex - only check if there are GET parameters 733 if ( function_exists( 'WC' ) && ! empty( $_GET ) ) { 732 734 $blocked_params = [ 733 735 'add-to-cart', … … 737 739 ]; 738 740 741 $get_keys = array_keys( $_GET ); 742 739 743 foreach ( $blocked_params as $param ) { 740 foreach ( $ _GET as $key => $value) {744 foreach ( $get_keys as $key ) { 741 745 if ( stripos( $key, $param ) !== false ) { 742 746 $robots['noindex'] = true; -
wp-perfect-plugin/trunk/includes/meta.php
r3343479 r3440912 42 42 43 43 <div class="meter-container"> 44 <meter id="w3p-meter--title" min="0" max="60" value="0" low="20" high="40" optimum="50"></meter>45 44 <span class="meter-counter" id="w3p-title-counter"><span class="meter-current">0</span>/60</span> 46 45 </div> … … 60 59 61 60 <div class="meter-container"> 62 <meter id="w3p-meter--excerpt" min="0" max="160" value="0" low="120" high="140" optimum="150"></meter>63 61 <span class="meter-counter" id="w3p-excerpt-counter"><span class="meter-current">0</span>/160</span> 64 62 </div> … … 69 67 <br><small>Check this box to prevent search engines from indexing this page and following links on it.</small> 70 68 </p> 69 <script> 70 (function() { 71 const title = document.getElementById('w3p-title'); 72 const excerpt = document.getElementById('w3p-excerpt'); 73 const titleCounter = document.querySelector('#w3p-title-counter .meter-current'); 74 const excerptCounter = document.querySelector('#w3p-excerpt-counter .meter-current'); 75 76 titleCounter.textContent = title.value.length; 77 title.addEventListener('input', () => { 78 titleCounter.textContent = title.value.length; 79 }); 80 81 excerptCounter.textContent = excerpt.value.length; 82 excerpt.addEventListener('input', () => { 83 excerptCounter.textContent = excerpt.value.length; 84 }); 85 })(); 86 </script> 71 87 <?php 72 88 } -
wp-perfect-plugin/trunk/includes/schema-breadcrumbs.php
r3362714 r3440912 6 6 7 7 function w3p_schema_breadcrumbs() { 8 $page_for_posts = get_option( 'page_for_posts' ); 9 $site_name = get_bloginfo( 'name' ); 10 11 // Determine the slug for the blog posts page 12 $blog_posts_page_slug = $page_for_posts ? get_permalink( $page_for_posts ) : trailingslashit( get_site_url() ); 8 // Cache options that rarely change 9 static $page_for_posts = null; 10 static $site_name = null; 11 static $blog_posts_page_slug = null; 12 13 if ( $page_for_posts === null ) { 14 $page_for_posts = get_option( 'page_for_posts' ); 15 } 16 if ( $site_name === null ) { 17 $site_name = get_bloginfo( 'name' ); 18 } 19 if ( $blog_posts_page_slug === null ) { 20 $blog_posts_page_slug = $page_for_posts ? get_permalink( $page_for_posts ) : trailingslashit( get_site_url() ); 21 } 13 22 14 23 if ( ! is_search() ) { … … 30 39 } 31 40 41 // Use post object properties directly to avoid queries 42 $post_permalink = get_permalink( $post->ID ); 43 $post_title = $post->post_title; 44 32 45 // Single Post 33 46 if ( is_singular( 'post' ) ) { … … 44 57 'position' => 2, 45 58 'item' => [ 46 '@id' => esc_url( get_permalink()),47 'name' => esc_html( get_the_title()),59 '@id' => esc_url( $post_permalink ), 60 'name' => esc_html( $post_title ), 48 61 ], 49 62 ]; 50 63 } elseif ( is_singular( 'product' ) ) { 51 64 // Single Product 52 $terms = wp_get_object_terms( $post->ID, 'product_cat' );65 $terms = wp_get_object_terms( $post->ID, 'product_cat', [ 'number' => 1 ] ); 53 66 if ( ! is_wp_error( $terms ) && ! empty( $terms ) ) { 54 $ product_category_slug = $terms[0]->slug;55 $ product_category_name = $terms[0]->name;67 $term = $terms[0]; 68 $term_link = get_term_link( $term ); 56 69 57 70 $breadcrumbs['itemListElement'][] = [ … … 59 72 'position' => 1, 60 73 'item' => [ 61 '@id' => esc_url( get_term_link( $terms[0] )),62 'name' => esc_html( $ product_category_name ),74 '@id' => esc_url( $term_link ), 75 'name' => esc_html( $term->name ), 63 76 ], 64 77 ]; … … 67 80 'position' => 2, 68 81 'item' => [ 69 '@id' => esc_url( get_permalink()),70 'name' => esc_html( get_the_title()),82 '@id' => esc_url( $post_permalink ), 83 'name' => esc_html( $post_title ), 71 84 ], 72 85 ]; … … 75 88 // Pages (Including Parent-Child Hierarchy) 76 89 if ( $post->post_parent ) { 77 $parent_page_url = get_permalink( $post->post_parent ); 78 $parent_page_title = get_the_title( $post->post_parent ); 90 // Fetch parent post in one query instead of two separate calls 91 $parent_post = get_post( $post->post_parent ); 92 if ( $parent_post ) { 93 $parent_page_url = get_permalink( $parent_post->ID ); 94 $parent_page_title = $parent_post->post_title; 79 95 80 $breadcrumbs['itemListElement'][] = [ 81 '@type' => 'ListItem', 82 'position' => 1, 83 'item' => [ 84 '@id' => esc_url( $parent_page_url ), 85 'name' => esc_html( $parent_page_title ), 86 ], 87 ]; 96 $breadcrumbs['itemListElement'][] = [ 97 '@type' => 'ListItem', 98 'position' => 1, 99 'item' => [ 100 '@id' => esc_url( $parent_page_url ), 101 'name' => esc_html( $parent_page_title ), 102 ], 103 ]; 104 } 88 105 } 89 106 … … 92 109 'position' => $post->post_parent ? 2 : 1, 93 110 'item' => [ 94 '@id' => esc_url( get_permalink()),95 'name' => esc_html( get_the_title()),111 '@id' => esc_url( $post_permalink ), 112 'name' => esc_html( $post_title ), 96 113 ], 97 114 ]; … … 107 124 ]; 108 125 } else { 109 // Reset query and post data 110 wp_reset_query(); 111 wp_reset_postdata(); 112 126 // Use cached post data instead of calling get_permalink() and get_the_title() again 113 127 $breadcrumbs['itemListElement'][] = [ 114 128 '@type' => 'ListItem', … … 123 137 'position' => 2, 124 138 'item' => [ 125 '@id' => esc_url( get_permalink()),126 'name' => esc_html( get_the_title()),139 '@id' => esc_url( $post_permalink ), 140 'name' => esc_html( $post_title ), 127 141 ], 128 142 ]; -
wp-perfect-plugin/trunk/modules/w3p-search-console.php
r3347664 r3440912 7 7 $w3p_google_meta = get_option( 'w3p_google_webmaster' ); 8 8 $w3p_bing_meta = get_option( 'w3p_bing_webmaster' ); 9 $w3p_yandex_meta = get_option( 'w3p_yandex_webmaster' );10 9 $w3p_pinterest_meta = get_option( 'w3p_pinterest_webmaster' ); 11 $w3p_baidu_meta = get_option( 'w3p_baidu_webmaster' );12 10 13 11 $twitter_author_rel = get_option( 'w3p_twitter_author' ); … … 22 20 echo '<meta name="msvalidate.01" content="' . esc_attr( $w3p_bing_meta ) . '">'; 23 21 } 24 if ( ! empty( $w3p_yandex_meta ) ) {25 echo '<meta name="yandex-verification" content="' . esc_attr( $w3p_yandex_meta ) . '">';26 }27 22 if ( ! empty( $w3p_pinterest_meta ) ) { 28 23 echo '<meta name="p:domain_verify" content="' . esc_attr( $w3p_pinterest_meta ) . '">'; 29 }30 if ( ! empty( $w3p_baidu_meta ) ) {31 echo '<meta name="baidu-site-verification" content="' . esc_attr( $w3p_baidu_meta ) . '">';32 24 } 33 25 … … 45 37 $out = ''; 46 38 47 $w3p_local = get_option( 'w3p_local' ); 48 $w3p_local_locality = get_option( 'w3p_local_locality' ); 49 $w3p_local_region = get_option( 'w3p_local_region' ); 50 $w3p_local_address = get_option( 'w3p_local_address' ); 51 $w3p_local_postal_code = get_option( 'w3p_local_postal_code' ); 52 $w3p_local_country = get_option( 'w3p_local_country' ); 53 $w3p_local_country_code = get_option( 'w3p_local_country_code' ); 54 $w3p_telephone = get_option( 'w3p_telephone' ); 55 56 $twitter_author_rel = get_option( 'w3p_twitter_author' ); 57 58 $name = get_bloginfo( 'name' ); 59 $url = get_bloginfo( 'url' ); 39 $w3p_local = get_option( 'w3p_local' ); 60 40 61 41 if ( (int) $w3p_local === 1 ) { 42 $w3p_local_locality = get_option( 'w3p_local_locality' ); 43 $w3p_local_region = get_option( 'w3p_local_region' ); 44 $w3p_local_address = get_option( 'w3p_local_address' ); 45 $w3p_local_postal_code = get_option( 'w3p_local_postal_code' ); 46 $w3p_local_country = get_option( 'w3p_local_country' ); 47 $w3p_local_country_code = get_option( 'w3p_local_country_code' ); 48 $w3p_telephone = get_option( 'w3p_telephone' ); 49 50 $twitter_author_rel = get_option( 'w3p_twitter_author' ); 51 52 $name = get_bloginfo( 'name' ); 53 $url = get_bloginfo( 'url' ); 54 62 55 // Create Organization schema 63 56 $organization_schema = [ -
wp-perfect-plugin/trunk/modules/w3p-settings.php
r3363937 r3440912 17 17 <a href="<?php echo esc_url( admin_url( 'admin.php?page=w3p&tab=meta-posts' ) ); ?>" class="nav-tab <?php echo $tab === 'meta-posts' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Meta Report (Posts)', 'wp-perfect-plugin' ); ?></a> 18 18 <a href="<?php echo esc_url( admin_url( 'admin.php?page=w3p&tab=tools' ) ); ?>" class="nav-tab <?php echo $tab === 'tools' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Tools', 'wp-perfect-plugin' ); ?></a> 19 20 <?php if ( (int) get_option( 'w3p_enable_link_whisper' ) === 1 ) { ?>21 <a href="<?php echo esc_url( admin_url( 'admin.php?page=w3p&tab=links' ) ); ?>" class="nav-tab <?php echo $tab === 'links' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Link Whisper', 'wp-perfect-plugin' ); ?></a>22 <?php } ?>23 19 </h2> 24 20 … … 31 27 update_option( 'w3p_enable_title_description', (int) sanitize_text_field( $_POST['w3p_enable_title_description'] ) ); 32 28 update_option( 'w3p_enable_sitemap', (int) sanitize_text_field( $_POST['w3p_enable_sitemap'] ) ); 33 update_option( 'w3p_enable_link_whisper', (int) sanitize_text_field( $_POST['w3p_enable_link_whisper'] ) );34 29 update_option( 'w3p_enable_yoast_migrator', (int) sanitize_text_field( $_POST['w3p_enable_yoast_migrator'] ) ); 35 30 update_option( 'w3p_enable_rankmath_migrator', (int) sanitize_text_field( $_POST['w3p_enable_rankmath_migrator'] ) ); … … 45 40 delete_option( 'wot-verification' ); 46 41 delete_option( 'w3p_topic_clustering' ); 42 delete_option( 'w3p_enable_link_whisper' ); 43 delete_option( 'w3p_link_repeater' ); 47 44 48 45 echo '<div class="updated notice is-dismissible"><p>Settings updated!</p></div>'; … … 109 106 </td> 110 107 </tr> 111 <tr>112 <th scope="row"><label>Link Whisper</label></th>113 <td>114 <p>115 <input name="w3p_enable_link_whisper" id="w3p_enable_link_whisper" type="checkbox" value="1" <?php checked( 1, (int) get_option( 'w3p_enable_link_whisper' ) ); ?>> <label for="w3p_enable_link_whisper">Enable Link Whisper</label>116 </p>117 </td>118 </tr>119 120 108 <tr><td colspan="2"><hr></td></tr> 121 109 … … 183 171 update_option( 'w3p_google_webmaster', sanitize_text_field( $_POST['w3p_google_webmaster'] ) ); 184 172 update_option( 'w3p_bing_webmaster', sanitize_text_field( $_POST['w3p_bing_webmaster'] ) ); 185 update_option( 'w3p_yandex_webmaster', sanitize_text_field( $_POST['w3p_yandex_webmaster'] ) );186 173 update_option( 'w3p_pinterest_webmaster', sanitize_text_field( $_POST['w3p_pinterest_webmaster'] ) ); 187 update_option( 'w3p_baidu_webmaster', sanitize_text_field( $_POST['w3p_baidu_webmaster'] ) ); 174 175 delete_option( 'w3p_yandex_webmaster' ); 176 delete_option( 'w3p_baidu_webmaster' ); 188 177 189 178 update_option( 'w3p_twitter_author', sanitize_text_field( $_POST['w3p_twitter_author'] ) ); … … 200 189 <h3><?php esc_html_e( 'Search Engine Verification And Link Relationships', 'wp-perfect-plugin' ); ?></h3> 201 190 202 <p><span class="dashicons dashicons-editor-help"></span> This section allows you to verify ownership of your site with Google Search Console, Bing Webmaster Tools, Yandex, Pinterest, and Baidu and Web of Trust.</p>191 <p><span class="dashicons dashicons-editor-help"></span> This section allows you to verify ownership of your site with Google Search Console, Bing Webmaster Tools, and Pinterest.</p> 203 192 <p> 204 193 <input name="w3p_google_webmaster" type="text" class="regular-text" value="<?php echo esc_attr( get_option( 'w3p_google_webmaster' ) ); ?>"> <label>Google Search Console</label> … … 210 199 </p> 211 200 <p> 212 <input name="w3p_yandex_webmaster" type="text" class="regular-text" value="<?php echo esc_attr( get_option( 'w3p_yandex_webmaster' ) ); ?>"> <label>Yandex Verification</label>213 <br><small><meta name="yandex-verification" content="48b322931315c6df"></small>214 </p>215 <p>216 201 <input name="w3p_pinterest_webmaster" type="text" class="regular-text" value="<?php echo esc_attr( get_option( 'w3p_pinterest_webmaster' ) ); ?>"> <label>Pinterest Verification</label> 217 202 <br><small><meta name="p:domain_verify" content="3d392d258cd7fb8a5676ba12d06be0c6"></small> 218 </p>219 <p>220 <input name="w3p_baidu_webmaster" type="text" class="regular-text" value="<?php echo esc_attr( get_option( 'w3p_baidu_webmaster' ) ); ?>"> <label>Baidu Verification</label>221 <br><small><meta name="baidu-site-verification" content="7V6m4wr5F2q2"></small>222 203 </p> 223 204 … … 1011 992 1012 993 <?php 1013 } elseif ( (string) $tab === 'links' ) {1014 include 'w3p-settings-links.php';1015 994 } elseif ( (string) $tab === 'tools' ) { 1016 995 include 'w3p-settings-tools.php'; -
wp-perfect-plugin/trunk/readme.txt
r3439747 r3440912 5 5 Requires PHP: 7.1 6 6 Tested up to: 6.9 7 Stable tag: 2. 0.67 Stable tag: 2.1.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 33 33 34 34 == Changelog = 35 36 = 2.1.0 = 37 * PERFORMANCE: Optimize sitemap post type and taxonomy filters with static caching 38 * PERFORMANCE: Optimize canonical link generation with request-scoped caching 39 * PERFORMANCE: Optimize w3p_search_console_footer with early exit when local business is disabled 40 * PERFORMANCE: Optimize logo dimensions retrieval to use database instead of file system operations 41 * PERFORMANCE: Fix duplicate get_option() calls in sitemap max URLs filter 42 * UPDATE: Remove Yandex and Baidu verification support 43 * UPDATE: Remove Link Whisper feature and associated code 44 * UPDATE: Simplify SEO meta character counters (remove color coding and thresholds) 35 45 36 46 = 2.0.6 = -
wp-perfect-plugin/trunk/wp-perfect-plugin.php
r3439747 r3440912 6 6 * Author: Ciprian Popescu 7 7 * Author URI: https://getbutterfly.com/ 8 * Version: 2. 0.68 * Version: 2.1.0 9 9 * License: GNU General Public License v3 or later 10 10 * License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 35 35 define( 'W3P_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) ); 36 36 define( 'W3P_PATH', plugin_dir_path( __FILE__ ) ); 37 define( 'W3P_VERSION', '2. 0.6' );37 define( 'W3P_VERSION', '2.1.0' ); 38 38 39 39 require 'includes/functions.php'; … … 71 71 72 72 wp_enqueue_script( 'datatable', plugins_url( 'assets/js/datatable.min.js', __FILE__ ), [], W3P_VERSION, true ); 73 wp_enqueue_script( 'ui', plugins_url( 'assets/js/ui.js', __FILE__ ), [ 'datatable' ], W3P_VERSION, true );74 75 wp_register_script( 'w3p-html5sortable', plugins_url( 'assets/js/html5sortable.js', __FILE__ ), [], W3P_VERSION, true );76 73 } 77 74
Note: See TracChangeset
for help on using the changeset viewer.