Plugin Directory

Changeset 1150405


Ignore:
Timestamp:
04/30/2015 06:30:31 PM (11 years ago)
Author:
voceplatforms
Message:

version 0.5.0

Location:
voce-seo/trunk
Files:
6 edited

Legend:

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

    r952310 r1150405  
    215215            add_action( 'create_' . $taxonomy, array( __CLASS__, 'save_meta' ), 10, 2 );
    216216        }
     217        add_action( 'split_shared_term', array( __CLASS__, 'term_split_handling' ), 10, 4 );
    217218    }
    218219
     
    265266    }
    266267
     268    /**
     269     * Handling the splitting of terms with WordPress 4.2
     270     * @param type $old_term_id
     271     * @param type $new_term_id
     272     * @param type $term_taxonomy_id
     273     * @param type $taxonomy
     274     */
     275    public static function term_split_handling( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
     276        $vseo_term_meta = get_option( self::$option_key );
     277
     278        if ( isset( $vseo_term_meta[$taxonomy . '_' . $old_term_id] ) ) {
     279            $vseo_term_meta[$taxonomy . '_' . $new_term_id] = $vseo_term_meta[$taxonomy . '_' . $old_term_id];
     280            unset( $vseo_term_meta[$taxonomy . '_' . $old_term_id] );
     281            update_option( self::$option_key, $vseo_term_meta );
     282        }
     283    }
     284
    267285}
  • voce-seo/trunk/readme.txt

    r1052871 r1150405  
    33Tags: SEO
    44Requires at least: 3.7.0
    5 Tested up to: 4.1
    6 Stable tag: 0.4.0
     5Tested up to: 4.2.1
     6Stable tag: 0.5.0
    77License: GPLv2 or later
    88
     
    3232
    3333== Changelog ==
     34
     35= Version 0.5.0 =
     36* Testing with WordPress 4.2.1
     37* Adding handling to vseo meta for term splitting
    3438
    3539= Version 0.4.0 =
  • voce-seo/trunk/vendor/autoload.php

    r1052871 r1150405  
    55require_once __DIR__ . '/composer' . '/autoload_real.php';
    66
    7 return ComposerAutoloaderInit7ddae590bd04274a3c9923dcc74c444d::getLoader();
     7return ComposerAutoloaderInit7eff6626ebe9a725b9bf9bd18275a7a7::getLoader();
  • voce-seo/trunk/vendor/composer/ClassLoader.php

    r1052871 r1150405  
    5454    private $useIncludePath = false;
    5555    private $classMap = array();
     56
     57    private $classMapAuthoritative = false;
    5658
    5759    public function getPrefixes()
     
    250252
    251253    /**
     254     * Turns off searching the prefix and fallback directories for classes
     255     * that have not been registered with the class map.
     256     *
     257     * @param bool $classMapAuthoritative
     258     */
     259    public function setClassMapAuthoritative($classMapAuthoritative)
     260    {
     261        $this->classMapAuthoritative = $classMapAuthoritative;
     262    }
     263
     264    /**
     265     * Should class lookup fail if not found in the current class map?
     266     *
     267     * @return bool
     268     */
     269    public function isClassMapAuthoritative()
     270    {
     271        return $this->classMapAuthoritative;
     272    }
     273
     274    /**
    252275     * Registers this instance as an autoloader.
    253276     *
     
    299322        if (isset($this->classMap[$class])) {
    300323            return $this->classMap[$class];
     324        }
     325        if ($this->classMapAuthoritative) {
     326            return false;
    301327        }
    302328
  • voce-seo/trunk/vendor/composer/autoload_real.php

    r1052871 r1150405  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit7ddae590bd04274a3c9923dcc74c444d
     5class ComposerAutoloaderInit7eff6626ebe9a725b9bf9bd18275a7a7
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit7ddae590bd04274a3c9923dcc74c444d', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit7eff6626ebe9a725b9bf9bd18275a7a7', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit7ddae590bd04274a3c9923dcc74c444d', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit7eff6626ebe9a725b9bf9bd18275a7a7', 'loadClassLoader'));
    2525
    2626        $map = require __DIR__ . '/autoload_namespaces.php';
     
    4343        $includeFiles = require __DIR__ . '/autoload_files.php';
    4444        foreach ($includeFiles as $file) {
    45             composerRequire7ddae590bd04274a3c9923dcc74c444d($file);
     45            composerRequire7eff6626ebe9a725b9bf9bd18275a7a7($file);
    4646        }
    4747
     
    5050}
    5151
    52 function composerRequire7ddae590bd04274a3c9923dcc74c444d($file)
     52function composerRequire7eff6626ebe9a725b9bf9bd18275a7a7($file)
    5353{
    5454    require $file;
  • voce-seo/trunk/voce-seo.php

    r1052871 r1150405  
    22/*
    33  Plugin Name: Voce SEO
    4   Version: 0.4.0
     4  Version: 0.5.0
    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.
     
    1111class VSEO {
    1212
    13     const DB_VERSION = '0.1.1';
     13    const DB_VERSION = '0.2';
    1414
    1515    public static function init() {
     
    139139            Voce_Settings_API::GetInstance()->set_setting('robots-nodp', 'vseo-general', true);
    140140            Voce_Settings_API::GetInstance()->set_setting('robots-noydir', 'vseo-general', true);
     141        }
     142
     143        if ( $db_version < 0.2 && function_exists( 'wp_get_split_term' ) ) {
     144            $term_meta = $updated_term_meta = get_option( 'vseo_term_meta' );
     145            if ( is_array( $term_meta ) ) {
     146                foreach( $term_meta as $taxonomy_term => $term_data ) {
     147                    $tax_term_arr = explode( '_', $taxonomy_term );
     148                    if ( is_array( $tax_term_arr ) && !empty( $tax_term_arr ) ) {
     149                        $term_id  = array_pop( $tax_term_arr );
     150                        $taxonomy = implode( '_', $tax_term_arr );
     151                        $new_term_id = wp_get_split_term( $term_id, $taxonomy );
     152                        if ( $new_term_id !== false ) {
     153                            unset( $updated_term_meta[$taxonomy_term] );
     154                            $updated_term_meta[sprintf( '%s_%s', $taxonomy, $new_term_id )] = $term_data;
     155                        }
     156                    }
     157                }
     158                update_option( 'vseo_term_meta', $updated_term_meta );
     159            }
    141160        }
    142161
Note: See TracChangeset for help on using the changeset viewer.