403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.141.198.147
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /home/hendraso/public_html/old/wp-content/themes/hs/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/hendraso/public_html/old/wp-content/themes/hs/functions.php
<?php

//get active theme directory name (lets you rename roots)
$theme_name = next(explode('/themes/', get_template_directory()));

// custom constant (opposite of TEMPLATEPATH)
define('_TEMPLATEURL', WP_CONTENT_URL . '/' . stristr(TEMPLATEPATH, 'themes'));

include_once('includes/roots-activation.php');	// activation
include_once('includes/roots-admin.php');		// admin additions/mods
include_once('includes/roots-options.php');		// theme options menu
include_once('includes/roots-ob.php');			// output buffer
include_once('includes/roots-cleanup.php');		// code cleanup/removal
include_once('includes/roots-htaccess.php');	// h5bp htaccess
include_once('WPAlchemy/MetaBox.php');          // wpalchemy metabox

// set the value of the main container class depending on the selected grid framework
$roots_css_framework = get_option('roots_css_framework');
if (!defined('roots_container_class')) {
	switch ($roots_css_framework) {
		case 'blueprint':
			define('roots_container_class', 'span-24');
			define('is_960gs', false);
		case '960gs_12':
			define('roots_container_class', 'container_12');
			define('is_960gs', true);
			define('is_960gs_12', true);
		case '960gs_16':
			define('roots_container_class', 'container_16');
			define('is_960gs', true);
			define('is_960gs_16', true);
		case '960gs_24':
			define('roots_container_class', 'container_24');
			define('is_960gs', true);
			define('is_960gs_24', true);
		default:
			define('roots_container_class', '');
			define('is_960gs', false);
	}
}

function get_roots_css_framework_stylesheets() {
	$css_uri = get_stylesheet_directory_uri();
	$styles = '';

	if (!is_960gs) {
		$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/blueprint/screen.css\">\n";
	} elseif (is_960gs_12 == 1 || is_960gs_16 == 1) {
		$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/960/reset.css\">\n";
		$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/text.css\">\n";
		$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/960.css\">\n";
	} elseif (is_960gs_24 == 1) {
		$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/960/reset.css\">\n";
		$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/text.css\">\n";
		$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/960_24_col.css\">\n";
	}

	if (class_exists('RGForms')) {
		$styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url(). "/gravityforms/css/forms.css\">\n";
	}

	$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/style.css\">\n";

	if (!is_960gs) {
		$styles .= "\t<!--[if lt IE 8]>i<link rel=\"stylesheet\" href=\"$css_uri/css/blueprint/ie.css\"><![endif]-->\n";
	}

  return $styles;
}
	
// set the maximum 'Large' image width to the Blueprint grid maximum width
if (!isset($content_width)) $roots_selected_css_framework === 'blueprint' ? $content_width = 950 : $content_width = 940;

// tell the TinyMCE editor to use editor-style.css
// if you have issues with getting the editor to show your changes then use the following line:
// add_editor_style('editor-style.css?' . time());
add_editor_style('editor-style.css');

// function thumbnail by wordpress
	if(function_exists('add_theme_support')) { // Added in 2.9
		add_theme_support('post-thumbnails');
		set_post_thumbnail_size(155, 103); // Normal post thumbnails
        add_image_size('lawyers-thumb', 136, 263, false); // lawyers thumbnail
    }

// http://codex.wordpress.org/Post_Formats
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));

add_theme_support('menus');
register_nav_menus(
	array(
	  'primary_navigation' => 'Primary Navigation',
	  'practice_navigation' => 'Practice Navigation',
      'lawyer_navigation' => 'Lawyers Navigation',
      'partner_navigation' => 'Partners Navigation',
      'foreign_navigation' => 'Foreign Navigation',
      'news_navigation' => 'News Navigation'
	)
);

// remove container from menus
function roots_nav_menu_args($args = ''){
	$args['container'] = false;
	return $args;
}

add_filter('wp_nav_menu_args', 'roots_nav_menu_args');

// create widget areas: sidebar, footer
$sidebars = array('Sidebar', 'Footer');
foreach ($sidebars as $sidebar) {
	register_sidebar(array('name'=> $sidebar,
		'before_widget' => '<article id="%1$s" class="widget %2$s"><div class="container">',
		'after_widget' => '</div></article>',
		'before_title' => '<h3>',
		'after_title' => '</h3>'
	));
}

// add to robots.txt
// http://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization
add_action('do_robots', 'roots_robots');

