Plugin Directory

Changeset 2205467


Ignore:
Timestamp:
12/03/2019 07:04:59 PM (6 years ago)
Author:
mokimoki
Message:

new features

Location:
open-wp-seo
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • open-wp-seo/tags/1.0.1/modules/open-wp-seo-content.php

    r2172422 r2205467  
    4242    }
    4343   
     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   
    4450}
     51
  • open-wp-seo/tags/1.0.1/modules/open-wp-seo-ping.php

    r2172422 r2205467  
    3333        $last_ping_time = get_option($ping_time_option, 0);
    3434       
     35        // FIXME is this working correctly?
    3536        if (!is_integer($last_ping_time)) {
    3637            $last_ping_time = 0;
  • open-wp-seo/tags/1.0.1/modules/open-wp-seo-ui.php

    r2172422 r2205467  
    3737        <?php if (!$this->content->does_all_title_words_appear_in_content($this->meta->get_meta_title($post->post_title), $post->post_content)) : ?>               
    3838        <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
    3944        <?php endif; ?>         
    4045       
     
    102107           
    103108            $too_few_words = $this->content->is_word_count_too_low($post->post_content);
     109            $hyperlinks_exist = $this->content->content_contains_hyperlinks($post->post_content);
    104110           
    105             if (!$too_few_words && !empty($seo_title) && !empty($seo_description)) {
     111            if (!$too_few_words && $hyperlinks_exist && !empty($seo_title) && !empty($seo_description)) {
    106112                echo '<span title="'.__('SEO for this item is in good condition.', OpenWordPressSEO::TEXT_DOMAIN).'" class="open-wp-seo-table-icon open-wp-seo-ok">&#10003;</span>';
    107113            }
  • open-wp-seo/trunk/modules/open-wp-seo-content.php

    r2102410 r2205467  
    4242    }
    4343   
     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   
    4450}
     51
  • open-wp-seo/trunk/modules/open-wp-seo-ui.php

    r2102410 r2205467  
    3737        <?php if (!$this->content->does_all_title_words_appear_in_content($this->meta->get_meta_title($post->post_title), $post->post_content)) : ?>               
    3838        <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
    3944        <?php endif; ?>         
    4045       
     
    102107           
    103108            $too_few_words = $this->content->is_word_count_too_low($post->post_content);
     109            $hyperlinks_exist = $this->content->content_contains_hyperlinks($post->post_content);
    104110           
    105             if (!$too_few_words && !empty($seo_title) && !empty($seo_description)) {
     111            if (!$too_few_words && $hyperlinks_exist && !empty($seo_title) && !empty($seo_description)) {
    106112                echo '<span title="'.__('SEO for this item is in good condition.', OpenWordPressSEO::TEXT_DOMAIN).'" class="open-wp-seo-table-icon open-wp-seo-ok">&#10003;</span>';
    107113            }
Note: See TracChangeset for help on using the changeset viewer.