Plugin Directory

Changeset 1703182


Ignore:
Timestamp:
07/26/2017 02:39:36 PM (9 years ago)
Author:
digitalemphasis
Message:

adding 1.6 release

Location:
post-rotation/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • post-rotation/trunk/admin/post-rotation-admin.php

    r1608779 r1703182  
    2525settings_fields( 'pr-settings-group' );
    2626
    27 if ( get_option( 'pr_enabled' ) === '1' ) {
     27if ( get_option( 'pr_enabled' ) ) {
    2828    global $selected_post;
    2929    global $discrepancy;
     
    6969<tr>
    7070<td>
    71 <p>Interval<span class="extended"><?php if ( get_option( 'pr_fixed' ) !== '1' ) { echo ' without new posts'; } ?></span>:</p>
     71<p>Interval<span class="extended"><?php if ( ! get_option( 'pr_fixed' ) ) { echo ' without new posts'; } ?></span>:</p>
    7272<input type="number" min="0" max="999" id="pr-interval-hours" name="pr_interval[hours]" value="<?php echo esc_attr( get_option( 'pr_interval' )['hours'] ); ?>" />
    7373<label>hours.</label>
  • post-rotation/trunk/post-rotation-core.php

    r1608779 r1703182  
    22defined( 'ABSPATH' ) || die( 'Cannot access pages directly.' );
    33
    4 $pr_included_categories = array_map( function( $cat_id ) {
     4get_option( 'pr_included_categories' ) ? $pr_included_categories = array_map( function( $cat_id ) {
    55    return + $cat_id;
    6 }, get_option( 'pr_included_categories' ) );
     6}, get_option( 'pr_included_categories' ) ) : $pr_included_categories = array();
    77
    88function selected_post() {
     
    2929}
    3030
    31 if ( get_option( 'pr_enabled' ) === '1' && is_array( $pr_included_categories ) ) {
     31if ( get_option( 'pr_enabled' ) && $pr_included_categories ) {
    3232    global $wpdb;
    3333
     
    5656    $this_moment = strtotime( current_time( 'mysql' ) );
    5757
    58     if ( get_option( 'pr_fixed' ) === '1' && '' !== $latest_rotation_time ) {
     58    if ( get_option( 'pr_fixed' ) && $latest_rotation_time ) {
    5959        $key_moment = $latest_rotation_time;
    6060    } else {
     
    6565
    6666    if ( $discrepancy >= $pr_interval && $selected_post ) {
    67         if ( get_option( 'pr_enforce_punctuality' ) === '1' ) {
     67        if ( get_option( 'pr_enforce_punctuality' ) ) {
    6868            $new_date_unix = $key_moment + $pr_interval;
    6969            $new_date = date( 'Y-m-d H:i:s', $new_date_unix );
     
    8080        $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_date = %s, post_date_gmt = %s WHERE ID = %d", $new_date, $new_date_gmt, $selected_post ) );
    8181
    82         if ( get_option( 'pr_also_alter_last_modified' ) === '1' ) {
     82        if ( get_option( 'pr_also_alter_last_modified' ) ) {
    8383            $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_modified = %s, post_modified_gmt = %s WHERE ID = %d", $new_date, $new_date_gmt, $selected_post ) );
    8484        }
  • post-rotation/trunk/post-rotation.php

    r1608779 r1703182  
    44Plugin URI: http://www.digitalemphasis.com/wordpress-plugins/post-rotation/
    55Description: Set the rotation interval or the allowed time without new posts... and automatically the oldest post becomes the latest one!
    6 Version: 1.5
     6Version: 1.6
    77Author: digitalemphasis
    88Author URI: http://www.digitalemphasis.com/
     
    107107
    108108function pr_uninstall() {
    109     if ( get_option( 'pr_clean_uninstall' ) === '1' ) {
     109    if ( get_option( 'pr_clean_uninstall' ) ) {
    110110        delete_option( 'pr_latest_rotation_time' );
    111111        delete_option( 'pr_enabled' );
  • post-rotation/trunk/readme.txt

    r1608779 r1703182  
    44Donate link: http://www.digitalemphasis.com/donate/
    55Tags: admin, administration, automatic, post, posts, post rotation, post rotator, rotation, rotator, interval, frequency
    6 Requires at least: 3.5
    7 Tested up to: 4.7
    8 Stable tag: 1.5
     6Requires at least: 4.0
     7Tested up to: 4.8
     8Stable tag: 1.6
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5858== Changelog ==
    5959
     60= 1.6 =
     61* Ensure compatibility with WordPress 4.8
     62* Fixed: no more 'array_map(): Argument #2 should be an array...' warnings when no category is selected.
     63* Code optimization.
     64
    6065= 1.5 =
    6166* Ensure compatibility with WordPress 4.6 and 4.7
Note: See TracChangeset for help on using the changeset viewer.