function roots_robots() {
	echo "Disallow: /cgi-bin\n";
	echo "Disallow: /wp-admin\n";
	echo "Disallow: /wp-includes\n";
	echo "Disallow: /wp-content/plugins\n";
	echo "Disallow: /plugins\n";
	echo "Disallow: /wp-content/cache\n";
	echo "Disallow: /wp-content/themes\n";
	echo "Disallow: /trackback\n";
	echo "Disallow: /feed\n";
	echo "Disallow: /comments\n";
	echo "Disallow: /category/*/*\n";
	echo "Disallow: */trackback\n";
	echo "Disallow: */feed\n";
	echo "Disallow: */comments\n";
	echo "Disallow: /*?*\n";
	echo "Disallow: /*?\n";
	echo "Allow: /wp-content/uploads\n";
	echo "Allow: /assets";
}

// add custom post types

// Create cpt practices
add_action('init', 'practices_register',1);
function practices_register(){
    $labels = array(
        'name' => __('Practices'),
        'singular_name' => __('Practice'),
        'add_new_item' => __('Add New Practice'),
        'edit_item' => __('Edit Practice'),
        'new_item' => __('New Practice'),
        'view_item' => __('View Practice'),
        'not_found' =>  __('No Practice Found'),
        );
        
	$args = array(
		'labels' => $labels,
		'public' => true,
		'hierarchical' => false,
		'rewrite' => true,
		'supports' => array('title', 'editor', 'revisions', 'author', 'thumbnail'),
		);

	register_post_type('practices', $args);
}

// Create cpt lawyers
add_action('init', 'lawyers_register',1);
function lawyers_register(){
    $labels = array(
        'name' => __('Lawyers'),
        'singular_name' => __('Lawyer'),
        'add_new_item' => __('Add Lawyer'),
        'edit_item' => __('Edit Lawyer'),
        'new_item' => __('New Lawyer'),
        'view_item' => __('View Lawyer'),
        'not_found' =>  __('No Lawyer found'),
    );
        
	$args = array(
		'labels' => $labels,
		'public' => true,
		'hierarchical' => false,
		'rewrite' => array('slug' => 'lawyer'),
		'supports' => array('title', 'editor', 'revisions', 'author', 'thumbnail'),
	);

	register_post_type('lawyers', $args);
    
    $taxo_args = array(
		'label' => __('Categories'),
		'singular_label' => __('Category'),
		'hierarchical' => true,
		'rewrite' => true
	);
	register_taxonomy( "lawyers_categories", array("lawyers"), $taxo_args);
}

// Create cpt news
add_action('init', 'news_register',1);
function news_register(){
    $labels = array(
        'name' => __('News'),
        'singular_name' => __('News'),
        'add_new_item' => __('Add News'),
        'edit_item' => __('Edit News'),
        'new_item' => __('New News'),
        'view_item' => __('View News'),
        'not_found' =>  __('No News found'),
    );
        
	$args = array(
		'labels' => $labels,
		'public' => true,
		'hierarchical' => false,
		'rewrite' => true,
		'supports' => array('title', 'editor', 'revisions', 'author', 'thumbnail'),
	);

	register_post_type('news', $args);
    
    $taxo_args = array(
		'label' => __('Categories'),
		'singular_label' => __('Category'),
		'hierarchical' => true,
		'rewrite' => true
	);
	register_taxonomy( "news_categories", array("news"), $taxo_args);
}

// Custom column lawyers
	add_filter("manage_edit-lawyers_columns", "law_edit_columns");
	add_action("manage_posts_custom_column",  "law_custom_columns");
	
	function law_edit_columns($columns){
			
			$new_columns['cb']=$columns['cb'];
			$new_columns['title']= __('Name');
			$new_columns['email']= __('Email');
            $new_columns['lawyers_categories'] = __('Categories');
			$new_columns['author'] = $columns['author'];
			$new_columns['date'] = $columns['date'];
			
			return $new_columns;
	}
	
	function law_custom_columns($column){
			global $post, $email_metabox;
			switch ($column)
			{
				
                case "email":
                    $email_metabox->the_meta();
                    $email_metabox->the_value('email');
                break;
                
                case "lawyers_categories":
					echo get_the_term_list($post->ID, 'lawyers_categories', '', ', ','');
				break;
			}
	}
    
    // Custom column news
	add_filter("manage_edit-news_columns", "news_edit_columns");
	add_action("manage_posts_custom_column",  "news_custom_columns");
	
	function news_edit_columns($columns){
			
			$new_columns['cb']=$columns['cb'];
			$new_columns['title']= __('Name');
			$new_columns['news_categories'] = __('Categories');
			$new_columns['author'] = $columns['author'];
			$new_columns['date'] = $columns['date'];
			
			return $new_columns;
	}
	
	function news_custom_columns($column){
			global $post, $email_metabox;
			switch ($column)
			{
				
                case "news_categories":
					echo get_the_term_list($post->ID, 'news_categories', '', ', ','');
				break;
			}
	}
 
