Changeset 3332738
- Timestamp:
- 07/23/2025 08:57:28 AM (7 months ago)
- Location:
- progress-planner
- Files:
-
- 12 edited
- 1 copied
-
tags/1.6.3 (copied) (copied from progress-planner/trunk)
-
tags/1.6.3/CHANGELOG.md (modified) (1 diff)
-
tags/1.6.3/assets/js/editor.js (modified) (4 diffs)
-
tags/1.6.3/classes/admin/class-editor.php (modified) (1 diff)
-
tags/1.6.3/classes/wp-cli/class-task-command.php (modified) (2 diffs)
-
tags/1.6.3/progress-planner.php (modified) (1 diff)
-
tags/1.6.3/readme.txt (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/assets/js/editor.js (modified) (4 diffs)
-
trunk/classes/admin/class-editor.php (modified) (1 diff)
-
trunk/classes/wp-cli/class-task-command.php (modified) (2 diffs)
-
trunk/progress-planner.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
progress-planner/tags/1.6.3/CHANGELOG.md
r3326194 r3332738 1 = 1.6.3 = 2 3 Bugs 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 1 9 = 1.6.2 = 2 10 -
progress-planner/tags/1.6.3/assets/js/editor.js
r3264985 r3332738 40 40 return progressPlannerEditor.pageTypes.find( 41 41 ( pageTypeItem ) => parseInt( pageTypeItem.id ) === parseInt( id ) 42 ) .slug;42 )?.slug; 43 43 }; 44 44 … … 49 49 */ 50 50 const 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 51 59 // Build the page types array, to be used in the dropdown. 52 60 const pageTypes = []; … … 64 72 const pageTypeArr = 65 73 select( 'core/editor' ).getEditedPostAttribute( TAXONOMY ); 66 return 0 < pageTypeArr.length74 return pageTypeArr && 0 < pageTypeArr.length 67 75 ? parseInt( pageTypeArr[ 0 ] ) 68 76 : parseInt( progressPlannerEditor.defaultPageType ); … … 188 196 const pageTodos = pageTodosMeta || ''; 189 197 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 ) { 192 204 return el( 'div', {}, '' ); 193 205 } -
progress-planner/tags/1.6.3/classes/admin/class-editor.php
r3316864 r3332738 28 28 // Bail early when we're on the site-editor.php page. 29 29 $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' ) ) { 31 34 return; 32 35 } -
progress-planner/tags/1.6.3/classes/wp-cli/class-task-command.php
r3316864 r3332738 64 64 65 65 $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 69 93 } 70 94 … … 189 213 */ 190 214 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 ); 193 216 if ( empty( $tasks ) ) { 194 217 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 }202 218 } 203 219 -
progress-planner/tags/1.6.3/progress-planner.php
r3326194 r3332738 10 10 * Requires at least: 6.6 11 11 * Requires PHP: 7.4 12 * Version: 1.6. 212 * Version: 1.6.3 13 13 * Author: Team Emilia Projects 14 14 * Author URI: https://prpl.fyi/about -
progress-planner/tags/1.6.3/readme.txt
r3326194 r3332738 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.6. 27 Stable tag: 1.6.3 8 8 License: GPL3+ 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 110 110 111 111 == Changelog == 112 113 = 1.6.3 = 114 115 Bugs 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. 112 120 113 121 = 1.6.2 = -
progress-planner/trunk/CHANGELOG.md
r3326194 r3332738 1 = 1.6.3 = 2 3 Bugs 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 1 9 = 1.6.2 = 2 10 -
progress-planner/trunk/assets/js/editor.js
r3264985 r3332738 40 40 return progressPlannerEditor.pageTypes.find( 41 41 ( pageTypeItem ) => parseInt( pageTypeItem.id ) === parseInt( id ) 42 ) .slug;42 )?.slug; 43 43 }; 44 44 … … 49 49 */ 50 50 const 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 51 59 // Build the page types array, to be used in the dropdown. 52 60 const pageTypes = []; … … 64 72 const pageTypeArr = 65 73 select( 'core/editor' ).getEditedPostAttribute( TAXONOMY ); 66 return 0 < pageTypeArr.length74 return pageTypeArr && 0 < pageTypeArr.length 67 75 ? parseInt( pageTypeArr[ 0 ] ) 68 76 : parseInt( progressPlannerEditor.defaultPageType ); … … 188 196 const pageTodos = pageTodosMeta || ''; 189 197 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 ) { 192 204 return el( 'div', {}, '' ); 193 205 } -
progress-planner/trunk/classes/admin/class-editor.php
r3316864 r3332738 28 28 // Bail early when we're on the site-editor.php page. 29 29 $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' ) ) { 31 34 return; 32 35 } -
progress-planner/trunk/classes/wp-cli/class-task-command.php
r3316864 r3332738 64 64 65 65 $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 69 93 } 70 94 … … 189 213 */ 190 214 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 ); 193 216 if ( empty( $tasks ) ) { 194 217 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 }202 218 } 203 219 -
progress-planner/trunk/progress-planner.php
r3326194 r3332738 10 10 * Requires at least: 6.6 11 11 * Requires PHP: 7.4 12 * Version: 1.6. 212 * Version: 1.6.3 13 13 * Author: Team Emilia Projects 14 14 * Author URI: https://prpl.fyi/about -
progress-planner/trunk/readme.txt
r3326194 r3332738 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.6. 27 Stable tag: 1.6.3 8 8 License: GPL3+ 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 110 110 111 111 == Changelog == 112 113 = 1.6.3 = 114 115 Bugs 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. 112 120 113 121 = 1.6.2 =
Note: See TracChangeset
for help on using the changeset viewer.