if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'generate_scripts' ) ) {
add_action( 'wp_enqueue_scripts', 'generate_scripts' );
function generate_scripts() {
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
$dir_uri = get_template_directory_uri();
if ( generate_get_option( 'combine_css' ) && $suffix ) {
wp_dequeue_style( 'generate-style', $dir_uri . "/css/all.min.css", array(), GENERATE_VERSION, 'all' );
} else {
$lite = '';
if ( apply_filters( 'generate_unsemantic_grid_lite', false ) ) {
$lite = '-lite';
}
wp_dequeue_style( 'generate-style-grid', $dir_uri . "/css/unsemantic-grid{$lite}{$suffix}.css", false, GENERATE_VERSION, 'all' );
wp_dequeue_style( 'generate-style', $dir_uri . "/style{$suffix}.css", array(), GENERATE_VERSION, 'all' );
wp_dequeue_style( 'generate-mobile-style', $dir_uri . "/css/mobile{$suffix}.css", array( 'generate-style' ), GENERATE_VERSION, 'all' );
}
if ( is_child_theme() ) {
wp_dequeue_style( 'generate-child', get_stylesheet_uri(), array( 'generate-style' ), filemtime( get_stylesheet_directory() . '/style.css' ), 'all' );
}
if ( ! apply_filters( 'generate_fontawesome_essentials', false ) ) {
wp_dequeue_style( 'font-awesome', $dir_uri . "/css/font-awesome{$suffix}.css", false, '4.7', 'all' );
}
if ( function_exists( 'wp_script_add_data' ) ) {
wp_dequeue_script( 'generate-classlist', $dir_uri . "/js/classList{$suffix}.js", array(), GENERATE_VERSION, true );
wp_script_add_data( 'generate-classlist', 'conditional', 'lte IE 11' );
}
wp_dequeue_script( 'generate-menu', $dir_uri . "/js/menu{$suffix}.js", array(), GENERATE_VERSION, true );
wp_dequeue_script( 'generate-a11y', $dir_uri . "/js/a11y{$suffix}.js", array(), GENERATE_VERSION, true );
if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) {
wp_dequeue_script( 'generate-dropdown-click', $dir_uri . "/js/dropdown-click{$suffix}.js", array( 'generate-menu' ), GENERATE_VERSION, true );
}
if ( 'enable' === generate_get_option( 'nav_search' ) ) {
wp_dequeue_script( 'generate-navigation-search', $dir_uri . "/js/navigation-search{$suffix}.js", array( 'generate-menu' ), GENERATE_VERSION, true );
wp_localize_script(
'generate-navigation-search',
'generatepressNavSearch',
array(
'open' => esc_attr__( 'Open Search Bar', 'generatepress' ),
'close' => esc_attr__( 'Close Search Bar', 'generatepress' ),
)
);
}
if ( 'enable' === generate_get_option( 'back_to_top' ) ) {
wp_dequeue_script( 'generate-back-to-top', $dir_uri . "/js/back-to-top{$suffix}.js", array(), GENERATE_VERSION, true );
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_dequeue_script( 'comment-reply' );
}
}
}
if ( ! function_exists( 'generate_widgets_init' ) ) {
add_action( 'widgets_init', 'generate_widgets_init' );
function generate_widgets_init() {
$widgets = array(
'sidebar-1' => __( 'Right Sidebar', 'generatepress' ),
'sidebar-2' => __( 'Left Sidebar', 'generatepress' ),
'header' => __( 'Header', 'generatepress' ),
'footer-1' => __( 'Footer Widget 1', 'generatepress' ),
'footer-bar' => __( 'Footer Bar','generatepress' ),
'top-bar' => __( 'Top Bar','generatepress' ),
);
foreach ( $widgets as $id => $name ) {
register_sidebar( array(
'name' => $name,
'id' => $id,
'before_widget' => '',
'before_title' => apply_filters( 'generate_start_widget_title', '
' ),
) );
}
}
}
June 2019 | Drugs Details
Skip to content
What Is Ivabradine? Sold under the brand name Corlanor, Ivabradine is a prescription medication that can lower heart rate and decrease heart failure symptoms. Physicians usually turn to Ivabradine in … Leia mais
The world’s biggest retailer is officially looking out for your furry friends! Retail giant Walmart recently announced they would be making some major changes to their stores that will cater … Leia mais