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_marketing_agency_activation_notice' );
}
}
endif;
add_action( 'after_setup_theme', 'advance_marketing_agency_setup' );
// Notice after Theme Activation
function advance_marketing_agency_activation_notice() {
echo '
';
}
/* Theme Widgets Setup */
function advance_marketing_agency_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Nav 1', 'advance-marketing-agency' ),
'id' => 'footer-1',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 2', 'advance-marketing-agency' ),
'id' => 'footer-2',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 3', 'advance-marketing-agency' ),
'id' => 'footer-3',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Nav 4', 'advance-marketing-agency' ),
'id' => 'footer-4',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'advance_marketing_agency_widgets_init' );
function advance_marketing_agency_customize_register() {
global $wp_customize;
$wp_customize->remove_setting( 'multi_advance_footer_widget_areas' );
$wp_customize->remove_control( 'multi_advance_footer_widget_areas' );
$wp_customize->remove_setting( 'multi_advance_display_topbar' );
$wp_customize->remove_control( 'multi_advance_display_topbar' );
$wp_customize->remove_setting( 'multi_advance_header_premium_info' );
$wp_customize->remove_control( 'multi_advance_header_premium_info' );
$wp_customize->remove_setting( 'multi_advance_footer_premium_info' );
$wp_customize->remove_control( 'multi_advance_footer_premium_info' );
}
// Customizer Section
function advance_marketing_agency_customizer ( $wp_customize ) {
$wp_customize->add_setting('advance_marketing_agency_header_premium_info',array(
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('advance_marketing_agency_header_premium_info',array(
'type'=> 'hidden',
'description' => "". esc_html('For more settings and features, please explore our premium theme.','advance-marketing-agency') ."
". esc_html('Upgrade to Pro','advance-marketing-agency') ."",
'section'=> 'multi_advance_header'
));
$wp_customize->add_setting('advance_marketing_agency_footer_premium_info',array(
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('advance_marketing_agency_footer_premium_info',array(
'type'=> 'hidden',
'description' => "". esc_html('For more settings and features, please explore our premium theme.','advance-marketing-agency') ."
". esc_html('Upgrade to Pro','advance-marketing-agency') ."",
'section'=> 'multi_advance_footer_section'
));
}
add_action( 'customize_register', 'advance_marketing_agency_customizer' );
/*------------------------------section-pro.php part----------------------------------------*/
require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' );
class Advance_Marketing_Agency_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_Marketing_Agency_Customize_Section_Pro' );
}
/**
* Loads theme customizer CSS.
*
* @since 1.0.0
* @access public
* @return void
*/
public function enqueue_control_scripts() {
wp_enqueue_style( 'advance_marketing_agency-customize-controls', get_stylesheet_directory_uri() . '/css/customize-controls-child.css' );
}
}
// Doing this customizer thang!
Advance_Marketing_Agency_Customize::get_instance();
define('ADVANCE_MARKETING_AGENCY_BUY_NOW',__('https://www.themeshopy.com/themes/marketing-agent-wordpress-theme/', 'advance-marketing-agency'));
define('ADVANCE_MARKETING_AGENCY_LIVE_DEMO',__('https://www.themeshopy.com/marketing-agency-pro/', 'advance-marketing-agency'));
define('ADVANCE_MARKETING_AGENCY_CONTACT',__('https://wordpress.org/support/theme/advance-marketing-agency/', 'advance-marketing-agency'));
define('ADVANCE_MARKETING_AGENCY_PRO_DOC',__('https://www.themeshopy.com/demo/docs/marketing-agency-pro/', 'advance-marketing-agency'));
define('ADVANCE_MARKETING_AGENCY_FREE_DOC',__('https://themeshopy.com/demo/docs/free-marketing-agency/','advance-marketing-agency'));
define('ADVANCE_MARKETING_AGENCY_CREDIT',__('https://www.themeshopy.com/themes/free-marketing-agency-wordpress-theme/', 'advance-marketing-agency'));
if (!function_exists('advance_marketing_agency_credit')) {
function advance_marketing_agency_credit() {
echo "".esc_html__('Marketing Agency WordPress Theme', 'advance-marketing-agency')."";
}
}
add_action( 'customize_register', 'advance_marketing_agency_customize_register', 11 );
add_action( 'init', 'advance_marketing_agency_remove_action');
function advance_marketing_agency_remove_action() {
remove_action( 'admin_menu','multi_advance_abouttheme' );
remove_action( 'admin_notices','multi_advance_activation_notice' );
}
add_action( 'wp_enqueue_scripts', 'advance_marketing_agency_enqueue_styles' );
function advance_marketing_agency_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-marketing-agency-style', get_stylesheet_uri(), array( $parent_style ) );
require get_parent_theme_file_path( '/inc/ts-color-pallete.php' );
wp_add_inline_style( 'advance-marketing-agency-style',$multi_advance_custom_css );
require get_theme_file_path( '/ts-color-pallete.php' );
wp_add_inline_style( 'advance-marketing-agency-style',$multi_advance_custom_css );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
if ( ! defined( 'MULTI_ADVANCE_PRO_THEME_LINK' ) ) {
define( 'MULTI_ADVANCE_PRO_THEME_LINK',__('https://www.themeshopy.com/themes/marketing-agent-wordpress-theme/','advance-marketing-agency') );
}
if ( ! defined( 'MULTI_ADVANCE_PRO_THEME_TEXT' ) ) {
define( 'MULTI_ADVANCE_PRO_THEME_TEXT', __('Advance Marketing Pro','advance-marketing-agency') );
}
// Doc Link
if ( ! defined( 'MULTI_ADVANCE_DEMO_LINK' ) ) {
define( 'MULTI_ADVANCE_DEMO_LINK', 'https://www.themeshopy.com/themes/free-marketing-agency-wordpress-theme/' );
}
if ( ! defined( 'MULTI_ADVANCE_DEMO_LINK_TEXT' ) ) {
define( 'MULTI_ADVANCE_DEMO_LINK_TEXT', __('Guide','multi-advance') );
}
/* Admin about theme */
require get_theme_file_path('/inc/admin/admin.php');