'. $tag->name . ' ('. $tag->count .')' . "\n" ; } return $string; } // Page slug body class function body_slug_core( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . '-' . $post->post_name; } return $classes; } add_filter( 'body_class', 'body_slug_core' ); function my_theme_add_editor_styles() { add_editor_style( 'css/editor-style.css' ); } add_action( 'after_setup_theme', 'my_theme_add_editor_styles' ); function sayfalama($pages = '', $range = 3) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "
"; echo "".$paged."/".$pages.""; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "First"; 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 )) { echo ($paged == $i)? "".$i."":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "»"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last"; echo "
\n"; } } /** v1.4 start */ /** * Adds Foo_Widget widget. */ class Foo_Widget extends WP_Widget { /** * Register widget with WordPress. */ function __construct() { parent::__construct( 'foo_widget', // Base ID esc_html__( 'Widget Title', 'perblog' ), // Name array( 'description' => esc_html__( 'A Foo Widget' ,'perblog' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; } echo esc_html__( 'Hello, World!', 'perblog' ); echo $args['after_widget']; } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'New title', 'perblog' ); ?>

_x( 'Post Types', 'Post Type General Name', 'perblog' ), 'singular_name' => _x( 'Post Type', 'Post Type Singular Name', 'perblog' ), 'menu_name' => __( 'Post Types', 'perblog' ), 'name_admin_bar' => __( 'Post Type', 'perblog' ), 'archives' => __( 'Item Archives', 'perblog' ), 'attributes' => __( 'Item Attributes', 'perblog' ), 'parent_item_colon' => __( 'Parent Item:', 'perblog' ), 'all_items' => __( 'All Items', 'perblog' ), 'add_new_item' => __( 'Add New Item', 'perblog' ), 'add_new' => __( 'Add New', 'perblog' ), 'new_item' => __( 'New Item', 'perblog' ), 'edit_item' => __( 'Edit Item', 'perblog' ), 'update_item' => __( 'Update Item', 'perblog' ), 'view_item' => __( 'View Item', 'perblog' ), 'view_items' => __( 'View Items', 'perblog' ), 'search_items' => __( 'Search Item', 'perblog' ), 'not_found' => __( 'Not found', 'perblog' ), 'not_found_in_trash' => __( 'Not found in Trash', 'perblog' ), 'featured_image' => __( 'Featured Image', 'perblog' ), 'set_featured_image' => __( 'Set featured image', 'perblog' ), 'remove_featured_image' => __( 'Remove featured image', 'perblog' ), 'use_featured_image' => __( 'Use as featured image', 'perblog' ), 'insert_into_item' => __( 'Insert into item', 'perblog' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'perblog' ), 'items_list' => __( 'Items list', 'perblog' ), 'items_list_navigation' => __( 'Items list navigation', 'perblog' ), 'filter_items_list' => __( 'Filter items list', 'perblog' ), ); $args = array( 'label' => __( 'Post Type', 'perblog' ), 'description' => __( 'Post Type Description', 'perblog' ), 'labels' => $labels, 'supports' => false, 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'post_type', $args ); } add_action( 'init', 'custom_post_type', 0 ); load_theme_textdomain('tmarketo',$lang_dir ); ?> /"; preg_match_all($pattern,$content,$match); if(empty($match[0][0])){ echo ""; } else { echo $match[0][0]; } } add_theme_support( 'title-tag' ); add_theme_support( 'automatic-feed-links' ); $aahan_custom_header_args = array( 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $aahan_custom_header_args ); // Set content width value based on the theme's design if ( ! isset( $content_width ) ) $content_width = 976; // Register Theme Features function custom_theme_features() { // Add theme support for Automatic Feed Links add_theme_support( 'automatic-feed-links' ); // Add theme support for Post Formats add_theme_support( 'post-formats', array( 'status', 'quote', 'gallery', 'image', 'video', 'audio', 'link' ) ); // Add theme support for Featured Images add_theme_support( 'post-thumbnails' ); // Add theme support for Custom Background $background_args = array( 'default-color' => '#fff', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-background', $background_args ); // Add theme support for custom CSS in the TinyMCE visual editor add_editor_style( 'editor-style.css' ); // Add theme support for Translation load_theme_textdomain( 'perblog', get_template_directory() . '/language' ); } add_action( 'after_setup_theme', 'custom_theme_features' ); ?>