false, 'post_taxonomy' => array( 'at_biz_dir' => 'at_biz_dir-category', 'product' => 'product_cat', ), ); $breadcrumb = new \Best_Listing\Theme\Lib\Breadcrumb\Breadcrumb( $args ); return $breadcrumb->trail(); } } public static function get_nav_menu_args() { $nav_menu_args = array( 'theme_location' => 'primary', 'container' => 'nav', 'fallback_cb' => false, 'container_class' => 'menu-main-menu-container', 'items_wrap' => '
', ); return $nav_menu_args; } public static function get_page_title() { if ( is_search() ) { $title = esc_html__( 'Search Results for : ', 'best-listing' ) . get_search_query(); } elseif ( is_404() ) { $title = esc_html__( 'Page not Found', 'best-listing' ); } elseif ( is_home() ) { if ( get_option( 'page_for_posts' ) ) { $title = get_the_title( get_option( 'page_for_posts' ) ); } else { $title = apply_filters( 'best_listing_blog_title', esc_html__( 'Blog', 'best-listing' ) ); } } elseif ( is_archive() ) { $title = get_the_archive_title(); } else { $title = get_the_title(); } return apply_filters( 'best_listing_page_title', $title ); } public static function get_primary_color() { $primary_color = Theme::$options['primary_color']; return apply_filters( 'best_listing_primary_color', $primary_color ); } public static function comments_callback( $comment, $args, $depth ) { self::get_template_part( 'template-parts/comments-callback', compact( 'comment', 'args', 'depth' ) ); } public static function hex2rgb( $hex ) { $hex = str_replace( '#', '', $hex ); if ( strlen( $hex ) == 3 ) { $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) ); $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) ); $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) ); } else { $r = hexdec( substr( $hex, 0, 2 ) ); $g = hexdec( substr( $hex, 2, 2 ) ); $b = hexdec( substr( $hex, 4, 2 ) ); } $rgb = "$r, $g, $b"; return $rgb; } public static function user_textfield( $label, $field, $value ) { ?>