Skip to content

Commit

Permalink
Merge pull request #16 from humanmade/fix-media-settings
Browse files Browse the repository at this point in the history
Only register_setting if not defined
  • Loading branch information
roborourke authored Aug 26, 2021
2 parents e02c256 + 0426728 commit 6995ac1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function register_provider( ProviderRegistry $provider_registry ): void {
* Register the settings.
*/
function register_settings(): void {
if ( defined( 'AMF_WORDPRESS_URL' ) ) {
// Skip the UI.
return;
}

register_setting( SETTINGS_PAGE, URL_SETTING, [
'type' => 'string',
Expand All @@ -50,7 +54,6 @@ function register_settings(): void {
* Register the UI for the settings.
*/
function register_settings_ui(): void {

if ( defined( 'AMF_WORDPRESS_URL' ) ) {
// Skip the UI.
return;
Expand Down

0 comments on commit 6995ac1

Please sign in to comment.