A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Gündem - Stikked
From English, 6 Years ago, written in PHP.
Embed
  1. <?php
  2.  
  3.  
  4.  
  5. add_action( 'init', 'create_posttype' );
  6.  
  7.  
  8.  
  9. function create_posttype() {
  10.  
  11.  
  12.  
  13. register_post_type( 'haber',
  14.  
  15.  
  16.  
  17.         array(
  18.  
  19.                 'labels' => array(
  20.  
  21.                 'name' => 'Blog Yazıları',
  22.  
  23.                 'singular_name' => 'Blog',
  24.  
  25.                 'add_new' => 'Yeni Blog Yazısı Ekle',
  26.  
  27.                 'add_new_item' => 'Yeni Blog Yazısı Ekle',
  28.  
  29.                 'edit' => 'Yazıyı Düzenle',
  30.  
  31.                 'edit_item' => 'Yazıyı Düzenle',
  32.  
  33.                 'new_item' => 'Yeni Blog Yazısı Ekle',
  34.  
  35.                 'view' => 'Yazıyı Görüntüle',
  36.  
  37.                 'view_item' => 'Yazıyı Görüntüle',
  38.  
  39.                 'search_items' => 'Blog Yazılarında Ara',
  40.  
  41.                 'not_found' => 'Yazı Bulunamadı',
  42.  
  43.                 'not_found_in_trash' => 'Yazı Bulunamadı',
  44.  
  45.                 'parent' => 'Tüm Blog Yazıları'
  46.  
  47.         ),
  48.  
  49.        
  50.  
  51.         'show_ui' => true,
  52.  
  53.     'capability_type' => 'post',
  54.  
  55.         'supports' =>  
  56.  
  57.                 array( 'title', 'editor', 'comments', 'thumbnail', 'post-formats', 'author', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes', 'post-formats' ),               
  58.  
  59.         'query_var' => true,
  60.  
  61.         'menu_icon' =>'dashicons-location-alt',
  62.  
  63.         'rewrite' => true,
  64.  
  65.         'public' => true,
  66.  
  67.         'menu_position' => 5,
  68.  
  69.         'taxonomies' => array('post_tag','category'),
  70.  
  71.         'hierarchical' => true,
  72.  
  73.         'has_archive' => true,
  74.  
  75.         'can_export'  => true,
  76.  
  77.                
  78.  
  79. )              
  80.  
  81. );
  82.  
  83.        
  84.  
  85.  
  86.  
  87. register_post_type( 'kategorikliste',
  88.  
  89.  
  90.  
  91.         array(
  92.  
  93.                 'labels' => array(
  94.  
  95.                 'name' => 'Kategorik Liste',
  96.  
  97.                 'singular_name' => 'Kategorik Liste',
  98.  
  99.                 'add_new' => 'Yeni Ekle',
  100.  
  101.                 'add_new_item' => 'Yeni Ekle',
  102.  
  103.                 'edit' => 'Düzenle',
  104.  
  105.                 'edit_item' => 'Düzenle',
  106.  
  107.                 'new_item' => 'Yeni Ekle',
  108.  
  109.                 'view' => 'Görüntüle',
  110.  
  111.                 'view_item' => 'Görüntüle',
  112.  
  113.                 'search_items' => 'Ara',
  114.  
  115.                 'not_found' => 'Bulunamadı',
  116.  
  117.                 'not_found_in_trash' => 'Öğe Bulunamadı',
  118.  
  119.                 'parent' => 'Tümü'
  120.  
  121.         ),
  122.  
  123.                        
  124.  
  125.         'show_ui' => true,
  126.  
  127.     'capability_type' => 'post',
  128.  
  129.         'supports' => array( 'title', 'thumbnail'  ),
  130.  
  131.         'query_var' => true,
  132.  
  133.         'menu_icon' =>'dashicons-editor-kitchensink',
  134.  
  135.         'rewrite' => true,
  136.  
  137.         'public' => true,
  138.  
  139.         'publicly_queryable' => true,
  140.  
  141.         'exclude_from_search' => true,
  142.  
  143.         'menu_position' => 5,
  144.  
  145.         'menu_position' => 5,
  146.  
  147.         'has_archive' => false,
  148.  
  149.         'rewrite' => array('slug' => 'kategorikliste'),
  150.  
  151.         )
  152.  
  153. );
  154.  
  155.        
  156.  
  157. }
  158.  
  159.  
  160.  
  161.  
  162.  
  163. add_action( 'init', 'create_post_taxonomies', 0 );
  164.  
  165.  
  166.  
  167. add_action( 'init', 'create_post_taxonomies', 0 );
  168.  
  169.  
  170.  
  171. function create_post_taxonomies() {
  172.  
  173.  
  174.  
  175.         $labels = array(
  176.  
  177.                 'name'              => _x( 'Yola Çıkılan Şehir', 'taxonomy general name' ),
  178.  
  179.                 'singular_name'     => _x( 'Yola Çıkılan Şehir', 'taxonomy singular name' ),
  180.  
  181.                 'search_items'      => __( 'Ara' ),
  182.  
  183.                 'all_items'         => __( 'Tümüne Bak' ),
  184.  
  185.                 'parent_item'       => __( 'Yola Çıkılan Şehir' ),
  186.  
  187.                 'parent_item_colon' => __( 'Yola Çıkılan Şehir:' ),
  188.  
  189.                 'edit_item'         => __( 'Düzenle' ),
  190.  
  191.                 'update_item'       => __( 'Güncelle' ),
  192.  
  193.                 'add_new_item'      => __( 'Yeni Ekle' ),
  194.  
  195.                 'new_item_name'     => __( 'Yeni Şehir' ),
  196.  
  197.                 'menu_name'         => __( 'Yola Çıkılan Şehir' ),
  198.  
  199.         );
  200.  
  201.  
  202.  
  203.         $args = array(
  204.  
  205.                 'hierarchical'      => true,
  206.  
  207.                 'labels'            => $labels,
  208.  
  209.                 'show_ui'           => true,
  210.  
  211.                 'show_admin_column' => true,
  212.  
  213.                 'query_var'         => true,
  214.  
  215.         'has_archive' => true,
  216.  
  217.                 'rewrite'           => array( 'slug' => 'sehir' ),
  218.  
  219.         );
  220.  
  221.  
  222.  
  223.         register_taxonomy( 'sehir', array( 'post' ), $args );
  224.  
  225.        
  226.  
  227.         };
  228.  
  229.  
  230.  
  231.  
  232.  
  233. function add_custom_types_to_tax( $query ) {
  234.  
  235.        
  236.  
  237.         if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
  238.  
  239.  
  240.  
  241.                 $post_types = get_post_types();
  242.  
  243.  
  244.  
  245.                 $query->set( 'post_type', $post_types );
  246.  
  247.         return $query;
  248.  
  249.         }
  250.  
  251. }
  252.  
  253. add_filter( 'pre_get_posts', 'add_custom_types_to_tax' ); ?>