WP_Theme_JSON_Resolver::get_user_global_styles_post_id() – Returns the ID of the custom post type that stores user data.

You appear to be a bot. Output may be restricted

Description

Returns the ID of the custom post type that stores user data.

Usage

$integer|null = WP_Theme_JSON_Resolver::get_user_global_styles_post_id();

Parameters

Returns

integer|null

Source

File name: wordpress/wp-includes/class-wp-theme-json-resolver.php
Lines:

1 to 13 of 13
  public static function get_user_global_styles_post_id() {
    if ( null !== static::$user_custom_post_type_id ) {
      return static::$user_custom_post_type_id;
    }

    $user_cpt = static::get_user_data_from_wp_global_styles( wp_get_theme(), true );

    if ( array_key_exists( 'ID', $user_cpt ) ) {
      static::$user_custom_post_type_id = $user_cpt['ID'];
    }

    return static::$user_custom_post_type_id;
  }
 

 View on GitHub View on Trac