This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register custom settings with WordPress. | |
*/ | |
function register_settings() { | |
register_setting( | |
'custom_settings_group', | |
'custom_settings', | |
[ | |
'description' => esc_html__( 'Custom Settings', 'ravewebdev' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Customize the preview button in the WordPress admin to point to the headless frontend. | |
* | |
* @param string $link WordPress preview link. | |
* @param WP_Post $post Current post object. | |
* @return string The headless WordPress preview link. | |
*/ | |
function set_headless_preview_link( string $link, \WP_Post $post ) { | |
$frontend_url = 'https://my-headless-frontend.test'; |
OlderNewer