cat_ID )).'">'.esc_html($temp[$i]->cat_name).''; if($i!=$num-1&&$i+1<$count) $cat_string.='/'; } echo $cat_string; } function konkurrent_tag_list($num){ $temp=get_the_tags(); $count=count($temp); $cat_string = ''; for($i=0;$i<$num&&$i<$count;$i++){ $cat_string.=''.esc_html($temp[$i]->name).''; if($i!=$num-1&&$i+1<$count) $cat_string.='/'; } echo $cat_string; } function konkurrent_sanitize_select( $input, $setting ) { // Ensure input is a slug. $input = sanitize_key( $input ); // Get list of choices from the control associated with the setting. $choices = $setting->manager->get_control( $setting->id )->choices; // If the input is a valid key, return it; otherwise, return the default. return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } function konkurrent_sanitize_powered_by( $input ) { return wp_kses( $input, array( 'a' => array( 'href' => array(), 'title' => array() ), 'br' => array(), 'em' => array(), 'strong' => array(), ) ); } function konkurrent_content($post_id) { if(has_excerpt($post_id)) { $content = get_the_excerpt($post_id); } else { $content_post = get_post($post_id); $content = $content_post->post_content; $content = substr($content, 0, 200); $content = apply_filters('the_content', $content); } return $content; }