Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions classes/class-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,40 @@ abstract class Connector {
*
* @var string
*/
public $name = null;
public string $name = '';

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array();
public array $actions = array();

/**
* Store delayed logs
*
* @var array
*/
public $delayed = array();
public array $delayed = array();

/**
* Previous Stream entry in same request
* Previous Stream entry in same request.
* Nothing in the plugin writes this property.
*
* @var int
* @var int|null
*/
public $prev_stream = null;
public ?int $prev_stream = null;

/**
* Register connector in the WP Admin
*
* @var bool
*/
public $register_admin = true;
public bool $register_admin = true;

/**
* Register connector in the WP Frontend
*
* @var bool
*/
public $register_frontend = true;
public bool $register_frontend = true;

/**
* Holds connector registration status flag.
*
* @var bool
*/
private $is_registered = false;
private bool $is_registered = false;

/**
* Return translated connector label.
Expand Down
16 changes: 4 additions & 12 deletions connectors/class-connector-acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
class Connector_ACF extends Connector {
/**
* Connector slug
*
* @var string
*/
public $name = 'acf';
public string $name = 'acf';

/**
* Holds tracked plugin minimum version required
Expand All @@ -27,10 +25,8 @@ class Connector_ACF extends Connector {

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'save_post',
'post_updated',
'added_post_meta',
Expand All @@ -47,17 +43,13 @@ class Connector_ACF extends Connector {

/**
* Cached location rules, used in shutdown callback to verify changes in meta
*
* @var array
*/
public $cached_location_rules = array();
public array $cached_location_rules = array();

/**
* Cached field values updates, used by shutdown callback to verify actual changes
*
* @var array
*/
public $cached_field_values_updates = array();
public array $cached_field_values_updates = array();


/**
Expand Down
28 changes: 7 additions & 21 deletions connectors/class-connector-bbpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
class Connector_BbPress extends Connector {
/**
* Connector slug
*
* @var string
*/
public $name = 'bbpress';
public string $name = 'bbpress';

/**
* Holds tracked plugin minimum version required
Expand All @@ -27,49 +25,37 @@ class Connector_BbPress extends Connector {

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'bbp_toggle_topic_admin',
);

/**
* Tracked option keys
*
* @var array
*/
public $options = array(
public array $options = array(
'bbpress' => null,
);

/**
* Flag to stop logging update logic twice
*
* @var bool
*/
public $is_update = false;
public bool $is_update = false;

/**
* Stores an activity to be deleted for use across multiple callbacks.
*
* @var bool
*/
public $deleted_activity = false;
public bool $deleted_activity = false;

/**
* Stores post data of an activity to be deleted for use across multiple callbacks.
*
* @var array
*/
public $delete_activity_args = array();
public array $delete_activity_args = array();

/**
* Flag for ignoring irrelevant activity deletions.
*
* @var bool
*/
public $ignore_activity_bulk_deletion = false;
public bool $ignore_activity_bulk_deletion = false;

/**
* Check if plugin dependencies are satisfied and add an admin notice if not
Expand Down
12 changes: 3 additions & 9 deletions connectors/class-connector-blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@
class Connector_Blogs extends Connector {
/**
* Connector slug
*
* @var string
*/
public $name = 'blogs';
public string $name = 'blogs';

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'wp_initialize_site',
'wp_delete_site',
'wpmu_activate_blog',
Expand All @@ -43,10 +39,8 @@ class Connector_Blogs extends Connector {

/**
* Register connector in the WP Frontend
*
* @var bool
*/
public $register_frontend = false;
public bool $register_frontend = false;

/**
* Return translated connector label
Expand Down
20 changes: 5 additions & 15 deletions connectors/class-connector-buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ class Connector_BuddyPress extends Connector {

/**
* Connector slug
*
* @var string
*/
public $name = 'buddypress';
public string $name = 'buddypress';

/**
* Holds tracked plugin minimum version required
Expand All @@ -28,10 +26,8 @@ class Connector_BuddyPress extends Connector {

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'update_option',
'add_option',
'delete_option',
Expand Down Expand Up @@ -70,21 +66,17 @@ class Connector_BuddyPress extends Connector {

/**
* Tracked option keys
*
* @var array
*/
public $options = array(
public array $options = array(
'bp-active-components' => null,
'bp-pages' => null,
'buddypress' => null,
);

/**
* Flag to stop logging update logic twice
*
* @var bool
*/
public $is_update = false;
public bool $is_update = false;

/**
* Stores an activity to be deleted for use across multiple callbacks.
Expand All @@ -102,10 +94,8 @@ class Connector_BuddyPress extends Connector {

/**
* Flag for ignoring irrelevant activity deletions.
*
* @var bool
*/
public $ignore_activity_bulk_deletion = false;
public bool $ignore_activity_bulk_deletion = false;

/**
* Check if plugin dependencies are satisfied and add an admin notice if not
Expand Down
8 changes: 2 additions & 6 deletions connectors/class-connector-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@
class Connector_Comments extends Connector {
/**
* Connector slug
*
* @var string
*/
public $name = 'comments';
public string $name = 'comments';

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'comment_flood_trigger',
'wp_insert_comment',
'edit_comment',
Expand Down
28 changes: 7 additions & 21 deletions connectors/class-connector-edd.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ class Connector_EDD extends Connector {

/**
* Connector slug
*
* @var string
*/
public $name = 'edd';
public string $name = 'edd';

/**
* Holds tracked plugin minimum version required
Expand All @@ -28,10 +26,8 @@ class Connector_EDD extends Connector {

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array(
public array $actions = array(
'update_option',
'add_option',
'delete_option',
Expand All @@ -53,40 +49,30 @@ class Connector_EDD extends Connector {

/**
* Tracked option keys
*
* @var array
*/
public $options = array();
public array $options = array();

/**
* Tracking registered Settings, with overridden data
*
* @var array
*/
public $options_override = array();
public array $options_override = array();

/**
* Tracking user meta updates related to this connector
*
* @var array
*/
public $user_meta = array(
public array $user_meta = array(
'edd_user_public_key',
);

/**
* Flag status changes to not create duplicate entries
*
* @var bool
*/
public $is_discount_status_change = false;
public bool $is_discount_status_change = false;

/**
* Flag status changes to not create duplicate entries
*
* @var bool
*/
public $is_payment_status_change = false;
public bool $is_payment_status_change = false;

/**
* Check if plugin dependencies are satisfied and add an admin notice if not
Expand Down
12 changes: 3 additions & 9 deletions connectors/class-connector-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@
class Connector_Editor extends Connector {
/**
* Connector slug
*
* @var string
*/
public $name = 'editor';
public string $name = 'editor';

/**
* Actions registered for this connector
*
* @var array
*/
public $actions = array();
public array $actions = array();

/**
* Actions registered for this connector
Expand All @@ -34,10 +30,8 @@ class Connector_Editor extends Connector {

/**
* Register connector in the WP Frontend
*
* @var bool
*/
public $register_frontend = false;
public bool $register_frontend = false;

/**
* Register all context hooks
Expand Down
Loading
Loading