HEX
Server: Apache
System: Linux p3plzcpnl507418.prod.phx3.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: retoti4c1e1s (10075650)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/retoti4c1e1s/www/thecommitment.earth/wp-content/plugins/trx_addons/includes/plugin.admin.php
<?php
/**
 * Plugin's admin functions
 *
 * @package WordPress
 * @subpackage ThemeREX Addons
 * @since v1.6.17
 */

// Don't load directly
if ( ! defined( 'TRX_ADDONS_VERSION' ) ) {
	die( '-1' );
}

// AJAX: Get specified list's items
if ( !function_exists( 'trx_addons_callback_refresh_list' ) ) {
	add_action('wp_ajax_trx_addons_refresh_list', 		'trx_addons_callback_refresh_list');
	add_action('wp_ajax_nopriv_trx_addons_refresh_list',	'trx_addons_callback_refresh_list');
	function trx_addons_callback_refresh_list() {
		if ( !wp_verify_nonce( trx_addons_get_value_gp('nonce'), admin_url('admin-ajax.php') ) )
			die();
		$response = array(
			'error' => '',
			'data' => apply_filters('trx_addons_filter_refresh_list_'.trim($_REQUEST['parent_type']), array(), $_REQUEST['parent_value'])
		);
		echo json_encode($response);
		die();
	}
}

// Get list categories
if ( !function_exists( 'trx_addons_admin_refresh_list_post_type' ) ) {
	add_filter('trx_addons_filter_refresh_list_post_type', 'trx_addons_admin_refresh_list_post_type');
	function trx_addons_admin_refresh_list_post_type($list, $post_type) {
		return trx_addons_array_merge(
					array(0 => esc_html__('- Select category -', 'trx_addons')), 
					trx_addons_get_list_terms(false, trx_addons_get_post_type_taxonomy($post_type))
					);
	}
}
?>