403Webshell
Server IP : 216.250.13.251  /  Your IP : 216.73.217.37
Web Server : nginx/1.24.0
System : Linux gunay 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : root ( 0)
PHP Version : 7.4.33
Disable Function : 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,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/gunay/wp-content/themes/rttheme19/rt-framework/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/gunay/wp-content/themes/rttheme19/rt-framework/functions/common_functions.php
<?php
#-----------------------------------------
#	RT-Theme common_functions.php
#	version: 1.1
#-----------------------------------------

#
# Check a file exists in the child theme from path 
# @return file url
#
function rt_locate_media_file( $file_path ){
	if ( is_child_theme() ){
		$child_file_path = get_stylesheet_directory() . $file_path ; 

		if ( file_exists( $child_file_path ) ){
			$file_url = get_stylesheet_directory_uri() . $file_path ; 
		}else{
			$file_url = RT_THEMEURI . $file_path ; 
		}
	}else{
		$file_url = RT_THEMEURI . $file_path ; 
	}

	return $file_url;
}

#
# find vimeo and youtube id from url
#
function rt_find_tube_video_id($url){
	$tubeID="";

	$url = esc_url( $url );
	
	if( strpos($url, 'youtube') || strpos($url, 'youtu.be')  ) {	
		$tubeID=parse_url($url);		

		isset( $tubeID['path'] ) && strpos($url, 'http://youtu.be') 
			and $tubeID=str_replace("/", "", $tubeID['path']);	

		isset( $tubeID['query'] ) 
			and parse_str($tubeID['query'], $url_parts);

		isset( $url_parts ) && is_array( $url_parts ) 
			and $tubeID=$url_parts["v"];
	}
	
	if( strpos($url, 'vimeo')  ) {
		$tubeID=parse_url($url, PHP_URL_PATH);			
		$tubeID=str_replace("/", "", $tubeID);	
	}	


	if( is_string( $tubeID ) ) return $tubeID;
}

#
# Check layer slider
#

function rt_check_layer_slider() { 
	if( function_exists( "layerslider_load_lang" ) || function_exists( "layerslider_activation_scripts" ) || function_exists( "layerslider_new_site" ) ) {
		return true;
	}else{
		return false;
	}
}

#
# layer slider slides list 
#
function rt_layer_slider_list() { 

	$get_layer_slider_list = array();

	if( function_exists( "lsSliders" ) ){
		$sliders = lsSliders(200, false, true); 

		if ( rt_check_layer_slider() ){
			if( is_array( $sliders ) ){
				foreach ($sliders as $key => $value) { 
					$get_layer_slider_list[$value["id"]] = $value["name"];  
				}		
			}
		}
	}else{
		$get_layer_slider_list[0] = "Layer Slider has not been installed or activated!";
	}

	return $get_layer_slider_list;		
}

#
# layer revslider slides list 
#

function rt_rev_slider_list() { 
	global $wpdb,$table_prefix;
	
	$get_rev_slider_list = array();

	if( class_exists( "RevSlider" ) ){

		$revslider_sliders = $wpdb->get_results( "SELECT title,alias FROM ".$table_prefix."revslider_sliders" );

		if( isset( $revslider_sliders ) ){
			foreach ($revslider_sliders as $key => $value) {
				$get_rev_slider_list[ $value->alias ] = $value->title;   
			}
		}
	}else{
		$get_layer_slider_list[0] = "Slider Revolution has not been installed or activated!";		
	}

	return $get_rev_slider_list;
}

#
# returns a post ID from a url
#
if( ! function_exists("rt_get_attachment_id_from_src") ){
	function rt_get_attachment_id_from_src ( $image_src ) { 
		$id = attachment_url_to_postid( $image_src );

		return $id; 
	}
}
#
# find orginal image url - clean thumbnail extensions
#

function rt_clean_thumbnail_ext ($image_src) { 
	$search = '#-\d+x\d+#';  
	return preg_replace($search, "", $image_src);
}

#
# generate shortcode function
#
function rt_generate_shortcode($class,$shorcode_name=""){

	$shorcode_name = !empty( $shorcode_name ) ? $shorcode_name : $class->content_type;

	$template_shortcode ='['.$shorcode_name.' ';
	foreach ($class as $key => $value) {
		$template_shortcode  .= $key.'="'.$value.'" ';
	}

	return $template_shortcode.']';	
}


#
# Remove slashes from strings, arrays and objects
#
if( ! function_exists("rt_stripslashesFull") ){
	function rt_stripslashesFull($input){
		if (is_array($input)) {
			$input = array_map('rt_stripslashesFull', $input);
		} elseif (is_object($input)) {
			$vars = get_object_vars($input);
			foreach ($vars as $k=>$v) {
				$input->{$k} = rt_stripslashesFull($v);
			}
		} else {
			$input = stripcslashes($input);
		}
		return $input;
	}
}



Youez - 2016 - github.com/yon3zu
LinuXploit