Plugin Directory

Changeset 3332738


Ignore:
Timestamp:
07/23/2025 08:57:28 AM (7 months ago)
Author:
progressplanner
Message:

Update to version 1.6.3 from GitHub

Location:
progress-planner
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • progress-planner/tags/1.6.3/CHANGELOG.md

    r3326194 r3332738  
     1= 1.6.3 =
     2
     3Bugs we fixed:
     4
     5* Fixed a bug in the WP-CLI task-list command.
     6* Fixed a bug in the post-editor when lessons cannot be retrieved.
     7* Fixed a bug in the site-editor when using block themes, where the sidebar was instantiated on some servers.
     8
    19= 1.6.2 =
    210
  • progress-planner/tags/1.6.3/assets/js/editor.js

    r3264985 r3332738  
    4040    return progressPlannerEditor.pageTypes.find(
    4141        ( pageTypeItem ) => parseInt( pageTypeItem.id ) === parseInt( id )
    42     ).slug;
     42    )?.slug;
    4343};
    4444
     
    4949 */
    5050const PrplRenderPageTypeSelector = () => {
     51    // Bail early if the page types are not set.
     52    if (
     53        ! progressPlannerEditor.pageTypes ||
     54        0 === progressPlannerEditor.pageTypes.length
     55    ) {
     56        return el( 'div', {}, '' );
     57    }
     58
    5159    // Build the page types array, to be used in the dropdown.
    5260    const pageTypes = [];
     
    6472            const pageTypeArr =
    6573                select( 'core/editor' ).getEditedPostAttribute( TAXONOMY );
    66             return 0 < pageTypeArr.length
     74            return pageTypeArr && 0 < pageTypeArr.length
    6775                ? parseInt( pageTypeArr[ 0 ] )
    6876                : parseInt( progressPlannerEditor.defaultPageType );
     
    188196    const pageTodos = pageTodosMeta || '';
    189197
    190     // Bail early if the page type is not set.
    191     if ( ! pageType ) {
     198    // Bail early if the page type or lessons are not set.
     199    if (
     200        ! pageType ||
     201        ! progressPlannerEditor.lessons ||
     202        0 === progressPlannerEditor.lessons.length
     203    ) {
    192204        return el( 'div', {}, '' );
    193205    }
  • progress-planner/tags/1.6.3/classes/admin/class-editor.php

    r3316864 r3332738  
    2828        // Bail early when we're on the site-editor.php page.
    2929        $request = \filter_input( INPUT_SERVER, 'REQUEST_URI' );
    30         if ( false !== \strpos( (string) $request, '/site-editor.php' ) ) {
     30        if ( ! $request && isset( $_SERVER['REQUEST_URI'] ) ) {
     31            $request = \sanitize_text_field( \wp_unslash( $_SERVER['REQUEST_URI'] ) );
     32        }
     33        if ( $request && str_contains( $request, 'site-editor.php' ) ) {
    3134            return;
    3235        }
  • progress-planner/tags/1.6.3/classes/wp-cli/class-task-command.php

    r3316864 r3332738  
    6464
    6565        $format = isset( $assoc_args['format'] ) ? $assoc_args['format'] : 'table';
    66         $fields = isset( $assoc_args['fields'] ) ? \explode( ',', $assoc_args['fields'] ) : [ 'task_id', 'provider_id', 'category', 'date', 'status' ];
    67 
    68         WP_CLI\Utils\format_items( $format, $tasks, $fields ); // @phpstan-ignore-line
     66        $fields = isset( $assoc_args['fields'] ) ? \explode( ',', $assoc_args['fields'] ) : [ 'task_id', 'provider_id', 'category', 'date', 'post_status' ];
     67
     68        $formatted_tasks = [];
     69        foreach ( $tasks as $task ) {
     70            $formatted = [];
     71            foreach ( $fields as $field ) {
     72                switch ( $field ) {
     73                    case 'task_id':
     74                    case 'date':
     75                    case 'post_status':
     76                        $formatted[ $field ] = $task->$field ?? '';
     77                        break;
     78                    case 'provider_id':
     79                        $formatted[ $field ] = is_object( $task->provider ?? null ) && isset( $task->provider->name ) ? $task->provider->name : '';
     80                        break;
     81                    case 'category':
     82                        $formatted[ $field ] = is_object( $task->category ?? null ) && isset( $task->category->name ) ? $task->category->name : '';
     83                        break;
     84                    default:
     85                        $formatted[ $field ] = $task->$field ?? '';
     86                }
     87            }
     88
     89            $formatted_tasks[] = $formatted;
     90        }
     91
     92        WP_CLI\Utils\format_items( $format, $formatted_tasks, $fields ); // @phpstan-ignore-line
    6993    }
    7094
     
    189213     */
    190214    private function get_tasks( $args ) {
    191         $tasks = \progress_planner()->get_settings()->get( 'tasks', [] ); // Get tasks from the database, without filtering.
    192 
     215        $tasks = \progress_planner()->get_suggested_tasks_db()->get_tasks_by( $args );
    193216        if ( empty( $tasks ) ) {
    194217            return [];
    195         }
    196 
    197         // Set fields which are not set for all tasks.
    198         foreach ( $tasks as $key => $task ) {
    199             if ( ! isset( $task['date'] ) ) {
    200                 $tasks[ $key ]['date'] = '';
    201             }
    202218        }
    203219
  • progress-planner/tags/1.6.3/progress-planner.php

    r3326194 r3332738  
    1010 * Requires at least: 6.6
    1111 * Requires PHP:      7.4
    12  * Version:           1.6.2
     12 * Version:           1.6.3
    1313 * Author:            Team Emilia Projects
    1414 * Author URI:        https://prpl.fyi/about
  • progress-planner/tags/1.6.3/readme.txt

    r3326194 r3332738  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.6.2
     7Stable tag: 1.6.3
    88License: GPL3+
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    110110
    111111== Changelog ==
     112
     113= 1.6.3 =
     114
     115Bugs we fixed:
     116
     117* Fixed a bug in the WP-CLI task-list command.
     118* Fixed a bug in the post-editor when lessons cannot be retrieved.
     119* Fixed a bug in the site-editor when using block themes, where the sidebar was instantiated on some servers.
    112120
    113121= 1.6.2 =
  • progress-planner/trunk/CHANGELOG.md

    r3326194 r3332738  
     1= 1.6.3 =
     2
     3Bugs we fixed:
     4
     5* Fixed a bug in the WP-CLI task-list command.
     6* Fixed a bug in the post-editor when lessons cannot be retrieved.
     7* Fixed a bug in the site-editor when using block themes, where the sidebar was instantiated on some servers.
     8
    19= 1.6.2 =
    210
  • progress-planner/trunk/assets/js/editor.js

    r3264985 r3332738  
    4040    return progressPlannerEditor.pageTypes.find(
    4141        ( pageTypeItem ) => parseInt( pageTypeItem.id ) === parseInt( id )
    42     ).slug;
     42    )?.slug;
    4343};
    4444
     
    4949 */
    5050const PrplRenderPageTypeSelector = () => {
     51    // Bail early if the page types are not set.
     52    if (
     53        ! progressPlannerEditor.pageTypes ||
     54        0 === progressPlannerEditor.pageTypes.length
     55    ) {
     56        return el( 'div', {}, '' );
     57    }
     58
    5159    // Build the page types array, to be used in the dropdown.
    5260    const pageTypes = [];
     
    6472            const pageTypeArr =
    6573                select( 'core/editor' ).getEditedPostAttribute( TAXONOMY );
    66             return 0 < pageTypeArr.length
     74            return pageTypeArr && 0 < pageTypeArr.length
    6775                ? parseInt( pageTypeArr[ 0 ] )
    6876                : parseInt( progressPlannerEditor.defaultPageType );
     
    188196    const pageTodos = pageTodosMeta || '';
    189197
    190     // Bail early if the page type is not set.
    191     if ( ! pageType ) {
     198    // Bail early if the page type or lessons are not set.
     199    if (
     200        ! pageType ||
     201        ! progressPlannerEditor.lessons ||
     202        0 === progressPlannerEditor.lessons.length
     203    ) {
    192204        return el( 'div', {}, '' );
    193205    }
  • progress-planner/trunk/classes/admin/class-editor.php

    r3316864 r3332738  
    2828        // Bail early when we're on the site-editor.php page.
    2929        $request = \filter_input( INPUT_SERVER, 'REQUEST_URI' );
    30         if ( false !== \strpos( (string) $request, '/site-editor.php' ) ) {
     30        if ( ! $request && isset( $_SERVER['REQUEST_URI'] ) ) {
     31            $request = \sanitize_text_field( \wp_unslash( $_SERVER['REQUEST_URI'] ) );
     32        }
     33        if ( $request && str_contains( $request, 'site-editor.php' ) ) {
    3134            return;
    3235        }
  • progress-planner/trunk/classes/wp-cli/class-task-command.php

    r3316864 r3332738  
    6464
    6565        $format = isset( $assoc_args['format'] ) ? $assoc_args['format'] : 'table';
    66         $fields = isset( $assoc_args['fields'] ) ? \explode( ',', $assoc_args['fields'] ) : [ 'task_id', 'provider_id', 'category', 'date', 'status' ];
    67 
    68         WP_CLI\Utils\format_items( $format, $tasks, $fields ); // @phpstan-ignore-line
     66        $fields = isset( $assoc_args['fields'] ) ? \explode( ',', $assoc_args['fields'] ) : [ 'task_id', 'provider_id', 'category', 'date', 'post_status' ];
     67
     68        $formatted_tasks = [];
     69        foreach ( $tasks as $task ) {
     70            $formatted = [];
     71            foreach ( $fields as $field ) {
     72                switch ( $field ) {
     73                    case 'task_id':
     74                    case 'date':
     75                    case 'post_status':
     76                        $formatted[ $field ] = $task->$field ?? '';
     77                        break;
     78                    case 'provider_id':
     79                        $formatted[ $field ] = is_object( $task->provider ?? null ) && isset( $task->provider->name ) ? $task->provider->name : '';
     80                        break;
     81                    case 'category':
     82                        $formatted[ $field ] = is_object( $task->category ?? null ) && isset( $task->category->name ) ? $task->category->name : '';
     83                        break;
     84                    default:
     85                        $formatted[ $field ] = $task->$field ?? '';
     86                }
     87            }
     88
     89            $formatted_tasks[] = $formatted;
     90        }
     91
     92        WP_CLI\Utils\format_items( $format, $formatted_tasks, $fields ); // @phpstan-ignore-line
    6993    }
    7094
     
    189213     */
    190214    private function get_tasks( $args ) {
    191         $tasks = \progress_planner()->get_settings()->get( 'tasks', [] ); // Get tasks from the database, without filtering.
    192 
     215        $tasks = \progress_planner()->get_suggested_tasks_db()->get_tasks_by( $args );
    193216        if ( empty( $tasks ) ) {
    194217            return [];
    195         }
    196 
    197         // Set fields which are not set for all tasks.
    198         foreach ( $tasks as $key => $task ) {
    199             if ( ! isset( $task['date'] ) ) {
    200                 $tasks[ $key ]['date'] = '';
    201             }
    202218        }
    203219
  • progress-planner/trunk/progress-planner.php

    r3326194 r3332738  
    1010 * Requires at least: 6.6
    1111 * Requires PHP:      7.4
    12  * Version:           1.6.2
     12 * Version:           1.6.3
    1313 * Author:            Team Emilia Projects
    1414 * Author URI:        https://prpl.fyi/about
  • progress-planner/trunk/readme.txt

    r3326194 r3332738  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.6.2
     7Stable tag: 1.6.3
    88License: GPL3+
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    110110
    111111== Changelog ==
     112
     113= 1.6.3 =
     114
     115Bugs we fixed:
     116
     117* Fixed a bug in the WP-CLI task-list command.
     118* Fixed a bug in the post-editor when lessons cannot be retrieved.
     119* Fixed a bug in the site-editor when using block themes, where the sidebar was instantiated on some servers.
    112120
    113121= 1.6.2 =
Note: See TracChangeset for help on using the changeset viewer.