Plugin Directory

Changeset 3307166


Ignore:
Timestamp:
06/05/2025 03:54:26 PM (6 months ago)
Author:
donmhico
Message:

Sugar Calendar Lite v3.7.2

Location:
sugar-calendar-lite
Files:
1292 added
11 edited

Legend:

Unmodified
Added
Removed
  • sugar-calendar-lite/trunk/assets/languages/sugar-calendar-lite.pot

    r3306586 r3307166  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Sugar Calendar (Lite) 3.7.1\n"
     3"Project-Id-Version: Sugar Calendar (Lite) 3.7.2\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sugar-calendar-lite\n"
    55"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    88"Content-Type: text/plain; charset=UTF-8\n"
    99"Content-Transfer-Encoding: 8bit\n"
    10 "POT-Creation-Date: 2025-06-04T14:30:20+00:00\n"
     10"POT-Creation-Date: 2025-06-05T15:02:56+00:00\n"
    1111"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1212"X-Generator: WP-CLI 2.8.1\n"
     
    849849
    850850#: includes/admin/screen-options.php:232
    851 #: includes/common/time-zones.php:286
    852 #: includes/common/time-zones.php:860
     851#: includes/common/time-zones.php:288
     852#: includes/common/time-zones.php:862
    853853msgid "Floating"
    854854msgstr ""
     
    890890#: includes/classes/database/events/Row.php:633
    891891#: includes/themes/legacy/event-display.php:165
    892 #: includes/themes/legacy/events-list.php:196
     892#: includes/themes/legacy/events-list.php:216
    893893msgid "All-day"
    894894msgstr ""
     
    22632263msgstr ""
    22642264
    2265 #: includes/common/time-zones.php:200
     2265#: includes/common/time-zones.php:202
    22662266msgctxt "Plus"
    22672267msgid "+"
    22682268msgstr ""
    22692269
    2270 #: includes/common/time-zones.php:201
     2270#: includes/common/time-zones.php:203
    22712271msgctxt "Minus"
    22722272msgid "-"
    22732273msgstr ""
    22742274
    2275 #: includes/common/time-zones.php:205
     2275#: includes/common/time-zones.php:207
    22762276#: includes/common/time.php:198
    22772277#: includes/common/time.php:232
     
    22812281msgstr[1] ""
    22822282
    2283 #: includes/common/time-zones.php:937
     2283#: includes/common/time-zones.php:939
    22842284msgid "Default"
    22852285msgstr ""
    22862286
    2287 #: includes/common/time-zones.php:944
    2288 #: includes/common/time-zones.php:945
     2287#: includes/common/time-zones.php:946
     2288#: includes/common/time-zones.php:947
    22892289msgid "UTC"
    22902290msgstr ""
    22912291
    2292 #: includes/common/time-zones.php:994
     2292#: includes/common/time-zones.php:996
    22932293msgid "UTC Manual Offsets"
    22942294msgstr ""
     
    26302630msgstr ""
    26312631
    2632 #: includes/themes/legacy/events-list.php:239
     2632#: includes/themes/legacy/events-list.php:259
    26332633msgid "Read More"
    26342634msgstr ""
     
    36723672#: src/Admin/Pages/Rsvp.php:51
    36733673#: src/Admin/Pages/SettingsRsvpTab.php:71
    3674 #: src/Pro/Admin/Loader.php:200
     3674#: src/Pro/Admin/Loader.php:191
    36753675msgid "RSVP feature is available as an add-on. Please <a target=\"_blank\" href=\"%1$s\">upgrade your plan</a> to Plus, Pro or Elite, in order to get access to the RSVP add-on and others."
    36763676msgstr ""
     
    49474947msgstr ""
    49484948
    4949 #: src/Helpers.php:1112
     4949#: src/Helpers.php:1118
    49504950msgid "There are no events to display."
    49514951msgstr ""
    49524952
    4953 #: src/Helpers.php:1116
     4953#: src/Helpers.php:1122
    49544954msgid "There are no upcoming events to display."
    49554955msgstr ""
    49564956
    4957 #: src/Helpers.php:1120
     4957#: src/Helpers.php:1126
    49584958msgid "There are no past events to display."
    49594959msgstr ""
  • sugar-calendar-lite/trunk/includes/classes/database/events/Schema.php

    r3229315 r3307166  
    1818 *
    1919 * @since 2.0
     20 * @since 3.7.2 Changed `start_tz` and `end_tz` length to `155`.
    2021 */
    2122final class Event_Schema extends Schema {
     
    109110            'name'       => 'start_tz',
    110111            'type'       => 'varchar',
    111             'length'     => '20',
     112            'length'     => '155',
    112113            'default'    => ''
    113114        ),
     
    126127            'name'       => 'end_tz',
    127128            'type'       => 'varchar',
    128             'length'     => '20',
     129            'length'     => '155',
    129130            'default'    => ''
    130131        ),
  • sugar-calendar-lite/trunk/includes/classes/database/events/TableEvents.php

    r3229315 r3307166  
    2727     * @var string Database version
    2828     */
    29     protected $version = 201902040006;
     29    protected $version = 202506040001;
    3030
    3131    /**
     
    4141     * @var array
    4242     */
    43     protected $upgrades = array(
     43    protected $upgrades = [
    4444        '201901090003' => 201901090003,
    4545        '201901220001' => 201901220001,
     
    4747        '201902040005' => 201902040005,
    4848        '201902040006' => 201902040006,
    49     );
     49        '202506040001' => 202506040001,
     50    ];
    5051
    5152    /**
     
    6768            status varchar(20) NOT NULL default '',
    6869            start datetime NOT NULL default '0000-00-00 00:00:00',
    69             start_tz varchar(20) NOT NULL default '',
     70            start_tz varchar(155) NOT NULL default '',
    7071            end datetime NOT NULL default '0000-00-00 00:00:00',
    71             end_tz varchar(20) NOT NULL default '',
     72            end_tz varchar(155) NOT NULL default '',
    7273            all_day tinyint(1) NOT NULL default '0',
    7374            recurrence varchar(20) NOT NULL default '',
     
    222223        return $this->is_success( true );
    223224    }
     225
     226    /**
     227     * Upgrade to version 202506040001.
     228     * - Modify the `start_tz` and `end_tz` columns to have a length of 155.
     229     *
     230     * @since 3.7.2
     231     *
     232     * @return bool True if upgrade was successful, false otherwise.
     233     */
     234    protected function __202506040001() {
     235
     236        $this->get_db()->query( "ALTER TABLE {$this->table_name} MODIFY COLUMN `start_tz` varchar(155) NOT NULL default '';" );
     237        $this->get_db()->query( "ALTER TABLE {$this->table_name} MODIFY COLUMN `end_tz` varchar(155) NOT NULL default '';" );
     238
     239        // Return success/fail
     240        return $this->is_success( true );
     241    }
    224242}
  • sugar-calendar-lite/trunk/includes/common/time-zones.php

    r3229315 r3307166  
    55 * @package Plugins/Site/Events/Functions
    66 */
     7
     8use Sugar_Calendar\Options;
    79
    810// Exit if accessed directly
     
    4345 *
    4446 * @since 2.1.2
     47 * @since 3.7.2 If Time Zone is turned off, then the timezone is floating.
     48 *
    4549 * @return bool
    4650 */
     
    5054    $retval = true;
    5155
    52     // Get the time zone and type
    53     $tz = sugar_calendar_get_timezone();
    54 
    55     // Maybe not floating
    56     if ( ! empty( $tz ) ) {
     56    if ( Options::get( 'timezone_type', 'off' ) === 'off' ) {
     57        $retval = true;
     58    } elseif ( ! empty( sugar_calendar_get_timezone() ) ) {
    5759        $retval = false;
    5860    }
  • sugar-calendar-lite/trunk/includes/post/relationship.php

    r3305766 r3307166  
    217217 * @since 2.0.0
    218218 * @since 3.7.0 Add filter to support multiple taxonomies.
     219 * @since 3.7.2 Fix issue with legacy shortcode.
    219220 *
    220221 * @param array        $clauses SQL clauses.
     
    236237        if ( ! empty( $query->query_vars['sc_event_category'] ) ) {
    237238
    238             $args[] = [
     239            $sc_event_cat_args = [
    239240                'taxonomy' => 'sc_event_category',
    240241                'terms'    => $query->query_vars['sc_event_category'],
    241242            ];
     243
     244            if ( is_string( $sc_event_cat_args['terms'] ) ) {
     245                $sc_event_cat_args['field'] = 'slug';
     246            }
     247
     248            $args[] = $sc_event_cat_args;
    242249        }
    243250
  • sugar-calendar-lite/trunk/includes/themes/legacy/events-list.php

    r3255409 r3307166  
    9696
    9797        $get_upcoming_events_args = [
    98             'number'       => $number,
    99             'calendar_ids' => $category,
     98            'number' => $number,
    10099        ];
     100
     101        if ( ! empty( $category ) ) {
     102
     103            $category     = is_array( $category ) ? $category : explode( ',', $category );
     104            $calendar_ids = [];
     105
     106            // Get term by slug.
     107            foreach ( $category as $cat ) {
     108
     109                $term = get_term_by( 'slug', $cat, 'sc_event_category' );
     110
     111                if ( $term && isset( $term->term_id ) ) {
     112
     113                    $calendar_ids[] = $term->term_id;
     114                }
     115            }
     116
     117            if ( $calendar_ids ) {
     118                $get_upcoming_events_args['calendar_ids'] = $calendar_ids;
     119            }
     120        }
    101121
    102122        $events = Helpers::get_upcoming_events_list_with_recurring( $get_upcoming_events_args, [] );
  • sugar-calendar-lite/trunk/readme.txt

    r3306586 r3307166  
    1010Requires at least: 5.9
    1111Tested up to:      6.8
    12 Stable tag:        3.7.1
     12Stable tag:        3.7.2
    1313
    1414Easily manage events and sell tickets on your WordPress site. Sugar Calendar is easy-to-use, reliable, and exceptionally powerful. See for yourself.
     
    200200
    201201== Changelog ==
     202= 3.7.2 - 2025-06-05 =
     203- Fixed: Legacy event list shortcode not showing events.
     204- Fixed: Timezone is being applied in the Admin Calendar even when turned off.
     205- Fixed: JS warning in edit event admin page.
     206- Fixed: Some product education.
     207
    202208= 3.7.1 - 2025-06-04 =
    203209- Fixed: Fatal error on PHP 7.4.
  • sugar-calendar-lite/trunk/src/Admin/Events/Metaboxes.php

    r3305766 r3307166  
    691691            ?>
    692692            <div class="sugar-calendar-metabox__field-row sugar-calendar-metabox__field-row--education">
    693                 <label for="sc-event-url-redirect"><?php echo esc_html( $toggle['label'] ); ?></label>
     693                <label><?php echo esc_html( $toggle['label'] ); ?></label>
    694694
    695695                <div class="sugar-calendar-metabox__field">
    696696                    <span class="sugar-calendar-toggle-control">
    697                         <input type="checkbox" id="sc-event-url-redirect" name="" value="1" disabled="disabled">
    698                         <label class="sugar-calendar-toggle-control-icon" for="sc-event-url-redirect"></label>
    699                         <label class="sugar-calendar-toggle-control-status sugar-calendar-toggle-control-status-on" for="sc-event-url-redirect">ON</label>
    700                         <label class="sugar-calendar-toggle-control-status sugar-calendar-toggle-control-status-off" for="sc-event-url-redirect">OFF</label>
     697                        <input type="checkbox" name="" value="1" disabled="disabled">
     698                        <label class="sugar-calendar-toggle-control-icon"></label>
     699                        <label class="sugar-calendar-toggle-control-status sugar-calendar-toggle-control-status-on">ON</label>
     700                        <label class="sugar-calendar-toggle-control-status sugar-calendar-toggle-control-status-off">OFF</label>
    701701                    </span>
    702702
  • sugar-calendar-lite/trunk/src/Helpers.php

    r3305766 r3307166  
    681681     * @since 3.7.0 Fixed issue with not displaying on-going events.
    682682     * @since 3.7.0 Added support for the 'tags' parameter.
     683     * @since 3.7.2 Fixed issue with non-array calendar args.
    683684     *
    684685     * @param array $args       The arguments to get the events.
     
    743744        // Get the category left join and where queries if necessary.
    744745        if ( ! empty( $args['calendar_ids'] ) ) {
     746
     747            if ( ! is_array( $args['calendar_ids'] ) ) {
     748                $args['calendar_ids'] = [ $args['calendar_ids'] ];
     749            }
     750
    745751            $term_taxonomy_ids = array_filter( array_map( 'absint', $args['calendar_ids'] ) );
    746752
  • sugar-calendar-lite/trunk/sugar-calendar-lite.php

    r3306586 r3307166  
    1212 * Requires PHP:      7.4
    1313 * Requires at least: 5.9
    14  * Version:           3.7.1
     14 * Version:           3.7.2
    1515 */
    1616
     
    2626     * @since 3.0.0
    2727     */
    28     define( 'SC_PLUGIN_VERSION', '3.7.1' );
     28    define( 'SC_PLUGIN_VERSION', '3.7.2' );
    2929}
    3030
  • sugar-calendar-lite/trunk/vendor/composer/installed.php

    r3306586 r3307166  
    44        'pretty_version' => 'dev-develop',
    55        'version' => 'dev-develop',
    6         'reference' => '6da88cff9d215986acddcf8e6b381420086f53bb',
     6        'reference' => 'c98d21f6450eecf0e28d7f5f5d967ae7e81312e0',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-develop',
    1515            'version' => 'dev-develop',
    16             'reference' => '6da88cff9d215986acddcf8e6b381420086f53bb',
     16            'reference' => 'c98d21f6450eecf0e28d7f5f5d967ae7e81312e0',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.