Plugin Directory

Changeset 3394817


Ignore:
Timestamp:
11/13/2025 07:32:59 AM (4 months ago)
Author:
awelzel
Message:

Update trunk from Codeberg

Location:
timed-content/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • timed-content/trunk/lib/class-timedcontentplugin.php

    r3236754 r3394817  
    583583
    584584        $human_readable      = (bool) $args['human_readable'];
    585         $freq                = $args['freq'];
     585        $freq                = (int) $args['freq'];
    586586        $timezone            = $args['timezone'];
    587587        $recurr_type         = $args['recurr_type'];
     
    670670                // Adjust current date offset if start DST differs from current DST and we don't have a monthly pattern
    671671                $current_adjusted = $current;
    672                 if (!$monthly_pattern) {
     672                if (TIMED_CONTENT_FREQ_MONTHLY !== $freq) {
    673673                    $current_has_dst = $this->format_timestamp('I', $current);
    674674                    if ('1' === $start_has_dst && '0' === $current_has_dst) {
     
    902902            $action = __( 'Hide the content', 'timed-content' );
    903903        }
    904         $freq                = $args['freq'];
     904        $freq                = (int)$args['freq'];
    905905        $timezone            = $args['timezone'];
    906906        $recurr_type         = $args['recurr_type'];
     
    932932        );
    933933
    934         if ( 0 === $freq ) {
     934        if ( TIMED_CONTENT_FREQ_HOURLY === $freq ) {
    935935            $desc .= '<br />' . sprintf(
    936936                    /* translators: %d numerical hours value */
     
    943943                $interval_multiplier
    944944            );
    945         } elseif ( 1 === $freq ) {
     945        } elseif ( TIMED_CONTENT_FREQ_DAILY === $freq ) {
    946946            $desc .= '<br />' . sprintf(
    947947                    /* translators: %d numerical days value */
     
    954954                $interval_multiplier
    955955            );
    956         } elseif ( 2 === $freq ) {
     956        } elseif ( TIMED_CONTENT_FREQ_WEEKLY === $freq ) {
    957957            if ( ( $days_of_week ) && ( is_array( $days_of_week ) ) ) {
    958958                $days      = array();
     
    10831083                );
    10841084            }
    1085         } elseif ( 3 === $freq ) {
     1085        } elseif ( TIMED_CONTENT_FREQ_MONTHLY === $freq ) {
    10861086            if ( 'yes' === $monthly_pattern ) {
    10871087                if ( 1 === $interval_multiplier ) {
     
    11211121                );
    11221122            }
    1123         } elseif ( 4 === $freq ) {
     1123        } elseif ( TIMED_CONTENT_FREQ_YEARLY === $freq ) {
    11241124            $desc .= '<br />' . sprintf(
    11251125                /* translators: %d: year count */
  • timed-content/trunk/readme.txt

    r3283662 r3394817  
    55Requires at least: 3.8
    66Tested up to: 6.8
    7 Stable tag: 2.95
     7Stable tag: 2.96
    88License: GPL2
    99
     
    6262
    6363== Changelog ==
     64
     65= 2.96 =
     66
     67* Internal code refactoring for frequency option.
     68* Fix adjustment for DST switches to keep start/end time constant.
    6469
    6570= 2.95 =
  • timed-content/trunk/timed-content.php

    r3283662 r3394817  
    77Description: Plugin to show or hide portions of a Page or Post based on specific date/time characteristics.  These actions can either be processed either server-side or client-side, depending on the desired effect.
    88Author: K. Tough, Arno Welzel, Enrico Bacis
    9 Version: 2.95
     9Version: 2.96
    1010Author URI: http://wordpress.org/plugins/timed-content/
    1111*/
     
    1515require 'lib/class-timedcontentplugin.php';
    1616
    17 define( 'TIMED_CONTENT_VERSION', '2.95' );
     17define( 'TIMED_CONTENT_VERSION', '2.96' );
    1818define( 'TIMED_CONTENT_SLUG', 'timed-content' );
    1919define( 'TIMED_CONTENT_PLUGIN_URL', plugins_url() . '/' . TIMED_CONTENT_SLUG );
Note: See TracChangeset for help on using the changeset viewer.