$word_limit) array_pop($words); return implode(' ', $words); } function ca_painting_excerpt_more( $link ) { if ( is_admin() ) { return $link; } $link = sprintf( '

%2$s

', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading "%s"', 'ca-painting' ), get_the_title( get_the_ID() ) ) ); return ' … ' . $link; } add_filter( 'excerpt_more', 'ca_painting_excerpt_more' ); function ca_painting_start_set() { load_theme_textdomain( 'ca-painting', get_template_directory() . '/languages' ); add_theme_support( 'title-tag' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'woocommerce' ); add_theme_support( 'custom-header' ); add_theme_support( 'custom-logo', array( 'height' => 240, 'width' => 240, 'flex-height' => true, ) ); add_image_size('ca-painting-homepage-thumb',240,145,true); register_nav_menus( array( 'primary' => __( 'Primary Menu', 'ca-painting' ) ) ); add_theme_support( 'custom-background', array( 'default-color' => 'f1f1f1' ) ); add_editor_style( array( 'assets/css/editor-style.css') ); } endif; add_action( 'after_setup_theme', 'ca_painting_start_set' ); function ca_painting_add_scripts_to_theme() { wp_enqueue_style( 'ca-painting-font-theme', ca_painting_font_url(), array() ); wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/assets/css/fontawesome-all.min.css' ); wp_enqueue_style( 'bootstrap-style-theme', get_template_directory_uri().'/assets/css/boot/bootstrap.min.css' ); wp_enqueue_style( 'ca-painting-basic-style', get_stylesheet_uri() ); wp_style_add_data( 'ca-painting-style', 'rtl', 'replace' ); wp_enqueue_style( 'animation-wow', get_template_directory_uri().'/assets/css/animation/animation.css' ); wp_enqueue_style( 'effect', get_template_directory_uri().'/assets/css/other/effect.css' ); wp_enqueue_style( 'owl-carousel-style', get_template_directory_uri().'/assets/css/other/owl.carousel.css' ); wp_enqueue_script( 'tether', get_template_directory_uri() . '/assets/js/other/tether.js', array('jquery'), '',true); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/boot/bootstrap.min.js',array('jquery'),'',true); wp_enqueue_script( 'superfsh', get_template_directory_uri() . '/assets/js/menu/jquery.superfish.js',array('jquery'),'',true); wp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/assets/js/loop/owl.carousel.js',array('jquery'),'',true); wp_enqueue_script( 'smooth-scroll', get_template_directory_uri() . '/assets/js/loop/SmoothScroll.js',array('jquery'),'',true); wp_enqueue_script( 'ca-painting-customscripts', get_template_directory_uri() . '/assets/js/main/mainjsfile.js', array('jquery'),'', true ); wp_enqueue_style('ca-painting-ie', get_template_directory_uri().'/assets/css/ie.css', array('ca-painting-basic-style')); wp_style_add_data( 'ca-painting-ie', 'conditional', 'IE' ); } add_action( 'wp_enqueue_scripts', 'ca_painting_add_scripts_to_theme' ); define('SITE_URL','https://chitrarchana.com/'); function ca_painting_credit_link() { echo esc_html_e('Credit @ ','ca-painting'). " CA Themes"; } function ca_painting_sanitize_choices( $input, $setting ) { global $wp_customize; $control = $wp_customize->get_control( $setting->id ); if ( array_key_exists( $input, $control->choices ) ) { return $input; } else { return $setting->default; } } function ca_painting_the_breadcrumb() { if (!is_home()) { echo ''; bloginfo('name'); echo " "; if (is_category() || is_single()) { the_category(', '); if (is_single()) { echo " "; the_title(); echo " "; } } elseif (is_page()) { the_title(); } } } function ca_painting_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'ca-painting' ), 'description' => __( 'Appears on blog page sidebar', 'ca-painting' ), 'id' => 'sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'ca_painting_widgets_init' ); // Enqueue comment-reply add_action('wp_enqueue_scripts', 'ca_painting_public_scripts'); function ca_painting_public_scripts() { if (!is_admin()) { if (is_singular() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } } //social widget file require get_parent_theme_file_path( '/inc/widget/wed/social-widget.php' ); //Contact Widget file require get_parent_theme_file_path( '/inc/widget/wed/contact-widget.php' ); // Recent post widget with thumbnails Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts { function widget($args, $instance) { if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = $this->id; } $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts', 'ca-painting' ); /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; if ( ! $number ) $number = 5; $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; /** * Filter the arguments for the Recent Posts widget. * * @since 3.4.0 * * @see WP_Query::get_posts() * * @param array $args An array of arguments used to retrieve the recent posts. */ $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); if ($r->have_posts()) : ?>
    have_posts() ) : $r->the_post(); ?>
urlencode(implode('|',$font_family)), ); $font_url = add_query_arg($query_args,'//fonts.googleapis.com/css'); return $font_url; }