Changeset 878936
- Timestamp:
- 03/20/2014 06:04:52 PM (12 years ago)
- Location:
- voce-seo/trunk
- Files:
-
- 6 edited
-
admin/admin.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (2 diffs)
-
vendor/composer/autoload_real.php (modified) (4 diffs)
-
voce-seo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
voce-seo/trunk/admin/admin.php
r852646 r878936 95 95 'general' => array( 96 96 'title' => array( 97 "display_callback" => "vseo_field_text",97 'display_callback' => 'vseo_field_text', 98 98 'sanitize_callback' => 'vseo_sanitize_meta_text', 99 99 'args' => array( 100 "description"=> '<span class="description">Title display in search engines is limited to 70 chars, <span id="vseo_title-length"></span> chars left.</span>',100 'description' => '<span class="description">Title display in search engines is limited to 70 chars, <span id="vseo_title-length"></span> chars left.</span>', 101 101 ), 102 "title" => "SEO Title",102 'title' => 'SEO Title', 103 103 ), 104 104 'description' => array( 105 "display_callback" => "vseo_field_textarea",105 'display_callback' => 'vseo_field_textarea', 106 106 'sanitize_callback' => 'vseo_sanitize_meta_text', 107 107 'args' => array( 108 "description"=> '<span class="description">The <code>meta</code> description will be limited to 140 chars, <span id="vseo_description-length"></span> chars left</span>',108 'description' => '<span class="description">The <code>meta</code> description will be limited to 140 chars, <span id="vseo_description-length"></span> chars left</span>', 109 109 ), 110 "title" => "Meta Description",110 'title' => 'Meta Description', 111 111 ), 112 112 ), 113 113 'advanced' => array( 114 114 'robots-noindex' => array( 115 "display_callback" => "vseo_field_select",115 'display_callback' => 'vseo_field_select', 116 116 'sanitize_callback' => 'vseo_sanitize_select', 117 117 'args' => array( … … 123 123 'default' => '0', 124 124 ), 125 "title" => "Meta Robots Index",125 'title' => 'Meta Robots Index', 126 126 ), 127 127 'robots-nofollow' => array( 128 "display_callback" => "vseo_field_select",128 'display_callback' => 'vseo_field_select', 129 129 'sanitize_callback' => 'vseo_sanitize_select', 130 130 'args' => array( … … 136 136 'default' => '0', 137 137 ), 138 "title" => "Meta Robots Follow",138 'title' => 'Meta Robots Follow', 139 139 ), 140 140 'canonical' => array( 141 "display_callback" => "vseo_field_text",141 'display_callback' => 'vseo_field_text', 142 142 'sanitize_callback' => 'vseo_sanitize_url', 143 143 'args' => array( 144 "description"=> '<span class="description">The canonical URL that this page should point to, leave empty to default to permalink.</span>',144 'description' => '<span class="description">The canonical URL that this page should point to, leave empty to default to permalink.</span>', 145 145 ), 146 "title" => "Canonical URL",146 'title' => 'Canonical URL', 147 147 ), 148 148 'redirect' => array( 149 "display_callback" => "vseo_field_text",149 'display_callback' => 'vseo_field_text', 150 150 'sanitize_callback' => 'vseo_sanitize_url', 151 151 'args' => array( 152 "description"=> '<span class="description">The URL that this page should redirect to.</span>',152 'description' => '<span class="description">The URL that this page should redirect to.</span>', 153 153 ), 154 "title" => "301 Redirect URL",154 'title' => '301 Redirect URL', 155 155 ), 156 156 … … 158 158 'social' => array( 159 159 'og_description' => array( 160 "display_callback" => "vseo_field_textarea",160 'display_callback' => 'vseo_field_textarea', 161 161 'sanitize_callback' => 'vseo_sanitize_meta_text', 162 162 'args' => array( 163 "description"=> '<span class="description">If you don\'t want to use the meta description for sharing the post on Facebook but want another description there, write it here.</span>',163 'description' => '<span class="description">If you don\'t want to use the meta description for sharing the post on Facebook but want another description there, write it here.</span>', 164 164 ), 165 "title" => "Facebook Description", 165 'title' => 'Facebook Description', 166 ), 167 'twitter_description' => array( 168 'display_callback' => 'vseo_field_textarea', 169 'sanitize_callback' => 'vseo_sanitize_meta_text', 170 'args' => array( 171 'description' => '<span class="description">If you don\'t want to use the meta description for Twitter card but want another description there, write it here.</span>', 172 ), 173 'title' => 'Twitter Description', 166 174 ), 167 175 -
voce-seo/trunk/readme.txt
r852646 r878936 3 3 Tags: SEO 4 4 Requires at least: 3.7.0 5 Tested up to: 3.8. 06 Stable tag: 0.2. 35 Tested up to: 3.8.1 6 Stable tag: 0.2.5 7 7 License: GPLv2 or later 8 8 … … 15 15 16 16 == Changelog == 17 18 = Version 0.2.5 = 19 * Separate filters for og:description and twitter:description 20 * Add separate field for twitter description 21 * Change logic for twitter and facebook description to: respective separate meta text field falls back to voce seo generic meta text field to excerpt. 22 23 = Version 0.2.4 = 24 * Refactor og:title and twitter:title to be filterable and use a more appropriate title based on the queried object. 25 17 26 = Version 0.2.2 = 18 27 * Fix bug in 'wp_title' filter affecting archive pages. -
voce-seo/trunk/vendor/autoload.php
r852646 r878936 5 5 require_once __DIR__ . '/composer' . '/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit ca012c536e9953f76af8ac184e1ffbc3::getLoader();7 return ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb::getLoader(); -
voce-seo/trunk/vendor/composer/ClassLoader.php
r839041 r878936 267 267 { 268 268 if ($file = $this->findFile($class)) { 269 include $file;269 includeFile($file); 270 270 271 271 return true; … … 353 353 } 354 354 } 355 356 /** 357 * Scope isolated include. 358 * 359 * Prevents access to $this/self from included files. 360 */ 361 function includeFile($file) 362 { 363 include $file; 364 } -
voce-seo/trunk/vendor/composer/autoload_real.php
r852646 r878936 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit ca012c536e9953f76af8ac184e1ffbc35 class ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit ca012c536e9953f76af8ac184e1ffbc3', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit ca012c536e9953f76af8ac184e1ffbc3', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb', 'loadClassLoader')); 25 25 26 26 $vendorDir = dirname(__DIR__); … … 46 46 $includeFiles = require __DIR__ . '/autoload_files.php'; 47 47 foreach ($includeFiles as $file) { 48 require $file;48 composerRequireb9874f5322e4f1adf783066fde07b3bb($file); 49 49 } 50 50 … … 52 52 } 53 53 } 54 55 function composerRequireb9874f5322e4f1adf783066fde07b3bb($file) 56 { 57 require $file; 58 } -
voce-seo/trunk/voce-seo.php
r852646 r878936 2 2 /* 3 3 Plugin Name: Voce SEO 4 Version: 0.2. 34 Version: 0.2.5 5 5 Plugin URI: http://voceconnect.com/ 6 6 Description: An SEO plugin taking things from both WP SEO and All in One SEO but leaving out the VIP incompatible pieces. … … 144 144 145 145 if ( isset( $queried_object->post_type ) ) { 146 if ( $og_description = self::get_seo_meta( 'og_description', get_queried_object_id() ) ) { 147 printf( '<meta property="og:description" content="%s" />' . chr( 10 ), $og_description ); 148 printf('<meta name="twitter:description" content="%s" />'.chr(10), esc_attr($og_description)); 149 } 150 151 } 152 153 remove_filter( 'wp_title', array( __CLASS__, 'seo_title' ), 10, 3); 154 printf('<meta property="og:title" content="%s" />'.chr(10), esc_attr(trim(wp_title('', false)))); 155 printf('<meta name="twitter:title" content="%s" />'.chr(10), esc_attr(trim(wp_title('', false)))); 156 add_filter( 'wp_title', array( __CLASS__, 'seo_title' ), 10, 3); 146 $og_description = self::get_seo_meta( 'og_description', get_queried_object_id() ); 147 $twitter_description = self::get_seo_meta( 'twitter_description', get_queried_object_id() ); 148 if ( ! $og_description && $description ) { 149 $og_description = $description; 150 } 151 if ( ! $twitter_description && $description ) { 152 $twitter_description = $description; 153 } 154 printf( '<meta property="og:description" content="%s" />' . chr( 10 ), esc_attr( $og_description ) ); 155 printf( '<meta name="twitter:description" content="%s" />'.chr(10), esc_attr( $twitter_description ) ); 156 157 } 158 159 printf('<meta property="og:title" content="%s" />'.chr(10), esc_attr(self::get_ogtitle())); 160 printf('<meta name="twitter:title" content="%s" />'.chr(10), esc_attr(self::get_ogtitle())); 157 161 158 162 printf('<meta property="og:type" content="%s"/>'.chr(10), apply_filters('vseo_ogtype', 'article')); 159 printf('<meta name="twitter:card" content="%s" />'.chr(10), apply_filters('vseo_ ogtype', 'summary'));163 printf('<meta name="twitter:card" content="%s" />'.chr(10), apply_filters('vseo_twittercard', 'summary')); 160 164 161 165 … … 164 168 printf('<meta property="og:image" content="%s" />'.chr(10), esc_attr($image)); 165 169 } 166 echo '<!-- end voce_seo --> ';170 echo '<!-- end voce_seo -->\n'; 167 171 168 172 do_action( 'voce_seo_after_wp_head' ); 173 } 174 175 public static function get_ogtitle() { 176 if ( is_home() || is_front_page() ) { 177 $title = get_bloginfo( 'name' ); 178 } else if ( is_author() ) { 179 $author = get_queried_object(); 180 $title = $author->display_name; 181 } else if ( is_singular() ) { 182 global $post; 183 $title = empty( $post->post_title ) ? ' ' : wp_kses( $post->post_title, array() ) ; 184 } else { 185 $title = ''; 186 } 187 188 return apply_filters( 'vseo_ogtitle', $title ); 169 189 } 170 190
Note: See TracChangeset
for help on using the changeset viewer.