403Webshell
Server IP : 93.115.150.27  /  Your IP : 216.73.216.221
Web Server : LiteSpeed
System : Linux host2.azar.host 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
User : dorfakkh ( 1797)
PHP Version : 8.1.34
Disable Function : show_source, system, passthru, exec, popen, proc_open, mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/dorfakkh/www/wp-content/themes/dorfakkhabar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/dorfakkh/www/wp-content/themes/dorfakkhabar/functions.php
<?php



// includes
require_once(TEMPLATEPATH . '/tabnakweb/admin-functions.php');
require_once(TEMPLATEPATH . '/tabnakweb/admin-interface.php');
require_once(TEMPLATEPATH . '/tabnakweb/theme-settings.php');
require_once(TEMPLATEPATH . '/tw/printme.php');
// Paginate
require_once('tw/wp-paginate.php');
//instantiate the class
if (class_exists('WPPaginate')) {
	$wp_paginate = new WPPaginate();
}
/**
 * Pagination function to use for posts
 */
function wp_paginate_posts($args = false) {
	global $wp_paginate;
	$wp_paginate->type = 'posts';
	return $wp_paginate->paginate($args);
}
// Add support for WP 2.9 post thumbnails
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
	add_theme_support( 'post-thumbnails' );

add_image_size( 'news', 108, 108, true);
add_image_size( 'secondtitle', 136, 78, true);
add_image_size( 'firsttitle', 410, 231, true);
add_image_size( 'rightside', 85, 65, true);
add_image_size( 'media', 180, 103, true);


}

 add_action("admin_init", "admin_init");
		add_action('save_post', 'save_details');
		//add_action('save_post', 'author_post_data');
		//add_action('save_post', 'movie_post_data');


		function admin_init(){
		  add_meta_box("post_fields_custom-meta", "نويسنده |روتيتر ", "post_fields_custom", "post", "side", "high");		  
 		  
		}
		
		function save_details(){
			global $post;
			
			update_post_meta($post->ID, "post_rutitr", $_POST["post_rutitr"]);
			update_post_meta($post->ID, "post_another", $_POST["post_another"]);
		}
 



	


	// Register Post Custom Fields
		function post_fields_custom(){
		  global $post;
		  $custom = get_post_custom($post->ID);
		  $post_rutitr = $custom["post_rutitr"][0];
		  $post_another = $custom["post_another"][0];

		  ?>
		  <input type="text" name="post_rutitr" value="<?php echo $post_rutitr; ?>" style="float: left; width: 180px; margin-top: 10px;"/><br />
          <label for="post_rutitr">روتیتر:</label>
          <div style="clear: both; height: 1px;">&nbsp;</div>
		  <input type="text" name="post_another" value="<?php echo $post_another; ?>" style="float: left; width: 180px; margin-top: 10px;"/><br />
          <label for="post_another">نويسنده:</label>
          <div style="clear: both; height: 1px;">&nbsp;</div>

 <?php
		} 


////////////////////////////////////////////////////////////////////////////////
// Menu
if (function_exists('register_nav_menu')) {
    register_nav_menu( 'header-menu', 'منوی بالا' );
    register_nav_menu( 'header_menu', 'منوی موضوعات سربرگ' );   
    
}






//  dynamic sidebars
if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
		'name' => 'sidebar',
      'before_widget' => '<div class="block">',
        'after_widget' => '</div></div>',
        'before_title' => '<div class="block_title"><h3>',
        'after_title' => '</h3></div><div class="block_content">'    
    ));
}


if ( function_exists('register_sidebar') )
register_sidebar(array(
'name'          => 'right-sidebar',
'description'   => 'ناحيه قرار گيری ابزارک شما',
'before_widget' => '<div class="box">
					
					<div class="boxtitle">
					<div class="arrow"></div>',
'after_widget'  => '</ul>
					
			</div>',
'before_title'  => '<div class="title">',
'after_title'   => '</div>
				</div>
				
					<ul>',
));

// automatic feed links
add_theme_support( 'automatic-feed-links' );


?>
<?php
function my_formatter($excerpt) {
    $new_content = strip_tags($excerpt);
    return $new_content;
}
 
 
add_filter('the_excerpt', 'my_formatter');
function wordpressapi_comments($comment, $args, $depth) {
 $GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id="comment-<?php comment_ID() ?>">
<div class="arrow"></div>
 <div id="comment-<?php comment_ID(); ?>">
 <div style="float: right">
 <?php $user_name_str = substr(get_comment_author(),0, 60); ?>
 <span class="author"><?php echo $user_name_str; ?></span>&nbsp;&nbsp;
 <span class="date"><?php printf(__('%1$s'), get_comment_date(),  get_comment_time()) ?>&nbsp;&nbsp;<?php edit_comment_link(__('(Edit)'),'  ','') ?></span>
 </div>

 <div class="reply">
 <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
 </div>

 <?php if ($comment->comment_approved == '0') : ?>
 <em><?php _e('Your comment is awaiting moderation.') ?></em>
 <br />
 <?php endif; ?>
 

 <div style="clear: both; padding: 5px 0;">
 <?php comment_text() ?>
 </div>

 </div>
<?php
 }


function featured_image_in_feed( $content ) {
    global $post;
    if( is_feed() ) {
        if ( has_post_thumbnail( $post->ID ) ){
            $output = get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'style' => 'display:block;' ));
            $content = $output . $content;
        }
    }
    return $content;
}
add_filter('the_excerpt_rss', 'featured_image_in_feed');
add_filter('the_content_feed', 'featured_image_in_feed');

// كلامات كليدي



 //jl,l
?>
<?php //Activate the Link Manager built in to the WordPress admin
 add_filter( 'pre_option_link_manager_enabled', '__return_true' ); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit