'5.3.0', 'theme' => '5.5.0'); /** * Class constructor. */ public function __construct() { } /** * Returns instance of the class. * * @since 4.7.0 * * @return ET_Core_CompatibilityWarning */ public static function instance() { } /** * Set theme additional properties before it's rendered on Manage Themes page. * * @since 4.7.0 * * @param array $prepared_themes List of available themes. * * @return array */ public function set_theme_additional_properties($prepared_themes) { } /** * Get plugins data for Update Core page. * * The data processing is backported from WP 5.5 with few modification. * * @see {list_plugin_updates()} of WP 5.5 * * @since 4.7.0 * * @return array */ public function get_update_core_plugins_data() { } /** * Get themes data for Update Core page. * * @since 4.7.0 * * @return array */ public function get_update_core_themes_data() { } /** * Enqueue compatibility warning scripts and its local data. * * @since 4.7.0 */ public function enqueue_scripts() { } /** * Overrides table body of plugin updates section. * * The structure is backported from WP 5.5 without any modification. * * @see {list_plugin_updates()} of WP 5.5 * * @since 4.7.0 */ public function overrides_update_core_plugins_table_body() { } /** * Overrides table body of theme updates section. * * The structure is backported from WP 5.5 without any modification. * * @see {list_theme_updates()} of WP 5.5 * * @since 4.7.0 */ public function overrides_update_core_themes_table_body() { } /** * Overrides theme info & details display of Manage Themes. * * The structure is backported from WP 5.5 without any modification. * * @see {wp-admin/themes.php} of WP 5.5 * * @since 4.7.0 */ public function overrides_tmpl_theme() { } /** * Overrides plugin warning display of Plugins list page. * * @see {wp_plugin_update_rows()} of WP 5.5 * * @since 4.7.0 */ public function overrides_plugins_table_rows() { } /** * Display plugin update row with error compatibility. * * @see {wp_plugin_update_row()} of WP 5.5 * * @since 4.7.0 * * @param string $file Plugin basename. * @param array $plugin_data Plugin information. */ public function plugin_update_row_compatibility_error($file, $plugin_data) { } /** * Overrides theme info & details display of Theme Customizer. * * The structure is backported from WP 5.5 without any modification. * * @see {WP_Customize_Theme_Control::content_template()} of WP 5.5 * * @since 4.7.0 */ public function overrides_tmpl_customize_control_theme_content() { } /** * Deactivate incompatible plugin once it's activated. * * The code is backported from WP 5.5 partially. However, not all the code is inlcuded * here because: * - We can't add `RequiresWP: Requires at least` & `RequiresPHP: Requires PHP` plugin * headers via `extra_plugin_headers` hook because the keys & values will be combined. * - On WP 5.3, it requires readme.txt instead of main plugin file. We can simplify it * by directly access main plugin file. * * @see {validate_plugin_requirements()} * * @since 4.7.0 * * @param string $plugin Main plugin file name. */ public static function maybe_deactivate_incompatible_plugin($plugin) { } } /** * HTTP interface class. * * @package ET\Core\HTTP */ // @phpcs:disable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. // @phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name. // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r -- We are purposefully logging the object for debugging purposes. /** * Simple object to hold HTTP request details. * * @since 1.1.0 * * @package ET\Core\HTTP */ class ET_Core_HTTPRequest { /** * The request arguments. * * @var array */ public $ARGS; /** * Whether the request should block. * * @var bool */ public $BLOCKING = \true; /** * The request body. * * @var null|array */ public $BODY = \null; /** * Whether the request is complete. * * @var bool */ public $COMPLETE = \false; /** * The request cookies. * * @var array */ public $COOKIES = array(); /** * The request headers. * * @var array */ public $HEADERS = array(); /** * Whether the request is authentication-related. * * @var bool */ public $IS_AUTH = \false; /** * The request method. * * @var string */ public $METHOD = 'GET'; /** * The name of the owner of this request instance. * * @var string */ public $OWNER; /** * The request URL. * * @var string */ public $URL; /** * The user agent string. * * @var string */ public $USER_AGENT; /** * The data format. * * @var string|null */ public $data_format; /** * Whether the request body is JSON. * * @var bool */ public $JSON_BODY; // phpcs:ignore -- No need to change the class property. /** * Whether to verify SSL certificate. * * @var bool */ public $SSL_VERIFY; // phpcs:ignore -- No need to change the class property. /** * ET_Core_HTTP_Request constructor. * * @param string $url The request URL. * @param string $method HTTP request method. Default is 'GET'. * @param string $owner The name of the owner of this request instance. Default is 'ET_Core'. * @param bool $is_auth Whether or not this request is auth-related. Cache disabled if `true`. Default is `false`. * @param array $body The request body. Default is `null`. * @param bool $is_json_body Whether or not the request body is JSON. Default is `false`. * @param bool $ssl_verify Whether or not to verify the SSL certificate. Default is `true`. * * @return void */ public function __construct($url, $method = 'GET', $owner = 'ET_Core', $is_auth = \false, $body = \null, $is_json_body = \false, $ssl_verify = \true) { } /** * Only include necessary properties when printing this object using {@link var_dump}. * * @return array */ public function __debugInfo() { } /** * Sets the user agent string. */ private function _set_user_agent() { } /** * Prepares the request arguments (to be passed to wp_remote_*()) */ public function prepare_args() { } } // @phpcs:disable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. // @phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name. // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r -- We are purposefully logging the object for debugging purposes. /** * Simple object to hold HTTP response details. * * @since 1.1.0 * * @package ET\Core\HTTP */ class ET_Core_HTTPResponse { // phpcs:ignore -- Legacy file, no need to rename this class. /** * The response cookies. * * @var array */ public $COOKIES; /** * The response data. * * @var string|array */ public $DATA; /** * Whether the response is an error. * * @var bool */ public $ERROR = \false; /** * The error message if `self::$ERROR` is `true`. * * @var string */ public $ERROR_MESSAGE; /** * The response headers. * * @var array */ public $HEADERS; /** * The raw response. * * @var array|WP_Error */ public $RAW_RESPONSE; /** * The request object. * * @var ET_Core_HTTPRequest */ public $REQUEST; /** * The response's HTTP status code. * * @var int */ public $STATUS_CODE; /** * The response status message. * * @var string */ public $STATUS_MESSAGE; /** * ET_Core_HTTP_Response constructor. * * @param ET_Core_HTTPRequest $request The request object. * @param array|WP_Error $response The response data. * * @return void */ public function __construct($request, $response) { } /** * Parse response and save relevant details. * * @return void */ private function _parse_response() { } /** * Only include necessary properties when printing this object using {@link var_dump}. * * @return array */ public function __debugInfo() { } /** * Only include necessary properties when serializing this object for * storage in the WP Transient Cache. * * @return array */ public function __sleep() { } } /** * High level, generic, wrapper for making HTTP requests. It uses WordPress HTTP API under-the-hood. * * @since 1.1.0 * * @package ET\Core\HTTP */ class ET_Core_HTTPInterface { // phpcs:ignore -- Legacy file, no need to rename this class. /** * How much time responses are cached (in seconds). * * @since 1.1.0 * @var int */ protected $_cache_timeout; /** * The request object. * * @var ET_Core_HTTPRequest */ public $request; /** * The response object. * * @var ET_Core_HTTPResponse */ public $response; /** * Whether or not json responses are expected to be received. Default is `true`. * * @var bool */ public $expects_json; /** * The name of the theme/plugin that created this class instance. Default: 'ET_Core'. * * @var string */ public $owner; /** * ET_Core_API_HTTP_Interface constructor. * * @since 1.1.0 * * @param string $owner The name of the theme/plugin that created this class instance. Default: 'ET_Core'. * @param array $request_details Array of config values for the request. Optional. * @param bool $json Whether or not json responses are expected to be received. Default is `true`. * * @return void */ public function __construct($owner = 'ET_Core', $request_details = array(), $json = \true) { } /** * Only include necessary properties when printing this object using {@link var_dump}. * * @return array Debug info. */ public function __debugInfo() { } /** * Only include necessary properties when serializing this object for * storage in the WP Transient Cache. * * @return array */ public function __sleep() { } /** * Creates an identifier key for a request based on the URL and body content. * * @internal * @since 1.1.0 * * @param string $url The request URL. * @param string|string[] $body The request body. * * @return string */ protected static function _get_cache_key_for_request($url, $body) { } /** * Writes request/response info to the error log for failed requests. * * @internal * @since 1.1.0 * * @return void */ protected function _log_failed_request() { } /** * Logs HTTP requests (for debugging purposes when ET_DEBUG is enabled). * Logs both successful and failed requests with appropriate status indicators. * * @since 5.5.0 * * @return void */ protected function _log_request() { } /** * Prepares request to send JSON data. * * @return void */ protected function _setup_json_request() { } /** * Performs a remote HTTP request. Responses are cached for {@see self::$_cache_timeout} seconds using * the {@link https://goo.gl/c0FSMH WP Transients API}. * * @since 1.1.0 * * @return void */ public function make_remote_request() { } /** * Replaces the current request object with a new instance. * * @param string $url The request URL. * @param string $method The HTTP request method. * @param bool $is_auth Whether or not this request is auth-related. Cache disabled if `true`. Default is `false`. * @param mixed? $body The request body. Default is `null`. * @param bool $json_body Whether or not the request body is JSON. Default is `false`. * @param bool $ssl_verify Whether or not to verify the SSL certificate. Default is `true`. * * @return void */ public function prepare_request($url, $method = 'GET', $is_auth = \false, $body = \null, $json_body = \false, $ssl_verify = \true) { } } class ET_Core_Logger { /** * @var ET_Core_Data_Utils */ protected static $_; /** * Checksum for every log message output during the current request. * * @var string[] */ protected static $HISTORY = array(); /** * Writes a message to the debug log if it hasn't already been written once. * * @since 3.10 * * @param mixed $message * @param int $bt_index * @param boolean $log_ajax Whether or not to log on AJAX calls. */ protected static function _maybe_write_log($message, $bt_index = 4, $log_ajax = \true) { } /** * Writes a message to the WP Debug and PHP Error logs. * * @param string $message * @param int $bt_index */ private static function _write_log($message, $bt_index = 4) { } /** * Writes message to the logs if {@link WP_DEBUG} is `true`, otherwise does nothing. * * @since 1.1.0 * * @param mixed $message * @param int $bt_index * @param boolean $log_ajax Whether or not to log on AJAX calls. */ public static function debug($message, $bt_index = 4, $log_ajax = \true) { } public static function disable_php_notices() { } /** * Writes an error message to the logs regardless of whether or not debug mode is enabled. * * @since 1.1.0 * * @param mixed $message * @param int $bt_index */ public static function error($message, $bt_index = 4) { } public static function enable_php_notices() { } public static function initialize() { } public static function php_notices_enabled() { } } /** * Manages a frontend inline CSS or JavaScript resource. * * If possible, the resource will be served as a static file for better performance. It can be * tied to a specific post or it can be 'global'. The resource can be output, static or inline, * to one of four locations on the page: * * * `head-early`: right AFTER theme styles have been enqueued * * `head` : right BEFORE the theme and wp's inline custom css * * `head-late` : right AFTER the theme and wp's inline custom css * * `footer` : in the footer * * The first time the class is instantiated, a static callback method will be registered for each * output location. Inside each callback, we'll iterate over any/all instances that are assigned * to the current output location and perform the following steps: * * 1. If a static file exists for the resource, go to the next step. Otherwise, try to create * a static file for the resource if it has `data`. If it doesn't have `data`, assign it to * the next output location and then move on to the next resource (continue). * 2. If a static file exists for the resource, enqueue it (via WP or manually) and then move on * to the next resource (continue). If no static file exists, go to the next step. * 3. Output the resource inline. * * @since 2.0 * * @package ET\Core */ class ET_Core_PageResource { /** * Lock file. * * @var string[] */ protected static $_lock_file; /** * Track if global timestamp has been updated in this request. * * @var bool */ protected static $_global_timestamp_updated = \false; /** * Onload attribute for stylesheet output. * * @var string[] */ private static $_onload = ''; /** * Output locations. * * @var string[] */ protected static $_output_locations = array('head-early', 'head', 'head-late', 'footer'); /** * Resource owners. * * @var string[] */ protected static $_owners = array('divi', 'builder', 'epanel', 'epanel_temp', 'extra', 'core', 'bloom', 'monarch', 'custom', 'all'); /** * Resource scopes. * * @var string[] */ protected static $_scopes = array('global', 'post'); /** * Temp DIRS. * * @var array */ protected static $_temp_dirs = array(); /** * Directories where files were created during this request. * Used to track which directories need stale file cleanup. * * @var array */ public static $_directories_with_new_files = array(); /** * Cached taxonomy folder name for the current request. * Used to ensure taxonomy pages always use the taxonomy folder, * even when is_tax() becomes unreliable later in the request. * * @var string|null */ protected static $_cached_taxonomy_folder = \null; /** * Cache for resolved folder names to avoid repeated lookups. * Stores folder names keyed by post_id for performance optimization. * * @var array */ protected static $_cache_folder_cache = array(); /** * Check if we're using a taxonomy folder for the current request. * * @return bool */ public static function is_using_taxonomy_folder() { } /** * Get cache folder name for a given post_id or object_id. * Consolidates logic used by both PageResource and DynamicAssets. * * @param int|string $post_id_or_object_id The post ID or object ID. * @return string Cache folder name (e.g., 'taxonomy/product_brand/417', 'search', 'author/1', etc.). */ public static function get_cache_folder_name($post_id_or_object_id) { } /** * Check if a folder name indicates an archive/taxonomy folder. * * @param string $folder_name The folder name to check. * @return bool True if the folder name indicates an archive folder. */ public static function is_archive_folder($folder_name) { } /** * Determine if post_id should be excluded from filename. * Consolidates logic used by both PageResource and DynamicAssets. * * @param int|string $post_id The post ID. * @param string $slug The resource slug (may contain TB IDs). * @param string $folder_name Optional. The cache folder name. If not provided, will be determined. * @return bool True if post_id should be excluded from filename. */ public static function should_exclude_post_id_from_filename($post_id, $slug, $folder_name = \null) { } /** * Resource types. * * @var string[] */ protected static $_types = array('style', 'script'); /** * Whether or not we have write access to the filesystem. * * @var bool */ protected static $_can_write; /** * Request ID. * * @var int */ protected static $_request_id; /** * Request time. * * @var string */ protected static $_request_time; /** * All instances of this class. * * @var ET_Core_PageResource[] { * * @type ET_Core_PageResource $slug * } */ protected static $_resources; /** * All instances of this class organized by output location and sorted by priority. * * @var array[] { * * @type array[] $location {@see self::$_output_locations} { * * @type ET_Core_PageResource[] $priority { * * @type ET_Core_PageResource $slug * } * } * } */ protected static $_resources_by_location; /** * All instances of this class organized by scope. * * @var array[] { * * @type ET_Core_PageResource[] $post|$global { * * @type ET_Core_PageResource $slug * } * } */ protected static $_resources_by_scope; /** * @var string */ public static $WP_CONTENT_DIR; /** * @var string */ public static $current_output_location; /** * @var ET_Core_Data_Utils */ public static $data_utils; /** * @var \WP_Filesystem_Base|null */ public static $wpfs; /** * The absolute path to the directory where the static resource will be stored. * * @var string */ public $base_dir; /** * The absolute path to the static resource on the server. * * @var string */ public $path; /** * Temp DIR. * * @var array */ public $temp_dir; /** * The absolute URL through which the static resource can be downloaded. * * @var string */ public $url; /** * The data/contents for/of the static resource sorted by priority. * * @var array */ public $data; /** * Whether or not this resource has been disabled. * * @var bool */ public $disabled; /** * Whether or not the static resource file has been enqueued. * * @var bool */ public $enqueued; /** * Whether or not this resource is forced inline. * * @var bool */ public $forced_inline; /** * @var string */ public $filename; /** * Whether or not the resource has already been output to the page inline. * * @var bool */ public $inlined; /** * The owner of this instance. * * @var string */ public $owner; /** * The id of the post to which this resource belongs. * * @var string */ public $post_id; /** * The priority of this resource. * * @var int */ public $priority; /** * A unique identifier for this resource. * * @var string */ public $slug; /** * The resource type (style|script). * * @var string */ public $type; /** * The output location during which this resource's static file should be generated. * * @var string */ public $write_file_location; /** * The output location where this resource should be output. * * @var string */ public $location; /** * ET_Core_PageResource constructor * * @param string $owner The owner of the instance (core|divi|builder|bloom|monarch|custom). * @param string $slug A string that uniquely identifies the resource. * @param string|int $post_id The post id that the resource is associated with or `global`. * If `null`, {@link get_the_ID()} will be used. * @param string $type The resource type (style|script). Default: `style`. * @param string $location Where the resource should be output (head|footer). Default: `head`. */ public function __construct($owner, $slug, $post_id = \null, $priority = 10, $location = 'head-late', $type = 'style') { } /** * Activates the class */ public static function startup() { } /** * Clean up stale CSS files in directories where new files were created. * * After regenerating CSS files for a page, old stale CSS files that weren't * regenerated should be removed. This prevents accumulation of unused stale files. * * @return void */ protected static function _cleanup_stale_files_in_directories() { } /** * Cleanup and save */ public static function shutdown() { } protected static function _assign_output_location($location, $resource) { } /** * Enqueues static file for provided script resource. * * @param ET_Core_PageResource $resource page resources. */ protected static function _enqueue_script($resource) { } /** * Enqueues static file for provided style resource. * * @param ET_Core_PageResource $resource */ protected static function _enqueue_style($resource) { } /** * Returns the next output location. * * @see self::$_output_locations * * @return string */ protected static function _get_next_output_location() { } /** * Creates static resource files for an output location if needed. * * @param string $location {@link self::$_output_locations}. */ protected static function _maybe_create_static_resources($location) { } /** * Enqueues static files for an output location if available. * * @param string $location {@link self::$_output_locations}. */ protected static function _maybe_enqueue_static_resources($location) { } /** * Outputs all non-enqueued resources for an output location inline. * * @param string $location {@link self::$_output_locations}. */ protected static function _maybe_output_inline_resources($location) { } /** * Registers necessary callbacks. */ protected static function _register_callbacks() { } /** * Initializes the WPFilesystem class. */ protected static function _setup_wp_filesystem() { } /** * Unassign a resource from an output location. * * @param string $location {@link self::$_output_locations}. * @param ET_Core_PageResource $resource */ protected static function _unassign_output_location($location, $resource) { } protected static function _validate_property($property, $value) { } /** * Determine if static CSS should be forced inline for paginated-loop requests. * * @return bool */ public static function should_force_inline_for_paginated_request() { } /** * Whether or not we are able to write to the filesystem. * * @return bool */ public static function can_write_to_filesystem() { } /** * Output Location: footer * {@see 'wp_footer' (20) Allow third-party extensions some room to do what they do} */ public static function footer_output_cb() { } /** * Returns the absolute path to our cache directory. * * @since 4.0.8 Removed `$path_type` param b/c cache directory might not be located under wp-content. * @since 3.0.52 * * @return string */ public static function get_cache_directory() { } /** * Returns all current resources. * * @return array {@link self::$_resources} */ public static function get_resources() { } /** * Returns the current resources for the provided output location, sorted by priority. * * @param string $location The desired output location {@see self::$_output_locations}. * * @return array[] { * * @type ET_Core_PageResource[] $priority { * * @type ET_Core_PageResource $slug Resource. * ... * } * ... * } */ public static function get_resources_by_output_location($location) { } /** * Returns the current resources for the provided scope. * * @param string $scope The desired scope (post|global). * * @return ET_Core_PageResource[] */ public static function get_resources_by_scope($scope) { } /** * Output Location: head-early * {@see 'wp_enqueue_scripts' (11) Should run right after the theme enqueues its styles.} */ public static function head_early_output_cb() { } /** * Output Location: head * {@see 'wp_head' (99) Must run BEFORE the theme and WP's custom css callbacks.} */ public static function head_output_cb() { } /** * Output Location: head-late * {@see 'wp_head' (103) Must run AFTER the theme and WP's custom css callbacks.} */ public static function head_late_output_cb() { } /** * {@see 'widget_update_callback'} * * @param array $instance Widget settings being saved. */ public static function widget_update_callback_cb($instance) { } /** * {@see 'customize_save_after'} * * @param WP_Customize_Manager $manager */ public static function customize_save_after_cb($manager) { } /** * {@see 'save_post'} * * @param int $post_id * @param WP_Post $post * @param bool $update */ public static function save_post_cb($post_id, $post, $update) { } /** * Remove static resources for a post, or optionally all resources, if any exist. * * @param string $post_id id of post. * @param string $owner owner of file. * @param bool $force remove all resources. * @param string $slug file slug. * @param bool $preserve_vb_files Whether to preserve files containing "-vb-" string. Default false. * @param bool $delete_files Whether to delete files immediately instead of marking as stale. Default false. */ public static function remove_static_resources($post_id, $owner = 'core', $force = \false, $slug = 'all', $preserve_vb_files = \false, $delete_files = \false) { } /** * Remove static resources action. * * @param string $post_id id of post. * @param string $owner owner of file. * @param bool $force remove all resources. * @param string $slug file slug. * @param bool $preserve_vb_files Whether to preserve files containing "-vb-" string. Default false. * @param bool $delete_files Whether to delete files immediately instead of marking as stale. Default false. */ public static function do_remove_static_resources($post_id, $owner = 'core', $force = \false, $slug = 'all', $preserve_vb_files = \false, $delete_files = \false) { } /** * Clear post meta caches for dynamic assets. * * Clears post meta caches like _divi_dynamic_assets_cached_feature_used for the given post ID(s). * This is used when clearing caches after saving posts or Theme Builder templates. * * @since 5.0.0 * * @param string|int|array $post_ids Post ID(s) to clear caches for. Can be: * - A single post ID (int) * - 'all' (string) to clear all posts * - An array of post IDs * - Empty string to clear all posts * * @return void */ public static function clear_post_meta_caches($post_ids) { } /** * Decide whether to use global timestamp vs individual markers. * * Use global timestamp ONLY for true "clear all" operations. * Use individual markers for specific posts/owners to avoid marking entire site as stale. * * @param string $post_id Post ID or 'all'. * @param string $owner Owner or 'all'. * @param string $slug Slug or 'all'. * * @return bool True to use global timestamp, false to use individual markers. */ protected static function _should_use_global_timestamp($post_id, $owner, $slug) { } /** * Check if a file is a valid Divi CSS file that can be deleted. * * @param string $file_path Full path to the file. * * @return bool True if file is a valid Divi CSS file, false otherwise. */ protected static function _is_valid_divi_css_file($file_path) { } /** * Mark global cache as cleared using a timestamp file. * * O(1) operation - just write one timestamp file regardless of cache size. * * @param string $cache_dir Cache directory path. * @param bool $delete_files Whether to delete files immediately instead of marking as stale. Default false. */ protected static function _mark_global_cache_cleared($cache_dir, $delete_files = \false) { } /** * Mark specific files as stale using companion marker files. * * Creates a .stale file next to each CSS file. Only used for surgical clears. * * @param array $files Array of file paths to mark as stale. * @param bool $delete_files Whether to delete files immediately instead of marking as stale. Default false. */ protected static function _mark_files_stale($files, $delete_files = \false) { } /** * Check if a CSS file is marked as stale and needs regeneration. * * Uses two-layer detection: * 1. Global timestamp check (fastest, catches all mass operations). * 2. Companion .stale marker check (for surgical clears). * * @since 5.0.0 * * @param string $file_path File path to check. * * @return bool True if file is marked as stale, false otherwise. */ public static function is_file_stale($file_path) { } /** * Remove stale marker after file regeneration. * * Called after successfully writing a new CSS file. * * @since 5.0.0 * * @param string $file_path File path to remove stale marker from. * * @return void */ public static function remove_stale_marker($file_path) { } public static function wpfs() { } protected function _initialize_resource() { } protected function _register_resource() { } public function get_data($context) { } /** * Whether or not a static resource exists on the filesystem for this instance. * * Checks both that the file exists and that it's not marked as stale. * * @return bool */ public function has_file() { } /** * Set the resource's data. * * @param string $data * @param int $priority */ public function set_data($data, $priority = 10) { } public function set_output_location($location) { } public function unregister_resource() { } } /** * Handles the portability workflow. * * @package ET\Core\Portability */ class ET_Core_Portability { /** * Current instance. * * @since 2.7.0 * * @type object */ public $instance; /** * @var ET_Core_Data_Utils */ protected static $_; /** * Whether or not an import is in progress. * * @since 3.0.99 * * @var bool */ protected static $_doing_import = \false; /** * Constructor. * * @param string $context Portability context previously registered. */ public function __construct($context) { } public static function doing_import() { } /** * Whether options-type portability for this context may read or write WordPress Additional CSS (`wp_custom_css`). * * Theme Options and Customizer exports include Additional CSS for Customizer parity (Divi core 6d89d3417e). * Role Editor (`et_pb_roles`) must not bundle or apply global CSS (#49101). New `options` contexts default * to excluding Additional CSS unless explicitly allowlisted here. * * @since 5.2.0 * * @return bool */ protected function _options_context_includes_wp_custom_css() { } /** * Import a previously exported layout. * * @since 3.10 Return the result of the import instead of dieing. * @since 2.7.0 * * @param string $file_context Accepts 'upload', 'sideload'. Default 'upload'. * * @return bool|array */ public function import($file_context = 'upload') { } /** * Updates null preset IDs in post_content using pre-built default preset arrays. * * @param string $content The imported post_content. * @param array $default_module_presets Module default IDs [module_name => preset_id]. * @param array $default_group_presets Group default IDs [group_name => preset_id]. * * @return string Updated post_content. */ protected static function _update_preset_ids_in_content($content, $default_module_presets, $default_group_presets) { } /** * Generates UUIDs for the D4 presets to avoid collisions. * * @since 4.5.0 * * @param array $global_presets - The Global Presets to be imported. * * @return array - The list of module types for which preset ids have been changed. */ public function prepare_to_import_d4_layout_presets(&$global_presets) { } /** * Initiate Export. * * @since 2.7.0 * * @param bool $return * * @return null|array */ public function export($return = \false, $include_used_presets = \false) { } /** * Export canvases for a post. * * Exports local canvases from postmeta and global canvases that are targeted by interactions * or that append to the main canvas. * * @since 5.0.0 * * @param int $post_id Post ID. * @param string $content Post content (serialized Gutenberg blocks). * * @return array Canvas data structure with 'local' and 'global' keys. */ private function _export_canvases($post_id, $content) { } /** * Export global canvases targeted by interactions. * * Finds global canvases that contain modules with interactionTarget attributes matching * the target IDs extracted from interactions in the main content. * * @since 5.0.0 * * @param string $content Post content to extract interaction targets from. * @param array $exported_canvases Canvas data structure (passed by reference to add to it). * * @return void */ private function _export_canvases_targeted_by_interactions($content, &$exported_canvases) { } /** * Export global canvases that have appendToMainCanvas set. * * These canvases will be appended to the main canvas on the frontend, so they should be included in exports. * Note: Local canvases are already exported, so we only need to check global canvases. * * @since 5.0.0 * * @param int $post_id Post ID (unused but kept for consistency). * @param array $exported_canvases Canvas data structure (passed by reference to add to it). * * @return void */ private function _export_canvases_that_append_to_main($post_id, &$exported_canvases) { } /** * Export global canvases matching a condition. * * Helper function to reduce code duplication when exporting global canvases. * Handles common logic: fetching global canvas posts, filtering archived/existing canvases, * and building the canvas data structure. * * @since 5.0.0 * * @param array $exported_canvases Canvas data structure (passed by reference to add to it). * @param callable $condition_callback Callback function that receives ($post, $canvas_content) and returns bool. * Should return true if the canvas should be exported. * * @return void */ private function _export_global_canvases_matching_condition(&$exported_canvases, callable $condition_callback) { } /** * Check if canvas content contains any of the target IDs. * * Searches for interactionTarget attributes in canvas content that match any of the provided target IDs. * Handles both simple and nested interactionTarget structures. * * @since 5.0.0 * * @param string $canvas_content Canvas content (serialized Gutenberg blocks). * @param string[] $target_ids Array of target IDs to search for. * * @return bool True if canvas content contains any of the target IDs, false otherwise. */ private function _canvas_content_contains_target($canvas_content, $target_ids) { } /** * Build global canvas export array structure. * * Helper function to create a consistent global canvas export data structure. * * @since 5.0.0 * * @param string $canvas_id Canvas ID. * @param object $post WordPress post object. * @param string $canvas_content Canvas content (serialized Gutenberg blocks). * * @return array Global canvas export data structure. */ private function _build_global_canvas_export_array($canvas_id, $post, $canvas_content) { } /** * Build local canvas export array structure. * * Helper function to create a consistent local canvas export data structure. * * @since 5.0.0 * * @param string $canvas_id Canvas ID. * @param array $canvas_meta Canvas metadata array. * @param string $canvas_content Canvas content (serialized Gutenberg blocks). * * @return array Local canvas export data structure. */ private function _build_local_canvas_export_array($canvas_id, $canvas_meta, $canvas_content) { } /** * Get canvas metadata from a WordPress post object. * * Helper function to extract canvas metadata (created_at, append_to_main) from a post. * * @since 5.0.0 * * @param object $post WordPress post object. * * @return array Canvas metadata with 'created_at' and 'append_to_main' keys. */ private function _get_canvas_meta_from_post($post) { } /** * Import canvases for a post. * * Imports local canvases as postmeta and global canvases as et_pb_canvas post types. * * @since 5.0.0 * * @param int $post_id Post ID. * @param array $canvases Canvas data structure with 'local' and 'global' keys. * * @return void */ private function _import_canvases($post_id, $canvases) { } /** * Import a single canvas (local or global). * * Helper function to reduce code duplication when importing canvases. * Handles both local and global canvas import logic. * * @since 5.0.0 * * @param string $canvas_id Canvas ID. * @param array $canvas_data Canvas data from import. * @param int|null $parent_post_id Parent post ID for local canvases, null for global. * @param array $existing_posts Array of existing posts found for this canvas. * @param bool $is_local Whether this is a local canvas. * * @return void */ private function _import_single_canvas($canvas_id, $canvas_data, $parent_post_id, $existing_posts, $is_local) { } /** * Serialize a single layout post in chunks. * * @since 4.0 * * @param integer $id Unique ID to represent this layout serialization. * @param integer $post_id * @param string $content * @param array $theme_builder_meta * @param integer $chunk * * @return array */ public function serialize_layout($id, $post_id, $content, $theme_builder_meta = array(), $chunk = 0) { } /** * Serialize Theme Builder templates in chunks. * * @since 4.0 * * @param integer $id Unique ID to represent this theme builder serialization process. * @param array $step * @param integer $steps * @param integer $step_index * @param integer $chunk * * @return array|false */ public function serialize_theme_builder($id, $step, $steps, $step_index = 0, $chunk = 0) { } /** * Export Theme Builder templates in chunks. * * @since 4.0 * * @param integer $id Unique ID to represent this theme builder export process. * @param array $step * @param integer $steps * @param integer $step_index * @param integer $chunk * * @return array|false */ public function export_theme_builder($id, $step, $steps, $step_index = 0, $chunk = 0) { } /** * Get whether an array represents a valid Theme Builder export. * * @since 4.0 * * @param array $export * * @return boolean */ public function is_valid_theme_builder_export($export) { } /** * Import a single layout in chunks. * * @since 4.0 * * @param string $id Unique ID to represent this layout serialization. * @param array $layout * @param integer $chunk * * @return array|false */ public function import_layout($id, $layout, $chunk = 0, $onboarding = \false) { } /** * Get importing presets ID and name pairs from presets data. * * @since 4.26.1 * * @param array $presets Presets data. */ protected function _get_importing_presets_id_name_pairs($presets, $preset_prefix = '') { } /** * Import Theme Builder templates in chunks. * * @since 4.0 * * @param integer $id Unique ID to represent this theme builder import process. * @param array $step * @param integer $steps * @param integer $step_index * @param integer $chunk * * @return array|false */ public function import_theme_builder($id, $step, $steps, $step_index = 0, $chunk = 0) { } /** * Download temporary file. * * @since 4.0 * * @param string $filename * @param string $temp_file_id * @param string $temp_file * @return void */ public function download_file($filename, $temp_file_id, $temp_file) { } /** * Download Export Data. * * @since 2.7.0 */ public function download_export() { } protected function to_megabytes($value) { } // end to_megabytes() /** * Get selected posts data. * * @since 2.7.0 */ protected function export_posts_query() { } /** * Check whether the $parent_id included into the $terms_list. * * @since 2.7.0 * * @param array $terms_list Array of term objects. * @param int $parent_id . * * @return bool */ protected function is_parent_term_included($terms_list, $parent_id) { } /** * Retrieve the term slug. * * @since 2.7.0 * * @param int $parent_id . * @param string $taxonomy . * * @return int|string */ protected function get_parent_slug($parent_id, $taxonomy) { } /** * Prepare array of all parents so the correct hierarchy can be restored during the import. * * @since 2.7.0 * * @param int $parent_id . * @param string $taxonomy . * * @return array */ protected function get_all_parents($parent_id, $taxonomy) { } /** * Check if a layout exists in the database already based on both its title and its slug. * * @param string $title * @param string $slug * * @return int $post_id The post id if it exists, zero otherwise. */ protected static function layout_exists($title, $slug) { } /** * Get used global preset ids from the d5 post content. * Match pattern => "modulePreset":"wc8l3h...f". * * @since 5.0.0 * * @param string $content The post content. * * @return array */ protected static function _get_preset_ids_from_d5_content($content, $d5_presets) { } /** * Get used global variable ids from the d5 post content. * Match pattern => gvid-. * * @since 5.0.0 * * @param string $content The post content. * * @return array */ protected static function _get_gvids_from_d5_content($content) { } /** * Extract global color IDs from D5 Gutenberg content. * * @since 5.0.0 * * @param string $content The post content in Gutenberg format. * * @return array Array of unique global color IDs found in the content. */ protected static function _get_gcids_from_d5_content($content) { } /** * Get used global presets from the post content of d5 gutenberg format content. * This function is basically recieve the all d5 presets and return the used presets, * by checking the post content. * * So returned data will be like: * ```php * module => [ * 'divi/blurb' => [ * 'default' => 'wc873hxlff', * 'items' => [ * 'wc873hxlff' => [ * 'id' => 'wc873hxlff', * 'name' => 'Blurb Preset 1', * 'attrs' => [ * ... * ] * ], * ... * ] * ``` * * @since 5.0.0 * * @param array $used_presets The used presets data. * @param array $d5_presets The D5 presets data. * @param int $preset_id The preset ID. * * @return void */ protected static function _prepare_used_module_presets_data_from_d5_content(&$used_presets, $d5_presets, $preset_id) { } /** * Get used global presets from the post content of d5 gutenberg format content. * This function is basically recieve the all d5 presets and return the used presets, * by checking the post content. * * @since 5.0.0 * * @param array $used_presets The used presets data. * @param array $d5_presets The D5 presets data. * @param int $preset_id The preset ID. * * @return void */ protected static function _prepare_used_group_presets_data_from_d5_content(&$used_presets, $d5_presets, $preset_id) { } /** * Extract global color IDs from presets. * * This method extracts global color IDs (gcid-*) from preset data by recursively * searching through the array/object structure. This is more reliable than JSON * encoding because it handles nested structures and escaped JSON strings * (like $variable(...)) correctly. * * @since 5.0.0 * * @param array $presets The presets data (module or group presets). * * @return array Array of unique global color IDs. */ protected static function _extract_global_color_ids_from_presets($presets) { } /** * Extract global variable IDs from presets. * * This method extracts global variable IDs (gvid-*) from preset data by recursively * searching through the array/object structure. This is more reliable than JSON * encoding because it handles nested structures and escaped JSON strings * (like $variable(...)) correctly. * * @since 5.0.0 * * @param array $presets The presets data (module or group presets). * * @return array Array of unique global variable IDs. */ protected static function _extract_global_variable_ids_from_presets($presets) { } /** * Recursively extract IDs matching a pattern from an array structure. * * This helper method searches through arrays, objects, and strings to find * IDs matching the provided regex pattern. It handles nested structures * and escaped JSON strings correctly. * * @since 5.0.0 * * @param mixed $data The data to search (array, object, or string). * @param string $pattern The regex pattern to match IDs (must include capture group). * * @return array Array of unique IDs found. */ protected static function _extract_ids_recursive($data, $pattern) { } /** * Update shortcode with onboarding preset. * * @since 4.26.1 * * @param array $shortcode_object - The shortcode object to be updated. * @param array $presets_lookup - The lookup table for presets. */ protected function _update_shortcode_with_onboarding_preset(&$shortcode_object, $presets_lookup) { } /** * Conver and import D5 presets from onboarding. * * 1. Retrieve all existing presets. * 2. Convert new presets data if needed. * 3. Create a lookup table for existing presets by name. * 4. For each module type in converted presets: * a. If module type does not exist in all presets, initialize it. * b. For each incoming preset: * i. Generate new name with prefix. * ii. If preset with new name exists, remove the existing preset. * iii. Add incoming preset to current presets. * c. If not skipping default, update the default preset. * 5. Save all presets data. * * @since 5.0.0 * * @param array $new_presets_d4 Array of new presets data. * @param string $preset_prefix Prefix to be added to the preset names. * @param bool $skip_default Whether to skip updating the default preset key. */ protected function _convert_and_import_d5_presets_from_onboarding($new_presets_d4, $preset_prefix, $skip_default) { } /** * Imports Global Presets * * @since 4.0.10 Made public. * * @param array $presets - The Global Presets to be imported. * @param bool $is_temp_presets - Whether the presets are temporary or not. * @param bool $override_defaults - Whether the default presets should be overridden. * @param string $preset_prefix - A prefix to be prepended to preset name of the preset being imported, if override_defaults is true. * @param bool $skip_default - Whether updating the default preset key should be skipped. * * @return boolean */ public function import_global_presets($presets, $is_temp_presets = \false, $override_defaults = \false, $preset_prefix = '', $skip_default = \false) { } /** * Prepare to import non-duplicate presets. * * @since 4.26.0 * * @param array $presets Presets to import. * * @return array */ public function prepare_to_import_non_duplicate_presets($presets) { } /** * Import global colors. * * @since 4.9.0 * * @param array $incoming_global_colors Global Colors Array. * * @return void */ public function import_global_colors($incoming_global_colors) { } /** * Import post. * * @since 2.7.0 * * @param array $posts Array of data formatted by the portability exporter. * * @return bool */ protected function import_posts($posts) { } /** * Restore the categories hierarchy in library. * * @since 2.7.0 * * @param array $parents_array Array of parent categories data. * @param string $taxonomy */ protected function restore_parent_categories($parents_array, $taxonomy) { } /** * Generates UUIDs for the D5 presets to avoid collisions. * * @since 4.5.0 * * @param array $global_presets - The Global Presets to be imported. * * @return array - The list of module types for which preset ids have been changed */ public function prepare_to_import_layout_presets(&$global_presets) { } /** * Remaps nested group preset references after group preset IDs are rewritten. * * Handles both: * - module presets: `items[*].groupPresets[*].presetId` * - group presets: `items[*].attrs.groupPreset[*].presetId` * * @since 5.3.0 * * @param array $global_presets D5 global presets payload. * @param array $group_rewrite_map Group preset rewrite map keyed by group name. * * @return array Updated presets payload. */ protected function _remap_nested_group_preset_references($global_presets, $group_rewrite_map) { } /** * Remaps a group preset reference map by group name and preset ID. * * @since 5.3.0 * * @param array $group_refs Group references keyed by group id. * @param array $group_rewrite_map Group rewrite map keyed by group name. * * @return array Updated group references. */ protected function _remap_group_preset_reference_map($group_refs, $group_rewrite_map) { } /** * Normalize imported preset IDs for rewrite mapping lookup. * * Keeps reserved IDs (like `_initial`) so they can be remapped. * * @since 5.3.0 * * @param mixed $preset_id_value Preset ID value (string or stacked array). * * @return array */ protected function _normalize_import_preset_ids_for_rewrite($preset_id_value) { } /** * Injects the given Global Presets settings into the imported layout * * @since 4.5.0 * * @param array $shortcode_object - The multidimensional array representing a page/module structure * @param array $global_presets - The Global Presets to be imported * @param array $preset_rewrite_map - The list of module types for which preset ids have been changed */ protected function rewrite_module_preset_ids(&$shortcode_object, $global_presets, $preset_rewrite_map) { } /** * Injects global color ids into the imported layout * * @since 4.10.0 * * @param array $data - The multidimensional array representing a import object structure. */ protected function _maybe_inject_gcid(&$data, &$gcolors = \null) { } /** * Process and inject global color ids into the shortcode * * @since 4.10.0 * * @param array $shortcode_object - The multidimensional array representing a page/module structure. */ protected function _inject_gcid(&$shortcode_object, &$global_colors) { } /** * Injects the given Global Presets settings into the imported layout * * @since 3.26 * * @param array $shortcode_object - The multidimensional array representing a page/module structure * @param array $global_presets - The Global Presets to be applied */ protected function _apply_global_presets(&$shortcode_object, $global_presets) { } /** * Restrict data according the argument registered. * * @since 2.7.0 * * @param array $data Array of data the query is applied on. * @param string $method Whether data should be set or reset. Accepts 'set' or 'unset' which is * should be used when treating existing data in the db. * * @return array */ protected function apply_query($data, $method) { } /** * Serialize images in chunks. * * @since 4.0 * * @param array $images * @param string $method Method applied on images. * @param string $id Unique ID to use for temporary files. * @param integer $chunk * * @return array */ protected function chunk_images($images, $method, $id, $chunk = 0) { } /** * Paginate images processing. * * @since 1.0.0 * * @param $images * @param string $method Method applied on images. * @param int $timestamp Timestamp used to store data upon pagination. * * @return array * @internal param array $data Array of images. */ protected function maybe_paginate_images($images, $method, $timestamp) { } /** * Get all thumbnail images in the data given. * * @since 4.7.4 * * @param array $data Array of data. * * @return array */ protected function _get_thumbnail_images($data) { } /** * Get all images in the data given. * * @since 2.7.0 * * @param array $data Array of data. * @param bool $force Set whether the value should be added by force. Usually used for image ids. * * @return array */ protected function get_data_images($data, $force = \false) { } /** * Get the attachment post id for the given url. * * @since 3.22.3 * * @param string $url The url of an attachment file. * * @return int */ protected function _get_attachment_id_by_url($url) { } /** * Encode image in a base64 format. * * @since 2.7.0 * * @param array $images Array of data for which images need to be encoded if any. * * @return array */ protected function encode_images($images) { } /** * Encode an image attachment. * * @since 3.22.3 * * @param int $id * * @return string */ protected function _encode_attachment_image($id) { } /** * Encode a remote image. * * @since 3.22.3 * * @param string $url * * @return string */ protected function _encode_remote_image($url) { } /** * Decode base64 formatted image and upload it to WP media. * * @since 2.7.0 * * @param array $images Array of encoded images which needs to be uploaded. * * @return array */ protected function upload_images($images) { } /** * Replace encoded image url with a real url * * @param $subject - The string to perform replacing for * @param array $image - The image settings * * @return string|string[]|null */ protected function replace_image_url($subject, $image) { } /** * Replace image urls with newly uploaded images. * * @since 2.7.0 * * @param array $images Array of new images uploaded. * @param array $data Array of for which images url needs to be replaced. * * @return array|mixed|object */ protected function replace_images_urls($images, $data) { } /** * Validate data and remove any malicious code. * * @since 2.7.0 * * @param array $data Array of data which needs to be validated. * @param array $fields_validation Array of field and validation callback. * * @return array|bool */ protected function validate($data, $fields_validation = array()) { } /** * Filters a variable with string filter * * @param mixed $data - Value to filter. * * @return mixed */ protected function _filter_post_data($data) { } /** * Prevent import and export timeout or memory failure. * * @since 2.7.0 * * It doesn't need to be reset as in both case the request exit. */ protected function prevent_failure() { } /** * Set WP filesystem to direct. This should only be use to create a temporary file. * * @since 2.7.0 * * It is safe to do so since the created file is removed immediately after import. The method does'nt have * to be reset since the ajax query is exited. */ protected function set_filesystem() { } /** * Proxy method for set_filesystem() to avoid calling it multiple times. * * @since 4.0 * * @return WP_Filesystem_Direct */ protected function get_filesystem() { } /** * Check if a temporary file is register. Returns temporary file if it exists. * * @since 4.0 Made method public. * * @param string $id Unique id used when the temporary file was created. * @param string $group Group name in which files are grouped. * * @return bool|string */ public function has_temp_file($id, $group) { } /** * Create a temp file and register it. * * @since 2.7.0 * @since 4.0 Made method public. Added $content parameter. * * @param string $id Unique id reference for the temporary file. * @param string $group Group name in which files are grouped. * @param string|bool $temp_file Path to the temporary file. False create a new temporary file. * * @return bool|string */ public function temp_file($id, $group, $temp_file = \false, $content = '') { } /** * Get temp file contents or an empty string if it does not exist. * * @since 4.0 * * @param string $id Unique id used when the temporary file was created. * @param string $group Group name in which files are grouped. * * @return string */ public function get_temp_file_contents($id, $group) { } /** * Delete all the temp files. * * @since 2.7.0 * * @param bool|string $group Group name in which files are grouped. Set to true to remove all groups and files. * @param array $defined_files Array or temoporary files to delete. No argument deletes all temp files. */ public function delete_temp_files($group = \false, $defined_files = \false) { } /** * Set WP filesystem method to direct. * * @since 2.7.0 */ public function replace_filesystem_method() { } /** * Get timestamp or create one if it isn't set. * * @since 2.7.0 */ public function get_timestamp() { } /** * Collect global color dependencies and add them to the used global colors array. * * This ensures that if a color references another color (e.g., HSL relative colors), * the base color is also included in the export. * * @since 5.0.0 * * @param array $used_global_colors Array of used global colors (format: [color_id => []]). * * @return array The used global colors array with dependency colors added. */ protected function _add_global_color_dependencies($used_global_colors) { } /** * Get Global Colors array from provided global_colors_info. * * @since 4.10.8 * * @param array $global_colors_info Array of global colors to process. * * @return array The list of the Global Colors for export. */ protected function _get_global_colors_data($global_colors_info = array()) { } /** * Get List of global colors used in shortcode. * * @since 4.10.8 * * @param array $shortcode_object The multidimensional array representing a page structure. * @param array $used_global_colors List of global colors to merge with. * @param array $presets Object of presets. * * @return array - The list of the Global Colors. */ protected function _get_used_global_colors($shortcode_object, $used_global_colors = array(), $presets = array()) { } /** * Returns Global Presets used for a given shortcode only * * @since 3.26 * * @param array $shortcode_object - The multidimensional array representing a page structure * @param array $used_global_presets * * @return array - The list of the Global Presets * */ protected function get_used_global_presets($shortcode_object, $used_global_presets = array()) { } /** * Returns Global Colors used for a given theme builder shortcode. * * @since 4.18.0 * * @param array $shortcode_object - The multidimensional array representing a page structure. * * @return array The list of the Global Colors */ public function get_theme_builder_library_used_global_colors($shortcode_object) { } /** * Returns Global Presets used for a given theme builder shortcode. * * @since 4.18.0 * * @param array $shortcode_object - The multidimensional array representing a page structure. * * @return array The list of the Global Presets */ public function get_theme_builder_library_used_global_presets($shortcode_object) { } /** * Returns images used for a given theme builder shortcode. * * @since 4.18.0 * * @param array $data - ID and Post content. * * @return array The list of the encoded images */ public function get_theme_builder_library_images($data) { } /** * Returns thumbnails used for a given theme builder shortcode. * * @since 4.18.0 * * @param array $data - ID and Post content. * * @return array The list of the thumbnails */ public function get_theme_builder_library_thumbnail_images($data) { } /** * Enqueue assets. * * @since ?.? Script `et-core-portability` now loads in footer along with `et-core-admin`. * @since 2.7.0 */ public function assets() { } /** * Modal HTML. * * @since 2.7.0 */ public function modal() { } } /** * Elegant Themes Support Center adds a new page to the WP Admin menu. * * System Status * Here we note system settings that could potentially cause problems. An extended view (displaying all settings we * check, not just those with problematic results) can be toggled, with an option to copy this report to the * clipboard so it can be pasted in a support ticket. * * Elegant Themes Support * If Remote Access is enabled in this section, Elegant Themes Support will be granted limited access to the user's site * (@see ET_Core_SupportCenter::support_user_maybe_create_user()). When this is activated, a second toggle appears * for the user that will allow them to enable "Full Admin Privileges" which has no restrictions (only certain ET * Support staff will be able to request that the user enables this). Full Admin Privileges can be disabled at any * time, but are automatically disabled whenever the Remote Access is disabled (manually or by timeout). Time * remaining until Remote Access is automatically deactivated is indicated alongside the toggle. A link for * initiating a chat https://www.elegantthemes.com/members-area/help/ is also available in this section. * * Divi Documentation & Help * This section contains common help videos, articles, and a link to full documentation. This is not meant to be a * full service documentation center; it's mainly a launch off point. * * Divi Safe Mode * A quick and easy way for users and support to quickly disable plugins and scripts to see if Divi is the cause of * an issue. This call to action disables active plugins, custom css, child themes, scripts in the Integrations tab, * static css, and combination/minification of CSS and JS. When enabling this, the user will be presented with a * list of plugins that will be affected (disabled). Sitewide (not including the Visual Builder), there will be a * floating indicator in the upper right or left corner of the website that will indicate that Safe Mode is enabled * and will contain a link that takes you to the Support Page to disabled it. * * Logs * If WP_DEBUG_LOG is enabled, WordPress related errors will be archived in a log file. We load the most recent entries * of this log file for convienient viewing here, with a link to download the full log, as well as an option to copy * the log to the clipboard so it can be pasted in a support ticket. * * @package ET\Core\SupportCenter * @author Elegant Themes * @license GNU General Public License v2 * * @since 3.24.1 Renamed from `ET_Support_Center` to `ET_Core_SupportCenter`. * @since 3.20 */ class ET_Core_SupportCenter { /** * Catch whether the ET_DEBUG flag is set. * * @since 3.20 * * @type string */ protected $DEBUG_ET_SUPPORT_CENTER = \false; /** * Identifier for the parent theme or plugin activating the Support Center. * * @since 3.20 * * @type string */ protected $parent = ''; /** * "Nice name" for the parent theme or plugin activating the Support Center. * * @since 3.20 * * @type string */ protected $parent_nicename = ''; /** * Whether the Support Center was activated through a `plugin` or a `theme`. * * @since 3.20 * * @type string */ protected $child_of = ''; /** * Identifier for the parent theme or plugin activating the Support Center. * * @since 3.20 * * @type string */ protected $local_path; /** * Support User options * * @since 3.20 * * @type array */ protected $support_user_options; /** * Support User account name * * @since 3.20 * * @type string */ protected $support_user_account_name = 'elegant_themes_support'; /** * Support options name in the database * * @since 3.20 * * @type string */ protected $support_user_options_name = 'et_support_options'; /** * Name of the cron job we use to auto-delete the Support User account * * @since 3.20 * * @type string */ protected $support_user_cron_name = 'et_cron_delete_support_account'; /** * Expiration time to auto-delete the Support User account via cron * * @since 3.20 * * @type string */ protected $support_user_expiration_time = '+4 days'; /** * Provide nicename equivalents for boolean values * * @since 3.23 * * @type array */ protected $boolean_label = array('False', 'True'); /** * Collection of plugins that we will NOT disable when Safe Mode is activated. * * @since 3.20 * * @type array */ protected $safe_mode_plugins_allowlist = array( 'etdev/etdev.php', // ET Development Workspace 'bloom/bloom.php', // ET Bloom Plugin 'monarch/monarch.php', // ET Monarch Plugin 'divi-builder/divi-builder.php', // ET Divi Builder Plugin 'divi-dash/divi-dash.php', // Divi Dash Plugin 'ari-adminer/ari-adminer.php', // ARI Adminer 'query-monitor/query-monitor.php', // Query Monitor 'woocommerce/woocommerce.php', // WooCommerce 'really-simple-ssl/rlrsssl-really-simple-ssl.php', ); /** * Capabilities that should be granted to the Administrator role on activation. * * @since 3.28 * * @type array */ protected $support_center_administrator_caps = array('et_support_center', 'et_support_center_system', 'et_support_center_remote_access', 'et_support_center_documentation', 'et_support_center_safe_mode', 'et_support_center_logs'); /** * Collection of Cards that has button to dismiss the Card. * * @since 4.4.7 * * @type array */ protected $card_with_dismiss_button = array('et_hosting_card'); /** * Core functionality of the class * * @since 4.4.7 Added WP AJAX action for dismissible button for a card * @since 3.20 * * @param string $parent Identifier for the parent theme or plugin activating the Support Center. */ public function __construct($parent = '') { } /** * WordPress action & filter setup * * @since 3.20 */ public function init() { } /** * Add User capabilities to the Administrator Role (if it exists) on first run * * @since 3.29.2 Added check to verify the Administrator Role exists before attempting to run `add_cap()`. * @since 3.28 */ public function support_center_capabilities_setup() { } /** * Remove User capabilities from the Administrator Role when product with Support Center is removed * * @since 3.29.2 Added check to verify the Administrator Role exists before attempting to run `remove_cap()`. * @since 3.28 */ public function support_center_capabilities_teardown() { } /** * Set variables that change depending on whether a theme or a plugin activated the Support Center * * @since 3.20 */ public function set_parent_properties() { } /** * Get the "Nice Name" for the parent theme/plugin * * @param $parent * * @return bool|string */ public function get_parent_nicename($parent) { } /** * Prevent any possible conflicts with the Elegant Themes Support plugin * * @since 3.20 */ public function deactivate_conflicting_plugins() { } /** * @param string $capability * * @return bool */ protected function current_user_can($capability = '') { } /** * Add Safe Mode Autoloader Must-Use Plugin * * @since 3.20 */ public function maybe_add_mu_autoloader() { } public function maybe_remove_mu_autoloader() { } /** * Update the Site ID data via Elegant Themes API * * @since ?.? Early exit if no Site ID, but also no API credentials to use for a request. * @since 3.20 * * @return void */ public function maybe_set_site_id() { } /** * Safe Mode temporarily deactivates all plugins *except* those in the allowlist option set here * * @since 3.20 * * @return void */ public function set_safe_mode_plugins_allowlist() { } /** * Add Support Center menu item (but only if it's enabled for current user) * * When initialized we were given an identifier for the plugin or theme doing the initializing. We're going to use * that identifier here to insert the Support Center menu item in the correct location within the WP Admin Menu. * * @since 3.28 Expanded sub-menu links with support for additional ET products. * @since 3.20 */ public function add_admin_menu_item() { } /** * Add class name to Support Center page * * @since 3.20 * * @param string $admin_classes Current class names for the body tag. * * @return string */ public function add_admin_body_class_name($admin_classes = '') { } /** * Support Center admin page JS * * @since 3.20 * * @param $hook string Unique identifier for WP admin page. * * @return void */ public function admin_enqueue_scripts_styles($hook) { } /** * Support Center frontend CSS/JS * * @since 3.20 * * @param $hook string Unique identifier for WP admin page. * * @return void */ public function enqueue_scripts_styles($hook) { } /** * Divi Support Center :: Card * * Take an array of attributes and build a WP Card block for display on the Divi Support Center page. * * @since 4.4.7 Added optional dismissible button * @since 3.20 * * @param array $attrs * * @return string */ protected function add_support_center_card($attrs = array('title' => '', 'content' => '')) { } /** * Divi Support Center :: Dismiss a Card via Ajax * * @since 4.4.7 */ public function dismiss_support_center_card_via_ajax() { } /** * Prepare the "Divi Documentation & Help" video player block * * @since 3.28 Added support for Bloom, Monarch, and Divi Builer plugins. * @since 3.20 * * @param bool $formatted Return either a formatted HTML block (true) or an array (false) * * @return array|string */ protected function get_documentation_video_player($formatted = \true) { } /** * Prepare the "Divi Documentation & Help" articles list * * @since 3.28 Added support for Bloom, Monarch, and Divi Builer plugins. * @since 3.20 * * @param bool $formatted Return either a formatted HTML block (true) or an array (false) * * @return array|string */ protected function get_documentation_articles_list($formatted = \true) { } /** * Look for Elegant Themes Support Account * * @since 3.20 * * @return WP_User|false WP_User object on success, false on failure. */ public function get_et_support_user() { } /** * Look for saved Elegant Themes Username & API Key * * @since 3.20 * * @return array|false license credentials on success, false on failure. */ public function get_et_license() { } /** * Try to load the WP debug log. If found, return the last [$lines_to_return] lines of the file and the filesize. * * @since 3.20 * * @param int $lines_to_return Number of lines to read and return from the end of the wp_debug.log file. * * @return array */ protected function get_wp_debug_log($lines_to_return = 10) { } /** * When a predefined system setting is passed to this function, it will return the observed value. * * @since 3.20 * * @param bool $formatted Whether to return a formatted report or just the data array * @param string $format Return the report as either a `div` or `plain` text (if $formatted = true) * * @return array|string */ protected function system_diagnostics_generate_report($formatted = \true, $format = 'plain') { } /** * Convert size string with "shorthand byte" notation to raw byte value for comparisons. * * @since 3.20 * * @param string $size * * @return int size in bytes */ protected function get_size_in_bytes($size = '') { } /** * Convert size string with "shorthand byte" notation to raw byte value for comparisons. * * @since 3.20 * * @param int $bytes * @param int $precision * * @return string size in "shorthand byte" notation */ protected function get_size_in_shorthand($bytes = 0, $precision = 2) { } /** * Size comparisons between two values using a variety of calculation methods. * * @since 3.20.2 * * @param string|int|float $a Our value to compare against * @param string|int|float $b Server value being compared * @param string $type Comparison type * * @return bool Whether the second value is equal to or greater than the first */ protected function value_is_at_least($a, $b, $type = 'size') { } /** * Check value against a collection of "falsy" values * * @since 3.23 * * @param string|int|float $a Value to compare against * * @return bool Whether the second value is equal to or greater than the first */ protected function value_is_falsy($a) { } /** * SUPPORT CENTER :: REMOTE ACCESS */ /** * Add Support Center options to the Role Editor screen * * @see ET_Core_SupportCenter::current_user_can() * * @since 3.20 * * @param $all_role_options * * @return array */ public function support_user_add_role_options($all_role_options) { } /** * Add third party capabilities to Remote Access roles * * @return array Capabilities to add to the Remote Access user roles. */ public function support_user_extra_caps_standard($extra_capabilities = array()) { } /** * Add third party capabilities to the *Elevated* Remote Access role only * * @return array Capabilities to add to the Elevated Remote Access user role. */ public function support_user_extra_caps_elevated() { } /** * Create the Divi Support user (if it doesn't already exist) * * @since 3.20 * * @return void|WP_Error */ public function support_user_maybe_create_user() { } /** * Define Standard role for the Divi Support user * * @since 5.0.0 Removed definition for the Divi Support 'elevated' role * @since 3.22 Added filters to extend the list of capabilities for the ET Support User * @since 3.20 */ public function support_user_create_role() { } /** * Remove our Standard Support role * * @since 5.0.0 No longer attempt to remove the defunct Divi Support 'elevated' role * @since 3.20 */ public function support_user_remove_role() { } /** * Set the ET Support User's role * * @since 5.0.0 Removed the 'et_support_elevated' role; using 'administrator' instead * @since 3.20 * * @param string $role */ public function support_user_set_role($role = '') { } /** * Ensure the `unfiltered_html` capability is added to the ET Support roles in Multisite * * @since 3.22 * * @param array $caps An array of capabilities. * @param string $cap The capability being requested. * @param int $user_id The current user's ID. * * @return array Modified array of user capabilities. */ function support_user_map_meta_cap($caps, $cap, $user_id) { } /** * Remove KSES filters on ET Support User's content * * @since 3.22 */ function support_user_kses_remove_filters() { } /** * Clear "Delete Account" cron hook * * @since 3.20 * * @return void */ public function support_user_clear_delete_cron() { } /** * Delete the support account if it's expired or the expiration date is not set * * @since 3.20 * * @return void */ public function support_user_cron_maybe_delete_account() { } /** * Schedule account removal check * * @since 3.20 * * @return void */ public function support_user_init_cron_delete_account() { } /** * Get plugin options * * @since 3.20 * * @return void */ public function support_user_get_options() { } /** * Generate random token * * @since 3.20 * * @param integer $length Token Length * @param bool $include_symbols Whether to include special characters (or just stick to alphanumeric) * * @return string $token Generated token */ public function support_user_generate_token($length = 17, $include_symbols = \true) { } /** * Generate password from token * * @since 3.20 * * @param string $token Token * * @return string|WP_Error Generated password if successful, WP Error object otherwise */ public function support_user_generate_password($token) { } /** * Delete the account if it's expired * * @since 3.20 * * @return void */ public function support_user_maybe_delete_expired_account() { } /** * Delete support account and the plugin options ( token, expiration date ) * * @since 3.20 * * @return string | WP_Error Confirmation message on success, WP_Error on failure */ public function support_user_delete_account() { } /** * Maybe delete support account and the plugin options when switching themes * * If a theme change is one of: * - [Divi/Extra] > [Divi/Extra] child theme * - [Divi/Extra] child theme > [Divi/Extra] child theme * - [Divi/Extra] child theme > [Divi/Extra] * ...then we won't change the state of the Remote Access toggle. * * @since 3.23 * * @return string | WP_Error Confirmation message on success, WP_Error on failure */ public function maybe_deactivate_on_theme_switch() { } /** * Is this user the ET Support User? * * @since 3.22 * * @param int|null $user_id Pass a User ID to check. We'll get the current user's ID otherwise. * * @return bool Returns whether this user is the ET Support User. */ function is_support_user($user_id = \null) { } /** * Delete support account and the plugin options ( token, expiration date ) * * @since 3.20 * * @return void */ public function unlist_support_center() { } /** * */ public function support_user_remove_site_id() { } function support_user_update_via_ajax() { } /** * SUPPORT CENTER :: SAFE MODE */ /** * ET Product Allowlist * * @since 3.28 * * @param string $product Potential ET product name that we want to confirm is on the list. * * @return string|false If the product is on our list, we return the "nice name" we have for it. Otherwise, we return FALSE. */ protected function is_allowlisted_product($product = '') { } /** * Safe Mode: Set session cookie to temporarily disable Plugins * * @since 3.20 * * @return void */ function safe_mode_update_via_ajax() { } /** * Toggle Safe Mode * * @since 3.20 * * @param bool $activate TRUE if enabling Safe Mode, FALSE if disabling Safe mode. * @param string $product Name of ET product that is activating Safe Mode (@see ET_Core_SupportCenter::get_parent_nicename()). */ public function toggle_safe_mode($activate = \true, $product = '') { } /** * Set Safe Mode Cookie * * @since 3.20 * * @return void */ function set_safe_mode_cookie() { } /** * Render modal that intercepts plugin activation/deactivation * * @since 3.20 * * @return void */ public function render_safe_mode_block_restricted() { } /** * Disable Custom CSS (if Safe Mode is active) * * @since 3.20 */ function maybe_disable_custom_css() { } /** * Add Safe Mode Indicator (if Safe Mode is active) * * @since 3.20 */ function maybe_add_safe_mode_indicator() { } /** * Prints the admin page for Support Center * * @since 3.20 */ public function add_support_center() { } /** * SUPPORT CENTER :: DIVI HOSTING CARD */ /** * Conditionally display Divi Hosting Card in the Support Center * * @since 4.4.7 */ public function maybe_display_divi_hosting_card() { } /** * Prepare Settings for ET API request * Returns false when ET username/api_key is not found, and ET subscription is not active * * @since 4.4.7 * @param string $action * * @return bool|array */ protected function get_et_api_request_settings($action) { } /** * Check ET API whether ET User has disabled Divi Hosting Card * * @since 4.4.7 * * @return bool */ protected function maybe_api_has_hosting_card_disabled() { } /** * Return Data for Divi Hosting Card * * @since 4.4.7 * * @return array */ protected function get_divi_hosting_features() { } /** * Build and display Divi Hosting Card * * @since 4.4.7 */ public function print_divi_hosting_card() { } } /** * Handles the updates workflow. * * @private * * @package ET\Core\Updates */ final class ET_Core_Updates { protected $core_url; protected $options; protected $account_status; protected $product_version; protected $all_et_products_domains; protected $upgrading_et_product; protected $up_to_date_products_data; // class version protected $version; // Is a product being upgraded in the current API request. protected $upgraded_a_product = \false; private static $_this; function __construct($core_url, $product_version) { } function check_upgrading_product($options) { } function maybe_append_custom_notification($plugin_data, $response) { } /** * Check if we need to force update options removal in case a customer clicked on "Check Again" button * in the notification area. */ function maybe_force_update_requests() { } function get_custom_update_notification_message($update_message) { } function replace_theme_update_notification($themes_array) { } function update_error_message($reply, $package, $upgrader, $hook_extra = array()) { } /** * Get all Elegant Themes products, returned from the API request */ function get_et_api_products() { } function get_all_et_products() { } function remove_theme_update_actions() { } function remove_plugin_update_actions() { } /** * Removes Updater plugin actions and filters, * so it doesn't make additional requests to API * * @return void */ function remove_updater_plugin_actions() { } /** * Returns an instance of the object * * @return object */ static function get_this() { } /** * Adds automatic updates data only if Username and API key options are set * * @param array $send_to_api Data sent to server * @return array Modified data set if Username and API key are set, original data if not */ function maybe_add_automatic_updates_data($send_to_api) { } /** * Gets plugin options * * @return void */ function get_options() { } function load_scripts_styles($hook) { } function add_up_to_date_products_data($update_data, $settings = array()) { } /** * Merges product information from cached et updates transients * to the main WordPress updates transients. * * @param array $update_transient The main WordPress themes or plugins updates transient. * @param array $et_update_products_data The cached et themes or plugins updates transient. * @return array */ function merge_et_products_response($update_transient, $et_update_products_data) { } function check_plugins_updates($update_transient) { } public function maybe_modify_plugins_changelog($false, $action, $args) { } function process_account_settings($response) { } function process_up_to_date_products_settings($response, $settings) { } function process_request_settings($settings = array()) { } function process_additional_response_settings($response, $settings = array()) { } /** * Sends a request to server, gets current themes versions * * @param object $update_transient Update transient option * @return object Update transient option */ function check_themes_updates($update_transient) { } function maybe_show_account_notice() { } function change_plugin_changelog_url($url, $path) { } function force_update_requests() { } function update_product_domains() { } /** * Delete Elegant Themes update products transient, whenever default WordPress update transient gets removed */ function maybe_reset_et_products_update_transient($transient_name) { } /** * Detects if the current API request is related to a product update. * In this case, we need to allow the request to bypass rate limiting * since the update process requests two requests. */ function upgraded_a_product() { } } /** * Handles version rollback. * * @since 3.10 * * @private * * @package ET\Core\VersionRollback */ class ET_Core_VersionRollback { /** * Product name. * * @var string */ protected $product_name = ''; /** * Product shortname. * * @var string */ protected $product_shortname = ''; /** * Current product version. * * @var string */ protected $product_version = ''; /** * Is rollback service enabled. * * @var bool */ protected $enabled = \false; /** * API Username. * * @var string */ protected $api_username = ''; /** * API Key. * * @var string */ protected $api_key = ''; /** * ET_Core_VersionRollback constructor. * * @since 3.10 * * @param string $product_name Product name. * @param string $product_shortname Product shortname. * @param string $product_version Product version. */ public function __construct($product_name, $product_shortname, $product_version) { } /** * Enqueue assets. * * @since ?.? Script `et-core-version-rollback` now loads in footer. * @since 3.10 */ public function assets() { } /** * Get previous installed version, if any. * * @since 3.10 * * @return string */ protected function _get_previous_installed_version() { } /** * Set previous installed version. * * @since 3.10 * * @param string $version * * @return void */ protected function _set_previous_installed_version($version) { } /** * Get latest installed version, if any. * * @since 3.10 * * @return string */ protected function _get_latest_installed_version() { } /** * Set latest installed version. * * @since 3.10 * * @param string $version * * @return void */ protected function _set_latest_installed_version($version) { } /** * Check if the product has already been rolled back. * * @since 3.10 * * @return bool */ protected function _is_rolled_back() { } /** * Get unique ajax action. * * @since 3.10 * * @return string */ protected function _get_ajax_action() { } /** * Enable update rollback. * * @since 3.10 * * @return void */ public function enable() { } /** * Handle REST API requests to rollback. * * @since 3.10 * * @return void */ public function ajax_rollback() { } /** * Execute a version rollback. * * @since 3.10 * * @return bool|WP_Error */ public function rollback() { } /** * Install a theme overwriting it if it already exists. * Copied from Theme_Upgrader::install() due to lack of control over the clear_desination argument. * * @see Theme_Upgrader::install() @ WordPress 4.9.4 * * @since 3.10 * * @param string $package * * @return bool|WP_Error */ protected function _install_theme($package) { } /** * Get update documentation url for the product. * * @since 3.10 * * @return string */ protected function _get_update_documentation_url() { } /** * Return ePanel option. * * @since 3.10 * * @return array */ public function get_epanel_option() { } /** * Render ePanel option. * * @since 3.10 * * @return void */ public function render_epanel_option() { } /** * Render ePanel warning modal when no previous supported version has been used. * * @since 3.10 * * @return void */ public function render_epanel_no_previous_version_modal() { } /** * Render ePanel confirmation modal for rollback. * * @since 3.10 * * @return void */ public function render_epanel_confirm_rollback_modal() { } /** * Render ePanel warning modal when a rollback has already been done. * * @since 3.10 * * @return void */ public function render_epanel_already_rolled_back_modal() { } /** * Store latest and previous installed version. * * @since 3.10 * * @return void; */ public function store_previous_version_number() { } } /** * Handles communication with the main ET API. * * @since 3.10 * * @private * * @package ET\Core\API */ class ET_Core_API_ElegantThemes { /** * Base API URL. * * @var string */ protected $api_url = 'https://www.elegantthemes.com/api/'; /** * API username. * * @var string */ protected $username = ''; /** * API key. * * @var string */ protected $api_key = ''; /** * ET_Core_API_Client constructor. * * @since 3.10 * * @param string $username * @param string $api_key * @param string $api */ public function __construct($username, $api_key) { } /** * Decorate a payload array with common data. * * @since 3.10 * * @param array $payload * * @return array */ protected function _get_decorated_payload($payload) { } /** * Decorate request options array with common options. * * @since 3.10 * * @param array $options * * @return array */ protected function _get_decorated_request_options($options = array()) { } /** * Parse a response from the API. * * @since 3.10 * * @param array|WP_Error $response * * @return object|WP_Error */ protected function _parse_response($response) { } /** * Get the full API endpoint. * * @since 3.10 * * @param string $endpoint "api" or "api_downloads" * * @return string */ protected function _get_endpoint($endpoint = 'api') { } /** * Submit a GET request to the API. * * @since 3.10 * * @param array $payload * @param string $endpoint * * @return object|WP_Error */ protected function _get($payload, $endpoint = 'api') { } /** * Submit a POST request to the API. * * @since 3.10 * * @param array $payload * @param string $endpoint * * @return object|WP_Error */ protected function _post($payload, $endpoint = 'api') { } /** * Check if a product is available. * * @since 3.10 * * @param string $product_name * @param string $version * * @return bool|WP_Error */ public function is_product_available($product_name, $version) { } /** * Get a product download url for a specific version, if available. * * @since 3.10 * * @param string $product_name * @param string $version * * @return string|WP_Error */ public function get_download_url($product_name, $version) { } } /** * Wrapper for the ET_Core_OAuth library. * * @package ET\Core\API * * @since 1.1.0 */ // @phpcs:disable ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Use uppercase to be consistent with existing code. // @phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * Wrapper for the ET_Core_OAuth library. * * @since 1.1.0 * @package ET\Core\API * * @property string consumer_key * @property string consumer_secret * @property string access_token * @property string access_token_secret */ class ET_Core_API_OAuthHelper { /** * URL for access token requests. * * @since 1.1.0 * @var string */ public $ACCESS_TOKEN_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * URL for authorizing applications. * * @since 1.1.0 * @var string */ public $AUTHORIZATION_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * URL for request token requests. * * @since 1.1.0 * @var string */ public $REQUEST_TOKEN_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * Instance URL, used by Salesforce. * * @since 4.9.0 * @var string */ public $INSTANCE_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * The OAuth Redirect URL for this instance. * * @since 5.5.0 * @var string */ public $REDIRECT_URL = ''; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code. /** * The OAuth2 bearer for this instance. This is used as the value of the HTTP * `Authorization` header. The format is: `Bearer {$access_token}`. * * @since 1.1.0 * @var string */ private $_bearer = \null; /** * The OAuth Consumer object for this instance. * * @since 1.1.0 * @var ET_Core_LIB_OAuthConsumer */ public $consumer = \null; /** * The OAuth Token object for this instance. * * @since 1.1.0 * @var ET_Core_LIB_OAuthToken */ public $token = \null; /** * The OAuth Consumer key for this instance. * * @since 5.5 * @var string */ public $consumer_key = ''; /** * The OAuth Consumer secret for this instance. * * @since 5.5 * @var string */ public $consumer_secret = ''; /** * The OAuth Access token for this instance. * * @since 5.5 * @var string */ public $access_token = ''; /** * The OAuth Access token secret for this instance. * * @since 5.5 * @var string */ public $access_token_secret = ''; /** * The OAuth Redirect URL for this instance. * * @since 5.5 * @var string */ public $redirect_url = ''; /** * The OAuth SHA1 method for this instance. * * @since 5.5 * @var string */ public $sha1_method = \null; /** * ET_Core_API_OAuth_Helper constructor. * * @since 1.1.0 * * @param array $data { * The consumer key/secret and access token/secret. * * @type string $consumer_key Consumer key. Required. * @type string $consumer_secret Consumer secret. Required. * @type string $access_token Previously obtained access token. Optional. * @type string $access_secret Previously obtained access secret. Optional. * } * @param array $urls { * The service's OAuth endpoints. * * @type string $request_token_url URL for request tokens. Required. * @type string $authorization_url URL for authorizations. Optional. * @type string $access_token_url URL for access tokens. Required. * } * * @param mixed $owner The owner of the OAuth helper. * * @return void */ public function __construct(array $data, array $urls, $owner) { } /** * Initialize the OAuth helper. * * @internal * * @param array $data The data for the OAuth helper. * @param array $urls The URLs for the OAuth helper. * * @return void */ private function _initialize($data, $urls) { } /** * Get the OAuth 2.0 parameters. * * @param array $args The arguments for the OAuth 2.0 parameters. * * @return array */ protected function _get_oauth2_parameters($args) { } /** * Prepare the OAuth 1.0a request. * * @param \ET_Core_HTTPRequest $request The request to prepare. * * @return \ET_Core_HTTPRequest */ protected function _prepare_oauth_request($request) { } /** * Prepare the OAuth 2.0 request. * * @param \ET_Core_HTTPRequest $request The request to prepare. * * @return \ET_Core_HTTPRequest */ protected function _prepare_oauth2_request($request) { } /** * Finish the OAuth2 authorization process if needed. * * @return void */ public static function finish_oauth2_authorization() { } /** * Prepare a request for an access token. * * @param array $args { * For OAuth 1.0 & 1.0a. * * @type string $verifier OAuth verifier token. Optional. * * For OAuth 2.0: * * @type string $code The code returned when the user was redirected back to their dashboard. * @type string $grant_type The desired grant type, as per the OAuth 2.0 spec. * @type string $redirect_uri The redirect URL from the original authorization request. * } * * @return ET_Core_HTTPRequest */ public function prepare_access_token_request($args = array()) { } /** * Prepare an OAuth 1.0a or 2.0 request. * * @param \ET_Core_HTTPRequest $request The request to prepare. * @param bool $oauth2 Whether the request is OAuth 2.0. * * @return \ET_Core_HTTPRequest */ public function prepare_oauth_request($request, $oauth2 = \false) { } /** * Process a response to an OAuth access token request and retrieve the access token if auth was successful. * * @param \ET_Core_HTTPResponse $response The response to process. * @param bool $json Whether the response is JSON. * * @return void */ public function process_authentication_response($response, $json = \true) { } } /** * High level, generic, wrapper for interacting with a external, 3rd-party API. * * @since 1.1.0 * * @package ET\Core\API */ abstract class ET_Core_API_Service { /** * @var ET_Core_Data_Utils */ protected static $_; /** * URL to request an OAuth access token. * * @since 1.1.0 * @var string */ public $ACCESS_TOKEN_URL; /** * URL to authorize an application using OAuth. * * @since 1.1.0 * @var string */ public $AUTHORIZATION_URL; /** * General failure message (translated & escaped). * * @since 1.1.0 * @var string */ public $FAILURE_MESSAGE; /** * URL to request an OAuth request token. * * @since 1.1.0 * @var string */ public $REQUEST_TOKEN_URL; /** * Callback URL for OAuth Authorization. * * @since 1.1.0 * @var string */ public $REDIRECT_URL; /** * The base url for the service. * * @since 1.1.0 * @var string */ public $BASE_URL; /** * Instance of the OAuth wrapper class initialized for this service. * * @since 1.1.0 * @var ET_Core_API_OAuthHelper */ public $OAuth_Helper; /** * The form fields (shown in the dashboard) for the service account. * * @since 1.1.0 * @var array */ public $account_fields; /** * Each service can have multiple sets of credentials (accounts). This identifies which * account an instance of this class will provide access to. * * @since 1.1.0 * @var string */ public $account_name; /** * Custom HTTP headers that should be added to all requests made to this service's API. * * @since 1.1.0 * @var array */ public $custom_headers; /** * The service's data. Typically this will be IDs, tokens, secrets, etc used for API authentication. * * @since 1.1.0 * @var string[] */ public $data; /** * The mapping of the key names we use to store the service's data to the key names used by the service's API. * * @since 1.1.0 * @var string[] */ public $data_keys; /** * An instance of our HTTP Interface (utility class). * * @since 1.1.0 * @var ET_Core_HTTPInterface */ public $http; /** * If service uses HTTP Basic Auth, an array with details needed to generate the auth header, false otherwise. * * @since 1.1.0 * @var bool|array { * Details needed to generate the HTTP Auth header. * * @type string $username The data key name who's value should be used as the username, or a value to use instead. * @type string $password The data key name who's value should be used as the password, or a value to use instead. * } */ public $http_auth = \false; /** * Maximum number of accounts user is allowed to add for the service. * * @since 4.0.7 * @var int */ public $max_accounts; /** * The service's proper name (will be shown in the UI). * * @since 1.1.0 * @var string */ public $name; /** * The OAuth version (if the service uses OAuth). * * @since 1.1.0 * @var string */ public $oauth_version; /** * The OAuth verifier key (if the service uses OAuth along with verifier keys). * * @since 1.1.0 * @var string */ public $oauth_verifier; /** * The name and version of the theme/plugin that created this class instance. * Should be formatted like this: `Divi/3.0.23`. * * @since 1.1.0 * @var string */ public $owner; /** * Convenience accessor for {@link self::http->request} * * @since 1.1.0 * @var \ET_Core_HTTPRequest? */ public $request; /** * Convenience accessor for {@link self::http->response} * * @since 1.1.0 * @var \ET_Core_HTTPResponse? */ public $response; /** * For services that return JSON responses, this is the top-level/root key for the returned data. * * @since 1.1.0 * @var string */ public $response_data_key; /** * The service type (email, social, etc). * * @since 1.1.0 * @var string */ public $service_type; /** * The slug for this service (not shown in the UI). * * @since 1.1.0 * @var string */ public $slug; /** * Whether or not the service uses OAuth. * * @since 1.1.0 * @var bool */ public $uses_oauth; /** * Data Utility class. * * @var ET_Core_Data_Utils */ public $data_utils; // phpcs:disable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Existing codebase. /** * Error message for when API Key is required. * * @var string */ public $API_KEY_REQUIRED; // phpcs:enable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Existing codebase. /** * ET_Core_API_Service constructor. * * @since 1.1.0 * * @param string $owner {@see self::owner} * @param string $account_name The name of the service account that the instance will provide access to. * @param string $api_key The api key for the account. Optional (can be set after instantiation). */ public function __construct($owner = 'ET_Core', $account_name = '', $api_key = '') { } /** * Generates a HTTP Basic Auth header and adds it to the current request object. Uses the value * of {@link self::http_auth} to determine the correct values to use for the username and password. */ protected function _add_http_auth_header_to_request() { } /** * Exchange a request/verifier token for an access token. This is the last step in the OAuth authorization process. * If successful, the access token will be saved and used for future calls to the API. * * @return bool Whether or not authentication was successful. */ private function _do_oauth_access_token_request() { } /** * The service's private data. * * @see self::$_data * @internal * @since 1.1.0 * * @return array */ protected function _get_data() { } /** * Initializes {@link self::OAuth_Helper} * * @return bool `true` if successful, `false` otherwise. */ protected function _initialize_oauth_helper() { } /** * Returns the currently known custom fields for this service. * * @return array */ protected function _get_custom_fields() { } /** * Initiate OAuth Authorization Flow * * @return array|bool */ public function authenticate() { } /** * Remove the service account from the database. This cannot be undone. The instance * will no longer be usable after a call to this method. * * @since 1.1.0 */ abstract public function delete(); /** * Get the form fields to show in the WP Dashboard for this service's accounts. * * @since 1.1.0 * * @return array */ abstract public function get_account_fields(); /** * Get an array that maps our data keys to those returned by the 3rd-party service's API. * * @since 1.1.0 * * @param array $keymap A mapping of our data key addresses to those of the service, organized by type/category. * * @return array[] { * * @type array $key_type { * * @type string $our_key_address The corresponding key address on the service. * ... * } * ... * } */ abstract public function get_data_keymap($keymap = array()); /** * Get error message for a response that has an ERROR status. If possible the provider's * error message will be returned. Otherwise the HTTP error status description will be returned. * * @return string */ public function get_error_message() { } /** * Whether or not the current account has been authenticated with the service's API. * * @return bool */ public function is_authenticated() { } /** * Makes a remote request using the current {@link self::http->request}. Automatically * handles custom headers and OAuth when applicable. */ public function make_remote_request() { } /** * Convenience accessor for {@link self::http->prepare_request()} * * @param string $url * @param string $method * @param bool $is_auth * @param mixed $body * @param bool $json_body * @param bool $ssl_verify */ public function prepare_request($url, $method = 'GET', $is_auth = \false, $body = \null, $json_body = \false, $ssl_verify = \true) { } /** * Save this service's data to the database. * * @return mixed */ abstract public function save_data(); /** * Set the account name for the instance. Changing the accounts name affects the * value of {@link self::data}. * * @param string $name */ abstract public function set_account_name($name); /** * Transforms an array from our data format to that of the service provider. * * @param array $data The data to be transformed. * @param string $key_type The type of data. This corresponds to the key_type in {@link self::data_keys}. * @param array $exclude_keys Keys that should be excluded from the transformed data. * * @return array */ public function transform_data_to_our_format($data, $key_type, $exclude_keys = array()) { } /** * Transforms an array from the service provider's data format to our data format. * * @param array $data The data to be transformed. * @param string $key_type The type of data. This corresponds to the key_type in {@link self::data_keys}. * @param array $exclude_keys Keys that should be excluded from the transformed data. * * @return array */ public function transform_data_to_provider_format($data, $key_type, $exclude_keys = array()) { } } /** * High-level wrapper for interacting with the external API's offered by 3rd-party mailing list providers. * * @since 1.1.0 * * @package ET\Core\API */ abstract class ET_Core_API_Email_Provider extends \ET_Core_API_Service { /** * The URL from which custom fields for a list on this account can be retrieved. * * @var string */ public $FIELDS_URL; /** * The URL from which groups/tags for a list on this account can be retrieved. * * @var string */ public $GROUPS_URL; /** * The number of records to return from API (per request). * * @var int */ public $COUNT; /** * The URL from which subscriber lists for this account can be retrieved. * * @var string */ public $LISTS_URL; /** * The URL to which new subscribers can be posted. * * @var string */ public $SUBSCRIBE_URL; /** * The URL from which subscribers for this account can be retrieved. * * @var string */ public $SUBSCRIBERS_URL; /** * "Subscribed via..." translated string. * * @var string */ public $SUBSCRIBED_VIA; /** * Type of support for custom fields offered by provider. * * @since 3.17.2 * * @var bool|string Accepts `dynamic`, `predefined`, `false`. Default `predefined`. */ public $custom_fields = 'predefined'; /** * Type of support for custom fields offered by provider. * * @since 3.17.2 * * @var string Accepts `list`, `account`. */ public $custom_fields_scope = 'list'; /** * Whether or not only a single name field is supported instead of first/last name fields. * * @var string */ public $name_field_only = \false; /** * ET_Core_API_Email_Provider constructor. * * @inheritDoc */ public function __construct($owner = '', $account_name = '', $api_key = '') { } /** * Get custom fields for a subscriber list. * * @param int|string $list_id * @param array $list * * @return array */ protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * @inheritDoc */ protected function _get_data() { } protected function _process_custom_fields($args) { } /** * Processes subscriber lists data from the provider's API and returns only the data we're interested in. * * @since 1.1.0 * * @param array $lists Subscriber lists data to process. * * @return array */ protected function _process_subscriber_lists($lists) { } /** * Returns whether or not an account exists in the database. * * @param string $provider * @param string $account_name * * @return bool */ public static function account_exists($provider, $account_name) { } /** * @inheritDoc */ public function delete() { } /** * Retrieves the email accounts data from the database. * * @return array */ public static function get_accounts() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * Retrieves the subscriber lists for the account assigned to the current instance. * * @return string 'success' if successful, an error message otherwise. */ public function fetch_subscriber_lists() { } /** * Remove an account * * @param $provider * @param $account_name */ public static function remove_account($provider, $account_name) { } /** * @inheritDoc */ public function save_data() { } /** * @inheritDoc */ public function set_account_name($name) { } /** * Makes an HTTP POST request to add a subscriber to a list. * * @param string[] $args Data for the POST request. * @param string $url The URL for the POST request. Optional when called on child classes. * * @return string 'success' if successful, an error message otherwise. */ public function subscribe($args, $url = '') { } /** * Updates the data for a provider account. * * @param string $provider The provider's slug. * @param string $account The account name. * @param array $data The new data for the account. */ public static function update_account($provider, $account, $data) { } } /** * Wrapper for ActiveCampaign's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_ActiveCampaign extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $name = 'ActiveCampaign'; /** * @inheritDoc */ public $slug = 'activecampaign'; /** * @inheritDoc */ public $uses_oauth = \false; /** * @inheritDoc */ public $custom_fields_scope = 'account'; protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _process_custom_fields($args) { } /** * Returns the requests URL for the account assigned to this class instance. * * @return string */ protected function _get_requests_url() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * Get ActiveCampaign subscriber info by email. * * @param string $email * * @return array */ public function get_subscriber($email) { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for Aweber's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_Aweber extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $ACCESS_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/access_token'; /** * @inheritDoc */ public $AUTHORIZATION_URL = 'https://auth.aweber.com/1.0/oauth/authorize'; /** * @inheritDoc */ public $REQUEST_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/request_token'; /** * @inheritDoc */ public $BASE_URL = 'https://api.aweber.com/1.0'; /** * @var string */ public $accounts_url; /** * @inheritDoc */ public $name = 'Aweber'; /** * @inheritDoc */ public $name_field_only = \true; /** * @inheritDoc */ public $slug = 'aweber'; /** * @inheritDoc */ public $oauth_version = '1.0a'; /** * @inheritDoc */ public $uses_oauth = \true; /** * ET_Core_API_Email_Aweber constructor. * * @inheritDoc */ public function __construct($owner, $account_name = '', $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _get_lists_collection_url() { } protected static function _parse_ID($ID) { } protected function _process_custom_fields($args) { } /** * Uses the app's authorization code to get an access token */ public function authenticate() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_error_message() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for Campaign Monitor's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_CampaignMonitor extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.createsend.com/api/v3.1'; /** * @inheritDoc */ public $http_auth = array('username' => 'api_key', 'password' => '-'); /** * @inheritDoc */ public $name = 'CampaignMonitor'; /** * @inheritDoc */ public $name_field_only = \true; /** * @inheritDoc */ public $slug = 'campaign_monitor'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; public function __construct($owner, $account_name, $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _get_clients() { } protected function _get_subscriber_counts() { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * ConstantContact API email provider class. * * @package ET\Core\API\Email */ // @phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change the class property. /** * Wrapper for ConstantContact's API. * * @since 3.0.75 * * @package ET\Core\API\Email */ class ET_Core_API_Email_ConstantContact extends \ET_Core_API_Email_Provider { /** * Constant Contact API v3 access token URL (Authorization Code Flow). * * @var string */ public $ACCESS_TOKEN_URL = 'https://authz.constantcontact.com/oauth2/default/v1/token'; // phpcs:ignore -- No need to change the class property. /** * Constant Contact API v3 authorization URL (Authorization Code Flow). * * @var string */ public $AUTHORIZATION_URL = 'https://authz.constantcontact.com/oauth2/default/v1/authorize'; // phpcs:ignore -- No need to change the class property. /** * Constant Contact API v3 base URL. * * @var string */ public $BASE_URL = 'https://api.cc.email/v3'; // phpcs:ignore -- No need to change the class property. /** * Constant Contact API v3 lists URL. * * @var string */ public $LISTS_URL = 'https://api.cc.email/v3/contact_lists'; // phpcs:ignore -- No need to change the class property. /** * Constant Contact API v3 subscribe URL (sign_up_form endpoint for form submissions). * * @var string */ public $SUBSCRIBE_URL = 'https://api.cc.email/v3/contacts/sign_up_form'; // phpcs:ignore -- No need to change the class property. /** * Constant Contact API v3 subscribers URL. * * @var string */ public $SUBSCRIBERS_URL = 'https://api.cc.email/v3/contacts'; // phpcs:ignore -- No need to change the class property. /** * Subscriber data. * * @var array */ protected $_subscriber; /** * Constant Contact API v3 custom fields scope. * * @var string */ public $custom_fields_scope = 'account'; /** * Constant Contact name. * * @var string */ public $name = 'ConstantContact'; /** * Constant Contact OAuth version. * * @var string */ public $oauth_version = '2.0'; /** * Constant Contact slug. * * @var string */ public $slug = 'constant_contact'; /** * Constant Contact uses OAuth. * * @var bool */ public $uses_oauth = \true; /** * ET_Core_API_Email_ConstantContact constructor. * * @param string $owner Owner type (builder or admin). * @param string $account_name Account name. * @param string $api_key API key. */ public function __construct($owner = '', $account_name = '', $api_key = '') { } /** * Create subscriber data array for sign_up_form endpoint. * The /contacts/sign_up_form endpoint uses a different structure: * - email_address as a string (not object) * - list_memberships as array of strings (list_id values) * * @param array $args Subscriber data array. * * @return array Subscriber data array. */ protected function _create_subscriber_data_array($args) { } /** * Fetch custom fields. * * @param string $list_id List ID. * @param array $list List data array. * * @return array Custom fields array. */ protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * Get list from subscriber. * * @param array $subscriber Subscriber data array. * @param string $list_id List ID. * * @return array List data array. */ protected function _get_list_from_subscriber($subscriber, $list_id) { } /** * Maybe set custom headers. * * @return void */ protected function _maybe_set_custom_headers() { } /** * Process custom fields. * * @param array $args Subscriber data array. * * @return array Subscriber data array. */ protected function _process_custom_fields($args) { } /** * Get account fields. * * @return array Account fields array. */ public function get_account_fields() { } /** * Get data keymap. * * @param array $keymap Keymap array. * * @return array Keymap array. * * @since 5.0.0 Updated to support ConstantContact V3 API which uses different response structure than V2. */ public function get_data_keymap($keymap = array()) { } /** * Get subscriber. * * @param string $email Email address. * * @return array Subscriber data array. */ public function get_subscriber($email) { } /** * Authenticate using OAuth 2.0 Authorization Code Flow (v3 API). * Constant Contact v3 API uses Authorization Code Flow which requires client_secret. * According to: https://v3.developer.constantcontact.com/api_guide/server_flow.html * * @return array|bool */ public function authenticate() { } /** * Exchange authorization code for access token (v3 API). * v3 API requires Basic Auth with base64(client_id:client_secret) in Authorization header. * * @return bool */ private function _do_oauth_access_token_request_v3() { } /** * Refresh OAuth access token using refresh token (v3 API). * Called automatically when API requests return 401 Unauthorized errors. * * @return bool True if token refresh succeeded, false otherwise. */ private function _refresh_access_token() { } /** * Fetch subscriber lists. * * @return string */ public function fetch_subscriber_lists() { } /** * Fetch subscriber lists from Constant Contact API v3. * * @return string */ protected function _fetch_subscriber_lists() { } /** * Subscribe to a list. * Uses /contacts/sign_up_form endpoint which automatically handles both creating new contacts * and updating existing contacts based on email address. * * @param array $args Subscriber data array. * @param string $url Subscribe URL (ignored, always uses sign_up_form endpoint). * * @return string Result. */ public function subscribe($args, $url = '') { } } /** * Wrapper for ConvertKit's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_ConvertKit extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.convertkit.com/v3'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'ConvertKit'; /** * @inheritDoc */ public $name_field_only = \true; /** * @inheritDoc */ public $slug = 'convertkit'; /** * @inheritDoc */ public $uses_oauth = \false; /** * ET_Core_API_Email_ConvertKit constructor. * * @inheritDoc */ public function __construct($owner, $account_name = '', $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * Generates the URL for adding subscribers. * * @param $list_id * * @since 1.1.0 * * @return string */ protected function _get_subscribe_url($list_id) { } protected function _get_subscriber_counts($forms) { } /** * Adds default args for all API requests to given url. * * @since 1.1.0 * * @param string $url * @param bool $with_secret * * @return string */ protected function _generate_url_for_request($url, $with_secret = \false) { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for Emma's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_Emma extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.e2ma.net'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $http_auth = array('username' => 'api_key', 'password' => 'private_api_key'); /** * @inheritDoc */ public $name = 'Emma'; /** * @inheritDoc */ public $slug = 'emma'; protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _get_custom_fields_url() { } protected function _get_lists_url() { } protected function _get_subscribe_url() { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for Feedblitz's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_Feedblitz extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://www.feedblitz.com'; /** * @inheritDoc */ public $LISTS_URL = 'https://www.feedblitz.com/f.api/syndications'; /** * @inheritDoc */ public $SUBSCRIBE_URL = 'https://www.feedblitz.com/f'; /** * @inheritDoc */ public $custom_fields = 'dynamic'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'Feedblitz'; /** * @inheritDoc */ public $slug = 'feedblitz'; protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } class ET_Core_API_Email_Fields { /** * @var ET_Core_Data_Utils */ protected static $_; protected static $_any_custom_field_type_support; protected static $_predefined_custom_field_support; /** * @var ET_Core_API_Email_Providers */ protected static $_providers; public static $owner; protected static function _custom_field_definitions() { } protected static function _predefined_custom_field_select($custom_fields, $provider, $account_name, $list_id = '') { } /** * Get field definitions * * @since 3.10 * * @param string $type Accepts 'custom_field' * @param string $for Accepts 'builder', 'bloom' * * @return array */ public static function get_definitions($for, $type = 'custom_field') { } public static function initialize() { } } /** * ET_Core_API_Email_FluentCRM class file. * * @class ET_Core_API_Email_FluentCRM * @package ET\Core\API\Email */ // phpcs:disable Squiz.Commenting.VariableComment.MissingVar -- All the class level variables here inherit parent inline documentation. Please check ET_Core_API_Email_Provider or ET_Core_API_Service class. // phpcs:disable Squiz.Commenting.FunctionComment.MissingParamTag -- Almost all the methods here inherit parent inline documentation. Please check ET_Core_API_Email_Provider or ET_Core_API_Service class. /** * Wrapper for FluentCRM's API. * * @since 4.9.1 * * @package ET\Core\API\Email */ class ET_Core_API_Email_FluentCRM extends \ET_Core_API_Email_Provider { /** * Warning message text if the required plugin doesn't exist. * * @var boolean */ public static $PLUGIN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Widely used on all email provider classes. /** * {@inheritdoc} */ public $name = 'FluentCRM'; /** * {@inheritdoc} */ public $slug = 'fluentcrm'; /** * {@inheritdoc} */ public $custom_fields = 'predefined'; /** * {@inheritdoc} */ public $custom_fields_scope = 'account'; /** * ET_Core_API_Email_FluentCRM constructor. */ public function __construct($owner = '', $account_name = '', $api_key = '') { } /** * {@inheritdoc} */ public function get_data_keymap($keymap = array()) { } /** * {@inheritdoc} * * FluentCRM is self hosted and all the fields can be managed on the plugin itself. */ protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * {@inheritdoc} * * FluentCRM is self hosted and all the fields can be managed on the plugin itself. */ public function get_account_fields() { } /** * {@inheritdoc} * * FluentCRM is self hosted and all the lists can be managed on the plugin itself. */ public function fetch_subscriber_lists() { } /** * {@inheritdoc} */ protected function _process_custom_fields($args) { } /** * {@inheritdoc} */ public function subscribe($args, $url = '') { } } /** * Wrapper for GetResponse's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_GetResponse extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.getresponse.com/v3'; /** * @inheritDoc */ public $FIELDS_URL = 'https://api.getresponse.com/v3/custom-fields'; /** * @inheritDoc */ public $LISTS_URL = 'https://api.getresponse.com/v3/campaigns'; /** * @inheritDoc */ public $SUBSCRIBE_URL = 'https://api.getresponse.com/v3/contacts'; /** * @inheritDoc */ public $name = 'GetResponse'; /** * @inheritDoc */ public $name_field_only = \true; /** * @inheritDoc */ public $slug = 'getresponse'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _maybe_set_custom_headers() { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for HubSpot's API. * * @since 3.0.72 * * @package ET\Core\API\Email */ class ET_Core_API_Email_HubSpot extends \ET_Core_API_Email_Provider { /** * Access Token required error message. * * @var string */ public static $TOKEN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Widely used on all email provider classes. /** * @inheritDoc */ public $BASE_URL = 'https://api.hubapi.com/contacts/v1'; /** * @inheritDoc */ public $FIELDS_URL = 'https://api.hubapi.com/properties/v1/contacts/properties'; /** * @inheritDoc */ public $LISTS_URL = 'https://api.hubapi.com/contacts/v1/lists/static'; /** * @inheritDoc */ public $SUBSCRIBE_URL = 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/@email@'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'HubSpot'; /** * @inheritDoc */ public $slug = 'hubspot'; /** * ET_Core_API_Email_HubSpot constructor. * * @inheritDoc * * @param string $owner {@see self::owner}. * @param string $account_name The name of the service account that the instance will provide access to. * @param string $api_key The api key for the account. Optional (can be set after instantiation). */ public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * Whether current request needs API Key instead. * * It's needed to check existing API Key implementation when no Access Token presents. * * @since 4.18.1 * * @return boolean API Key status. */ protected function _is_api_key_needed() { } /** * Get list add contact URL. * * @since 3.0.72 * @since 4.18.1 Replaces hapikey query string with authentication on headers. * * @param string $list_id List ID. * * @return string URL for adding contact to list. */ protected function _get_list_add_contact_url($list_id) { } /** * Maybe need to set custom headers. * * @since 4.18.1 */ protected function _maybe_set_custom_headers() { } /** * Maybe set URLs. * * @since 3.0.72 * @since 4.18.1 Replaces hapikey query string with access token headers. * * @param string $email Contact email. */ protected function _maybe_set_urls($email = '') { } protected function _process_custom_fields($args) { } /** * @inheritDoc * * @since 4.18.1 Replaces api_key field with token. */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc * * @since 4.18.1 Replaces API Key usage with Access Token. */ public function fetch_subscriber_lists() { } /** * @inheritDoc * * @since 4.18.1 Replaces API Key usage with Access Token. */ public function subscribe($args, $url = '') { } } /** * Wrapper for Infusionsoft's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_Infusionsoft extends \ET_Core_API_Email_Provider { private static $_data_keys = array('app_name' => 'client_id', 'api_key' => 'api_key'); /** * @inheritDoc */ public $ACCESS_TOKEN_URL = 'https://api.infusionsoft.com/token'; /** * @inheritDoc */ public $AUTHORIZATION_URL = 'https://signin.infusionsoft.com/app/oauth/authorize'; /** * @inheritDoc */ public $BASE_URL = ''; /** * @inheritDoc * Use this variable to hold the pattern and update $BASE_URL dynamically when needed */ public $BASE_URL_PATTERN = 'https://@app_name@.infusionsoft.com/api/xmlrpc'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'Infusionsoft'; /** * @inheritDoc */ public $oauth_version = '2.0'; /** * @inheritDoc */ public $slug = 'infusionsoft'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _add_contact_to_list($contact_id, $list_id) { } protected function _create_contact($contact_details) { } protected function _do_request($data) { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _get_base_url() { } protected function _get_contact_by_email($email) { } protected function _optin_email_address($email) { } protected function _process_custom_fields($args) { } public function retrieve_subscribers_count() { } /** * @inheritDoc */ protected function _process_subscriber_lists($lists) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for MadMimi's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MadMimi extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.madmimi.com'; /** * @inheritDoc */ public $LISTS_URL = 'https://api.madmimi.com/audience_lists/lists.json'; /** * @inheritDoc */ public $SUBSCRIBE_URL = 'https://api.madmimi.com/audience_lists/@list_id@/add'; /** * @inheritDoc */ public $custom_fields = 'dynamic'; /** * @inheritDoc */ public $name = 'MadMimi'; /** * @inheritDoc */ public $slug = 'madmimi'; public function __construct($owner, $account_name, $api_key = '') { } protected function _maybe_set_urls($list_id = '') { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for MailChimp's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MailChimp extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = ''; /** * Use this variable to hold the pattern and update $BASE_URL dynamically when needed */ public $BASE_URL_PATTERN = 'https://@datacenter@.api.mailchimp.com/3.0'; /** * @inheritDoc */ public $http_auth = array('username' => '-', 'password' => 'api_key'); /** * @inheritDoc */ public $name = 'MailChimp'; /** * @inheritDoc */ public $slug = 'mailchimp'; public function __construct($owner, $account_name, $api_key = '') { } protected function _add_note_to_subscriber($email, $url) { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _fetch_subscriber_list_group_options($list_id, $group_id) { } protected function _fetch_subscriber_list_groups($list_id) { } protected function _process_custom_fields($args) { } protected function _set_base_url() { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } public function get_subscriber($list_id, $email) { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for MailPoet's API. * * @since 3.0.76 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MailPoet extends \ET_Core_API_Email_Provider { /** * @var ET_Core_API_Email_Provider */ private $_MP; public static $PLUGIN_REQUIRED; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'MailPoet'; /** * @inheritDoc */ public $slug = 'mailpoet'; public function __construct($owner = '', $account_name = '', $api_key = '') { } /** * Initiate provider class based on the version number. * * @param string $version Version number. * @param string $owner Owner. * @param string $account_name Account name. * @param string $api_key API key. */ protected function _init_provider_class($version, $owner, $account_name, $api_key) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for MailerLite's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MailerLite extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.mailerlite.com/api/v2'; /** * @inheritDoc */ public $FIELDS_URL = 'https://api.mailerlite.com/api/v2/fields'; /** * @inheritDoc */ public $LISTS_URL = 'https://api.mailerlite.com/api/v2/groups'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'MailerLite'; /** * @inheritDoc */ public $slug = 'mailerlite'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _maybe_set_custom_headers() { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for integration with Mailster plugin. * * @license * Copyright © 2017 Elegant Themes, Inc. * Copyright © 2017 Xaver Birsak * * @since 1.1.0 * @package ET\Core\API\Email */ class ET_Core_API_Email_Mailster extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $name = 'Mailster'; /** * @inheritDoc */ public $slug = 'mailster'; /** * @inheritDoc */ public $uses_oauth = \false; /** * Creates a referrer string that includes the name of the opt-in used to subscribe. * * @param array $args The args array that was passed to {@link self::subscribe()} * * @return string */ protected function _get_referrer($args) { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for Ontraport's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_Ontraport extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $FIELDS_URL = 'https://api.ontraport.com/1/Contacts/meta'; /** * @inheritDoc */ public $LISTS_URL = 'https://api.ontraport.com/1/objects?objectID=5'; /** * @inheritDoc */ public $SUBSCRIBE_URL = 'https://api.ontraport.com/1'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'Ontraport'; /** * @inheritDoc */ public $slug = 'ontraport'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _get_subscriber_list_type($list_id) { } protected function _maybe_set_custom_headers() { } protected function _prefix_subscriber_lists($name_prefix, $id_prefix) { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } public function get_subscriber($email) { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Manages email provider class instances. */ class ET_Core_API_Email_Providers { private static $_instance; /** * @var ET_Core_Data_Utils */ protected static $_; protected static $_any_custom_field_type; protected static $_custom_fields_support; protected static $_fields; protected static $_metadata; protected static $_names; protected static $_names_by_slug; protected static $_name_field_only = array(); protected static $_slugs; public static $providers = array(); public function __construct() { } protected function _initialize() { } /** * Returns the email provider accounts array from core. * * @return array|mixed */ public function accounts() { } /** * @see {@link \ET_Core_API_Email_Provider::account_exists()} */ public function account_exists($provider, $account_name) { } public function account_fields($provider = 'all') { } public function custom_fields_data() { } /** * Get class instance for a provider. Instance will be created if necessary. * * @param string $name_or_slug The provider's name or slug. * @param string $account_name The identifier for the desired account with the provider. * @param string $owner The owner for the instance. * * @return bool|ET_Core_API_Email_Provider The provider instance or `false` if not found. */ public function get($name_or_slug, $account_name, $owner = 'ET_Core') { } public static function instance() { } public function is_third_party($name_or_slug) { } /** * Returns the names of available providers. List can optionally be filtered. * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * * @return array */ public function names($type = 'all') { } /** * Returns an array mapping the slugs of available providers to their names. List can optionally be filtered. * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * @param string $filter Optionally filter the list by a condition. * Accepts 'name_field_only', 'predefined_custom_fields', 'dynamic_custom_fields', * 'no_custom_fields', 'any_custom_field_type', 'custom_fields'. * * @return array */ public function names_by_slug($type = 'all', $filter = '') { } /** * @see {@link \ET_Core_API_Email_Provider::remove_account()} */ public function remove_account($provider, $account_name) { } /** * Returns the slugs of available providers. List can optionally be filtered. * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * * @return array */ public function slugs($type = 'all') { } /** * @see {@link \ET_Core_API_Email_Provider::update_account()} */ public function update_account($provider, $account, $data) { } } /** * Wrapper for SalesForce's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_SalesForce extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $ACCESS_TOKEN_URL = 'https://login.salesforce.com/services/oauth2/token'; /** * @inheritDoc */ public $AUTHORIZATION_URL = 'https://login.salesforce.com/services/oauth2/authorize'; /** * @inheritDoc */ public $BASE_URL = ''; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'SalesForce'; /** * @inheritDoc */ public $slug = 'salesforce'; /** * @inheritDoc */ public $oauth_version = '2.0'; /** * @inheritDoc */ public $uses_oauth = \true; /** * ET_Core_API_SalesForce constructor. * * @inheritDoc */ public function __construct($owner, $account_name = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * @return string */ protected function _fetch_subscriber_lists() { } protected function _process_custom_fields($args) { } public function _set_base_url() { } public function authenticate() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } public function get_subscriber($email) { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } /** * Post web-to-lead request to SalesForce * * @return string */ public function subscribe_salesforce_web($args) { } } /** * Wrapper for SendinBlue's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_SendinBlue extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://api.sendinblue.com/v3'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name. /** * @inheritDoc */ public $FIELDS_URL = 'https://api.sendinblue.com/v3/contacts/attributes'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name. /** * @inheritDoc */ public $LISTS_URL = 'https://api.sendinblue.com/v3/contacts/lists'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name. /** * The URL to which new subscribers can be posted. * * @var string */ public $SUBSCRIBE_URL = 'https://api.sendinblue.com/v3/contacts'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name. /** * The URL to get the subscriber information. * Only used by legacy mode (v2) to check whether we should create or update subscription. * * @var string */ public $USERS_URL = 'https://api.sendinblue.com/v2.0/user'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'SendinBlue'; /** * @inheritDoc */ public $slug = 'sendinblue'; /** * @inheritDoc */ public $uses_oauth = \false; public function __construct($owner, $account_name, $api_key = '') { } protected function _maybe_set_custom_headers() { } protected function _process_custom_fields($args) { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } public function get_subscriber($email) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * Get custom fields for a subscriber list. * Need to override the method in the child class to dynamically use the API endpoint * and response_data_key based on the API version being used. * * @param int|string $list_id The list ID. * @param array $list The lists array. * * @return array */ protected function _fetch_custom_fields($list_id = '', $list = array()) { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } /** * Check if the api-key being used is legacy (v2). * * @return boolean */ protected function _should_use_legacy_api() { } } /** * Wrapper for MailPoet's API. * * @since 3.0.76 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MailPoet2 extends \ET_Core_API_Email_Provider { public static $PLUGIN_REQUIRED; /** * @inheritDoc */ public $name = 'MailPoet'; /** * @inheritDoc */ public $slug = 'mailpoet'; public function __construct($owner = '', $account_name = '', $api_key = '') { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for MailPoet's API. * * @since 3.0.76 * * @package ET\Core\API\Email */ class ET_Core_API_Email_MailPoet3 extends \ET_Core_API_Email_Provider { public static $PLUGIN_REQUIRED; /** * @inheritDoc */ public $name = 'MailPoet'; /** * @inheritDoc */ public $slug = 'mailpoet'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; public function __construct($owner = '', $account_name = '', $api_key = '') { } protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _process_custom_fields($args) { } /** * Get required custom fields. * * @return $required_fields */ protected function _get_required_custom_fields() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for ProviderName's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_ProviderName extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = ''; /** * @inheritDoc */ public $name = 'ProviderName'; /** * Whether or not only a single name field is supported instead of first/last name fields. * * @var string */ public $name_field_only = \false; /** * @inheritDoc */ public $slug = 'providername'; /** * @inheritDoc * @internal If true, oauth endpoints properties must also be defined. */ public $uses_oauth = \false; /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array(), $custom_fields_key = '') { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } /** * Wrapper for iContact's API. * * @since 1.1.0 * * @package ET\Core\API\Email */ class ET_Core_API_Email_iContact extends \ET_Core_API_Email_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://app.icontact.com/icp/a'; /** * @inheritDoc */ public $custom_fields_scope = 'account'; /** * @inheritDoc */ public $name = 'iContact'; /** * @inheritDoc */ public $slug = 'icontact'; protected function _fetch_custom_fields($list_id = '', $list = array()) { } protected function _set_custom_headers() { } protected function _get_account_id() { } protected function _get_subscriber($args, $exclude = \null) { } protected function _get_folder_id() { } protected function _process_custom_fields($args) { } protected function _set_urls() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } /** * @inheritDoc */ public function fetch_subscriber_lists() { } /** * @inheritDoc */ public function subscribe($args, $url = '') { } } abstract class ET_Core_API_SocialNetwork extends \ET_Core_API_Service { public function __construct($owner = '', $account_name = '') { } /** * @inheritDoc */ protected function _get_data_keys() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ protected function _get_accounts_data() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array(), $custom_fields_key = '') { } /** * @inheritDoc */ public function save_data() { } } /** * High-level wrapper for interacting with the external API's offered by 3rd-party anti-spam providers. * * @since 4.0.7 * * @package ET\Core\API\Spam */ abstract class ET_Core_API_Spam_Provider extends \ET_Core_API_Service { /** * @since 4.0.7 * * @inheritDoc */ public $service_type = 'spam'; /** * @since 4.0.7 * * @inheritDoc */ protected function _get_data() { } /** * Returns whether or not an account exists in the database. * * @since 4.0.7 * * @param string $provider * @param string $account_name * * @return bool */ public static function account_exists($provider, $account_name) { } /** * @since 4.0.7 * * @inheritDoc */ public function delete() { } /** * Retrieves the email accounts data from the database. * * @since 4.0.7 * * @return array */ public static function get_accounts() { } /** * @since 4.0.7 * * @inheritDoc */ public function get_data_keymap($keymap = array()) { } abstract public function is_enabled(); /** * Remove an account * * @since 4.0.7 * * @param string $provider * @param string $account_name */ public static function remove_account($provider, $account_name) { } /** * @since 4.0.7 * * @inheritDoc */ public function save_data() { } /** * @since 4.0.7 * * @inheritDoc */ public function set_account_name($name) { } /** * Remove keys with brackets. * * Fixing my errors is no walk in the park; it's more like a hike up Mt. * * @param array $data Options array. * @return void */ public static function remove_keys_with_brackets(&$data) { } /** * Updates the data for a provider account. * * @since 4.0.7 * * @param string $provider The provider's slug. * @param string $account The account name. * @param array $data The new data for the account. */ public static function update_account($provider, $account, $data) { } abstract public function verify_form_submission(); } /** * Manages anti-spam provider class instances. * * @since 4.0.7 */ class ET_Core_API_Spam_Providers { private static $_instance; /** * @var ET_Core_Data_Utils */ protected static $_; protected static $_fields; protected static $_metadata; protected static $_names; protected static $_names_by_slug; protected static $_slugs; public static $providers = array(); public function __construct() { } protected function _initialize() { } /** * Returns the spam provider accounts array from core. * * @since 4.0.7 * * @return array|mixed */ public function accounts() { } /** * @see {@link \ET_Core_API_Spam_Provider::account_exists()} */ public function account_exists($provider, $account_name) { } public function account_fields($provider = 'all') { } /** * Get class instance for a provider. Instance will be created if necessary. * * @param string $name_or_slug The provider's name or slug. * @param string $account_name The identifier for the desired account with the provider. * @param string $owner The owner for the instance. * * @return ET_Core_API_Spam_Provider|bool The provider instance or `false` if not found. */ public function get($name_or_slug, $account_name, $owner = 'ET_Core') { } public static function instance() { } public function is_third_party($name_or_slug) { } /** * Returns the names of available providers. List can optionally be filtered. * * @since 4.0.7 * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * * @return array */ public static function names($type = 'all') { } /** * Returns an array mapping the slugs of available providers to their names. * * @since 4.0.7 * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * * @return array */ public function names_by_slug($type = 'all') { } /** * @see {@link \ET_Core_API_Spam_Provider::remove_account()} */ public function remove_account($provider, $account_name) { } /** * Returns the slugs of available providers. List can optionally be filtered. * * @since 4.0.7 * * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'. * * @return array */ public static function slugs($type = 'all') { } /** * @since 4.0.7 * * @see {@link \ET_Core_API_Spam_Provider::update_account()} */ public function update_account($provider, $account, $data) { } } /** * Wrapper for ProviderName's API. * * @since 4.0.7 * * @package ET\Core\API\Misc\ReCaptcha */ class ET_Core_API_Spam_ReCaptcha extends \ET_Core_API_Spam_Provider { /** * @inheritDoc */ public $BASE_URL = 'https://www.google.com/recaptcha/api/siteverify'; /** * @inheritDoc */ public $max_accounts = 1; /** * @inheritDoc */ public $name = 'ReCaptcha'; /** * @inheritDoc */ public $slug = 'recaptcha'; public function __construct($owner = 'ET_Core', $account_name = '', $api_key = '') { } protected function _add_actions_and_filters() { } public function action_wp_enqueue_scripts() { } public function is_enabled() { } /** * Check if page content contains Contact Form or Signup modules with reCaptcha enabled. * * This method now leverages DynamicAssets' cached feature detection instead of performing * expensive content parsing, avoiding redundant work and improving performance. * * @since 5.0.0 * * @return bool True if reCaptcha-enabled modules found, false otherwise. */ private function _has_recaptcha_enabled_module() { } /** * Verify a form submission. * * @since 4.0.7 * * @global $_POST['token'] * * @return mixed[]|string $result { * Interaction Result * * @type bool $success Whether or not the request was valid for this site. * @type int $score Score for the request (0 < score < 1). * @type string $action Action name for this request (important to verify). * @type string $challenge_ts Timestamp of the challenge load (ISO format yyyy-MM-ddTHH:mm:ssZZ). * @type string $hostname Hostname of the site where the challenge was solved. * @type string[] $error-codes Optional * } */ public function verify_form_submission() { } /** * @inheritDoc */ public function get_account_fields() { } /** * @inheritDoc */ public function get_data_keymap($keymap = array()) { } } class ET_Core_Post_Query { /** * @var ET_Core_Data_Utils */ protected static $_; /** * Whether or not to negate the next query arg that is set. Default 'false'. * * @since 3.0.99 * @var bool */ protected $_negate = \false; /** * The query result. * * @since 3.0.99 * @var WP_Post|WP_Post[] */ protected $_query_result; /** * The args that will be passed to {@see WP_Query} the next time {@see self::run()} is called. * * @since 3.0.99 * @var array */ protected $_wp_query_args; /** * The name of the primary category-style taxonomy for this post type. * * @since 3.0.99 * @var string */ public $category_tax; /** * The post type (slug) for this instance. * * @since 3.0.99 * @var string */ public $post_type; /** * The name of the primary tag-style taxonomy for this post type. * * @since 3.0.99 * @var string */ public $tag_tax; /** * ET_Core_Post_Query constructor. * * @since 3.0.99 * * @param string $post_type See {@see self::$post_type} * @param string $category_tax See {@see self::$category_tax} * @param string $tag_tax See {@see self::$tag_tax} */ public function __construct($post_type = '', $category_tax = '', $tag_tax = '') { } /** * Adds a meta query to the WP Query args for this instance. * * @since 3.0.99 * * @param string $key The meta key. * @param string $value The meta value. * @param bool $negate Whether or not to negate this meta query. */ protected function _add_meta_query($key, $value, $negate) { } /** * Adds a tax query to the WP Query args for this instance. * * @since 3.0.99 * * @param string $taxonomy The taxonomy name. * @param array $terms Taxonomy terms. * @param bool $negate Whether or not to negate this tax query. */ protected function _add_tax_query($taxonomy, $terms, $negate) { } /** * Resets {@see self::$_negate} to default then returns the previous value. * * @return bool */ protected function _reset_negate() { } /** * Adds a tax query to this instance's WP Query args for it's category taxonomy. * * @since 3.0.99 * * @param mixed ...$categories Variable number of category arguments where each arg can be * a single category name or ID or an array of names or IDs. * * @return $this */ public function in_category() { } /** * Negates the next query arg that is set. * * @since 3.0.99 * * @return $this */ public function not() { } /** * Performs a new WP Query using the instance's current query params and then returns the * results. Typically, this method is the last method call in a set of chained calls to other * methods on this class during which various query params are set. * * Examples: * * $cpt_query * ->in_category( 'some_cat' ) * ->with_tag( 'some_tag' ) * ->run(); * * $cpt_query * ->with_tag( 'some_tag' ) * ->not()->in_category( 'some_cat' ) * ->run(); * * @since 3.0.99 * * @param array $args Optional. Additional arguments for {@see WP_Query}. * * @return WP_Post|WP_Post[] $posts */ public function run($args = array()) { } /** * Adds a meta query to this instance's WP Query args. * * @since 3.0.99 * * @param string $key The meta key. * @param mixed $value Optional. The meta value to compare. When `$value` is not provided, * the comparison will be 'EXISTS' or 'NOT EXISTS' (when negated). * When `$value` is an array, comparison will be 'IN' or 'NOT IN'. * When `$value` is not an array, comparison will be '=' or '!='. * * @return $this */ public function with_meta($key, $value = \null) { } /** * Adds a tax query to this instance's WP Query args for it's primary tag-like taxonomy. * * @since 3.0.99 * * @param mixed ...$tags Variable number of tag arguments where each arg can be * a single tag name or ID, or an array of tag names or IDs. * * @return $this */ public function with_tag() { } } /** * This class handles the d5-readiness process. * * @package Divi */ class ET_D5_Readiness { /** * Class instance. * * @var ET_D5_Readiness */ private static $_instance; /** * Get the class instance. * * @since ?? * * @return ET_D5_Readiness */ public static function instance() { } /** * Includes files. * * @since ?? * * @return void */ public static function includes() { } /** * Initialize the hooks. * * @since ?? * * @return void */ public static function init_hooks() { } /** * Even if woocommerce is not active, we need to load the modules. * * @since ?? * * @return bool */ public static function load_woocommerce_modules() { } /** * Update the ajax calls list. * * @since ?? * * @return array */ public static function update_ajax_calls_list() { } /** * Callback for `et_should_load_shortcode_framework` filter to force shortcode framework to be loaded * when AJAX request is made for getting post check result list on D5 Readiness app. Shortcode framework * is not loaded on AJAX requests by default for performance reason. * * @since ?? * * @param bool $value The current value. * * @return bool */ public static function force_load_shortcode_framework($value) { } /** * Clear module cache transient when theme is switched. * * This ensures that when users switch from D4 to D5 after editing content in D4, * the migrator starts with fresh data and doesn't show stale module counts. * * @since ?? * * @return void */ public static function clear_module_cache_on_theme_switch() { } /** * Clear module cache transient when Divi theme is updated. * * This ensures that after a theme update, the migrator uses fresh data since * module conversion capabilities may have changed in the new version. * * @since ?? * * @param WP_Upgrader $upgrader WP_Upgrader instance. * @param array $options Array of bulk item update data. * * @return void */ public static function clear_module_cache_on_upgrade($upgrader, $options) { } } } namespace Divi\D5_Readiness\Server\AJAXEndpoints { /** * Class that handles endpoints callback for compatibility checks * * @since ?? * * @package D5_Readiness */ class CompatibilityChecks { /** * List of modules. * * @var array */ protected static $_modules; /** * List of third party module slugs. * * @var array */ protected static $_third_party_module_slugs; /** * Register endpoints for compatibility checks. * * @since ?? */ public static function register_endpoints() { } /** * Setup the post feature check manager. * * @since ?? */ public static function setup_post_feature_check_manager() { } /** * Get the overview status results. * * Extracted from get_overview_status() method to be used in D5 Migrator menu Notification count. * * @param bool $override_use_meta Whether to override the use_meta value. Override maybe required * to obtain Notification bubble count. * @param bool $updated_use_meta The updated use_meta value. * * @since ?? * * @return array */ public static function get_overview_status_results($override_use_meta = false, $updated_use_meta = false) { } /** * Get the overview status. * * @since ?? * * @return void */ public static function get_overview_status() { } /** * Get the post data. * * @param string $post_type Post type. * @param array $results Results. * * @since ?? * * @return array */ public static function get_post_data($post_type, $results) { } /** * Initialize modules before use. * * @since ?? * * @return void */ public static function initialze_modules_before_use() { } /** * Get the initial used modules names. * * @since ?? * * @return array */ protected static function _get_initial_used_modules_names() { } /** * Get the used modules name from content. * Keep track of used modules names from every post content. * * @param string $post_content The post content. * @param array $used_modules_names The used modules names. * * @since ?? * * @return array */ protected static function _get_used_modules_name_from_content($post_content, &$used_modules_names) { } /** * Get newly convertible shortcode modules from converted posts. * Only checks shortcode modules that now have D5 support in already-converted posts. * * @param string $post_content The post content from a converted post. * * @since ?? * * @return array The newly convertible modules found in the converted post. */ protected static function _get_newly_convertible_modules_from_converted_post($post_content, &$used_modules_names = []) { } /** * Get shortcode slugs from converted content while ignoring nonconvertible shortcode-modules. * * @param string $content The converted post content. * * @since ?? * * @return array */ protected static function _get_shortcode_slugs_from_converted_content($content) { } /** * Collect shortcode content from blocks, skipping nonconvertible shortcode-modules. * * @param array $blocks Block data from parse_blocks(). * * @since ?? * * @return string */ protected static function _collect_shortcode_content_from_blocks(array $blocks) { } /** * Check whether a shortcode-module block is nonconvertible. * * @param array $block Block data from parse_blocks(). * * @since ?? * * @return bool */ protected static function _is_nonconvertible_shortcode_module_block(array $block) { } /** * Get the result list. * * @since ?? * * @return void */ public static function get_result_list() { } /** * Run the checks for presets. * * @since ?? * * @return void */ public static function get_preset_check_result_list() { } /** * Run the checks for widget areas. * * @since ?? * * @return void */ public static function get_widget_check_result_list() { } /** * Run the checks for plugins that use divi hooks. * * @since ?? * * @return void */ public static function get_active_plugins_result_list() { } /** * Get the list of modules that are ready and not ready for D5 conversation. * * @since ?? * * @return void */ public static function get_modules_conversation_status() { } public static function third_party_module_slugs() { } } /** * Class that handles endpoints callback for rollback site's content. * * @since ?? * * @package D5_Readiness */ class Rollback { /** * Register endpoints for rollback site's content. */ public static function register_endpoints() { } /** * Ajax Callback :: Get post IDs that are ready to be rolled back. */ public static function get_rollback_ids() { } /** * Ajax Callback :: Rollback D5 content to D4 format. */ public static function rollback_d5_to_d4() { } } /** * Class that handles endpoints callback for upgrading site's content. * * @since ?? * * @package D5_Readiness */ class Upgrade { /** * Register endpoints for upgrading site's content. * * @since ?? */ public static function register_endpoints() { } /** * Ajax Callback :: Convert D4 content to D5 format. */ public static function convert_d4_to_d5() { } /** * Convert global presets from D4 to D5 format. * * @since ?? * * @return void */ protected static function _maybe_convert_global_presets() { } /** * Maybe migrate app preferences settings. * Some of the app preferences settings are saved under different setting names. * * @since ?? * * @return void */ protected static function _maybe_migrate_app_preferences() { } } } namespace Divi\D5_Readiness\Server { /** * Class that handles D5 Readiness admin page. * * @since ?? * * @package D5_Readiness */ class AdminPage { /** * Add the d5-readiness submenu menu item. * * @since ?? * * @return string|false */ public static function add_admin_submenu_item() { } /** * Render the D5 Readiness page. * * @since ?? * * @return void */ public static function render_page() { } /** * Load the d5-readiness scripts. * * @since ?? * * @param bool $enqueue_prod_scripts Whether to enqueue the production scripts. * @param bool $skip_react_loading Whether to skip the React loading. * * @return void */ public static function load_js($enqueue_prod_scripts = true, $skip_react_loading = false) { } /** * ET_D5_Readiness helpers. * * @since ?? */ public static function get_settings() { } } } namespace Divi\D5_Readiness\Server\Checks { /** * Abstract class for feature checking. * * @since ?? * * @package D5_Readiness */ abstract class FeatureCheck { /** * Feature name. * * @var string * * @since ?? */ protected $_feature_name = 'Feature Name'; /** * Detected flag. * * @var array|bool * * @since ?? */ protected $_detected = false; /** * Check if the feature was detected. * * @since ?? */ public function detected() { } /** * Get the feature name. * * @since ?? */ public function get_feature_name() { } } /** * This file checks for plugins that use Divi hooks. * * @package D5_Readiness */ class PluginHooksCheck { /** * Divi 4 hooks that we should detect. * * @var array */ protected $_divi_4_hooks = ['et_builder_ready', 'et_builder_modules_loaded', 'divi_extensions_init']; /** * Divi 5 hooks that we should detect. * * @var array */ protected $_divi_5_hooks = ['divi_module_library_modules_dependency_tree', 'divi_visual_builder_assets_before_enqueue_packages', 'divi_visual_builder_assets_before_enqueue_scripts', 'divi_visual_builder_assets_before_enqueue_styles']; /** * List of plugins that use only Divi 4 hooks. * * @var array */ protected $_incompatible_plugins = []; /** * Run the hook checks. */ public function run_check() { } /** * Check if plugins are hooked into the specified Divi hooks. */ protected function _check_hooks() { } /** * Get the plugin name of the callback function. * * @param mixed $function The callback function. * * @return string|false The plugin name if found, false otherwise. */ private function _get_plugin_name($function) { } /** * Get the name of the feature being checked along with the description. * * @return int[]|string[] The name of the feature with a detailed * description of detected plugins. */ public function get_detected_plugins() { } /** * Determine if any plugins were detected using Divi hooks. * * @return bool True if plugins were detected, false otherwise. */ public function detected() { } } /** * Abstract class for post feature checking. * * @since ?? * * @package D5_Readiness */ abstract class PostFeatureCheck extends \Divi\D5_Readiness\Server\Checks\FeatureCheck { /** * Post ID. * * @var int * * @since ?? */ protected $_post_id; /** * Post Content. * * @var string * * @since ?? */ protected $_post_content; /** * Post Meta. * * @var mixed * * @since ?? */ protected $_post_meta; /** * Constructor. * * @param int $post_id The post ID. * @param string $post_content The post content. * @param array $post_meta The post meta. * * @since ?? */ public function __construct($post_id, $post_content, $post_meta) { } /** * Check the post content for a specific feature. * * @param string $content The post content. * * @return bool True if the feature was detected, false otherwise. */ protected function _check_post_content($content) { } /** * Check the post meta for a specific feature. * * @param array $meta The post meta. * * @return bool True if the feature was detected, false otherwise. */ protected function _check_post_meta($meta) { } /** * Check the post for a specific feature. * * @since ?? * * @return bool True if the feature was detected, false otherwise. */ protected function _check_post() { } /** * Run the check. * * @since ?? */ public function run_check() { } } } namespace Divi\D5_Readiness\Server\Checks\PostFeature { /** * Class for checking if post contains modules that makes post content not compatible with Divi 5. * * @since ?? * * @package D5_Readiness */ class ModuleUsage extends \Divi\D5_Readiness\Server\Checks\PostFeatureCheck { /** * Module's post feature check results. * * @var array * * @since ?? */ protected $_module_results = []; /** * Constructor. * * @param int $post_id The post ID. * @param string $post_content The post content. * @param array $post_meta The post meta. * * @return void */ public function __construct($post_id, $post_content, $post_meta) { } /** * Check the post content for certain module use. * * @param string $content The post content. * * @return bool|array false if no modules detected, results array otherwise. */ protected function _check_post_content($content) { } /** * Get feature name. * * @since ?? */ public function get_feature_name() { } } /** * Class for checking if post contains split test usage that makes post content not compatible with Divi 5. * * @since ?? * * @package Divi */ class SplitTestUsage extends \Divi\D5_Readiness\Server\Checks\PostFeatureCheck { /** * Constructor. * * @param int $post_id The post ID. * @param string $post_content The post content. * @param array $post_meta The post meta. * * @return void */ public function __construct($post_id, $post_content, $post_meta) { } /** * Check the post content for split test usage. * * @param string $content The post content. */ protected function _check_post_content($content) { } } } namespace Divi\D5_Readiness\Server\Checks { /** * This file handles AJAX requests for the Divi 5 Readiness System. * * @since ?? * * @package D5_Readiness */ class PostFeatureCheckManager { /** * Array of registered feature check classes. * * @var array */ private $_checks = array(); /** * Register a new feature check class. * * @param string $check_class The name of the feature check class to register. */ public function register_check($check_class) { } /** * Run all registered feature checks and return the results. * * @param int $post_id The post ID to run the checks on. * @param string $content The post content to run the checks on. * * @return mixed False if no features were detected, an array detailing detected features otherwise. */ public function run_all_checks($post_id, $content) { } } /** * Class for checking if preset exist. * * @since ?? * * @package D5_Readiness */ class PresetFeatureCheck extends \Divi\D5_Readiness\Server\Checks\FeatureCheck { /** * Constructor. * * @since ?? */ public function __construct() { } /** * Check preset exist. * * @since ?? * * @return bool Boolean value for preset exist. */ protected function _check_preset_exist() { } /** * Run preset check. * * @since ?? */ public function run_check() { } } /** * Class for checking if widget areas containst shortcode-based module that is not compatible with Divi 5. * * @since ?? * * @package D5_Readiness */ class WidgetFeatureCheck extends \Divi\D5_Readiness\Server\Checks\FeatureCheck { /** * List of modules. * * @var array */ protected static $_modules; /** * List of third party module slugs. * * @var array */ protected static $_third_party_module_slugs; /** * Constructor. * * @since ?? */ public function __construct() { } /** * Get the initial used modules names. * * @since ?? * * @return array */ protected static function _get_initial_used_modules_names() { } /** * Get the used modules name from content. * Keep track of used modules names from every widget content. * * @param string $post_content The widget content. * @param array $used_modules_names The used modules names. * * @since ?? * * @return array */ protected static function _get_used_modules_name_from_content($post_content, &$used_modules_names) { } /** * Get Module Name from Registered Modules. * * @since ?? * * @param string $slug The module slug. * * @return string $results Comma separated list of shortcode names found in widget areas. */ protected static function _get_module_name_from_slug($slug) { } /** * Detect and process shortcodes found in widget areas. * * @since ?? * * @param string $content The content to check for shortcodes. * * @return string $results Comma separated list of shortcode names found in widget areas. */ protected static function _get_module_names_from_content($content) { } /** * Get sidebar name by ID. * * @since ?? * * @param string $sidebar_id The sidebar ID. * * @return string|null The sidebar name if found, null otherwise. */ protected static function _get_sidebar_name_by_id($sidebar_id) { } /** * Check widget areas for any shortcode usage. * * @since ?? * * @return array|bool Array with results if any shortcode usage was detected, false otherwise. */ protected function _check_widget_areas() { } /** * Run widget check. * * @since ?? */ public function run_check() { } } } namespace Divi\D5_Readiness\Server { /** * Class that handles conversion for Divi 5 Readiness. * * @since ?? * * @package D5_Readiness */ class Conversion { /** * For a D4 formatted post, converts to D5 format. For a D5 formatted post, checks for newly * convertible modules within D5 shortcode-module and converts them to D5 format. * * @param string $post_id The post ID. * * @return array */ public static function convert_single_post($post_id) { } /** * Get the meta query for posts for which conversion failed or was only partially successful. * * @since ?? * * @param string $post_type The post type. * @param bool $use_meta Whether to use meta. * * @return array */ private static function _get_conversion_failed_meta_query($post_type, $use_meta) { } /** * Get posts for which conversion failed or was partially successful. * * @since ?? * * @param string $post_type The post type. * @param bool $use_meta Whether to use meta. * * @return array */ public static function get_posts_conversion_failed($post_type, $use_meta) { } /** * Get the meta query for posts that have not been converted. * * @param string $post_type The post type. * @param bool $use_meta Whether to use meta. * * @return array * @since ?? */ public static function _get_pending_conversion_meta_query($post_type, $use_meta) { } /** * Get posts to convert. * * @since ?? * * @param string $post_type The post type. * @param boolean $use_meta Default FALSE. * * @return array */ public static function get_posts_pending_conversion($post_type, $use_meta = false) { } } /** * Class that handles post types for Divi 5 Readiness. * * @since ?? * * @package D5_Readiness */ class PostTypes { /** * Get post type slugs that needs to be checked / converted. * * @since ?? * * @return array */ public static function get_post_type_slugs() { } /** * Helper function to query and count library posts by status. * * @param string $status The post status to query. * @return int The count of posts with the given status. */ public static function get_library_posts_count_by_status($status) { } /** * Get post types that need to be checked / converted. * * @since ?? * * @return array */ public static function get_post_types() { } } } namespace { /** * Theme Options library. * * Registers post types to be used in the "Theme Options" library. * * @package Divi * @subpackage Cloud * @since ?? */ /** * Core class used to implement "Theme Options" library. * * Register post types & taxonomies to be used in "Theme Options" library. */ class ET_Builder_Theme_Options_Library { /** * Instance of `ET_Builder_Theme_Options_Library`. * * @var ET_Builder_Theme_Options_Library */ private static $_instance; /** * Instance of`ET_Core_Data_Utils`. * * @var ET_Core_Data_Utils */ protected static $_; /** * List of i18n strings. * * @var mixed[] */ protected static $_i18n; /** * ET_Builder_Post_Taxonomy_LayoutCategory instance. * * Shall be used for querying `et_theme_options` taxonomy. * * @var ET_Builder_Post_Taxonomy_LayoutCategory */ public $theme_options_categories; /** * ET_Builder_Post_Taxonomy_LayoutTag instance. * * Shall be used for querying `et_theme_options` taxonomy . * * @var ET_Builder_Post_Taxonomy_LayoutTag */ public $theme_options_tags; /** * ET_Builder_Post_Type_TBItem instance. * * Shall be used for querying `et_tb_item` posts . * * @var ET_Builder_Post_Type_TBItem */ public $theme_options; /** * Class constructor. */ public function __construct() { } /** * Dies if an instance already exists. */ protected function _instance_check() { } /** * Registers the Theme Options Library's custom post type and its taxonomies. */ protected function _register_cpt_and_taxonomies() { } /** * Returns the ET_Builder_Theme_Options_Library instance. * * @return ET_Builder_Theme_Options_Library */ public static function instance() { } } /** * Register ET_THEME_OPTIONS_POST_TYPE. * * @since ?? * * @package Divi * @subpackage Cloud * @since ?? */ /** * Class to handle `et_theme_options` post type. * * Registers TO Item. */ class ET_Post_Type_Theme_Options extends \ET_Core_Post_Type { /** * {@inheritDoc} * * @var string */ protected $_owner = 'builder'; /** * {@inheritDoc} * * @var string */ public $name = \ET_THEME_OPTIONS_POST_TYPE; /** * {@inheritDoc} */ protected function _get_args() { } /** * {@inheritDoc} */ protected function _get_labels() { } /** * Get the class instance. * * @param string $type See {@see self::$wp_type} for accepted values. Default is 'cpt'. * @param string $name The name/slug of the post object. Default is {@see self::$name}. * * @return self|null */ public static function instance($type = 'cpt', $name = \ET_THEME_OPTIONS_POST_TYPE) { } /** * Returns TRUE when a layout is Favorite. * * @param string $post_id Post ID. * * @return bool */ public function is_favorite($post_id) { } } /** * ET_Theme_Options_Library_App class. * * Nonces and i18n strings needed for Theme Options Library Cloud app. * * @package Divi */ class ET_Theme_Options_Library_App { /** * Class instance. * * @var ET_Theme_Options_Library_App */ private static $_instance; /** * Get the class instance. * * @return ET_Theme_Options_Library_App */ public static function instance() { } /** * Get Cloud Helpers. * * @return array Helpers. */ public static function get_cloud_helpers() { } /** * Load the Cloud App scripts. * * @param string $enqueue_prod_scripts Flag to force Production scripts. * @param bool $skip_react_loading Flag to skip react loading. * * @return void */ public static function load_js($enqueue_prod_scripts = \true, $skip_react_loading = \false) { } } /** * ET_Theme_Options_Library_Local utility class. * * Item can be a layout, a template, a theme option, a code snippet, etc. * * @since ?? * * @return void */ class ET_Theme_Options_Library_Local extends \ET_Item_Library_Local { /** * Gets the class instance. * * @since ?? * * @return ET_Item_Library_Local */ public static function instance() { } /** * Constructor. */ public function __construct() { } /** * Gets the library items. * * @param string $item_type Item type. * @return array */ public function get_library_items($item_type) { } /** * Performs item exceptional updates. * * @param array $payload Payload. * @param array $updated_data Updated data. * * @since ?? * * @return array */ private function _perform_item_exceptional_updates($payload, $updated_data) { } /** * Updates the library item. * * @param array $payload Payload. * * @return array */ public function perform_item_update($payload) { } } /** * Font style control for Customizer */ class ET_Divi_Font_Style_Option extends \WP_Customize_Control { public $type = 'font_style'; public function render_content() { } } /** * Icon picker control for Customizer */ class ET_Divi_Icon_Picker_Option extends \WP_Customize_Control { public $type = 'icon_picker'; public function render_content() { } } /** * Range-based sliding value picker for Customizer */ class ET_Divi_Range_Option extends \WP_Customize_Control { public $type = 'range'; public function render_content() { } } /** * Custom Select option which supports data attributes for the