get( 'Version' );
}
endif;
add_action( 'after_setup_theme', 'agencybell_setup' );
/**
* remove parent actions
*/
add_action( 'init', 'agencybell_remove_action');
function agencybell_remove_action() {
remove_action('construction_light_action_video_calltoaction','construction_light_video_calltoaction', 40);
remove_action('construction_light_calltoaction_section','construction_light_calltoaction', 50);
remove_action('construction_light_counter_section','construction_light_counter', 60);
remove_action('construction_light_blog_section','construction_light_blog', 65);
remove_action('construction_light_action_service_advance', 'construction_light_service_section', 45);
}
/**
* Enqueue child theme styles and scripts
*/
function agencybell_scripts() {
global $agencybell_version;
wp_dequeue_style( 'construction-light-style' );
wp_enqueue_style( 'agencybell-parent-style', trailingslashit( esc_url ( get_template_directory_uri() ) ) . 'style.css', array(), esc_attr( $agencybell_version ) );
wp_enqueue_style( 'agencybell-style', get_stylesheet_uri(), esc_attr( $agencybell_version ) );
wp_add_inline_style('agencybell-style', agencybell_dymanic_styles());
wp_enqueue_style( 'agencybell-responsive', get_template_directory_uri(). '/assets/css/responsive.css');
wp_enqueue_script('agencybell', get_stylesheet_directory_uri() . '/js/agencybell.js', array('jquery','masonry'), esc_attr( $agencybell_version ), true);
}
add_action( 'wp_enqueue_scripts', 'agencybell_scripts', 20 );
if ( ! function_exists( 'agencybell_child_options' ) ) {
function agencybell_child_options( $wp_customize ) {
$wp_customize->remove_control("header_image");
$agencybell = $wp_customize->get_setting('construction_light_header_layout');
$agencybell->default = 'layout_three';
$agencybellchoices = $wp_customize->get_control('construction_light_header_layout');
$agencybellchoices->choices = array(
'layout_one' => esc_html__( 'Layout One', 'agency-bell' ),
'layout_two' => esc_html__( 'Layout Two', 'agency-bell' ),
'layout_three' => esc_html__( 'Layout Three', 'agency-bell' )
);
/**
* About Section
*/
$wp_customize->remove_control('construction_light_aboutus_image');
$wp_customize->remove_control('construction_light_aboutus_style');
$wp_customize->remove_control('construction_light_aboutus_text_color');
$wp_customize->remove_control('construction_light_aboutus_bg_color');
$agencybell = $wp_customize->get_setting('construction_light_aboutus_alignment');
$agencybell->default = 'text-center';
/**
* Service Section Layout
*/
$agencybell = $wp_customize->get_setting('construction_light_service_layout');
$agencybell->default = 'layout_three';
$agencybellchoices = $wp_customize->get_control('construction_light_service_layout');
$agencybellchoices->choices = array(
'layout_one' => esc_html__( 'Layout One', 'agency-bell' ),
'layout_two' => esc_html__( 'Layout Two', 'agency-bell' ),
'layout_three' => esc_html__( 'Layout Three', 'agency-bell' )
);
$wp_customize->add_setting('construction_light_service_image', array(
'sanitize_callback' => 'esc_url_raw' //done
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'construction_light_service_image', array(
'label' => esc_html__('Background Image','agency-bell'),
'section' => 'construction_light_service_section',
'type' => 'image',
'priority' => 1
)));
/**
* Remove Section
*/
$wp_customize->remove_section( 'construction_light_video_calltoaction_section');
$wp_customize->remove_section( 'construction_light_calltoaction_section');
$wp_customize->remove_section( 'construction_light_counter_section');
$wp_customize->remove_section( 'construction_light_blog_section');
}
}
add_action( 'customize_register' , 'agencybell_child_options', 11 );
/**
* Our Service Featues Section.
*/
if (! function_exists( 'construction_light_promo_service' ) ):
function construction_light_promo_service(){
$features_options = get_theme_mod('construction_light_features_service_section','enable');
if( !empty( $features_options ) && $features_options == 'enable' ){
?>