File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,27 +157,15 @@ public function get_stats( \WP_REST_Request $request ) {
157157 // Timezone offset.
158158 $ data ['timezone_offset ' ] = \wp_timezone ()->getOffset ( new \DateTime ( 'midnight ' ) ) / 3600 ;
159159
160- $ todo_items = \progress_planner ()->get_todo ()->get_pending_items ();
161- $ pending_todo_items = [];
162- foreach ( $ todo_items as $ item ) {
163- $ pending_todo_items [] = $ item ['title ' ];
164- }
165- $ data ['todo ' ] = $ pending_todo_items ;
166-
167160 // Pending tasks include remote tasks.
168161 $ ravis_recommendations = \progress_planner ()->get_suggested_tasks ()->get_pending_tasks_with_details ();
169162 $ data ['recommendations ' ] = [];
170163 foreach ( $ ravis_recommendations as $ recommendation ) {
171-
172- // Skip user tasks.
173- if ( 'user ' === $ recommendation ['provider_id ' ] ) {
174- continue ;
175- }
176-
177164 $ data ['recommendations ' ][] = [
178- 'id ' => $ recommendation ['task_id ' ],
179- 'title ' => $ recommendation ['title ' ],
180- 'url ' => isset ( $ recommendation ['url ' ] ) ? $ recommendation ['url ' ] : '' ,
165+ 'id ' => $ recommendation ['task_id ' ],
166+ 'title ' => $ recommendation ['title ' ],
167+ 'url ' => isset ( $ recommendation ['url ' ] ) ? $ recommendation ['url ' ] : '' ,
168+ 'provider_id ' => $ recommendation ['provider_id ' ],
181169 ];
182170 }
183171
You can’t perform that action at this time.
0 commit comments