| @@ -10,8 +10,17 @@ | ||
| 10 | 10 | die( 'Silence is golden.' ); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | + * Registers the customizer nonces REST API routes. | |
| 15 | + */ | |
| 16 | +function gutenberg_register_rest_customizer_nonces() { | |
| 17 | + $customizer_nonces = new WP_Rest_Customizer_Nonces(); | |
| 18 | + $customizer_nonces->register_routes(); | |
| 19 | +} | |
| 20 | +add_action( 'rest_api_init', 'gutenberg_register_rest_customizer_nonces' ); | |
| 21 | + | |
| 22 | +/** | |
| 14 | 23 | * Registers the Block editor settings REST API routes. |
| 15 | 24 | */ |
| 16 | 25 | function gutenberg_register_block_editor_settings() { |
| 17 | 26 | $editor_settings = new WP_REST_Block_Editor_Settings_Controller(); |
| @@ -18,9 +27,8 @@ | ||
| 18 | 27 | $editor_settings->register_routes(); |
| 19 | 28 | } |
| 20 | 29 | add_action( 'rest_api_init', 'gutenberg_register_block_editor_settings' ); |
| 21 | 30 | |
| 22 | - | |
| 23 | 31 | /** |
| 24 | 32 | * Shim for get_sample_permalink() to add support for auto-draft status. |
| 25 | 33 | * |
| 26 | 34 | * This function filters the return from get_sample_permalink() and essentially |
| @@ -28,9 +36,9 @@ | ||
| 28 | 36 | * is actually publish in order to return the future permalink format. |
| 29 | 37 | * |
| 30 | 38 | * This is a temporary fix until we can patch get_sample_permalink() |
| 31 | 39 | * |
| 32 | - * @link https://core.trac.wordpress.org/ticket/46266 | |
| 40 | + * @see https://core.trac.wordpress.org/ticket/46266 | |
| 33 | 41 | * |
| 34 | 42 | * @param array $permalink Array containing the sample permalink with placeholder for the post name, and the post name. |
| 35 | 43 | * @param int $id ID of the post. |
| 36 | 44 | * @param string $title Title of the post. |