'ffffff', )); add_image_size( 'personal-gym-trainer-featured-image', 2000, 1200, true ); add_image_size( 'personal-gym-trainer-thumbnail-avatar', 100, 100, true ); $GLOBALS['content_width'] = 525; register_nav_menus( array( 'primary' => __( 'Primary Menu', 'personal-gym-trainer' ), ) ); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', fitness_insight_fonts_url() ) ); } add_action( 'after_setup_theme', 'personal_gym_trainer_setup' ); function personal_gym_trainer_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'personal-gym-trainer' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'personal-gym-trainer' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your pages and posts', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'personal-gym-trainer' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'personal-gym-trainer' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'personal-gym-trainer' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'personal-gym-trainer' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'personal-gym-trainer' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'personal_gym_trainer_widgets_init' ); function personal_gym_trainer_remove_my_action() { remove_action( 'admin_menu','fitness_insight_gettingstarted' ); remove_action( 'after_setup_theme','fitness_insight_notice' ); } add_action( 'init', 'personal_gym_trainer_remove_my_action'); function personal_gym_trainer_customize_register() { global $wp_customize; $wp_customize->remove_section( 'fitness_insight_pro' ); $wp_customize->remove_setting( '' ); $wp_customize->remove_control( '' ); } add_action( 'customize_register', 'personal_gym_trainer_customize_register', 11 ); function personal_gym_trainer_customize( $wp_customize ) { wp_enqueue_style('customizercustom_css', esc_url( get_stylesheet_directory_uri() ). '/assets/css/customizer.css'); $wp_customize->add_section('personal_gym_trainer_pro', array( 'title' => __('UPGRADE GYM TRAINER PREMIUM', 'personal-gym-trainer'), 'priority' => 1, )); $wp_customize->add_setting('personal_gym_trainer_pro', array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control(new Personal_Gym_Trainer_Pro_Control($wp_customize, 'personal_gym_trainer_pro', array( 'label' => __('GYM TRAINER PREMIUM', 'personal-gym-trainer'), 'section' => 'personal_gym_trainer_pro', 'settings' => 'personal_gym_trainer_pro', 'priority' => 1, ))); // BMI Section $wp_customize->add_section('fitness_insight_bmi_section',array( 'title' => __('BMI Settings', 'personal-gym-trainer'), ) ); $wp_customize->add_setting('personal_gym_trainer_calculator_main_heading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_main_heading',array( 'label' => esc_html__('Add Section Title','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_main_heading', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_calculator_left_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_left_title',array( 'label' => esc_html__('Add Calculator Title','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_left_title', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_calculator_left_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_left_text',array( 'label' => esc_html__('Add Calculator Text','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_left_text', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_calculator_right_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_right_title',array( 'label' => esc_html__('Add BMI Chart Title','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_right_title', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_calculator_left_heading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_left_heading',array( 'label' => esc_html__('Add Chart heading Left','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_left_heading', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_calculator_right_heading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_calculator_right_heading',array( 'label' => esc_html__('Add Chart heading Right','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_calculator_right_heading', 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_bmi_chart_count',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_bmi_chart_count',array( 'label' => esc_html__('Add No of Chart Text','personal-gym-trainer'), 'description' => esc_html__('Incarease the count and then publish the settings, then reload the page.','personal-gym-trainer'), 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_bmi_chart_count', 'type' => 'number' )); $chart_number = get_theme_mod('personal_gym_trainer_bmi_chart_count'); for($i=1; $i<=$chart_number; $i++) { $wp_customize->add_setting('personal_gym_trainer_list_left'.$i,array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_list_left'.$i,array( 'label' => esc_html__('Add Chart Left Text ','personal-gym-trainer').$i, 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_list_left'.$i, 'type' => 'text' )); $wp_customize->add_setting('personal_gym_trainer_list_right'.$i,array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('personal_gym_trainer_list_right'.$i,array( 'label' => esc_html__('Add Chart Right Text ','personal-gym-trainer').$i, 'section' => 'fitness_insight_bmi_section', 'setting' => 'personal_gym_trainer_list_right'.$i, 'type' => 'text' )); } } add_action( 'customize_register', 'personal_gym_trainer_customize' ); function personal_gym_trainer_enqueue_comments_reply() { if( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) { // Load comment-reply.js (into footer) wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); } } add_action( 'wp_enqueue_scripts', 'personal_gym_trainer_enqueue_comments_reply' ); define('PERSONAL_GYM_TRAINER_PRO_LINK',__('https://www.ovationthemes.com/wordpress/personal-gym-trainer-wordpress-theme/','personal-gym-trainer')); /* Pro control */ if (class_exists('WP_Customize_Control') && !class_exists('Personal_Gym_Trainer_Pro_Control')): class Personal_Gym_Trainer_Pro_Control extends WP_Customize_Control{ public function render_content(){?>