', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'blogcast_pingback_header' ); if( ! function_exists( 'blogcast_get_multicheckbox_categories_simple_array' ) ) : /** * Return array of categories prepended with "*" key. * */ function blogcast_get_multicheckbox_categories_simple_array() { $categories_list = get_categories(['number'=>6]); $cats_array = []; foreach( $categories_list as $cat ) : $cats_array[] = array( 'value' => esc_html( $cat->term_id ), 'label' => esc_html(str_replace(array('\'', '"'), '', $cat->name)) . ' (' .absint( $cat->count ). ')' ); endforeach; return $cats_array; } endif; if( ! function_exists( 'blogcast_get_multicheckbox_posts_simple_array' ) ) : /** * Return array of posts prepended with "*" key. * */ function blogcast_get_multicheckbox_posts_simple_array() { $posts_list = get_posts(array('numberposts'=>6)); $posts_array = []; foreach( $posts_list as $postItem ) : $posts_array[] = array( 'value' => esc_html( $postItem->ID ), 'label' => esc_html(str_replace(array('\'', '"'), '', $postItem->post_title)) ); endforeach; return $posts_array; } endif; if( ! function_exists( 'blogcast_get_categories_html' ) ) : /** * Return categories in