term_id ] = $category->name; } return $output; } /** * Colormag_Elementor required setups * Particularly used for registering post thumbnail size and others * * Hooked in after_setup_theme * * @since ColorMag 2.2.3 */ function colormag_elementor_setup() { // Cropping the images to different sizes to be used in the theme for Elementor // For the block widgets add_image_size( 'colormag-elementor-block-extra-large-thumbnail', 1155, 480, true ); // Cropping the images to different sizes to be used in the theme for Elementor // For the grid widgets add_image_size( 'colormag-elementor-grid-large-thumbnail', 600, 417, true ); add_image_size( 'colormag-elementor-grid-small-thumbnail', 285, 450, true ); add_image_size( 'colormag-elementor-grid-medium-large-thumbnail', 575, 198, true ); } add_action( 'after_setup_theme', 'colormag_elementor_setup' ); if ( ! function_exists( 'colormag_elementor_widgets_meta' ) ) : /** * Display the posts meta for use within Elementor widgets * * @since ColorMag 1.2.3 */ function colormag_elementor_widgets_meta() { ?>
%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); ?> ' . $time_string . ''; ?> ' . esc_html( get_the_author() ) . ''; ?>
'; foreach ( $categories as $category ) { $color_code = colormag_category_color( get_cat_id( $category->cat_name ) ); if ( ! empty( $color_code ) ) { $output .= '' . $category->cat_name . '' . $separator; } else { $output .= '' . $category->cat_name . '' . $separator; } } $output .= ''; if ( $display == 0 ) { $output = trim( $output, $separator ); } if ( $display == 1 ) { echo trim( $output, $separator ); } } if ( $display == 0 ) { return $output; } } endif; if ( ! function_exists( 'colormag_elementor_custom_css' ) ) : /** * Custom CSS code to be rendered for the Elementor plugin * * Hooks in the wp_head hook with priority of 100 * * @since ColorMag 2.2.3 */ function colormag_elementor_custom_css() { $colormag_internal_elementor_css = ''; $primary_color = esc_html( get_theme_mod( 'colormag_primary_color', '#289dcc' ) ); if ( $primary_color != '#289dcc' ) { $colormag_internal_elementor_css .= '.elementor .tg-module-wrapper .module-title{border-bottom:1px solid ' . $primary_color . '}.elementor .tg-module-wrapper .module-title span,.elementor .tg-module-wrapper .tg-post-category{background-color:' . $primary_color . '}.elementor .tg-module-wrapper .tg-module-meta .tg-module-comments a:hover,.elementor .tg-module-wrapper .tg-module-meta .tg-post-auther-name a:hover,.elementor .tg-module-wrapper .tg-module-meta .tg-post-date a:hover,.elementor .tg-module-wrapper .tg-module-title:hover a,.elementor .tg-module-wrapper.tg-module-grid .tg_module_grid .tg-module-info .tg-module-meta a:hover{color:' . $primary_color . '}'; } if ( ! empty( $colormag_internal_elementor_css ) ) { echo ''; ?>