';
}
function ba_get_svg_clock_icon() {
return '';
}
function ba_get_img_masking_shapes( $shape ) {
$masking_shapes = array(
'none' => '',
'shape_1' => '',
'shape_2' => '',
'shape_3' => '',
);
return $masking_shapes[ $shape ];
}
function brainaddons_login_page() {
$options = get_option( 'brainaddons_settings', array() );
$page = array_key_exists( 'login_page', $options ) ? get_post( $options['login_page'] ) : false;
return $page;
}
function ba_get_post_types() {
$post_types = get_post_types(
array(
'public' => true,
),
'objects'
);
$options = array();
foreach ( $post_types as $post_type ) {
$options[ $post_type->name ] = $post_type->label;
}
// Deprecated 'Media' post type.
$key = array_search( 'Media', $options, true );
if ( 'attachment' === $key ) {
unset( $options[ $key ] );
}
return apply_filters( 'uael_loop_post_types', $options );
}
function ba_get_taxonomies() {
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'objects' );
$options = array( '' => '' );
foreach ( $taxonomies as $taxonomy ) {
$options[ $taxonomy->name ] = $taxonomy->label;
}
return $options;
}
function ba_get_date_link( $post_id = null ) {
if ( empty( $post_id ) ) {
$post_id = get_the_ID();
}
$year = get_the_date( 'Y', $post_id );
$month = get_the_time( 'm', $post_id );
$day = get_the_time( 'd', $post_id );
$url = get_day_link( $year, $month, $day );
return $url;
}
function ba_get_excerpt( $post_id = null, $length = 35 ) {
return wpautop( strip_shortcodes( truncate_post( $length, false, '', true ) ) );
}
function ba_prev_arrow_icon(){
return '';
}
function ba_next_arrow_icon(){
return '';
}
function ba_related_posts_args( $post_id ) {
$categories = get_the_terms( $post_id, 'category' );
if ( empty( $categories ) || is_wp_error( $categories ) ) {
$categories = array();
}
$category_list = wp_list_pluck( $categories, 'term_id' );
$related_args = array(
'post_type' => 'post',
'posts_per_page' => 6,
'no_found_rows' => true,
'post_status' => 'publish',
'post__not_in' => array( $post_id ),
'orderby' => 'rand',
'category__in' => $category_list,
);
return $related_args;
}