mirror of
https://github.com/10h30/yeuchaybo.git
synced 2026-07-17 13:43:45 +09:00
Initial
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Child Theme Library
|
||||
*
|
||||
* WARNING: This file is a part of the core Child Theme Library.
|
||||
* DO NOT edit this file under any circumstances. Please use
|
||||
* the functions.php file to make any theme modifications.
|
||||
*
|
||||
* @package SEOThemes\ChildThemeLibrary\Widgets
|
||||
* @link https://github.com/seothemes/child-theme-library
|
||||
* @author Thuan Bui
|
||||
* @copyright Copyright © 2018 Thuan Bui
|
||||
* @license GPL-2.0+
|
||||
*/
|
||||
|
||||
// If this file is called directly, abort.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
||||
die;
|
||||
|
||||
}
|
||||
|
||||
add_action( 'widgets_init', 'child_theme_unregister_widgets' );
|
||||
/**
|
||||
* Unregister widgets defined in the config.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function child_theme_unregister_widgets() {
|
||||
|
||||
$config = child_theme_get_config( 'widgets' );
|
||||
|
||||
foreach ( $config as $widget ) {
|
||||
|
||||
unregister_widget( $widget );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action( 'after_setup_theme', 'child_theme_widget_shortcodes' );
|
||||
/**
|
||||
* Enables shortcodes in text widgets.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function child_theme_widget_shortcodes() {
|
||||
|
||||
add_filter( 'widget_text', 'do_shortcode' );
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user