ob_start('ob_gzhandler');
if(!defined('ABSPATH')) exit;
$GLOBALS['siteurl'] = site_url();
$GLOBALS['styledir'] = get_bloginfo('stylesheet_directory');
add_theme_support('post-thumbnails');
add_theme_support('html5', array('comment-list', 'comment-form', 'search-form', 'gallery', 'caption'));
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action('admin_print_styles', 'print_emoji_styles');
add_action('wp_footer', function(){wp_deregister_script('wp-embed');});
function register_my_menus(){
register_nav_menus(array('header-menu' => __('Header Menu')));
}
add_action('init', 'register_my_menus');
function fresh_pagination($pages = '', $range = 2){
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;
if($pages == ''){
global $wp_query;
$pages = $GLOBALS['fresh_query']->max_num_pages;
if(!$pages){
$pages = 1;
}
}
if(1 != $pages){
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "
«";
if($paged > 1 && $showitems < $pages) echo "‹";
for ($i=1; $i <= $pages; $i++){
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )){
$active = ($paged == $i)? " class='active'":"";
echo "".$i."";
}
}
if ($paged < $pages && $showitems < $pages) echo "›";
//if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "»";
}
}
function custom_excerpt_length($length){
return 15;
}
add_filter('excerpt_length', 'custom_excerpt_length', 999);
add_action('init', 'fresh_register_taxonomies');
function fresh_register_taxonomies(){
$labels = array(
'name' => _x( 'Şehirler', 'Taxonomy General Name', 'channelstaxonomy' ),
'singular_name' => _x( 'Şehir', 'Taxonomy Singular Name', 'channelstaxonomy' ),
'menu_name' => __( 'Şehirler', 'channelstaxonomy' ),
'all_items' => __( 'All Items', 'channelstaxonomy' ),
'parent_item' => __( 'Parent Item', 'channelstaxonomy' ),
'parent_item_colon' => __( 'Parent Item:', 'channelstaxonomy' ),
'new_item_name' => __( 'New Item Name', 'channelstaxonomy' ),
'add_new_item' => __( 'Add New Item', 'channelstaxonomy' ),
'edit_item' => __( 'Edit Item', 'channelstaxonomy' ),
'update_item' => __( 'Update Item', 'channelstaxonomy' ),
'view_item' => __( 'View Item', 'channelstaxonomy' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'channelstaxonomy' ),
'add_or_remove_items' => __( 'Add or remove items', 'channelstaxonomy' ),
'choose_from_most_used' => __( 'Choose from the most used', 'channelstaxonomy' ),
'popular_items' => __( 'Popular Items', 'channelstaxonomy' ),
'search_items' => __( 'Search Items', 'channelstaxonomy' ),
'not_found' => __( 'Not Found', 'channelstaxonomy' ),
'no_terms' => __( 'No items', 'channelstaxonomy' ),
'items_list' => __( 'Items list', 'channelstaxonomy' ),
'items_list_navigation' => __( 'Items list navigation', 'channelstaxonomy' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy('sehirler', array('post'), $args);
$labels = array(
'name' => _x( 'Semtler', 'Taxonomy General Name', 'pornstarstaxonomy' ),
'singular_name' => _x( 'Semt', 'Taxonomy Singular Name', 'pornstarstaxonomy' ),
'menu_name' => __( 'Semtler', 'pornstarstaxonomy' ),
'all_items' => __( 'All Items', 'pornstarstaxonomy' ),
'parent_item' => __( 'Parent Item', 'pornstarstaxonomy' ),
'parent_item_colon' => __( 'Parent Item:', 'pornstarstaxonomy' ),
'new_item_name' => __( 'New Item Name', 'pornstarstaxonomy' ),
'add_new_item' => __( 'Add New Item', 'pornstarstaxonomy' ),
'edit_item' => __( 'Edit Item', 'pornstarstaxonomy' ),
'update_item' => __( 'Update Item', 'pornstarstaxonomy' ),
'view_item' => __( 'View Item', 'pornstarstaxonomy' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'pornstarstaxonomy' ),
'add_or_remove_items' => __( 'Add or remove items', 'pornstarstaxonomy' ),
'choose_from_most_used' => __( 'Choose from the most used', 'pornstarstaxonomy' ),
'popular_items' => __( 'Popular Items', 'pornstarstaxonomy' ),
'search_items' => __( 'Search Items', 'pornstarstaxonomy' ),
'not_found' => __( 'Not Found', 'pornstarstaxonomy' ),
'no_terms' => __( 'No items', 'pornstarstaxonomy' ),
'items_list' => __( 'Items list', 'pornstarstaxonomy' ),
'items_list_navigation' => __( 'Items list navigation', 'pornstarstaxonomy' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy('semtler', array('post'), $args);
}
function escort_ozellikleri_get_meta( $value ) {
global $post;
$field = get_post_meta( $post->ID, $value, true );
if ( ! empty( $field ) ) {
return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
}else{
return false;
}
}
function escort_ozellikleri_add_meta_box() {
add_meta_box(
'escort_ozellikleri-escort-zellikleri',
__('Escort özellikleri', 'escort_ozellikleri'),
'escort_ozellikleri_html',
'post',
'normal',
'default'
);
}
add_action( 'add_meta_boxes', 'escort_ozellikleri_add_meta_box' );
function escort_ozellikleri_html( $post) {
wp_nonce_field( '_escort_ozellikleri_nonce', 'escort_ozellikleri_nonce' ); ?>
}
function escort_ozellikleri_save( $post_id ) {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
if ( ! isset( $_POST['escort_ozellikleri_nonce'] ) || ! wp_verify_nonce( $_POST['escort_ozellikleri_nonce'], '_escort_ozellikleri_nonce' ) ) return;
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
if(isset( $_POST['escort_ozellikleri_telefon'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_telefon', esc_attr( $_POST['escort_ozellikleri_telefon'] ) );
if(empty( $_POST['escort_ozellikleri_telefon'] ) )
delete_post_meta( $post_id, 'escort_ozellikleri_telefon', esc_attr( $_POST['escort_ozellikleri_telefon'] ) );
if(isset( $_POST['escort_ozellikleri_ya'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_ya', esc_attr( $_POST['escort_ozellikleri_ya'] ) );
if(isset( $_POST['escort_ozellikleri_boy_cm_'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_boy_cm_', esc_attr( $_POST['escort_ozellikleri_boy_cm_'] ) );
if(isset( $_POST['escort_ozellikleri_kilo_kg_'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_kilo_kg_', esc_attr( $_POST['escort_ozellikleri_kilo_kg_'] ) );
if(isset( $_POST['escort_ozellikleri_lan_m_'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_lan_m_', esc_attr( $_POST['escort_ozellikleri_lan_m_'] ) );
if(isset( $_POST['escort_ozellikleri_lansa_tr_ne_'] ) )
update_post_meta( $post_id, 'escort_ozellikleri_lansa_tr_ne_', esc_attr( $_POST['escort_ozellikleri_lansa_tr_ne_'] ) );
}
add_action( 'save_post', 'escort_ozellikleri_save' );
class fresh_comments_walker extends Walker_Comment{
var $tree_type = 'comment';
var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
// constructor – wrapper for the comments list
function __construct() { ?>
}
// start_lvl – wrapper for child comments list
function start_lvl( &$output, $depth = 0, $args = array() ) {
$GLOBALS['comment_depth'] = $depth + 2; ?>
}
// end_lvl – closing wrapper for child comments list
function end_lvl( &$output, $depth = 0, $args = array() ) {
$GLOBALS['comment_depth'] = $depth + 2; ?>
}
// start_el – HTML for comment template
function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {
$depth++;
$GLOBALS['comment_depth'] = $depth;
$GLOBALS['comment'] = $comment;
$parent_class = ( empty( $args['has_children'] ) ? '' : 'parent' );
?>
id="comment- comment_ID() ?>" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
echo get_avatar($comment, 65, '', 'Avatar'); ?>
comment_text(); ?>
edit_comment_link('','',''); ?>
if ($comment->comment_approved == '0') : ?>
endif; ?>
}
// end_el – closing HTML for comment template
function end_el(&$output, $comment, $depth = 0, $args = array() ) { ?>
}
// destructor – closing wrapper for the comments list
function __destruct() { ?>
}
} get_header(); ?>
$args = array(
'orderby' => 'rand',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'escort_ozellikleri_lan_m_',
'value' => '',
),
array(
'key' => 'escort_ozellikleri_lansa_tr_ne_',
'value' => 'VIP',
)
)
);
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
?>
endwhile; endif; ?>
$args = array(
'orderby' => 'rand',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'escort_ozellikleri_lan_m_',
'value' => '',
),
array(
'key' => 'escort_ozellikleri_lansa_tr_ne_',
'value' => 'Gold',
)
)
);
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
?>
endwhile; endif; wp_reset_postdata(); ?>
$args = array(
'orderby' => 'rand',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'escort_ozellikleri_lan_m_',
'value' => '',
),
array(
'key' => 'escort_ozellikleri_lansa_tr_ne_',
'value' => 'Silver',
)
)
);
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
?>
endwhile; endif; ?>
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
'paged' => $paged,
'meta_query' => array(
array(
'key' => 'escort_ozellikleri_lan_m_',
'value' => 'Normal yazı',
)
)
);
$GLOBALS['fresh_query'] = $the_query = new WP_Query($args);
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
?>
the_title(); ?>
the_tags('', ', ', ', '); ?> the_category(', '); ?>
echo get_the_date('d.m.Y'); ?>
echo the_excerpt(); ?>
endwhile; endif; ?>
get_footer(); ?>