mirror of
https://ghproxy.net/https://github.com/AlxMedia/alx-extensions.git
synced 2025-08-27 01:15:47 +08:00
Add on/off option for custom widgets
This commit is contained in:
parent
23d5b51bb7
commit
8cf4a571d8
3 changed files with 46 additions and 5 deletions
|
@ -21,8 +21,6 @@ require_once ALX_EXTENSIONS_DIR . '/inc/options.php';
|
|||
require_once ALX_EXTENSIONS_DIR . '/inc/share.php';
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/share-footer.php';
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/post-formats.php';
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/widgets/alx-posts.php';
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/widgets/alx-tabs.php';
|
||||
|
||||
|
||||
/* Load plugin textdomain
|
||||
|
@ -110,3 +108,12 @@ function alx_ext_register_custom_sidebars() {
|
|||
|
||||
add_action( 'widgets_init', 'alx_ext_register_custom_sidebars', 11 );
|
||||
|
||||
|
||||
/* Custom widgets
|
||||
/* ------------------------------------ */
|
||||
if ( get_theme_mod( 'widget-alx-posts', 'on' ) == 'on') {
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/widgets/alx-posts.php';
|
||||
}
|
||||
if ( get_theme_mod( 'widget-alx-tabs', 'on' ) == 'on') {
|
||||
require_once ALX_EXTENSIONS_DIR . '/inc/widgets/alx-tabs.php';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue