Skip to content

WP_Routines_Routines

Phil Faciana edited this page Jan 4, 2023 · 2 revisions

\WP_Routines\Routines


A collection of Pages

Synopsis


namespace WP_Routines;

class Routines {

  /* No Public Constants */

  /* No Public Properties */

  /* Public Methods */
  public addPage ( string|array|Page $config ) : Page|FALSE { }
  public addTask ( string|array|callable|Task $task ) : Task { }
  public addTasks ( Tasks $tasks ) : Tasks { }
  public get_instance (  ) : Routines { }

}  

Table of Contents


Methods


Examples


Example #1

# Using WP Routines...
add_action( 'wp_routines', function ( WP_Routines\Routines $routines ) {
    $page = $routines->addPage( [ ...$some_config ] );
} );

Go back to Table of Contents

WP_Routines

  • Page - A collection of task groups or Tasks
  • Routines - A collection of Pages
  • Stream - The layer that communicates with the ajax call to stream data
  • Task - A class that represents a single function/task to be executed on a Page
  • Tasks - This is an abstract class. When extended represents a group of Tasks on a Page

Clone this wiki locally