REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.30 KB
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskListSection.php
Text
Base64
<?php /** * Handles storage and retrieval of a task list section */ namespace Automattic\WooCommerce\Admin\Features\OnboardingTasks; /** * Task List section class. * * @deprecated 7.2.0 */ class TaskListSection { /** * Title. * * @var string */ public $id = ''; /** * Title. * * @var string */ public $title = ''; /** * Description. * * @var string */ public $description = ''; /** * Image. * * @var string */ public $image = ''; /** * Tasks. * * @var array */ public $task_names = array(); /** * Parent task list. * * @var TaskList */ protected $task_list; /** * Constructor * * @param array $data Task list data. * @param TaskList|null $task_list Parent task list. */ public function __construct( $data = array(), $task_list = null ) { $defaults = array( 'id' => '', 'title' => '', 'description' => '', 'image' => '', 'tasks' => array(), ); $data = wp_parse_args( $data, $defaults ); $this->task_list = $task_list; $this->id = $data['id']; $this->title = $data['title']; $this->description = $data['description']; $this->image = $data['image']; $this->task_names = $data['task_names']; } /** * Returns if section is complete. * * @return boolean; */ private function is_complete() { $complete = true; foreach ( $this->task_names as $task_name ) { if ( null !== $this->task_list && isset( $this->task_list->task_class_id_map[ $task_name ] ) ) { $task = $this->task_list->get_task( $this->task_list->task_class_id_map[ $task_name ] ); if ( $task->can_view() && ! $task->is_complete() ) { $complete = false; break; } } } return $complete; } /** * Get the list for use in JSON. * * @return array */ public function get_json() { return array( 'id' => $this->id, 'title' => $this->title, 'description' => $this->description, 'image' => $this->image, 'tasks' => array_map( function( $task_name ) { if ( null !== $this->task_list && isset( $this->task_list->task_class_id_map[ $task_name ] ) ) { return $this->task_list->task_class_id_map[ $task_name ]; } return ''; }, $this->task_names ), 'isComplete' => $this->is_complete(), ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Tasks
DIR
-
drwxr-xr-x
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DeprecatedExtendedTask.php
2.67 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DeprecatedOptions.php
2.50 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Init.php
1.08 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Task.php
11.94 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TaskList.php
9.11 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TaskLists.php
11.08 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TaskListSection.php
2.30 KB
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TaskTraits.php
971 B
lrw-r--r--
2026-03-03 06:10:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).