Changeset 53054
- Timestamp:
- 04/02/2022 04:19:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r52610 r53054 408 408 409 409 /** 410 * Return true if it's an Ajax request.410 * Returns true if it's an Ajax request. 411 411 * 412 412 * @since 3.4.0 … … 477 477 478 478 /** 479 * Return the Ajax wp_die() handler if it's a customized request.479 * Returns the Ajax wp_die() handler if it's a customized request. 480 480 * 481 481 * @since 3.4.0 … … 495 495 496 496 /** 497 * Start preview and customize theme.497 * Starts preview and customize theme. 498 498 * 499 499 * Check if customize query variable exist. Init filters to filter the active theme. … … 598 598 599 599 /** 600 * Establish the loaded changeset.600 * Establishes the loaded changeset. 601 601 * 602 602 * This method runs right at after_setup_theme and applies the 'customize_changeset_branching' filter to determine … … 698 698 699 699 /** 700 * Stop previewing the selected theme.700 * Stops previewing the selected theme. 701 701 * 702 702 * Removes filters to change the active theme. … … 803 803 804 804 /** 805 * Get the changeset UUID.805 * Gets the changeset UUID. 806 806 * 807 807 * @since 4.7.0 … … 819 819 820 820 /** 821 * Get the theme being customized.821 * Gets the theme being customized. 822 822 * 823 823 * @since 3.4.0 … … 833 833 834 834 /** 835 * Get the registered settings.835 * Gets the registered settings. 836 836 * 837 837 * @since 3.4.0 … … 844 844 845 845 /** 846 * Get the registered controls.846 * Gets the registered controls. 847 847 * 848 848 * @since 3.4.0 … … 855 855 856 856 /** 857 * Get the registered containers.857 * Gets the registered containers. 858 858 * 859 859 * @since 4.0.0 … … 866 866 867 867 /** 868 * Get the registered sections.868 * Gets the registered sections. 869 869 * 870 870 * @since 3.4.0 … … 877 877 878 878 /** 879 * Get the registered panels.879 * Gets the registered panels. 880 880 * 881 881 * @since 4.0.0 … … 899 899 900 900 /** 901 * Register styles/scripts and initialize the preview of each setting901 * Registers styles/scripts and initialize the preview of each setting 902 902 * 903 903 * @since 3.4.0 … … 967 967 968 968 /** 969 * Find the changeset post ID for a given changeset UUID.969 * Finds the changeset post ID for a given changeset UUID. 970 970 * 971 971 * @since 4.7.0 … … 1005 1005 1006 1006 /** 1007 * Get changeset posts.1007 * Gets changeset posts. 1008 1008 * 1009 1009 * @since 4.9.0 … … 1052 1052 1053 1053 /** 1054 * Dismiss all of the current user's auto-drafts (other than the present one).1054 * Dismisses all of the current user's auto-drafts (other than the present one). 1055 1055 * 1056 1056 * @since 4.9.0 … … 1078 1078 1079 1079 /** 1080 * Get the changeset post ID for the loaded changeset.1080 * Gets the changeset post ID for the loaded changeset. 1081 1081 * 1082 1082 * @since 4.7.0 … … 1099 1099 1100 1100 /** 1101 * Get the data stored in a changeset post.1101 * Gets the data stored in a changeset post. 1102 1102 * 1103 1103 * @since 4.7.0 … … 1133 1133 1134 1134 /** 1135 * Get changeset data.1135 * Gets changeset data. 1136 1136 * 1137 1137 * @since 4.7.0 … … 1180 1180 1181 1181 /** 1182 * Import theme starter content into the customized state.1182 * Imports theme starter content into the customized state. 1183 1183 * 1184 1184 * @since 4.7.0 … … 1633 1633 1634 1634 /** 1635 * Prepare starter content attachments.1635 * Prepares starter content attachments. 1636 1636 * 1637 1637 * Ensure that the attachments are valid and that they have slugs and file name/path. … … 1695 1695 1696 1696 /** 1697 * Save starter content changeset.1697 * Saves starter content changeset. 1698 1698 * 1699 1699 * @since 4.7.0 … … 1717 1717 1718 1718 /** 1719 * Get dirty pre-sanitized setting values in the current customized state.1719 * Gets dirty pre-sanitized setting values in the current customized state. 1720 1720 * 1721 1721 * The returned array consists of a merge of three sources: … … 1837 1837 1838 1838 /** 1839 * Override a setting's value in the current customized state.1839 * Overrides a setting's value in the current customized state. 1840 1840 * 1841 1841 * The name "post_value" is a carry-over from when the customized state was … … 1852 1852 1853 1853 /** 1854 * Announce when a specific setting's unsanitized post value has been set.1854 * Announces when a specific setting's unsanitized post value has been set. 1855 1855 * 1856 1856 * Fires when the WP_Customize_Manager::set_post_value() method is called. … … 1866 1866 1867 1867 /** 1868 * Announce when any setting's unsanitized post value has been set.1868 * Announces when any setting's unsanitized post value has been set. 1869 1869 * 1870 1870 * Fires when the WP_Customize_Manager::set_post_value() method is called. … … 1883 1883 1884 1884 /** 1885 * Print JavaScript settings.1885 * Prints JavaScript settings. 1886 1886 * 1887 1887 * @since 3.4.0 … … 1958 1958 1959 1959 /** 1960 * Add customize state query params to a given URL if preview is allowed.1960 * Adds customize state query params to a given URL if preview is allowed. 1961 1961 * 1962 1962 * @since 4.7.0 … … 2002 2002 2003 2003 /** 2004 * Prevent sending a 404 status when returning the response for the customize2004 * Prevents sending a 404 status when returning the response for the customize 2005 2005 * preview, since it causes the jQuery Ajax to fail. Send 200 instead. 2006 2006 * … … 2013 2013 2014 2014 /** 2015 * Print base element for preview frame.2015 * Prints base element for preview frame. 2016 2016 * 2017 2017 * @since 3.4.0 … … 2023 2023 2024 2024 /** 2025 * Print a workaround to handle HTML5 tags in IE < 9.2025 * Prints a workaround to handle HTML5 tags in IE < 9. 2026 2026 * 2027 2027 * @since 3.4.0 … … 2033 2033 2034 2034 /** 2035 * Print CSS for loading indicators for the Customizer preview.2035 * Prints CSS for loading indicators for the Customizer preview. 2036 2036 * 2037 2037 * @since 4.2.0 … … 2062 2062 2063 2063 /** 2064 * Remove customize_messenger_channel query parameter from the preview window when it is not in an iframe.2064 * Removes customize_messenger_channel query parameter from the preview window when it is not in an iframe. 2065 2065 * 2066 2066 * This ensures that the admin bar will be shown. It also ensures that link navigation will … … 2099 2099 2100 2100 /** 2101 * Print JavaScript settings for preview frame.2101 * Prints JavaScript settings for preview frame. 2102 2102 * 2103 2103 * @since 3.4.0 … … 2243 2243 2244 2244 /** 2245 * Is it a theme preview?2245 * Determines whether it is a theme preview or not. 2246 2246 * 2247 2247 * @since 3.4.0 … … 2254 2254 2255 2255 /** 2256 * Retrieve the template name of the previewed theme.2256 * Retrieves the template name of the previewed theme. 2257 2257 * 2258 2258 * @since 3.4.0 … … 2265 2265 2266 2266 /** 2267 * Retrieve the stylesheet name of the previewed theme.2267 * Retrieves the stylesheet name of the previewed theme. 2268 2268 * 2269 2269 * @since 3.4.0 … … 2276 2276 2277 2277 /** 2278 * Retrieve the template root of the previewed theme.2278 * Retrieves the template root of the previewed theme. 2279 2279 * 2280 2280 * @since 3.4.0 … … 2287 2287 2288 2288 /** 2289 * Retrieve the stylesheet root of the previewed theme.2289 * Retrieves the stylesheet root of the previewed theme. 2290 2290 * 2291 2291 * @since 3.4.0 … … 2409 2409 2410 2410 /** 2411 * Handle customize_save WP Ajax request to save/update a changeset.2411 * Handles customize_save WP Ajax request to save/update a changeset. 2412 2412 * 2413 2413 * @since 3.4.0 … … 2605 2605 2606 2606 /** 2607 * Save the post for the loaded changeset.2607 * Saves the post for the loaded changeset. 2608 2608 * 2609 2609 * @since 4.7.0 … … 2993 2993 2994 2994 /** 2995 * Preserve the initial JSON post_content passed to save into the post.2995 * Preserves the initial JSON post_content passed to save into the post. 2996 2996 * 2997 2997 * This is needed to prevent KSES and other {@see 'content_save_pre'} filters … … 3038 3038 3039 3039 /** 3040 * Trash or deletea changeset post.3040 * Trashes or deletes a changeset post. 3041 3041 * 3042 3042 * The following re-formulates the logic from `wp_trash_post()` as done in … … 3117 3117 3118 3118 /** 3119 * Handle request to trash a changeset.3119 * Handles request to trash a changeset. 3120 3120 * 3121 3121 * @since 4.9.0 … … 3202 3202 3203 3203 /** 3204 * Re-map 'edit_post' meta cap for a customize_changeset post to be the same as 'customize' maps.3204 * Re-maps 'edit_post' meta cap for a customize_changeset post to be the same as 'customize' maps. 3205 3205 * 3206 3206 * There is essentially a "meta meta" cap in play here, where 'edit_post' meta cap maps to … … 3296 3296 3297 3297 /** 3298 * Get lock user data.3298 * Gets lock user data. 3299 3299 * 3300 3300 * @since 4.9.0 … … 3319 3319 3320 3320 /** 3321 * Check locked changeset with heartbeat API.3321 * Checks locked changeset with heartbeat API. 3322 3322 * 3323 3323 * @since 4.9.0 … … 3400 3400 3401 3401 /** 3402 * Whether a changeset revision should be made.3402 * Determines whether a changeset revision should be made. 3403 3403 * 3404 3404 * @since 4.7.0 … … 3428 3428 3429 3429 /** 3430 * Publish changeset values.3431 * 3432 * This will the values contained in a changeset, even changesets that do not3430 * Publishes the values of a changeset. 3431 * 3432 * This will publish the values contained in a changeset, even changesets that do not 3433 3433 * correspond to current manager instance. This is called by 3434 3434 * `_wp_customize_publish_changeset()` when a customize_changeset post is … … 3618 3618 3619 3619 /** 3620 * Update stashed theme mod settings.3620 * Updates stashed theme mod settings. 3621 3621 * 3622 3622 * @since 4.7.0 … … 3655 3655 3656 3656 /** 3657 * Refresh nonces for the current preview.3657 * Refreshes nonces for the current preview. 3658 3658 * 3659 3659 * @since 4.2.0 … … 3668 3668 3669 3669 /** 3670 * Delete a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock.3670 * Deletes a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. 3671 3671 * 3672 3672 * @since 4.9.0 … … 3736 3736 3737 3737 /** 3738 * Add a customize setting.3738 * Adds a customize setting. 3739 3739 * 3740 3740 * @since 3.4.0 … … 3770 3770 3771 3771 /** 3772 * Register any dynamically-created settings, such as those from $_POST['customized']3772 * Registers any dynamically-created settings, such as those from $_POST['customized'] 3773 3773 * that have no corresponding setting created. 3774 3774 * … … 3831 3831 3832 3832 /** 3833 * Retrieve a customize setting.3833 * Retrieves a customize setting. 3834 3834 * 3835 3835 * @since 3.4.0 … … 3845 3845 3846 3846 /** 3847 * Remove a customize setting.3847 * Removes a customize setting. 3848 3848 * 3849 3849 * Note that removing the setting doesn't destroy the WP_Customize_Setting instance or remove its filters. … … 3858 3858 3859 3859 /** 3860 * Add a customize panel.3860 * Adds a customize panel. 3861 3861 * 3862 3862 * @since 4.0.0 … … 3883 3883 3884 3884 /** 3885 * Retrieve a customize panel.3885 * Retrieves a customize panel. 3886 3886 * 3887 3887 * @since 4.0.0 … … 3897 3897 3898 3898 /** 3899 * Remove a customize panel.3899 * Removes a customize panel. 3900 3900 * 3901 3901 * Note that removing the panel doesn't destroy the WP_Customize_Panel instance or remove its filters. … … 3927 3927 3928 3928 /** 3929 * Register a customize panel type.3929 * Registers a customize panel type. 3930 3930 * 3931 3931 * Registered types are eligible to be rendered via JS and created dynamically. … … 3942 3942 3943 3943 /** 3944 * Render JS templates for all registered panel types.3944 * Renders JS templates for all registered panel types. 3945 3945 * 3946 3946 * @since 4.3.0 … … 3954 3954 3955 3955 /** 3956 * Add a customize section.3956 * Adds a customize section. 3957 3957 * 3958 3958 * @since 3.4.0 … … 3979 3979 3980 3980 /** 3981 * Retrieve a customize section.3981 * Retrieves a customize section. 3982 3982 * 3983 3983 * @since 3.4.0 … … 3993 3993 3994 3994 /** 3995 * Remove a customize section.3995 * Removes a customize section. 3996 3996 * 3997 3997 * Note that removing the section doesn't destroy the WP_Customize_Section instance or remove its filters. … … 4006 4006 4007 4007 /** 4008 * Register a customize section type.4008 * Registers a customize section type. 4009 4009 * 4010 4010 * Registered types are eligible to be rendered via JS and created dynamically. … … 4021 4021 4022 4022 /** 4023 * Render JS templates for all registered section types.4023 * Renders JS templates for all registered section types. 4024 4024 * 4025 4025 * @since 4.3.0 … … 4033 4033 4034 4034 /** 4035 * Add a customize control.4035 * Adds a customize control. 4036 4036 * 4037 4037 * @since 3.4.0 … … 4058 4058 4059 4059 /** 4060 * Retrieve a customize control.4060 * Retrieves a customize control. 4061 4061 * 4062 4062 * @since 3.4.0 … … 4072 4072 4073 4073 /** 4074 * Remove a customize control.4074 * Removes a customize control. 4075 4075 * 4076 4076 * Note that removing the control doesn't destroy the WP_Customize_Control instance or remove its filters. … … 4085 4085 4086 4086 /** 4087 * Register a customize control type.4087 * Registers a customize control type. 4088 4088 * 4089 4089 * Registered types are eligible to be rendered via JS and created dynamically. … … 4099 4099 4100 4100 /** 4101 * Render JS templates for all registered control types.4101 * Renders JS templates for all registered control types. 4102 4102 * 4103 4103 * @since 4.1.0 … … 4389 4389 4390 4390 /** 4391 * Prepare panels, sections, and controls.4391 * Prepares panels, sections, and controls. 4392 4392 * 4393 4393 * For each, check if required related components exist, … … 4501 4501 4502 4502 /** 4503 * Enqueue scripts for customize controls.4503 * Enqueues scripts for customize controls. 4504 4504 * 4505 4505 * @since 3.4.0 … … 4523 4523 4524 4524 /** 4525 * Determine whether the user agent is iOS.4525 * Determines whether the user agent is iOS. 4526 4526 * 4527 4527 * @since 4.4.0 … … 4534 4534 4535 4535 /** 4536 * Get the template string for the Customizer pane document title.4536 * Gets the template string for the Customizer pane document title. 4537 4537 * 4538 4538 * @since 4.4.0 … … 4553 4553 4554 4554 /** 4555 * Set the initial URL to be previewed.4555 * Sets the initial URL to be previewed. 4556 4556 * 4557 4557 * URL is validated. … … 4567 4567 4568 4568 /** 4569 * Get the initial URL to be previewed.4569 * Gets the initial URL to be previewed. 4570 4570 * 4571 4571 * @since 4.4.0 … … 4597 4597 4598 4598 /** 4599 * Get URLs allowed to be previewed.4599 * Gets URLs allowed to be previewed. 4600 4600 * 4601 4601 * If the front end and the admin are served from the same domain, load the … … 4630 4630 4631 4631 /** 4632 * Get messenger channel.4632 * Gets messenger channel. 4633 4633 * 4634 4634 * @since 4.7.0 … … 4641 4641 4642 4642 /** 4643 * Set URL to link the user to when closing the Customizer.4643 * Sets URL to link the user to when closing the Customizer. 4644 4644 * 4645 4645 * URL is validated. … … 4657 4657 4658 4658 /** 4659 * Get URL to link the user to when closing the Customizer.4659 * Gets URL to link the user to when closing the Customizer. 4660 4660 * 4661 4661 * @since 4.4.0 … … 4700 4700 4701 4701 /** 4702 * Set the autofocused constructs.4702 * Sets the autofocused constructs. 4703 4703 * 4704 4704 * @since 4.4.0 … … 4717 4717 4718 4718 /** 4719 * Get the autofocused constructs.4719 * Gets the autofocused constructs. 4720 4720 * 4721 4721 * @since 4.4.0 … … 4734 4734 4735 4735 /** 4736 * Get nonces for the Customizer.4736 * Gets nonces for the Customizer. 4737 4737 * 4738 4738 * @since 4.5.0 … … 4765 4765 4766 4766 /** 4767 * Print JavaScript settings for parent window.4767 * Prints JavaScript settings for parent window. 4768 4768 * 4769 4769 * @since 4.4.0 … … 5015 5015 5016 5016 /** 5017 * Register some default controls.5017 * Registers some default controls. 5018 5018 * 5019 5019 * @since 3.4.0 … … 5733 5733 5734 5734 /** 5735 * Return whether there are published pages.5735 * Returns whether there are published pages. 5736 5736 * 5737 5737 * Used as active callback for static front page section and controls. … … 5755 5755 5756 5756 /** 5757 * Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets5757 * Adds settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets 5758 5758 * 5759 5759 * @since 4.2.0 … … 5767 5767 5768 5768 /** 5769 * Load themes into the theme browsing/installation UI.5769 * Loads themes into the theme browsing/installation UI. 5770 5770 * 5771 5771 * @since 4.9.0 … … 6002 6002 6003 6003 /** 6004 * Export header video settings to facilitate selective refresh.6004 * Exports header video settings to facilitate selective refresh. 6005 6005 * 6006 6006 * @since 4.7.0
Note: See TracChangeset
for help on using the changeset viewer.