Changeset 61600 for trunk/src/wp-includes/option.php
- Timestamp:
- 02/09/2026 04:43:35 PM (4 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/option.php (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r61470 r61600 2744 2744 'blogname', 2745 2745 array( 2746 'show_in_rest' => array(2746 'show_in_rest' => array( 2747 2747 'name' => 'title', 2748 2748 ), 2749 'type' => 'string', 2750 'label' => __( 'Title' ), 2751 'description' => __( 'Site title.' ), 2749 'show_in_abilities' => true, 2750 'type' => 'string', 2751 'label' => __( 'Title' ), 2752 'description' => __( 'Site title.' ), 2752 2753 ) 2753 2754 ); … … 2757 2758 'blogdescription', 2758 2759 array( 2759 'show_in_rest' => array(2760 'show_in_rest' => array( 2760 2761 'name' => 'description', 2761 2762 ), 2762 'type' => 'string', 2763 'label' => __( 'Tagline' ), 2764 'description' => __( 'Site tagline.' ), 2763 'show_in_abilities' => true, 2764 'type' => 'string', 2765 'label' => __( 'Tagline' ), 2766 'description' => __( 'Site tagline.' ), 2765 2767 ) 2766 2768 ); … … 2771 2773 'siteurl', 2772 2774 array( 2773 'show_in_rest' => array(2775 'show_in_rest' => array( 2774 2776 'name' => 'url', 2775 2777 'schema' => array( … … 2777 2779 ), 2778 2780 ), 2779 'type' => 'string', 2780 'description' => __( 'Site URL.' ), 2781 'show_in_abilities' => true, 2782 'type' => 'string', 2783 'description' => __( 'Site URL.' ), 2781 2784 ) 2782 2785 ); … … 2788 2791 'admin_email', 2789 2792 array( 2790 'show_in_rest' => array(2793 'show_in_rest' => array( 2791 2794 'name' => 'email', 2792 2795 'schema' => array( … … 2794 2797 ), 2795 2798 ), 2796 'type' => 'string', 2797 'description' => __( 'This address is used for admin purposes, like new user notification.' ), 2799 'show_in_abilities' => true, 2800 'type' => 'string', 2801 'description' => __( 'This address is used for admin purposes, like new user notification.' ), 2798 2802 ) 2799 2803 ); … … 2804 2808 'timezone_string', 2805 2809 array( 2806 'show_in_rest' => array(2810 'show_in_rest' => array( 2807 2811 'name' => 'timezone', 2808 2812 ), 2809 'type' => 'string', 2810 'description' => __( 'A city in the same timezone as you.' ), 2813 'show_in_abilities' => true, 2814 'type' => 'string', 2815 'description' => __( 'A city in the same timezone as you.' ), 2811 2816 ) 2812 2817 ); … … 2816 2821 'date_format', 2817 2822 array( 2818 'show_in_rest' => true, 2819 'type' => 'string', 2820 'description' => __( 'A date format for all date strings.' ), 2823 'show_in_rest' => true, 2824 'show_in_abilities' => true, 2825 'type' => 'string', 2826 'description' => __( 'A date format for all date strings.' ), 2821 2827 ) 2822 2828 ); … … 2826 2832 'time_format', 2827 2833 array( 2828 'show_in_rest' => true, 2829 'type' => 'string', 2830 'description' => __( 'A time format for all time strings.' ), 2834 'show_in_rest' => true, 2835 'show_in_abilities' => true, 2836 'type' => 'string', 2837 'description' => __( 'A time format for all time strings.' ), 2831 2838 ) 2832 2839 ); … … 2836 2843 'start_of_week', 2837 2844 array( 2838 'show_in_rest' => true, 2839 'type' => 'integer', 2840 'description' => __( 'A day number of the week that the week should start on.' ), 2845 'show_in_rest' => true, 2846 'show_in_abilities' => true, 2847 'type' => 'integer', 2848 'description' => __( 'A day number of the week that the week should start on.' ), 2841 2849 ) 2842 2850 ); … … 2846 2854 'WPLANG', 2847 2855 array( 2848 'show_in_rest' => array(2856 'show_in_rest' => array( 2849 2857 'name' => 'language', 2850 2858 ), 2851 'type' => 'string', 2852 'description' => __( 'WordPress locale code.' ), 2853 'default' => 'en_US', 2859 'show_in_abilities' => true, 2860 'type' => 'string', 2861 'description' => __( 'WordPress locale code.' ), 2862 'default' => 'en_US', 2854 2863 ) 2855 2864 ); … … 2859 2868 'use_smilies', 2860 2869 array( 2861 'show_in_rest' => true, 2862 'type' => 'boolean', 2863 'description' => __( 'Convert emoticons like :-) and :-P to graphics on display.' ), 2864 'default' => true, 2870 'show_in_rest' => true, 2871 'show_in_abilities' => true, 2872 'type' => 'boolean', 2873 'description' => __( 'Convert emoticons like :-) and :-P to graphics on display.' ), 2874 'default' => true, 2865 2875 ) 2866 2876 ); … … 2870 2880 'default_category', 2871 2881 array( 2872 'show_in_rest' => true, 2873 'type' => 'integer', 2874 'description' => __( 'Default post category.' ), 2882 'show_in_rest' => true, 2883 'show_in_abilities' => true, 2884 'type' => 'integer', 2885 'description' => __( 'Default post category.' ), 2875 2886 ) 2876 2887 ); … … 2880 2891 'default_post_format', 2881 2892 array( 2882 'show_in_rest' => true, 2883 'type' => 'string', 2884 'description' => __( 'Default post format.' ), 2893 'show_in_rest' => true, 2894 'show_in_abilities' => true, 2895 'type' => 'string', 2896 'description' => __( 'Default post format.' ), 2885 2897 ) 2886 2898 ); … … 2890 2902 'posts_per_page', 2891 2903 array( 2892 'show_in_rest' => true, 2893 'type' => 'integer', 2894 'label' => __( 'Maximum posts per page' ), 2895 'description' => __( 'Blog pages show at most.' ), 2896 'default' => 10, 2904 'show_in_rest' => true, 2905 'show_in_abilities' => true, 2906 'type' => 'integer', 2907 'label' => __( 'Maximum posts per page' ), 2908 'description' => __( 'Blog pages show at most.' ), 2909 'default' => 10, 2897 2910 ) 2898 2911 ); … … 2902 2915 'show_on_front', 2903 2916 array( 2904 'show_in_rest' => true, 2905 'type' => 'string', 2906 'label' => __( 'Show on front' ), 2907 'description' => __( 'What to show on the front page' ), 2917 'show_in_rest' => true, 2918 'show_in_abilities' => true, 2919 'type' => 'string', 2920 'label' => __( 'Show on front' ), 2921 'description' => __( 'What to show on the front page' ), 2908 2922 ) 2909 2923 ); … … 2913 2927 'page_on_front', 2914 2928 array( 2915 'show_in_rest' => true, 2916 'type' => 'integer', 2917 'label' => __( 'Page on front' ), 2918 'description' => __( 'The ID of the page that should be displayed on the front page' ), 2929 'show_in_rest' => true, 2930 'show_in_abilities' => true, 2931 'type' => 'integer', 2932 'label' => __( 'Page on front' ), 2933 'description' => __( 'The ID of the page that should be displayed on the front page' ), 2919 2934 ) 2920 2935 ); … … 2924 2939 'page_for_posts', 2925 2940 array( 2926 'show_in_rest' => true, 2927 'type' => 'integer', 2928 'description' => __( 'The ID of the page that should display the latest posts' ), 2941 'show_in_rest' => true, 2942 'show_in_abilities' => true, 2943 'type' => 'integer', 2944 'description' => __( 'The ID of the page that should display the latest posts' ), 2929 2945 ) 2930 2946 ); … … 2934 2950 'default_ping_status', 2935 2951 array( 2936 'show_in_rest' => array(2952 'show_in_rest' => array( 2937 2953 'schema' => array( 2938 2954 'enum' => array( 'open', 'closed' ), 2939 2955 ), 2940 2956 ), 2941 'type' => 'string', 2942 'description' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ), 2957 'show_in_abilities' => true, 2958 'type' => 'string', 2959 'description' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ), 2943 2960 ) 2944 2961 ); … … 2948 2965 'default_comment_status', 2949 2966 array( 2950 'show_in_rest' => array(2967 'show_in_rest' => array( 2951 2968 'schema' => array( 2952 2969 'enum' => array( 'open', 'closed' ), 2953 2970 ), 2954 2971 ), 2955 'type' => 'string', 2956 'label' => __( 'Allow comments on new posts' ), 2957 'description' => __( 'Allow people to submit comments on new posts.' ), 2972 'show_in_abilities' => true, 2973 'type' => 'string', 2974 'label' => __( 'Allow comments on new posts' ), 2975 'description' => __( 'Allow people to submit comments on new posts.' ), 2958 2976 ) 2959 2977 ); … … 2986 3004 * @type string $description A description of the data attached to this setting. 2987 3005 * @type callable $sanitize_callback A callback function that sanitizes the option's value. 2988 * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API. 2989 * When registering complex settings, this argument may optionally be an 2990 * array with a 'schema' key. 2991 * @type mixed $default Default value when calling `get_option()`. 3006 * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API. 3007 * When registering complex settings, this argument may optionally be an 3008 * array with a 'schema' key. 3009 * @type bool $show_in_abilities Whether this setting should be exposed through the Abilities API. 3010 * Default false. 3011 * @type mixed $default Default value when calling `get_option()`. 2992 3012 * } 2993 3013 */ … … 3002 3022 3003 3023 $defaults = array( 3004 'type' => 'string', 3005 'group' => $option_group, 3006 'label' => '', 3007 'description' => '', 3008 'sanitize_callback' => null, 3009 'show_in_rest' => false, 3024 'type' => 'string', 3025 'group' => $option_group, 3026 'label' => '', 3027 'description' => '', 3028 'sanitize_callback' => null, 3029 'show_in_rest' => false, 3030 'show_in_abilities' => false, 3010 3031 ); 3011 3032
Note: See TracChangeset
for help on using the changeset viewer.