'; print_r($data); echo ''; } } if(!function_exists('ap_has_term')){ function ap_has_term($taxonomy){ $response = false; switch($taxonomy){ case 'category': $response = is_category(); break; case 'post_tag': $response = is_tag(); break; default: $response = has_term('', $taxonomy); break; } return $response; } } if(!function_exists('ap_ready')){ function ap_ready($taxonomy){ $allowed_taxes = get_option('ap_tax'); $ap_go = FALSE; if(!empty($allowed_taxes) && $allowed_taxes[0]!=''){ foreach($allowed_taxes as $taxonomy_allowed){ $ap_go = ap_has_term($taxonomy_allowed); if($ap_go) break; } }else{ $ap_go = TRUE; } if($ap_go){ echo ''; } } } if(!function_exists('ap_start')){ function ap_start(){ update_option( 'ap_case', 'U'); update_option( 'ap_layout', 'H'); update_option( 'ap_dom', '#content' ); } } if(!function_exists('ap_end')){ function ap_end(){ delete_option( 'ap_case'); delete_option( 'ap_layout'); delete_option( 'ap_dom'); } } if(!function_exists('ap_pagination')){ function ap_pagination(){ global $wpdb; if(!is_admin() && is_main_query())// && $wpdb->num_rows>0){ if(!function_exists('ap_where')){ function ap_where($where){ global $wpdb; $where .= ' AND '.$wpdb->prefix.'posts.post_title LIKE "'.mysql_real_escape_string($_GET['ap']).'%"'; return $where; } } add_filter( 'posts_where' , 'ap_where' ); if(!function_exists('render_alphabets')){ function render_alphabets(){ $default_place = get_option('ap_dom')==''?'#content':get_option('ap_dom'); $alphabets = ap_alphabets(); $alphabets_bar = '