Properties

$instance

$instance : null

Holds the Public static instance of MainWP_Child_Links_Checker.

Type

null — instance of class.

$is_plugin_installed

$is_plugin_installed : boolean

Whether or not the Broken Links Checker Extension is installed.

Type

boolean — Default: false.

Methods

get_class_name()

get_class_name() : string

Get Class Name

Returns

string —

CLASS

__construct()

__construct() 

MainWP_Child_Links_Checker constructor.

Run any time class is called.

action()

action() 

MainWP Broken Links Checker actions: set_showhide, sync_data, sync_links_data, edit_link, unlink, set_dismiss, discard, save_settings, force_recheck.

init()

init() 

MainWP Broken links checker init.

hook_trashed_comment()

hook_trashed_comment(integer  $comment_id) 

Method hook_trashed_comment().

Parameters

integer $comment_id

Comment ID.

save_settings()

save_settings() : array

Save Settings.

Returns

array —

Return $information response array.

force_recheck()

force_recheck() : array

Force link recheck.

Returns

array —

Return $information response array.

initiate_recheck()

initiate_recheck() 

Initiate link recheck.

hook_post_deleted()

hook_post_deleted(integer  $post_id) 

Method hook_post_deleted().

Parameters

integer $post_id

Post ID.

hide_plugin()

hide_plugin(array  $plugins) : mixed

Method hide_plugin().

Parameters

array $plugins

Plugins array.

Returns

mixed —

$plugins array.

update_footer()

update_footer(string  $text) : string

Method update_footer().

Parameters

string $text

Test to add to footer.

Returns

string —

Footer html.

set_showhide()

set_showhide() : array

Show or hide the Broken links checker plugin.

Returns

array —

Return $information response array.

sync_others_data()

sync_others_data(array  $information, array  $data = array()) : array

Sync other broken links data.

Parameters

array $information

Array of information to sync.

array $data

Array of data.

Returns

array —

Return $information response array.

get_sync_data()

get_sync_data() : array

Get synced link data.

Returns

array —

Return $information response array.

get_links_data()

get_links_data() : array<mixed,array>|void

Get links data.

Throws

\MainWP\Child\Exception|\Exception

Error exception.

Returns

array<mixed,array>|void —

Return $information response array or void on failure.

get_count_links()

get_count_links() : array<mixed,array>|void

Count links: broken, redirects, dismissed, warning, all.

Throws

\MainWP\Child\Exception|\Exception

Error exception.

Returns

array<mixed,array>|void —

Return $data response array or void on failure.

links_checker_data()

links_checker_data(mixed  $params) : array

Link checker data.

Parameters

mixed $params

Broken Links parameters.

Throws

\MainWP\Child\Exception|\Exception

Error Exception.

Returns

array —

$return Links Array.

edit_link()

edit_link() : array

Edit Link.

Returns

array —

Return $information response array.

del_file()

del_file() : array

Unlink link.

Returns

array —

Return $information response array.

ui_get_source()

ui_get_source(object  $container, string  $container_field = '') : array|boolean

Get post or comment source.

Parameters

object $container

Instance of container.

string $container_field

Container fields.

Returns

array|boolean —

Array of content or FALSE on failure.

ui_get_source_comment()

ui_get_source_comment(object  $container, string  $container_field = '') : array|boolean

Get comment source.

Parameters

object $container

Instance of container.

string $container_field

Container fields.

Throws

\MainWP\Child\Exception|\Exception

Error Exception.

Returns

array|boolean —

Array of content or FALSE on failure.

ui_get_source_post()

ui_get_source_post(object  $container) : array

Get Post Source.

Parameters

object $container

Instance of container.

Returns

array —

Return array of content.

set_link_dismissed()

set_link_dismissed() : array

Set dismissed link.

Returns

array —

Return $information response array.

discard()

discard() : array

Discard link.

Returns

array —

Return $information response array.