HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/gayreviewsites.com/dead/wp-admin/edit-form-ajax-cat.php
<?php
require_once('../wp-config.php');
require_once('admin-functions.php');
require_once('admin-db.php');

get_currentuserinfo();

if ( !current_user_can('manage_categories') )
	die('-1');

function get_out_now() { exit; }

add_action('shutdown', 'get_out_now', -1);

$names = explode(',', rawurldecode($_GET['ajaxnewcat']) );
$ids   = array();

foreach ($names as $cat_name) {
	$cat_name = trim( $cat_name );
	
	if ( !$category_nicename = sanitize_title($cat_name) )
		continue;
	if ( $already = category_exists($cat_name) ) {
		$ids[] = (string) $already;
		continue;
	}
	
	$new_cat_id = wp_create_category($cat_name);
	
	$ids[] = (string) $new_cat_id;
}

$return = join(',', $ids);

die( (string) $return );

?>