Recent

Tools_Pageclass

Tools_Page

Generates the Tools page.

Namespace: WebberZone\WFP\Admin
Since: 3.1.0
Source: includes/admin/class-tools-page.php line 25

Methods

__construct()

Constructor class.

Since: 3.1.0
Line: 41

public function __construct(  );

admin_menu()

Admin Menu.

Since: 3.1.0
Line: 56

public function admin_menu(  );

admin_enqueue_scripts()

Enqueue scripts in admin area.

Since: 3.1.0
Line: 76

public function admin_enqueue_scripts( $hook );
Type Name Description
string $hook The current admin page.

render_page()

Render the tools settings page.

Since: 3.1.0
Line: 100

public function render_page(  ): void;

Returns: void

process_settings_export() static

Process a settings export that generates a .json file of the Top 10 settings

Since: 3.1.0
Line: 265

static public function process_settings_export(  );

process_settings_import() static

Process a settings import from a json file

Since: 3.1.0
Line: 289

static public function process_settings_import(  );

process_data_export() static

Process a tracking data export that streams a .csv file of the followed posts data.

Since: 3.4.0
Line: 340

static public function process_data_export(  ): void;

Returns: void

write_csv() static

Write the tracking data to a stream as CSV.

Reads the data in batches so that memory use stays flat however much tracking data the site holds.

Since: 3.4.0
Line: 412

static public function write_csv( $handle, $flush = ... ): int;
Type Name Description
resource $handle Open stream to write to.
bool $flush Whether to flush the output buffer after each batch. Only useful when streaming to the browser.

Returns: int — Number of data rows written, not counting the heading row.

process_delete_tracking_data() static

Process a request to delete the tracking data, keeping the settings.

Since: 3.4.0
Line: 486

static public function process_delete_tracking_data(  ): void;

Returns: void

process_delete_all_data() static

Process a request to delete every trace of the plugin and deactivate it.

The plugin has to be deactivated in the same request: while it is active it recreates its settings on the next page load, which would make the deletion look as though it had failed.

Since: 3.4.0
Line: 506

static public function process_delete_all_data(  ): void;

Returns: void

get_delete_keyword() static

The keyword the user has to type to confirm deleting all the plugin data.

Since: 3.4.0
Line: 540

static public function get_delete_keyword(  ): string;

Returns: string — Confirmation keyword.

is_delete_confirmed() static

Check whether the typed confirmation matches the delete keyword.

Accepts the translated keyword, and always the English one, so that the documented instruction works whatever the site language is.

Since: 3.4.0
Line: 555

static public function is_delete_confirmed( $input ): bool;
Type Name Description
string $input What the user typed.

Returns: bool — True if the deletion is confirmed.

help_tabs() static

Generates the Tools help page.

Since: 3.1.0
Line: 702

static public function help_tabs(  );