Changeset 38832 for trunk/src/wp-includes/option.php
- Timestamp:
- 10/20/2016 02:54:12 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r38818 r38832 1709 1709 1710 1710 /** 1711 * Register default settings available in WordPress. 1712 * 1713 * The settings registered here are primarily useful for the REST API, so this 1714 * does not encompass all settings available in WordPress. 1715 * 1716 * @since 4.7.0 1717 */ 1718 function register_initial_settings() { 1719 register_setting( 'general', 'blogname', array( 1720 'show_in_rest' => array( 1721 'name' => 'title', 1722 ), 1723 'type' => 'string', 1724 'description' => __( 'Site title.' ), 1725 ) ); 1726 1727 register_setting( 'general', 'blogdescription', array( 1728 'show_in_rest' => array( 1729 'name' => 'description', 1730 ), 1731 'type' => 'string', 1732 'description' => __( 'Site description.' ), 1733 ) ); 1734 1735 register_setting( 'general', 'siteurl', array( 1736 'show_in_rest' => array( 1737 'name' => 'url', 1738 'schema' => array( 1739 'format' => 'uri', 1740 ), 1741 ), 1742 'type' => 'string', 1743 'description' => __( 'Site URL.' ), 1744 ) ); 1745 1746 register_setting( 'general', 'admin_email', array( 1747 'show_in_rest' => array( 1748 'name' => 'email', 1749 'schema' => array( 1750 'format' => 'email', 1751 ), 1752 ), 1753 'type' => 'string', 1754 'description' => __( 'This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. The new address will not become active until confirmed.' ), 1755 ) ); 1756 1757 register_setting( 'general', 'timezone_string', array( 1758 'show_in_rest' => array( 1759 'name' => 'timezone', 1760 ), 1761 'type' => 'string', 1762 'description' => __( 'A city in the same timezone as you.' ), 1763 ) ); 1764 1765 register_setting( 'general', 'date_format', array( 1766 'show_in_rest' => true, 1767 'type' => 'string', 1768 'description' => __( 'A date format for all date strings.' ), 1769 ) ); 1770 1771 register_setting( 'general', 'time_format', array( 1772 'show_in_rest' => true, 1773 'type' => 'string', 1774 'description' => __( 'A time format for all time strings.' ), 1775 ) ); 1776 1777 register_setting( 'general', 'start_of_week', array( 1778 'show_in_rest' => true, 1779 'type' => 'number', 1780 'description' => __( 'A day number of the week that the week should start on.' ), 1781 ) ); 1782 1783 register_setting( 'general', 'WPLANG', array( 1784 'show_in_rest' => array( 1785 'name' => 'language', 1786 ), 1787 'type' => 'string', 1788 'description' => __( 'WordPress locale code.' ), 1789 'default' => 'en_US', 1790 ) ); 1791 1792 register_setting( 'writing', 'use_smilies', array( 1793 'show_in_rest' => true, 1794 'type' => 'boolean', 1795 'description' => __( 'Convert emoticons like :-) and :-P to graphics on display.' ), 1796 'default' => true, 1797 ) ); 1798 1799 register_setting( 'writing', 'default_category', array( 1800 'show_in_rest' => true, 1801 'type' => 'number', 1802 'description' => __( 'Default category.' ), 1803 ) ); 1804 1805 register_setting( 'writing', 'default_post_format', array( 1806 'show_in_rest' => true, 1807 'type' => 'string', 1808 'description' => __( 'Default post format.' ), 1809 ) ); 1810 1811 register_setting( 'reading', 'posts_per_page', array( 1812 'show_in_rest' => true, 1813 'type' => 'number', 1814 'description' => __( 'Blog pages show at most.' ), 1815 'default' => 10, 1816 ) ); 1817 } 1818 1819 /** 1711 1820 * Register a setting and its data. 1712 1821 *
Note: See TracChangeset
for help on using the changeset viewer.