Changeset 43571 for trunk/src/wp-includes/option.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r42833 r43571 1385 1385 $serialized_value = maybe_serialize( $value ); 1386 1386 $result = $wpdb->insert( 1387 $wpdb->sitemeta, array( 1387 $wpdb->sitemeta, 1388 array( 1388 1389 'site_id' => $network_id, 1389 1390 'meta_key' => $option, … … 1493 1494 1494 1495 $result = $wpdb->delete( 1495 $wpdb->sitemeta, array( 1496 $wpdb->sitemeta, 1497 array( 1496 1498 'meta_key' => $option, 1497 1499 'site_id' => $network_id, … … 1604 1606 $serialized_value = maybe_serialize( $value ); 1605 1607 $result = $wpdb->update( 1606 $wpdb->sitemeta, array( 'meta_value' => $serialized_value ), array( 1608 $wpdb->sitemeta, 1609 array( 'meta_value' => $serialized_value ), 1610 array( 1607 1611 'site_id' => $network_id, 1608 1612 'meta_key' => $option, … … 1874 1878 function register_initial_settings() { 1875 1879 register_setting( 1876 'general', 'blogname', array( 1880 'general', 1881 'blogname', 1882 array( 1877 1883 'show_in_rest' => array( 1878 1884 'name' => 'title', … … 1884 1890 1885 1891 register_setting( 1886 'general', 'blogdescription', array( 1892 'general', 1893 'blogdescription', 1894 array( 1887 1895 'show_in_rest' => array( 1888 1896 'name' => 'description', … … 1895 1903 if ( ! is_multisite() ) { 1896 1904 register_setting( 1897 'general', 'siteurl', array( 1905 'general', 1906 'siteurl', 1907 array( 1898 1908 'show_in_rest' => array( 1899 1909 'name' => 'url', … … 1910 1920 if ( ! is_multisite() ) { 1911 1921 register_setting( 1912 'general', 'admin_email', array( 1922 'general', 1923 'admin_email', 1924 array( 1913 1925 'show_in_rest' => array( 1914 1926 'name' => 'email', … … 1924 1936 1925 1937 register_setting( 1926 'general', 'timezone_string', array( 1938 'general', 1939 'timezone_string', 1940 array( 1927 1941 'show_in_rest' => array( 1928 1942 'name' => 'timezone', … … 1934 1948 1935 1949 register_setting( 1936 'general', 'date_format', array( 1950 'general', 1951 'date_format', 1952 array( 1937 1953 'show_in_rest' => true, 1938 1954 'type' => 'string', … … 1942 1958 1943 1959 register_setting( 1944 'general', 'time_format', array( 1960 'general', 1961 'time_format', 1962 array( 1945 1963 'show_in_rest' => true, 1946 1964 'type' => 'string', … … 1950 1968 1951 1969 register_setting( 1952 'general', 'start_of_week', array( 1970 'general', 1971 'start_of_week', 1972 array( 1953 1973 'show_in_rest' => true, 1954 1974 'type' => 'integer', … … 1958 1978 1959 1979 register_setting( 1960 'general', 'WPLANG', array( 1980 'general', 1981 'WPLANG', 1982 array( 1961 1983 'show_in_rest' => array( 1962 1984 'name' => 'language', … … 1969 1991 1970 1992 register_setting( 1971 'writing', 'use_smilies', array( 1993 'writing', 1994 'use_smilies', 1995 array( 1972 1996 'show_in_rest' => true, 1973 1997 'type' => 'boolean', … … 1978 2002 1979 2003 register_setting( 1980 'writing', 'default_category', array( 2004 'writing', 2005 'default_category', 2006 array( 1981 2007 'show_in_rest' => true, 1982 2008 'type' => 'integer', … … 1986 2012 1987 2013 register_setting( 1988 'writing', 'default_post_format', array( 2014 'writing', 2015 'default_post_format', 2016 array( 1989 2017 'show_in_rest' => true, 1990 2018 'type' => 'string', … … 1994 2022 1995 2023 register_setting( 1996 'reading', 'posts_per_page', array( 2024 'reading', 2025 'posts_per_page', 2026 array( 1997 2027 'show_in_rest' => true, 1998 2028 'type' => 'integer', … … 2003 2033 2004 2034 register_setting( 2005 'discussion', 'default_ping_status', array( 2035 'discussion', 2036 'default_ping_status', 2037 array( 2006 2038 'show_in_rest' => array( 2007 2039 'schema' => array( … … 2015 2047 2016 2048 register_setting( 2017 'discussion', 'default_comment_status', array( 2049 'discussion', 2050 'default_comment_status', 2051 array( 2018 2052 'show_in_rest' => array( 2019 2053 'schema' => array( … … 2026 2060 ); 2027 2061 2028 register_setting( 'permalink', 'permalink_structure', array( 2029 'show_in_rest' => true, 2030 'type' => 'string', 2031 'description' => __( 'Custom URL structure for permalinks and archives.' ), 2032 ) ); 2062 register_setting( 2063 'permalink', 2064 'permalink_structure', 2065 array( 2066 'show_in_rest' => true, 2067 'type' => 'string', 2068 'description' => __( 'Custom URL structure for permalinks and archives.' ), 2069 ) 2070 ); 2033 2071 } 2034 2072 … … 2093 2131 if ( 'misc' == $option_group ) { 2094 2132 _deprecated_argument( 2095 __FUNCTION__, '3.0.0', 2133 __FUNCTION__, 2134 '3.0.0', 2096 2135 /* translators: %s: misc */ 2097 2136 sprintf( … … 2105 2144 if ( 'privacy' == $option_group ) { 2106 2145 _deprecated_argument( 2107 __FUNCTION__, '3.5.0', 2146 __FUNCTION__, 2147 '3.5.0', 2108 2148 /* translators: %s: privacy */ 2109 2149 sprintf( … … 2143 2183 if ( 'misc' == $option_group ) { 2144 2184 _deprecated_argument( 2145 __FUNCTION__, '3.0.0', 2185 __FUNCTION__, 2186 '3.0.0', 2146 2187 /* translators: %s: misc */ 2147 2188 sprintf( … … 2155 2196 if ( 'privacy' == $option_group ) { 2156 2197 _deprecated_argument( 2157 __FUNCTION__, '3.5.0', 2198 __FUNCTION__, 2199 '3.5.0', 2158 2200 /* translators: %s: privacy */ 2159 2201 sprintf( … … 2171 2213 if ( '' !== $deprecated ) { 2172 2214 _deprecated_argument( 2173 __FUNCTION__, '4.7.0', 2215 __FUNCTION__, 2216 '4.7.0', 2174 2217 /* translators: 1: $sanitize_callback, 2: register_setting() */ 2175 2218 sprintf(
Note: See TracChangeset
for help on using the changeset viewer.