// include css to style the custom meta boxes, this should be a global
// stylesheet used by all similar meta boxes
if (is_admin()) 
{
	wp_enqueue_style('custom_meta_css', _TEMPLATEURL . '/custom/meta.css');
}
 
// call image uploader js
function my_admin_scripts() {
    wp_register_script('my-upload', _TEMPLATEURL .'/js/image-uploader.js', array('jquery','media-upload','thickbox'));
    wp_enqueue_script('my-upload');
}
add_action('admin_print_scripts', 'my_admin_scripts'); 
 
// background meta box
$background_metabox = new WPAlchemy_MetaBox(array
(
	'id' => '_background_meta',
	'title' => 'Background Image',
	'types' => array('page','practices','lawyers'), // added only for pages and to custom post type "events"
	'context' => 'normal', // same as above, defaults to "normal"
	'priority' => 'high', // same as above, defaults to "high"
	'template' => TEMPLATEPATH . '/custom/simple_meta.php'
));

// upload pdf meta box
/*$upload_metabox = new WPAlchemy_MetaBox(array
(
	'id' => '_upload_meta',
	'title' => 'Upload PDF File',
	'types' => array('lawyers'), // added only for pages and to custom post type "events"
	'context' => 'normal', // same as above, defaults to "normal"
	'priority' => 'high', // same as above, defaults to "high"
	'template' => TEMPLATEPATH . '/custom/full_meta.php'
));*/

// email meta box
$email_metabox = new WPAlchemy_MetaBox(array
(
	'id' => '_email_meta',
	'title' => 'Email',
	'types' => array('lawyers'), // added only for pages and to custom post type "events"
	'context' => 'normal', // same as above, defaults to "normal"
	'priority' => 'high', // same as above, defaults to "high"
	'template' => TEMPLATEPATH . '/custom/email_meta.php'
));

// function get background
function the_background_img(){
    global $background_metabox;
    
    if(get_post_type() == "news"){
        // get the meta data for the current post
        $background_metabox->the_meta(17);
    }
    else{
        // get the meta data for the current post
        $background_metabox->the_meta();    
    }
     
    // get value directly
    $img_url = $background_metabox->get_the_value('bg_image');
    
    if(!empty($img_url)){
        echo "<img id=\"preload_img\" src=\"".home_url().$img_url."\" alt=\"\" class=\"bg_image\">";    
    }
}

//add_filter( 'show_admin_bar', '__return_false'); 
//add_action( 'admin_print_scripts-profile.php', 'wpbeginner_hide_admin_bar' );
function wpbeginner_hide_admin_bar() { ?>
<style type="text/css">
    .show-admin-bar { display: none; }
</style>
<?php
}

// function selected menu top
    function selected_menu_top(){
        global $post; ?>
        
        <style type="text/css">
            <?php if(get_post_type() == 'practices'): ?>
            .menu-item-7 a{background:#900044;}
            <?php elseif(is_page(15) || $post->post_parent == '15' || get_post_type() == "lawyers"): ?>
            .menu-item-23 a{background:#900044;}
            <?php elseif(get_post_type() == "news"): ?>
            .menu-item-24 a{background:#900044;}
            <?php endif; ?>
        </style>
    
    <?php
    }
    add_action('wp_head','selected_menu_top');

// load jquery
	function my_js()
	{
		if (!is_admin())
		{	
			// load a JS file from my theme:
            wp_enqueue_script('mousewhell', '/js/jquery.mousewheel.js', array('jquery'), '1.0', true);
            wp_enqueue_script('jscrollpane', '/js/jquery.jscrollpane.min.js', array('jquery'), '1.0', true);
            wp_enqueue_script('scripts', '/js/scripts.js', array('jquery'), '1.0', true);
        }
	}
	add_action('wp_print_scripts', 'my_js');

// deregister theme my login style
    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    function my_deregister_styles() {
    	wp_deregister_style( 'theme-my-login' );
    }

// remove upgrade message
    add_action('admin_menu','wphidenag');
    function wphidenag() {
        remove_action( 'admin_notices', 'update_nag', 3 );
    }
?>

Youez - 2016 - github.com/yon3zu
LinuXploit