Unifies addition to extension panels into one function.

This commit is contained in:
mateuswetah 2021-05-20 11:59:18 -03:00
parent 788b1b007b
commit 19e7352a28
1 changed files with 3 additions and 13 deletions

View File

@ -15,17 +15,6 @@ if ( !function_exists('tainacan_blocksy_add_repository_and_terms_items_options_p
[], false [], false
); );
return $options;
}
}
add_filter( 'blocksy_extensions_customizer_options', 'tainacan_blocksy_add_repository_and_terms_items_options_panel' );
/**
* Adds Tainacan terms and term items list to settings on customizer.
*/
if ( !function_exists('tainacan_blocksy_add_terms_and_terms_items_options_panel') ) {
function tainacan_blocksy_add_terms_and_terms_items_options_panel($options) {
$options['tainacan_terms_items_list'] = blc_call_fnc( $options['tainacan_terms_items_list'] = blc_call_fnc(
[ [
'fnc' => 'blocksy_get_options', 'fnc' => 'blocksy_get_options',
@ -34,11 +23,12 @@ if ( !function_exists('tainacan_blocksy_add_terms_and_terms_items_options_panel'
TAINACAN_BLOCKSY_PLUGIN_DIR_PATH . '/inc/options/archives/tainacan-terms-items.php', TAINACAN_BLOCKSY_PLUGIN_DIR_PATH . '/inc/options/archives/tainacan-terms-items.php',
[], false [], false
); );
return $options; return $options;
} }
} }
add_filter( 'blocksy_extensions_customizer_options', 'tainacan_blocksy_add_terms_and_terms_items_options_panel' ); add_filter( 'blocksy_extensions_customizer_options', 'tainacan_blocksy_add_repository_and_terms_items_options_panel' );
/** /**
* Adds extra customizer options to items single page template * Adds extra customizer options to items single page template