'primary', 'container' => false, 'menu_class' => 'menu', 'menu_id' => 'menu', 'fallback_cb' => 'glowline_wp_page_menu')); } function glowline_wp_page_menu() { echo ''; } // full thumb get post content function glowline_full_post_image(){ $img_source = ''; global $post; $output = preg_match_all('//i', $post->post_content, $matches); if (isset($matches [1] [0])) { $img_source = $matches [1] [0]; } if($img_source!=''){ $permalink = esc_url(get_permalink($post->ID)); print "Post Image"; } } /** * Display navigation to next/previous post when applicable. * * @since ThemeHunk 1.0 */ if ( ! function_exists( 'glowline_post_nav' ) ) : function glowline_post_nav() { // Don't print empty markup if there's nowhere to navigate. ?> wp_get_post_categories($post->ID), 'post__not_in' => array($post->ID), 'post_status' => array('publish'), 'meta_key' => '_thumbnail_id', 'posts_per_page' => 3, ); $my_query = new WP_Query($args); if ($my_query->have_posts()) { while ($my_query->have_posts()) : $my_query->the_post(); ?> ]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ){ return false; } return esc_url_raw( $matches[1] ); } /*hexa to rgba convert*/ function glowline_hex2rgba($color, $opacity = false) { $default = 'rgb(0,0,0)'; //Return default if no color provided if(empty($color)){ return $default; } //Sanitize $color if "#" is provided if ($color[0] == '#' ) { $color = substr( $color, 1 ); } //Check if color has 6 or 3 characters and get values if (strlen($color) == 6) { $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ); } elseif ( strlen( $color ) == 3 ) { $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); } else { return $default; } //Convert hexadec to rgb $rgb = array_map('hexdec', $hex); //Check if opacity is set(rgba or rgb) if($opacity){ if(abs($opacity) > 1){ $opacity = 1.0; } $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; } else { $output = 'rgb('.implode(",",$rgb).')'; } //Return rgb(a) color string return $output; } //pagination function glowline_pagination() { the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => __( '«', 'glowline' ), 'next_text' => __( '»', 'glowline' ), ) ); } /*Number of comment*/ function glowline_comment_number(){ ?>