10, 'post_type' => 'post', 'cat' => get_theme_mod( 'editorialmag_breaking_news_team_id', 1 ) ) ); $options = get_theme_mod( 'editorialmag_breaking_news_section','enable' ); if(!empty( $options ) && $options == 'enable' ){ ?>
'.esc_html__('WordPress','editorialmag').'' ); } } } add_action( 'editorialmag_copyright', 'editorialmag_footer_copyright', 5 ); /** * Color Category */ if ( !function_exists('editorialmag_colored_category') ){ function editorialmag_colored_category() { global $post; $categories = get_the_category(); $separator = ' '; $output = ''; if($categories) { $output .= '
'; foreach($categories as $category) { $color_code = editorialmag_category_color( get_cat_id( $category->cat_name ) ); if (!empty($color_code)) { $output .= ''.esc_attr( $category->cat_name ).''.$separator; } else { $output .= ''.$category->cat_name.''.$separator; } } $output .='
'; echo trim( $output, $separator ); } } } if ( ! function_exists( 'editorialmag_category_color' ) ){ function editorialmag_category_color( $wp_category_id ) { $args = array( 'orderby' => 'id', 'hide_empty' => 0 ); $category = get_categories( $args ); foreach ( $category as $category_list ) { $color = get_theme_mod( 'editorialmag_category_color_'.$wp_category_id ); return $color; } } } /** * Customizer Custom Control Class Layout */ if(class_exists( 'WP_Customize_control')) { /** * Page Layout Control */ class Editorialmag_Image_Radio_Control extends WP_Customize_Control { public $type = 'radioimage'; public function render_content() { $name = '_customize-radio-' . $this->id; ?> label ); ?>
choices as $value => $label ) : ?>
label ); ?> description){ ?> description); ?> cats = get_categories($options); parent::__construct( $manager, $id, $args ); } public function render_content(){ if(!empty($this->cats)){ ?> description){ ?> description); ?> pro_text; $json['pro_url'] = esc_url( $this->pro_url ); return $json; } /** * 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 }} <# } #>

  • array( 'value' => 'leftsidebar', 'label' => esc_html__( 'Left Sidebar', 'editorialmag' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/left-sidebar.png', ), 'rightsidebar' => array( 'value' => 'rightsidebar', 'label' => esc_html__( 'Right (Default)', 'editorialmag' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/right-sidebar.png', ), 'nosidebar' => array( 'value' => 'nosidebar', 'label' => esc_html__( 'Full width', 'editorialmag' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ) ); /** * Function for Page layout meta box */ if ( ! function_exists( 'editorialmag_display_layout_callback' ) ) { function editorialmag_display_layout_callback(){ global $post, $editorialmag_page_layouts; wp_nonce_field( basename( __FILE__ ), 'editorialmag_settings_nonce' ); ?>
    ID, 'editorialmag_page_layouts', true ) ); ?>