Plugin Directory

Changeset 878936


Ignore:
Timestamp:
03/20/2014 06:04:52 PM (12 years ago)
Author:
prettyboymp
Message:

deploying 0.2.5

Location:
voce-seo/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • voce-seo/trunk/admin/admin.php

    r852646 r878936  
    9595            'general' => array(
    9696                'title' => array(
    97                     "display_callback" => "vseo_field_text",
     97                    'display_callback' => 'vseo_field_text',
    9898                    'sanitize_callback' => 'vseo_sanitize_meta_text',
    9999                    '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>',
    101101                    ),
    102                     "title" => "SEO Title",
     102                    'title' => 'SEO Title',
    103103                ),
    104104                'description' => array(
    105                     "display_callback" => "vseo_field_textarea",
     105                    'display_callback' => 'vseo_field_textarea',
    106106                    'sanitize_callback' => 'vseo_sanitize_meta_text',
    107107                    '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>',
    109109                    ),
    110                     "title" => "Meta Description",
     110                    'title' => 'Meta Description',
    111111                ),
    112112            ),
    113113            'advanced' => array(
    114114                'robots-noindex' => array(
    115                     "display_callback" => "vseo_field_select",
     115                    'display_callback' => 'vseo_field_select',
    116116                    'sanitize_callback' => 'vseo_sanitize_select',
    117117                    'args' => array(
     
    123123                        'default' => '0',
    124124                    ),
    125                     "title" => "Meta Robots Index",
     125                    'title' => 'Meta Robots Index',
    126126                ),
    127127                'robots-nofollow' => array(
    128                     "display_callback" => "vseo_field_select",
     128                    'display_callback' => 'vseo_field_select',
    129129                    'sanitize_callback' => 'vseo_sanitize_select',
    130130                    'args' => array(
     
    136136                        'default' => '0',
    137137                    ),
    138                     "title" => "Meta Robots Follow",
     138                    'title' => 'Meta Robots Follow',
    139139                ),
    140140                'canonical' => array(
    141                     "display_callback" => "vseo_field_text",
     141                    'display_callback' => 'vseo_field_text',
    142142                    'sanitize_callback' => 'vseo_sanitize_url',
    143143                    '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>',
    145145                    ),
    146                     "title" => "Canonical URL",
     146                    'title' => 'Canonical URL',
    147147                ),
    148148                'redirect' => array(
    149                     "display_callback" => "vseo_field_text",
     149                    'display_callback' => 'vseo_field_text',
    150150                    'sanitize_callback' => 'vseo_sanitize_url',
    151151                    '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>',
    153153                    ),
    154                     "title" => "301 Redirect URL",
     154                    'title' => '301 Redirect URL',
    155155                ),
    156156
     
    158158            'social' => array(
    159159                'og_description' => array(
    160                     "display_callback" => "vseo_field_textarea",
     160                    'display_callback' => 'vseo_field_textarea',
    161161                    'sanitize_callback' => 'vseo_sanitize_meta_text',
    162162                    '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>',
    164164                    ),
    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',
    166174                ),
    167175
  • voce-seo/trunk/readme.txt

    r852646 r878936  
    33Tags: SEO
    44Requires at least: 3.7.0
    5 Tested up to: 3.8.0
    6 Stable tag: 0.2.3
     5Tested up to: 3.8.1
     6Stable tag: 0.2.5
    77License: GPLv2 or later
    88
     
    1515
    1616== 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
    1726= Version 0.2.2 =
    1827* Fix bug in 'wp_title' filter affecting archive pages.
  • voce-seo/trunk/vendor/autoload.php

    r852646 r878936  
    55require_once __DIR__ . '/composer' . '/autoload_real.php';
    66
    7 return ComposerAutoloaderInitca012c536e9953f76af8ac184e1ffbc3::getLoader();
     7return ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb::getLoader();
  • voce-seo/trunk/vendor/composer/ClassLoader.php

    r839041 r878936  
    267267    {
    268268        if ($file = $this->findFile($class)) {
    269             include $file;
     269            includeFile($file);
    270270
    271271            return true;
     
    353353    }
    354354}
     355
     356/**
     357 * Scope isolated include.
     358 *
     359 * Prevents access to $this/self from included files.
     360 */
     361function includeFile($file)
     362{
     363    include $file;
     364}
  • voce-seo/trunk/vendor/composer/autoload_real.php

    r852646 r878936  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitca012c536e9953f76af8ac184e1ffbc3
     5class ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInitca012c536e9953f76af8ac184e1ffbc3', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInitca012c536e9953f76af8ac184e1ffbc3', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInitb9874f5322e4f1adf783066fde07b3bb', 'loadClassLoader'));
    2525
    2626        $vendorDir = dirname(__DIR__);
     
    4646        $includeFiles = require __DIR__ . '/autoload_files.php';
    4747        foreach ($includeFiles as $file) {
    48             require $file;
     48            composerRequireb9874f5322e4f1adf783066fde07b3bb($file);
    4949        }
    5050
     
    5252    }
    5353}
     54
     55function composerRequireb9874f5322e4f1adf783066fde07b3bb($file)
     56{
     57    require $file;
     58}
  • voce-seo/trunk/voce-seo.php

    r852646 r878936  
    22/*
    33  Plugin Name: Voce SEO
    4   Version: 0.2.3
     4  Version: 0.2.5
    55  Plugin URI: http://voceconnect.com/
    66  Description: An SEO plugin taking things from both WP SEO and All in One SEO but leaving out the VIP incompatible pieces.
     
    144144
    145145        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()));
    157161
    158162        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'));
    160164
    161165
     
    164168            printf('<meta property="og:image" content="%s" />'.chr(10), esc_attr($image));
    165169        }
    166         echo '<!-- end voce_seo -->';
     170        echo '<!-- end voce_seo -->\n';
    167171
    168172        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 );
    169189    }
    170190
Note: See TracChangeset for help on using the changeset viewer.