esc_html__( 'Sidebar', 'best-classifieds' ), 'id' => 'sidebar-1', 'romana_description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'best-classifieds' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 1', 'best-classifieds' ), 'id' => 'footer-1', 'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'best-classifieds' ), 'before_widget' => '', 'before_title' => '', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 2', 'best-classifieds' ), 'id' => 'footer-2', 'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'best-classifieds' ), 'before_widget' => '', 'before_title' => '', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 3', 'best-classifieds' ), 'id' => 'footer-3', 'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'best-classifieds' ), 'before_widget' => '', 'before_title' => '', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 4', 'best-classifieds' ), 'id' => 'footer-4', 'romana_description' => esc_html__( 'Add widgets here to appear in your footer.', 'best-classifieds' ), 'before_widget' => '', 'before_title' => '', ) ); } add_action( 'widgets_init', 'best_classifieds_widgets_init' ); // Menu default function best_classifieds_default_menu() { $html = ''; echo $html; } /** * Add a pingback url auto-discovery header for singularly identifiable articles. */ function best_classifieds_pingback_header() { if ( is_singular() && pings_open() ) { printf( '' . "\n", esc_url(get_bloginfo( 'pingback_url' )) ); } } add_action( 'wp_head', 'best_classifieds_pingback_header' ); function best_classifieds_excerpt_length( $length ) { if ( is_admin() ) { return $length; } if(is_front_page()){ return 40; } return get_theme_mod('blog_post_content_limit',30); } add_filter( 'excerpt_length', 'best_classifieds_excerpt_length', 999 ); /** * Replaces "[...]" (appended to automatically generated excerpts) with ... and * a 'Continue reading' link. */ function best_classifieds_excerpt_more( $link ) { if ( is_admin() ) { return $link; } return $link; } add_filter( 'excerpt_more', 'best_classifieds_excerpt_more' ); /** * Set up post entry meta. * Meta information for current post: categories, tags, permalink, author, and date. * */ function best_classifieds_entry_meta() { $best_classifieds_year = get_the_time( 'Y'); $best_classifieds_month = get_the_time( 'm'); $best_classifieds_day = get_the_time( 'd'); $best_classifieds_category_list = get_the_category_list() ? '
  • '.get_the_category_list(', ').'
  • ' : ''; $best_classifieds_tag_list = get_the_tag_list() ? '
  • '.get_the_tag_list('',', ').'
  • ' : ''; $best_classifieds_date = sprintf( '
  • ', esc_url( get_day_link( $best_classifieds_year, $best_classifieds_month, $best_classifieds_day)), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date('d M, Y') ) ); $best_classifieds_author = sprintf( '
  • %3$s
  • ', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), /* translators: 1: author name */ esc_attr( sprintf( __( 'View all posts by %s', 'best-classifieds' ), get_the_author() ) ), get_the_author() ); if(comments_open()) { if(get_comments_number()>=1) $best_classifieds_comments = '
  • '.get_comments_number().'
  • '; else $best_classifieds_comments = ''; } else { $best_classifieds_comments = ''; } if(is_front_page()) { printf(' %1$s %2$s', $best_classifieds_author, $best_classifieds_comments ); } elseif(is_singular()){ printf('%1$s %3$s %4$s %5$s', $best_classifieds_category_list, $best_classifieds_date, $best_classifieds_author, $best_classifieds_comments, $best_classifieds_tag_list ); }else{ printf('%1$s %2$s', $best_classifieds_author, $best_classifieds_comments ); } } add_action('tgmpa_register', 'best_classifieds_required_plugins'); function best_classifieds_required_plugins() { if (class_exists('TGM_Plugin_Activation')) { $plugins = array( array( 'name' => esc_html__('Page Builder by SiteOrigin', 'best-classifieds'), 'slug' => 'siteorigin-panels', 'required' => false, ), array( 'name' => esc_html__('SiteOrigin Widgets Bundle', 'best-classifieds'), 'slug' => 'so-widgets-bundle', 'required' => false, ), array( 'name' => esc_html__('Contact Form 7', 'best-classifieds'), 'slug' => 'contact-form-7', 'required' => false, ), ); $config = array( 'default_path' => '', 'menu' => 'best-classifieds-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', 'strings' => array( 'page_title' => esc_html__('Install Recommended Plugins', 'best-classifieds'), 'menu_title' => esc_html__('Install Plugins', 'best-classifieds'), 'nag_type' => 'updated' ) ); tgmpa($plugins, $config); } } // Theme customizer Font Icon - admin css,js function best_classifieds_customize_scripts() { wp_enqueue_style( 'font-awesome', get_template_directory_uri() .'/assets/css/font-awesome.css'); wp_enqueue_style( 'best-classifieds-admin-style',get_template_directory_uri().'/assets/css/admin.css', array(),'', '' ); wp_enqueue_script( 'best-classifieds-admin-js', get_template_directory_uri().'/assets/js/admin.js', array( 'jquery' ), '', true ); } add_action( 'customize_controls_enqueue_scripts', 'best_classifieds_customize_scripts' );