• id="li-comment-">
    comment_approved == '0') : ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>
    max_num_pages; if ( $pages >= 2 ): $big = 999999999; $paginate = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'end_size' => 13, 'type' => 'array' )); echo '
    '; endif; } //header add mobile_nav function acool_add_mobile_navigation(){ printf( '
    %1$s
    ', esc_html__( 'Select Page', 'acool' ) ); } add_action( 'ct_header_top', 'acool_add_mobile_navigation' ); /** * Convert Hex Code to RGB #FFFFFF -> 255 255 255 * @param string $hex Color Hex Code * @return array RGB values */ function acool_hex2rgb( $hex ) { if ( strpos( $hex,'rgb' ) !== FALSE ) { $rgb_part = strstr( $hex, '(' ); $rgb_part = trim($rgb_part, '(' ); $rgb_part = rtrim($rgb_part, ')' ); $rgb_part = explode( ',', $rgb_part ); $rgb = array($rgb_part[0], $rgb_part[1], $rgb_part[2], $rgb_part[3]); } elseif( $hex == 'transparent' ) { $rgb = array( '255', '255', '255', '0' ); } else { $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 = array( $r, $g, $b ); } return $rgb; // returns an array with the rgb values } /* this function gets thumbnail from Post Thumbnail or Custom field or First post image */ if ( ! function_exists( 'acool_get_thumbnail' ) ) { function acool_get_thumbnail($post_id) { //if ( $post == '' ) global $post; if(has_post_thumbnail()) { $ct_post_thumbnail_fullpath=wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), "Full"); $thumb_array['fullpath'] = esc_url($ct_post_thumbnail_fullpath[0]); }else{ $post_content = get_post($post_id)->post_content; $thumb_array['fullpath'] = acool_catch_that_image($post_content); } if($post = 'front-page' && $thumb_array['fullpath']=="" ) { $thumb_array['fullpath'] = esc_url(get_template_directory_uri()."/images/default-thumbnail.jpg"); } return $thumb_array; } } function acool_catch_that_image($post_content) { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('//i', $post_content, $matches); if($output!='') $first_img = $matches[1][0]; return $first_img; } function acool_get_title($str,$limit) { if(strlen($str) > $limit) { $str = substr($str, 0, $limit); } echo $str; } //post_meta function acool_show_post_meta() { ?>