Parsed: 115679
<?php /** * WordPress Customize Manager classes * * @package WordPress * @subpackage Customize * @since 3.4.0 */ #[AllowDynamicProperties] /* class WP_Customize_Manager */ /* function WP_Customize_Manager::__construct() – Constructor. */ /* function WP_Customize_Manager::doing_ajax() – Return true if it’s an Ajax request. */ /* function WP_Customize_Manager::wp_die() – Custom wp_die wrapper. Returns either the standard message for UI or the Ajax message. */ /* function WP_Customize_Manager::wp_die_handler() – Return the Ajax wp_die() handler if it’s a customized request. */ /* function WP_Customize_Manager::setup_theme() – Start preview and customize theme. */ /* function WP_Customize_Manager::establish_loaded_changeset() – Establish the loaded changeset. */ /* function WP_Customize_Manager::after_setup_theme() – Callback to validate a theme once it is loaded */ /* function WP_Customize_Manager::start_previewing_theme() – If the theme to be previewed isn’t the active theme, add filter callbacks to swap it out at runtime. */ /* function WP_Customize_Manager::stop_previewing_theme() – Stop previewing the selected theme. */ /* function WP_Customize_Manager::settings_previewed() – Gets whether settings are or will be previewed. */ /* function WP_Customize_Manager::autosaved() – Gets whether data from a changeset’s autosaved revision should be loaded if it exists. */ /* function WP_Customize_Manager::branching() – Whether the changeset branching is allowed. */ /* function WP_Customize_Manager::changeset_uuid() – Get the changeset UUID. */ /* function WP_Customize_Manager::theme() – Get the theme being customized. */ /* function WP_Customize_Manager::settings() – Get the registered settings. */ /* function WP_Customize_Manager::controls() – Get the registered controls. */ /* function WP_Customize_Manager::containers() – Get the registered containers. */ /* function WP_Customize_Manager::sections() – Get the registered sections. */ /* function WP_Customize_Manager::panels() – Get the registered panels. */ /* function WP_Customize_Manager::is_theme_active() – Checks if the current theme is active. */ /* function WP_Customize_Manager::wp_loaded() – Register styles/scripts and initialize the preview of each setting */ /* function WP_Customize_Manager::wp_redirect_status() – Prevents Ajax requests from following redirects when previewing a theme by issuing a 200 response instead of a 30x. */ /* function WP_Customize_Manager::find_changeset_post_id() – Find the changeset post ID for a given changeset UUID. */ /* function WP_Customize_Manager::get_changeset_posts() – Get changeset posts. */ /* function WP_Customize_Manager::dismiss_user_auto_draft_changesets() – Dismiss all of the current user’s auto-drafts (other than the present one). */ /* function WP_Customize_Manager::changeset_post_id() – Get the changeset post id for the loaded changeset. */ /* function WP_Customize_Manager::get_changeset_post_data() – Get the data stored in a changeset post. */ /* function WP_Customize_Manager::changeset_data() – Get changeset data. */ /* function WP_Customize_Manager::import_theme_starter_content() – Import theme starter content into the customized state. */ /* function WP_Customize_Manager::prepare_starter_content_attachments() – Prepare starter content attachments. */ /* function WP_Customize_Manager::_save_starter_content_changeset() – Save starter content changeset. */ /* function WP_Customize_Manager::unsanitized_post_values() – Gets dirty pre-sanitized setting values in the current customized state. */ /* function WP_Customize_Manager::post_value() – Returns the sanitized value for a given setting from the current customized state. */ /* function WP_Customize_Manager::set_post_value() – Overrides a setting’s value in the current customized state. */ /* function WP_Customize_Manager::customize_preview_init() – Print JavaScript settings. */ /* function WP_Customize_Manager::filter_iframe_security_headers() – Filter the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer. */ /* function WP_Customize_Manager::add_state_query_params() – Add customize state query params to a given URL if preview is allowed. */ /* function WP_Customize_Manager::customize_preview_override_404_status() – Prevent sending a 404 status when returning the response for the customize preview, since it causes the jQuery Ajax to fail. Send 200 instead. */ /* function WP_Customize_Manager::customize_preview_base() – Print base element for preview frame. */ /* function WP_Customize_Manager::customize_preview_html5() – Print a workaround to handle HTML5 tags in IE < 9. */ /* function WP_Customize_Manager::customize_preview_loading_style() – Print CSS for loading indicators for the Customizer preview. */ /* function WP_Customize_Manager::remove_frameless_preview_messenger_channel() – Remove customize_messenger_channel query parameter from the preview window when it is not in an iframe. */ /* function WP_Customize_Manager::customize_preview_settings() – Prints JavaScript settings for preview frame. */ /* function WP_Customize_Manager::customize_preview_signature() – Prints a signature so we can ensure the Customizer was properly executed. */ /* function WP_Customize_Manager::remove_preview_signature() – Removes the signature in case we experience a case where the Customizer was not properly executed. */ /* function WP_Customize_Manager::is_preview() – Is it a theme preview? */ /* function WP_Customize_Manager::get_template() – Retrieve the template name of the previewed theme. */ /* function WP_Customize_Manager::get_stylesheet() – Retrieve the stylesheet name of the previewed theme. */ /* function WP_Customize_Manager::get_template_root() – Retrieve the template root of the previewed theme. */ /* function WP_Customize_Manager::get_stylesheet_root() – Retrieve the stylesheet root of the previewed theme. */ /* function WP_Customize_Manager::current_theme() – Filters the current theme and return the name of the previewed theme. */ /* function WP_Customize_Manager::validate_setting_values() – Validates setting values. */ /* function WP_Customize_Manager::prepare_setting_validity_for_js() – Prepares setting validity for exporting to the client (JS). */ /* function WP_Customize_Manager::save() – Handle customize_save WP Ajax request to save/update a changeset. */ /* function WP_Customize_Manager::save_changeset_post() – Save the post for the loaded changeset. */ /* function WP_Customize_Manager::preserve_insert_changeset_post_content() – Preserve the initial JSON post_content passed to save into the post. */ /* function WP_Customize_Manager::trash_changeset_post() – Trash or delete a changeset post. */ /* function WP_Customize_Manager::handle_changeset_trash_request() – Handle request to trash a changeset. */ /* function WP_Customize_Manager::grant_edit_post_capability_for_changeset() – Re-map ‘edit_post’ meta cap for a customize_changeset post to be the same as ‘customize’ maps. */ /* function WP_Customize_Manager::set_changeset_lock() – Marks the changeset post as being currently edited by the current user. */ /* function WP_Customize_Manager::refresh_changeset_lock() – Refreshes changeset lock with the current time if current user edited the changeset before. */ /* function WP_Customize_Manager::add_customize_screen_to_heartbeat_settings() – Filters heartbeat settings for the Customizer. */ /* function WP_Customize_Manager::get_lock_user_data() – Gets lock user data. */ /* function WP_Customize_Manager::check_changeset_lock_with_heartbeat() – Check locked changeset with heartbeat API. */ /* function WP_Customize_Manager::handle_override_changeset_lock_request() – Removes changeset lock when take over request is sent via Ajax. */ /* function WP_Customize_Manager::_filter_revision_post_has_changed() – Filters whether a changeset has changed to create a new revision. */ /* function WP_Customize_Manager::_publish_changeset_values() – Publish changeset values. */ /* function WP_Customize_Manager::update_stashed_theme_mod_settings() – Update stashed theme mod settings. */ /* function WP_Customize_Manager::refresh_nonces() – Refresh nonces for the current preview. */ /* function WP_Customize_Manager::handle_dismiss_autosave_or_lock_request() – Delete a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. */ /* function WP_Customize_Manager::add_setting() – Add a customize setting. */ /* function WP_Customize_Manager::add_dynamic_settings() – Register any dynamically-created settings, such as those from $_POST[’customized’] that have no corresponding setting created. */ /* function WP_Customize_Manager::get_setting() – Retrieve a customize setting. */ /* function WP_Customize_Manager::remove_setting() – Remove a customize setting. */ /* function WP_Customize_Manager::add_panel() – Add a customize panel. */ /* function WP_Customize_Manager::get_panel() – Retrieve a customize panel. */ /* function WP_Customize_Manager::remove_panel() – Remove a customize panel. */ /* function WP_Customize_Manager::register_panel_type() – Register a customize panel type. */ /* function WP_Customize_Manager::render_panel_templates() – Render JS templates for all registered panel types. */ /* function WP_Customize_Manager::add_section() – Add a customize section. */ /* function WP_Customize_Manager::get_section() – Retrieve a customize section. */ /* function WP_Customize_Manager::remove_section() – Remove a customize section. */ /* function WP_Customize_Manager::register_section_type() – Register a customize section type. */ /* function WP_Customize_Manager::render_section_templates() – Render JS templates for all registered section types. */ /* function WP_Customize_Manager::add_control() – Add a customize control. */ /* function WP_Customize_Manager::get_control() – Retrieve a customize control. */ /* function WP_Customize_Manager::remove_control() – Remove a customize control. */ /* function WP_Customize_Manager::register_control_type() – Register a customize control type. */ /* function WP_Customize_Manager::render_control_templates() – Render JS templates for all registered control types. */ /* function WP_Customize_Manager::_cmp_priority() – Helper function to compare two objects by priority, ensuring sort stability via instance_number. */ /* function WP_Customize_Manager::prepare_controls() – Prepare panels, sections, and controls. */ /* function WP_Customize_Manager::enqueue_control_scripts() – Enqueue scripts for customize controls. */ /* function WP_Customize_Manager::is_ios() – Determine whether the user agent is iOS. */ /* function WP_Customize_Manager::get_document_title_template() – Get the template string for the Customizer pane document title. */ /* function WP_Customize_Manager::set_preview_url() – Sets the initial URL to be previewed. */ /* function WP_Customize_Manager::get_preview_url() – Get the initial URL to be previewed. */ /* function WP_Customize_Manager::is_cross_domain() – Determines whether the admin and the frontend are on different domains. */ /* function WP_Customize_Manager::get_allowed_urls() – Get URLs allowed to be previewed. */ /* function WP_Customize_Manager::get_messenger_channel() – Get messenger channel. */ /* function WP_Customize_Manager::set_return_url() – Sets URL to link the user to when closing the Customizer. */ /* function WP_Customize_Manager::get_return_url() – Gets URL to link the user to when closing the Customizer. */ /* function WP_Customize_Manager::set_autofocus() – Set the autofocused constructs. */ /* function WP_Customize_Manager::get_autofocus() – Get the autofocused constructs. */ /* function WP_Customize_Manager::get_nonces() – Get nonces for the Customizer. */ /* function WP_Customize_Manager::customize_pane_settings() – Prints JavaScript settings for parent window. */ /* function WP_Customize_Manager::get_previewable_devices() – Returns a list of devices to allow previewing. */ /* function WP_Customize_Manager::register_controls() – Registers some default controls. */ /* function WP_Customize_Manager::has_published_pages() – Returns whether there are published pages. */ /* function WP_Customize_Manager::register_dynamic_settings() – Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets */ /* function WP_Customize_Manager::handle_load_themes_request() – Load themes into the theme browsing/installation UI. */ /* function WP_Customize_Manager::_sanitize_header_textcolor() – Callback for validating the header_textcolor value. */ /* function WP_Customize_Manager::_sanitize_background_setting() – Callback for validating a background setting value. */ /* function WP_Customize_Manager::export_header_video_settings() – Export header video settings to facilitate selective refresh. */ /* function WP_Customize_Manager::_validate_header_video() – Callback for validating the header_video value. */ /* function WP_Customize_Manager::_validate_external_header_video() – Callback for validating the external_header_video value. */ /* function WP_Customize_Manager::_sanitize_external_header_video() – Callback for sanitizing the external_header_video value. */ /* function WP_Customize_Manager::_render_custom_logo_partial() – Callback for rendering the custom logo, used in the custom_logo partial. */