Make WordPress Core

Ticket #54729: 54729.3.diff

File 54729.3.diff, 17.2 KB (added by azouamauriac, 3 years ago)

Use third-person singular verbs for function descriptions in src/wp-includes/class-wp-customize-manager.php

  • src/wp-includes/class-wp-customize-manager.php

     
    407407        }
    408408
    409409        /**
    410          * Return true if it's an Ajax request.
     410         * Returns true if it's an Ajax request.
    411411         *
    412412         * @since 3.4.0
    413413         * @since 4.2.0 Added `$action` param.
     
    476476        }
    477477
    478478        /**
    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.
    480480         *
    481481         * @since 3.4.0
    482482         * @deprecated 4.7.0
     
    494494        }
    495495
    496496        /**
    497          * Start preview and customize theme.
     497         * Starts preview and customize theme.
    498498         *
    499          * Check if customize query variable exist. Init filters to filter the active theme.
     499         * Checks if customize query variable exist. Init filters to filter the active theme.
    500500         *
    501501         * @since 3.4.0
    502502         *
     
    597597        }
    598598
    599599        /**
    600          * Establish the loaded changeset.
     600         * Establishes the loaded changeset.
    601601         *
    602602         * This method runs right at after_setup_theme and applies the 'customize_changeset_branching' filter to determine
    603603         * whether concurrent changesets are allowed. Then if the Customizer is not initialized with a `changeset_uuid` param,
     
    697697        }
    698698
    699699        /**
    700          * Stop previewing the selected theme.
     700         * Stops previewing the selected theme.
    701701         *
    702702         * Removes filters to change the active theme.
    703703         *
     
    802802        }
    803803
    804804        /**
    805          * Get the changeset UUID.
     805         * Gets the changeset UUID.
    806806         *
    807807         * @since 4.7.0
    808808         *
     
    818818        }
    819819
    820820        /**
    821          * Get the theme being customized.
     821         * Gets the theme being customized.
    822822         *
    823823         * @since 3.4.0
    824824         *
     
    832832        }
    833833
    834834        /**
    835          * Get the registered settings.
     835         * Gets the registered settings.
    836836         *
    837837         * @since 3.4.0
    838838         *
     
    843843        }
    844844
    845845        /**
    846          * Get the registered controls.
     846         * Gets the registered controls.
    847847         *
    848848         * @since 3.4.0
    849849         *
     
    854854        }
    855855
    856856        /**
    857          * Get the registered containers.
     857         * Gets the registered containers.
    858858         *
    859859         * @since 4.0.0
    860860         *
     
    865865        }
    866866
    867867        /**
    868          * Get the registered sections.
     868         * Gets the registered sections.
    869869         *
    870870         * @since 3.4.0
    871871         *
     
    876876        }
    877877
    878878        /**
    879          * Get the registered panels.
     879         * Gets the registered panels.
    880880         *
    881881         * @since 4.0.0
    882882         *
     
    898898        }
    899899
    900900        /**
    901          * Register styles/scripts and initialize the preview of each setting
     901         * Registers styles/scripts and initialize the preview of each setting
    902902         *
    903903         * @since 3.4.0
    904904         */
     
    966966        }
    967967
    968968        /**
    969          * Find the changeset post ID for a given changeset UUID.
     969         * Finds the changeset post ID for a given changeset UUID.
    970970         *
    971971         * @since 4.7.0
    972972         *
     
    10041004        }
    10051005
    10061006        /**
    1007          * Get changeset posts.
     1007         * Gets changeset posts.
    10081008         *
    10091009         * @since 4.9.0
    10101010         *
     
    10771077        }
    10781078
    10791079        /**
    1080          * Get the changeset post ID for the loaded changeset.
     1080         * Gets the changeset post ID for the loaded changeset.
    10811081         *
    10821082         * @since 4.7.0
    10831083         *
     
    10981098        }
    10991099
    11001100        /**
    1101          * Get the data stored in a changeset post.
     1101         * Gets the data stored in a changeset post.
    11021102         *
    11031103         * @since 4.7.0
    11041104         *
     
    11321132        }
    11331133
    11341134        /**
    1135          * Get changeset data.
     1135         * Gets changeset data.
    11361136         *
    11371137         * @since 4.7.0
    11381138         * @since 4.9.0 This will return the changeset's data with a user's autosave revision merged on top, if one exists and $autosaved is true.
     
    11791179        protected $pending_starter_content_settings_ids = array();
    11801180
    11811181        /**
    1182          * Import theme starter content into the customized state.
     1182         * Imports theme starter content into the customized state.
    11831183         *
    11841184         * @since 4.7.0
    11851185         *
     
    16321632        }
    16331633
    16341634        /**
    1635          * Prepare starter content attachments.
     1635         * Prepares starter content attachments.
    16361636         *
    1637          * Ensure that the attachments are valid and that they have slugs and file name/path.
     1637         * Ensures that the attachments are valid and that they have slugs and file name/path.
    16381638         *
    16391639         * @since 4.7.0
    16401640         *
     
    16941694        }
    16951695
    16961696        /**
    1697          * Save starter content changeset.
     1697         * Saves starter content changeset.
    16981698         *
    16991699         * @since 4.7.0
    17001700         */
     
    17161716        }
    17171717
    17181718        /**
    1719          * Get dirty pre-sanitized setting values in the current customized state.
     1719         * Gets dirty pre-sanitized setting values in the current customized state.
    17201720         *
    17211721         * The returned array consists of a merge of three sources:
    17221722         * 1. If the theme is not currently active, then the base array is any stashed
     
    18361836        }
    18371837
    18381838        /**
    1839          * Override a setting's value in the current customized state.
     1839         * Overrides a setting's value in the current customized state.
    18401840         *
    18411841         * The name "post_value" is a carry-over from when the customized state was
    18421842         * exclusively sourced from `$_POST['customized']`.
     
    18821882        }
    18831883
    18841884        /**
    1885          * Print JavaScript settings.
     1885         * Prints JavaScript settings.
    18861886         *
    18871887         * @since 3.4.0
    18881888         */
     
    19571957        }
    19581958
    19591959        /**
    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.
    19611961         *
    19621962         * @since 4.7.0
    19631963         *
     
    20012001        }
    20022002
    20032003        /**
    2004          * Prevent sending a 404 status when returning the response for the customize
     2004         * Prevents sending a 404 status when returning the response for the customize
    20052005         * preview, since it causes the jQuery Ajax to fail. Send 200 instead.
    20062006         *
    20072007         * @since 4.0.0
     
    20122012        }
    20132013
    20142014        /**
    2015          * Print base element for preview frame.
     2015         * Prints base element for preview frame.
    20162016         *
    20172017         * @since 3.4.0
    20182018         * @deprecated 4.7.0
     
    20222022        }
    20232023
    20242024        /**
    2025          * Print a workaround to handle HTML5 tags in IE < 9.
     2025         * Prints a workaround to handle HTML5 tags in IE < 9.
    20262026         *
    20272027         * @since 3.4.0
    20282028         * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5.
     
    20322032        }
    20332033
    20342034        /**
    2035          * Print CSS for loading indicators for the Customizer preview.
     2035         * Prints CSS for loading indicators for the Customizer preview.
    20362036         *
    20372037         * @since 4.2.0
    20382038         */
     
    20612061        }
    20622062
    20632063        /**
    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.
    20652065         *
    20662066         * This ensures that the admin bar will be shown. It also ensures that link navigation will
    20672067         * work as expected since the parent frame is not being sent the URL to navigate to.
     
    20982098        }
    20992099
    21002100        /**
    2101          * Print JavaScript settings for preview frame.
     2101         * Prints JavaScript settings for preview frame.
    21022102         *
    21032103         * @since 3.4.0
    21042104         */
     
    22532253        }
    22542254
    22552255        /**
    2256          * Retrieve the template name of the previewed theme.
     2256         * Retrieves the template name of the previewed theme.
    22572257         *
    22582258         * @since 3.4.0
    22592259         *
     
    22642264        }
    22652265
    22662266        /**
    2267          * Retrieve the stylesheet name of the previewed theme.
     2267         * Retrieves the stylesheet name of the previewed theme.
    22682268         *
    22692269         * @since 3.4.0
    22702270         *
     
    22752275        }
    22762276
    22772277        /**
    2278          * Retrieve the template root of the previewed theme.
     2278         * Retrieves the template root of the previewed theme.
    22792279         *
    22802280         * @since 3.4.0
    22812281         *
     
    22862286        }
    22872287
    22882288        /**
    2289          * Retrieve the stylesheet root of the previewed theme.
     2289         * Retrieves the stylesheet root of the previewed theme.
    22902290         *
    22912291         * @since 3.4.0
    22922292         *
     
    24082408        }
    24092409
    24102410        /**
    2411          * Handle customize_save WP Ajax request to save/update a changeset.
     2411         * Handles customize_save WP Ajax request to save/update a changeset.
    24122412         *
    24132413         * @since 3.4.0
    24142414         * @since 4.7.0 The semantics of this method have changed to update a changeset, optionally to also change the status and other attributes.
     
    26042604        }
    26052605
    26062606        /**
    2607          * Save the post for the loaded changeset.
     2607         * Saves the post for the loaded changeset.
    26082608         *
    26092609         * @since 4.7.0
    26102610         *
     
    27222722                $this->add_dynamic_settings( array_keys( $post_values ) ); // Ensure settings get created even if they lack an input value.
    27232723
    27242724                /*
    2725                  * Get list of IDs for settings that have values different from what is currently
     2725                 * Gets list of IDs for settings that have values different from what is currently
    27262726                 * saved in the changeset. By skipping any values that are already the same, the
    27272727                 * subset of changed settings can be passed into validate_setting_values to prevent
    27282728                 * an underprivileged modifying a single setting for which they have the capability
     
    29922992        }
    29932993
    29942994        /**
    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.
    29962996         *
    29972997         * This is needed to prevent KSES and other {@see 'content_save_pre'} filters
    29982998         * from corrupting JSON data.
     
    30373037        }
    30383038
    30393039        /**
    3040          * Trash or delete a changeset post.
     3040         * Trashes or deletes a changeset post.
    30413041         *
    30423042         * The following re-formulates the logic from `wp_trash_post()` as done in
    30433043         * `wp_publish_post()`. The reason for bypassing `wp_trash_post()` is that it
     
    31163116        }
    31173117
    31183118        /**
    3119          * Handle request to trash a changeset.
     3119         * Handles request to trash a changeset.
    31203120         *
    31213121         * @since 4.9.0
    31223122         */
     
    32013201        }
    32023202
    32033203        /**
    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.
    32053205         *
    32063206         * There is essentially a "meta meta" cap in play here, where 'edit_post' meta cap maps to
    32073207         * the 'customize' meta cap which then maps to 'edit_theme_options'. This is currently
     
    32953295        }
    32963296
    32973297        /**
    3298          * Get lock user data.
     3298         * Gets lock user data.
    32993299         *
    33003300         * @since 4.9.0
    33013301         *
     
    33183318        }
    33193319
    33203320        /**
    3321          * Check locked changeset with heartbeat API.
     3321         * Checks locked changeset with heartbeat API.
    33223322         *
    33233323         * @since 4.9.0
    33243324         *
     
    34273427        }
    34283428
    34293429        /**
    3430          * Publish changeset values.
     3430         * Publishes changeset values.
    34313431         *
    34323432         * This will the values contained in a changeset, even changesets that do not
    34333433         * correspond to current manager instance. This is called by
     
    36173617        }
    36183618
    36193619        /**
    3620          * Update stashed theme mod settings.
     3620         * Updates stashed theme mod settings.
    36213621         *
    36223622         * @since 4.7.0
    36233623         *
     
    36543654        }
    36553655
    36563656        /**
    3657          * Refresh nonces for the current preview.
     3657         * Refreshes nonces for the current preview.
    36583658         *
    36593659         * @since 4.2.0
    36603660         */
     
    36673667        }
    36683668
    36693669        /**
    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.
    36713671         *
    36723672         * @since 4.9.0
    36733673         */
     
    37353735        }
    37363736
    37373737        /**
    3738          * Add a customize setting.
     3738         * Adds a customize setting.
    37393739         *
    37403740         * @since 3.4.0
    37413741         * @since 4.5.0 Return added WP_Customize_Setting instance.
     
    37693769        }
    37703770
    37713771        /**
    3772          * Register any dynamically-created settings, such as those from $_POST['customized']
     3772         * Registers any dynamically-created settings, such as those from $_POST['customized']
    37733773         * that have no corresponding setting created.
    37743774         *
    37753775         * This is a mechanism to "wake up" settings that have been dynamically created
     
    38303830        }
    38313831
    38323832        /**
    3833          * Retrieve a customize setting.
     3833         * Retrieves a customize setting.
    38343834         *
    38353835         * @since 3.4.0
    38363836         *
     
    38443844        }
    38453845
    38463846        /**
    3847          * Remove a customize setting.
     3847         * Removes a customize setting.
    38483848         *
    38493849         * Note that removing the setting doesn't destroy the WP_Customize_Setting instance or remove its filters.
    38503850         *
     
    38573857        }
    38583858
    38593859        /**
    3860          * Add a customize panel.
     3860         * Adds a customize panel.
    38613861         *
    38623862         * @since 4.0.0
    38633863         * @since 4.5.0 Return added WP_Customize_Panel instance.
     
    38823882        }
    38833883
    38843884        /**
    3885          * Retrieve a customize panel.
     3885         * Retrieves a customize panel.
    38863886         *
    38873887         * @since 4.0.0
    38883888         *
     
    38963896        }
    38973897
    38983898        /**
    3899          * Remove a customize panel.
     3899         * Removes a customize panel.
    39003900         *
    39013901         * Note that removing the panel doesn't destroy the WP_Customize_Panel instance or remove its filters.
    39023902         *
     
    39263926        }
    39273927
    39283928        /**
    3929          * Register a customize panel type.
     3929         * Registers a customize panel type.
    39303930         *
    39313931         * Registered types are eligible to be rendered via JS and created dynamically.
    39323932         *
     
    39413941        }
    39423942
    39433943        /**
    3944          * Render JS templates for all registered panel types.
     3944         * Renders JS templates for all registered panel types.
    39453945         *
    39463946         * @since 4.3.0
    39473947         */
     
    39533953        }
    39543954
    39553955        /**
    3956          * Add a customize section.
     3956         * Adds a customize section.
    39573957         *
    39583958         * @since 3.4.0
    39593959         * @since 4.5.0 Return added WP_Customize_Section instance.
     
    39783978        }
    39793979
    39803980        /**
    3981          * Retrieve a customize section.
     3981         * Retrieves a customize section.
    39823982         *
    39833983         * @since 3.4.0
    39843984         *
     
    39923992        }
    39933993
    39943994        /**
    3995          * Remove a customize section.
     3995         * Removes a customize section.
    39963996         *
    39973997         * Note that removing the section doesn't destroy the WP_Customize_Section instance or remove its filters.
    39983998         *
     
    40054005        }
    40064006
    40074007        /**
    4008          * Register a customize section type.
     4008         * Registers a customize section type.
    40094009         *
    40104010         * Registered types are eligible to be rendered via JS and created dynamically.
    40114011         *
     
    40204020        }
    40214021
    40224022        /**
    4023          * Render JS templates for all registered section types.
     4023         * Renders JS templates for all registered section types.
    40244024         *
    40254025         * @since 4.3.0
    40264026         */
     
    40324032        }
    40334033
    40344034        /**
    4035          * Add a customize control.
     4035         * Adds a customize control.
    40364036         *
    40374037         * @since 3.4.0
    40384038         * @since 4.5.0 Return added WP_Customize_Control instance.
     
    40574057        }
    40584058
    40594059        /**
    4060          * Retrieve a customize control.
     4060         * Retrieves a customize control.
    40614061         *
    40624062         * @since 3.4.0
    40634063         *
     
    40714071        }
    40724072
    40734073        /**
    4074          * Remove a customize control.
     4074         * Removes a customize control.
    40754075         *
    40764076         * Note that removing the control doesn't destroy the WP_Customize_Control instance or remove its filters.
    40774077         *
     
    40844084        }
    40854085
    40864086        /**
    4087          * Register a customize control type.
     4087         * Registers a customize control type.
    40884088         *
    40894089         * Registered types are eligible to be rendered via JS and created dynamically.
    40904090         *
     
    40984098        }
    40994099
    41004100        /**
    4101          * Render JS templates for all registered control types.
     4101         * Renders JS templates for all registered control types.
    41024102         *
    41034103         * @since 4.1.0
    41044104         */
     
    43884388        }
    43894389
    43904390        /**
    4391          * Prepare panels, sections, and controls.
     4391         * Prepares panels, sections, and controls.
    43924392         *
    43934393         * For each, check if required related components exist,
    43944394         * whether the user has the necessary capabilities,
     
    45224522        }
    45234523
    45244524        /**
    4525          * Determine whether the user agent is iOS.
     4525         * Determines whether the user agent is iOS.
    45264526         *
    45274527         * @since 4.4.0
    45284528         *
     
    45334533        }
    45344534
    45354535        /**
    4536          * Get the template string for the Customizer pane document title.
     4536         * Gets the template string for the Customizer pane document title.
    45374537         *
    45384538         * @since 4.4.0
    45394539         *
     
    45524552        }
    45534553
    45544554        /**
    4555          * Set the initial URL to be previewed.
     4555         * Sets the initial URL to be previewed.
    45564556         *
    45574557         * URL is validated.
    45584558         *
     
    45664566        }
    45674567
    45684568        /**
    4569          * Get the initial URL to be previewed.
     4569         * Gets the initial URL to be previewed.
    45704570         *
    45714571         * @since 4.4.0
    45724572         *
     
    45964596        }
    45974597
    45984598        /**
    4599          * Get URLs allowed to be previewed.
     4599         * Gets URLs allowed to be previewed.
    46004600         *
    46014601         * If the front end and the admin are served from the same domain, load the
    46024602         * preview over ssl if the Customizer is being loaded over ssl. This avoids
     
    46294629        }
    46304630
    46314631        /**
    4632          * Get messenger channel.
     4632         * Gets messenger channel.
    46334633         *
    46344634         * @since 4.7.0
    46354635         *
     
    46404640        }
    46414641
    46424642        /**
    4643          * Set URL to link the user to when closing the Customizer.
     4643         * Sets URL to link the user to when closing the Customizer.
    46444644         *
    46454645         * URL is validated.
    46464646         *
     
    46564656        }
    46574657
    46584658        /**
    4659          * Get URL to link the user to when closing the Customizer.
     4659         * Gets URL to link the user to when closing the Customizer.
    46604660         *
    46614661         * @since 4.4.0
    46624662         *
     
    46994699        }
    47004700
    47014701        /**
    4702          * Set the autofocused constructs.
     4702         * Sets the autofocused constructs.
    47034703         *
    47044704         * @since 4.4.0
    47054705         *
     
    47164716        }
    47174717
    47184718        /**
    4719          * Get the autofocused constructs.
     4719         * Gets the autofocused constructs.
    47204720         *
    47214721         * @since 4.4.0
    47224722         *
     
    47334733        }
    47344734
    47354735        /**
    4736          * Get nonces for the Customizer.
     4736         * Gets nonces for the Customizer.
    47374737         *
    47384738         * @since 4.5.0
    47394739         *
     
    47644764        }
    47654765
    47664766        /**
    4767          * Print JavaScript settings for parent window.
     4767         * Prints JavaScript settings for parent window.
    47684768         *
    47694769         * @since 4.4.0
    47704770         */
     
    50145014        }
    50155015
    50165016        /**
    5017          * Register some default controls.
     5017         * Registers some default controls.
    50185018         *
    50195019         * @since 3.4.0
    50205020         */
     
    57325732        }
    57335733
    57345734        /**
    5735          * Return whether there are published pages.
     5735         * Returns whether there are published pages.
    57365736         *
    57375737         * Used as active callback for static front page section and controls.
    57385738         *
     
    57545754        }
    57555755
    57565756        /**
    5757          * Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets
     5757         * Adds settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets
    57585758         *
    57595759         * @since 4.2.0
    57605760         *
     
    57665766        }
    57675767
    57685768        /**
    5769          * Load themes into the theme browsing/installation UI.
     5769         * Loads themes into the theme browsing/installation UI.
    57705770         *
    57715771         * @since 4.9.0
    57725772         */
     
    60016001        }
    60026002
    60036003        /**
    6004          * Export header video settings to facilitate selective refresh.
     6004         * Exports header video settings to facilitate selective refresh.
    60056005         *
    60066006         * @since 4.7.0
    60076007         *