mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`. See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -16,16 +16,16 @@
|
||||
* @since 2.6.0
|
||||
* @access private
|
||||
*
|
||||
* @staticvar array|false $fields
|
||||
* @staticvar array $fields
|
||||
*
|
||||
* @param array $post Optional. A post array to be processed for insertion as a post revision.
|
||||
* @param bool $autosave Optional. Is the revision an autosave?
|
||||
* @return array Post array ready to be inserted as a post revision or array of fields that can be versioned.
|
||||
*/
|
||||
function _wp_post_revision_fields( $post = null, $autosave = false ) {
|
||||
static $fields = false;
|
||||
static $fields = null;
|
||||
|
||||
if ( !$fields ) {
|
||||
if ( is_null( $fields ) ) {
|
||||
// Allow these to be versioned
|
||||
$fields = array(
|
||||
'post_title' => __( 'Title' ),
|
||||
|
||||
Reference in New Issue
Block a user