240,
'width' => 240,
'flex-height' => true,
) );
add_theme_support( 'custom-background', array(
'default-color' => 'f1f1f1'
) );
add_theme_support( 'html5', array(
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support('responsive-embeds');
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'css/editor-style.css', multi_advance_font_url() ) );
// Theme Activation Notice
global $pagenow;
if (
is_admin()
&&
('themes.php' == $pagenow)
// &&
// isset( $_GET['activated'] )
) {
add_action('admin_notices', 'advance_consultancy_activation_notice');
}
}
endif;
add_action( 'after_setup_theme', 'advance_consultancy_setup' );
// Dashboard Theme Notification
function advance_consultancy_activation_notice() {
$advance_consultancy_meta = get_option( 'advance_consultancy_admin_notice' );
if (!$advance_consultancy_meta) {
echo '
';
echo '
';
echo '
';
echo '
' . esc_html__( 'Thanks For Installing the "Advance Consultancy" Theme !', 'advance-consultancy' ) . '
';
echo '
' . esc_html__( 'We’re excited to help you get started with your new theme! Set up your website quickly and easily by importing our demo content and customizing it to suit your needs.', 'advance-consultancy' ) . '
';
echo '
';
echo '
';
echo '
';
echo '
) . '/images/demo-preview.png)
';
echo '
';
echo '
';
echo '
';
}
}
/* Theme Widgets Setup */
function advance_consultancy_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Nav 1', 'advance-consultancy' ),
'id' => 'footer-1',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 2', 'advance-consultancy' ),
'id' => 'footer-2',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 3', 'advance-consultancy' ),
'id' => 'footer-3',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 4', 'advance-consultancy' ),
'id' => 'footer-4',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'advance_consultancy_widgets_init' );
function advance_consultancy_customize_register() {
global $wp_customize;
$wp_customize->remove_setting( 'multi_advance_display_topbar' );
$wp_customize->remove_control( 'multi_advance_display_topbar' );
$wp_customize->remove_setting( 'multi_advance_theme_color_premium_info' );
$wp_customize->remove_control( 'multi_advance_theme_color_premium_info' );
$wp_customize->remove_section( 'multi_advance_doc_link' );
}
add_action( 'customize_register', 'advance_consultancy_customize_register', 11 );
// Customizer Section
function advance_consultancy_customizer ( $wp_customize ) {
$wp_customize->add_setting( 'advance_consultancy_theme_color_second', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'advance_consultancy_theme_color_second', array(
'label' => __( 'Color Option', 'advance-consultancy' ),
'description' => __('One can change complete theme color on just one click.', 'advance-consultancy'),
'section' => 'multi_advance_theme_color_option',
'settings' => 'advance_consultancy_theme_color_second',
)));
}
add_action( 'customize_register', 'advance_consultancy_customizer' );
/*------------------------------section-pro.php part----------------------------------------*/
require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' );
class Advance_Consultancy_Customize_Section_Pro extends WP_Customize_Section {
/**
* Outputs the Underscore.js template.
*
* @since 1.0.0
* @access public
* @return void
*/
protected function render_template() { ?>
{{ data.title }}
<# if ( data.pro_text && data.pro_url ) { #>
{{ data.pro_text }}
<# } #>
setup_actions();
}
return $instance;
}
/**
* Constructor method.
*
* @since 1.0.0
* @access private
* @return void
*/
private function __construct() {}
/**
* Sets up initial actions.
*
* @since 1.0.0
* @access private
* @return void
*/
private function setup_actions() {
// Register panels, sections, settings, controls, and partials.
add_action( 'customize_register', array( $this, 'sections' ) );
// Register scripts and styles for the controls.
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
}
/**
* Sets up the customizer sections.
*
* @since 1.0.0
* @access public
* @param object $manager
* @return void
*/
public function sections( $manager ) {
// Register custom section types.
$manager->register_section_type( 'Advance_Consultancy_Customize_Section_Pro' );
}
/**
* Loads theme customizer CSS.
*
* @since 1.0.0
* @access public
* @return void
*/
public function enqueue_control_scripts() {
wp_enqueue_style( 'advance_consultancy-customize-controls', get_stylesheet_directory_uri() . '/css/customize-controls-child.css' );
}
}
// Doing this customizer thang!
Advance_Consultancy_Customize::get_instance();
function advance_consultancy_links_setup() {
define('ADVANCE_CONSULTANCY_BUY_NOW',__('https://www.themescaliber.com/products/business-consultancy-wordpress-theme', 'advance-consultancy'));
define('ADVANCE_CONSULTANCY_LIVE_DEMO',__('https://preview.themescaliber.com/advance-consultancy-pro/', 'advance-consultancy'));
define('ADVANCE_CONSULTANCY_CONTACT',__('https://wordpress.org/support/theme/advance-consultancy/', 'advance-consultancy'));
define('ADVANCE_CONSULTANCY_FREE_THEME_DOC',__('https://preview.themescaliber.com/doc/free-advance-consultancy/','advance-consultancy'));
define('ADVANCE_CONSULTANCY_PRO_DOC',__('https://preview.themescaliber.com/doc/advance-consultancy-pro/', 'advance-consultancy'));
define('ADVANCE_CONSULTANCY_CREDIT',__('https://www.themescaliber.com/products/advance-consultancy/', 'advance-consultancy'));
define('ADVANCE_CONSULTANCY_SUPPORT',__('https://wordpress.org/support/theme/advance-consultancy/','advance-consultancy'));
define('ADVANCE_CONSULTANCY_REVIEW',__('https://wordpress.org/support/theme/advance-consultancy/reviews/','advance-consultancy'));
if (!function_exists('advance_consultancy_credit')) {
function advance_consultancy_credit() {
echo "".esc_html__('Advance Consultancy WordPress Theme', 'advance-consultancy')."";
}
}
if ( ! defined( 'MULTI_ADVANCE_GO_PRO' ) ) {
define( 'MULTI_ADVANCE_GO_PRO', 'https://www.themescaliber.com/products/business-consultancy-wordpress-theme');
}
if ( ! defined( 'MULTI_ADVANCE_PRO_THEME_LINK' ) ) {
define( 'MULTI_ADVANCE_PRO_THEME_LINK',__('https://www.themescaliber.com/products/business-consultancy-wordpress-theme','advance-consultancy') );
}
if ( ! defined( 'MULTI_ADVANCE_PRO_THEME_TEXT' ) ) {
define( 'MULTI_ADVANCE_PRO_THEME_TEXT', __('Advance Consultancy Pro','advance-consultancy') );
}
if ( ! defined( 'MULTI_ADVANCE_DEMO_LINK' ) ) {
define( 'MULTI_ADVANCE_DEMO_LINK',__('https://preview.themescaliber.com/advance-consultancy-pro/','advance-consultancy') );
}
}
add_action( 'after_setup_theme', 'advance_consultancy_links_setup' );
add_action( 'init', 'advance_consultancy_remove_action');
function advance_consultancy_remove_action() {
remove_action( 'admin_menu','multi_advance_gettingstarted' );
remove_action( 'admin_notices','multi_advance_activation_notice' );
}
add_action( 'wp_enqueue_scripts', 'advance_consultancy_enqueue_styles' );
function advance_consultancy_enqueue_styles() {
wp_enqueue_style('bootstrap-style', get_template_directory_uri().'/css/bootstrap.css');
$parent_style = 'multi-advance-basic-style'; // Style handle of parent theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'advance-consultancy-style', get_stylesheet_uri(), array( $parent_style ) );
require get_parent_theme_file_path( '/inc/ts-color-pallete.php' );
wp_add_inline_style( 'advance-consultancy-style',$multi_advance_custom_css );
require get_theme_file_path( '/ts-color-pallete.php' );
wp_add_inline_style( 'advance-consultancy-style',$multi_advance_custom_css );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
/* Admin about theme */
require get_theme_file_path('/inc/admin/admin.php');
// Admin notice code START
function advance_consultancy_dismissed_notice() {
update_option( 'advance_consultancy_admin_notice', true );
}
add_action( 'wp_ajax_advance_consultancy_dismissed_notice', 'advance_consultancy_dismissed_notice' );
//After Switch theme function
add_action('after_switch_theme', 'advance_consultancy_getstart_setup_options');
function advance_consultancy_getstart_setup_options () {
update_option('advance_consultancy_admin_notice', false );
}
// Admin notice code END