Plugin Directory

Changeset 1038771


Ignore:
Timestamp:
12/05/2014 10:27:37 AM (11 years ago)
Author:
farne
Message:

New version 1.0.4 with two bugfixes.

Location:
post-status-scheduler/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • post-status-scheduler/trunk/classes/event.php

    r1013039 r1038771  
    4646
    4747      // Get the activated categories
    48       $this->category = get_post_meta( $post_id, 'scheduler_category', true );
     48      // For some reason I seem to have to unserialize some meta data sometimes.
     49      // This is a check to make sure it is an unserialized array
     50      $tmp_categories = get_post_meta( $post_id, 'scheduler_category', true );
     51      if( is_string( $tmp_categories ) ) $tmp_categories = unserialize( $tmp_categories );
     52      $this->category = $tmp_categories;
    4953
    5054      // Get if we need to check meta data
  • post-status-scheduler/trunk/classes/scheduler.php

    r1028783 r1038771  
    328328                $scheduler_category_taxonomy = implode( '_', $scheduler_category_splits );
    329329
     330                // If this a tag and not a category than we need to get the term
     331                // data and set the term by name and not id.
     332                if( !is_taxonomy_hierarchical( $scheduler_category_taxonomy ) ) {
     333
     334                  $term_data = get_term_by( 'id', $scheduler_category_to_add, $scheduler_category_taxonomy );
     335                  $scheduler_category_to_add = $term_data->name;
     336
     337                }
     338
    330339                // Update the categories
    331340                Taxonomy::set_terms( $post_id, array( $scheduler_category_to_add ), $scheduler_category_taxonomy, true );
    332 
     341               
    333342                // Add the executed event
    334343                $executed_events []= 'check_category';
     
    337346
    338347            }
     348           
    339349          }
    340350
  • post-status-scheduler/trunk/post-status-scheduler.php

    r1028783 r1038771  
    55  Plugin Name: Post Status Scheduler
    66  Description: Change status, category or postmeta of any post type at a scheduled timestamp.
    7   Version: 1.0.2
     7  Version: 1.0.4
    88  Author: Andreas Färnstrand <[email protected]>
    99  Author URI: http://www.farnstranddev.se
     
    4242        if( !defined( 'POST_STATUS_SCHEDULER_TEXTDOMAIN' ) )         define( 'POST_STATUS_SCHEDULER_TEXTDOMAIN', 'post-status-scheduler' );
    4343    if( !defined( 'POST_STATUS_SCHEDULER_TEXTDOMAIN_PATH' ) )    define( 'POST_STATUS_SCHEDULER_TEXTDOMAIN_PATH', dirname( plugin_basename( __FILE__) ) .'/languages' );
    44     if( !defined( 'POST_STATUS_SCHEDULER_VERSION' ) )            define( 'POST_STATUS_SCHEDULER_VERSION', '1.0.2' );
     44    if( !defined( 'POST_STATUS_SCHEDULER_VERSION' ) )            define( 'POST_STATUS_SCHEDULER_VERSION', '1.0.4' );
    4545
    4646    // Create a new scheduler instance
  • post-status-scheduler/trunk/readme.txt

    r1028783 r1038771  
    44Requires at least: 3.9
    55Tested up to: 4.0
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Change status, category or postmeta of any post type at a scheduled timestamp.
     10Change status, categories/tags or postmeta of any post type at a scheduled timestamp.
    1111
    1212== Description ==
    1313
    14 Post Status Scheduler allows for scheduling of post status changes, category adding or removing and
     14Post Status Scheduler allows for scheduling of post status changes, category/tag adding or removing and
    1515removing of postmeta on any given date or time. It can be activated on any post type and shows
    1616up on the post edit screen in the publish section. From version 1.0.0 it has a feature for sending
     
    5252== Changelog ==
    5353
     54= 1.0.4 =
     55* Both tags and categories are now changed correctly. Previously tags were changed to their id and not the name.
     56* Changing categories and tags now work on custom posttypes. There seems to have been a bug here before even though not reported.
     57
    5458= 1.0.2 =
    5559* Fixed to use the correct textdomain. Translations should now work correctly.
     
    7882== Upgrade Notice ==
    7983
     84= 1.0.4 =
     85* Upgrade to this version to keep tags from being set to their id instead of the name.
     86* Now works correctly with custom post types.
     87
    8088= 1.0.2 =
    8189* Upgrade to this version to get translations to work 100%.
Note: See TracChangeset for help on using the changeset viewer.