Changeset 2205467
- Timestamp:
- 12/03/2019 07:04:59 PM (6 years ago)
- Location:
- open-wp-seo
- Files:
-
- 5 edited
-
tags/1.0.1/modules/open-wp-seo-content.php (modified) (1 diff)
-
tags/1.0.1/modules/open-wp-seo-ping.php (modified) (1 diff)
-
tags/1.0.1/modules/open-wp-seo-ui.php (modified) (2 diffs)
-
trunk/modules/open-wp-seo-content.php (modified) (1 diff)
-
trunk/modules/open-wp-seo-ui.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
open-wp-seo/tags/1.0.1/modules/open-wp-seo-content.php
r2172422 r2205467 42 42 } 43 43 44 public function content_contains_hyperlinks($content) { 45 return strpos($content, 'http') !== FALSE 46 || strpos($content, 'www.') !== FALSE 47 || strpos($content, 'ftp.') !== FALSE; 48 } 49 44 50 } 51 -
open-wp-seo/tags/1.0.1/modules/open-wp-seo-ping.php
r2172422 r2205467 33 33 $last_ping_time = get_option($ping_time_option, 0); 34 34 35 // FIXME is this working correctly? 35 36 if (!is_integer($last_ping_time)) { 36 37 $last_ping_time = 0; -
open-wp-seo/tags/1.0.1/modules/open-wp-seo-ui.php
r2172422 r2205467 37 37 <?php if (!$this->content->does_all_title_words_appear_in_content($this->meta->get_meta_title($post->post_title), $post->post_content)) : ?> 38 38 <p><?php _e('<span class="dashicons dashicons-warning open-wp-seo-fail"></span> Not all the words in the title seem to appear in content. Consider adding them.', OpenWordPressSEO::TEXT_DOMAIN); ?></p> 39 <?php endif; ?> 40 41 <?php if (!$this->content->content_contains_hyperlinks($post->post_content)) : ?> 42 <p><?php _e('<span class="dashicons dashicons-warning open-wp-seo-fail"></span> The content does not contain any hyperlinks. Consider adding them. ', OpenWordPressSEO::TEXT_DOMAIN); ?></p> 43 39 44 <?php endif; ?> 40 45 … … 102 107 103 108 $too_few_words = $this->content->is_word_count_too_low($post->post_content); 109 $hyperlinks_exist = $this->content->content_contains_hyperlinks($post->post_content); 104 110 105 if (!$too_few_words && !empty($seo_title) && !empty($seo_description)) {111 if (!$too_few_words && $hyperlinks_exist && !empty($seo_title) && !empty($seo_description)) { 106 112 echo '<span title="'.__('SEO for this item is in good condition.', OpenWordPressSEO::TEXT_DOMAIN).'" class="open-wp-seo-table-icon open-wp-seo-ok">✓</span>'; 107 113 } -
open-wp-seo/trunk/modules/open-wp-seo-content.php
r2102410 r2205467 42 42 } 43 43 44 public function content_contains_hyperlinks($content) { 45 return strpos($content, 'http') !== FALSE 46 || strpos($content, 'www.') !== FALSE 47 || strpos($content, 'ftp.') !== FALSE; 48 } 49 44 50 } 51 -
open-wp-seo/trunk/modules/open-wp-seo-ui.php
r2102410 r2205467 37 37 <?php if (!$this->content->does_all_title_words_appear_in_content($this->meta->get_meta_title($post->post_title), $post->post_content)) : ?> 38 38 <p><?php _e('<span class="dashicons dashicons-warning open-wp-seo-fail"></span> Not all the words in the title seem to appear in content. Consider adding them.', OpenWordPressSEO::TEXT_DOMAIN); ?></p> 39 <?php endif; ?> 40 41 <?php if (!$this->content->content_contains_hyperlinks($post->post_content)) : ?> 42 <p><?php _e('<span class="dashicons dashicons-warning open-wp-seo-fail"></span> The content does not contain any hyperlinks. Consider adding them. ', OpenWordPressSEO::TEXT_DOMAIN); ?></p> 43 39 44 <?php endif; ?> 40 45 … … 102 107 103 108 $too_few_words = $this->content->is_word_count_too_low($post->post_content); 109 $hyperlinks_exist = $this->content->content_contains_hyperlinks($post->post_content); 104 110 105 if (!$too_few_words && !empty($seo_title) && !empty($seo_description)) {111 if (!$too_few_words && $hyperlinks_exist && !empty($seo_title) && !empty($seo_description)) { 106 112 echo '<span title="'.__('SEO for this item is in good condition.', OpenWordPressSEO::TEXT_DOMAIN).'" class="open-wp-seo-table-icon open-wp-seo-ok">✓</span>'; 107 113 }
Note: See TracChangeset
for help on using the changeset viewer.