Plugin Directory

Changeset 694064


Ignore:
Timestamp:
04/08/2013 11:19:10 PM (13 years ago)
Author:
gabrielcastillo
Message:

Changed the out vars for meta content

Location:
wp-basic-seo-meta
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-basic-seo-meta/tags/1.01/seo-meta.php

    r694056 r694064  
    145145       
    146146        $meta = get_post_meta($post->ID, '_seo_meta', TRUE);
    147         $seo_description = isset($meta['seo_description']);
    148         $seo_description = trim($seo_description);
    149         $seo_description = substr($seo_description, 0, 160);
    150         $output  = '<meta name="author" content="'.isset($meta['seo_meta_author']).'" />' . "\n";
    151         $output .= '<meta name="description" content="'.isset($seo_description).'" />'. "\n";
    152         $output .= '<meta name="keywords" content="'.isset($meta['seo_meta_keyword']).'" />' ."\n";
    153         echo $output;
     147
     148        if(isset($meta['seo_meta_author'])){
     149            echo '<meta name="author" content="'.$meta['seo_meta_author'].'" />'."\n";
     150        }
     151
     152        if(isset($meta['seo_meta_keyword'])){
     153            echo  '<meta name="keywords" content="'.$meta['seo_meta_keyword'].'" />'."\n";
     154        }
     155
     156        if(isset($meta['seo_meta_description'])){
     157            echo '<meta name="description content="'.substr(trim($meta['seo_meta_description']), 0,160).'" />'."\n";
     158        }
     159
    154160    }
    155161
  • wp-basic-seo-meta/trunk/seo-meta.php

    r694056 r694064  
    145145       
    146146        $meta = get_post_meta($post->ID, '_seo_meta', TRUE);
    147         $seo_description = isset($meta['seo_description']);
    148         $seo_description = trim($seo_description);
    149         $seo_description = substr($seo_description, 0, 160);
    150         $output  = '<meta name="author" content="'.isset($meta['seo_meta_author']).'" />' . "\n";
    151         $output .= '<meta name="description" content="'.isset($seo_description).'" />'. "\n";
    152         $output .= '<meta name="keywords" content="'.isset($meta['seo_meta_keyword']).'" />' ."\n";
    153         echo $output;
     147
     148        if(isset($meta['seo_meta_author'])){
     149            echo '<meta name="author" content="'.$meta['seo_meta_author'].'" />'."\n";
     150        }
     151
     152        if(isset($meta['seo_meta_keyword'])){
     153            echo  '<meta name="keywords" content="'.$meta['seo_meta_keyword'].'" />'."\n";
     154        }
     155
     156        if(isset($meta['seo_meta_description'])){
     157            echo '<meta name="description content="'.substr(trim($meta['seo_meta_description']), 0,160).'" />'."\n";
     158        }
     159
    154160    }
    155161
Note: See TracChangeset for help on using the changeset viewer.