Function Reference: geodir_custom_post_type_localize_all_js_msg

Summary

This function has not been documented yet.

Source File

geodir_custom_post_type_localize_all_js_msg() is located in geodir_custom_posts/geodir_cp_hooks_actions.php [Line: 144]

Source Code

function geodir_custom_post_type_localize_all_js_msg(){

	global $path_location_url;
	
	$arr_alert_msg = array(
		
		'geodir_cp_post_type_char_validation' => __('Post Type can not be more than 17 characters.', GEODIR_CP_TEXTDOMAIN),
		'geodir_cp_post_type_illegal_characters_validation' => __('Post Type contains illegal characters.', GEODIR_CP_TEXTDOMAIN),
		'geodir_cp_post_type_blank_validation' => __('Post Type must not be blank.', GEODIR_CP_TEXTDOMAIN),
		'geodir_cp_listing_slug_illegal_characters_validation' => __('Listing Slug contains illegal characters.', GEODIR_CP_TEXTDOMAIN),
		'geodir_cp_listing_slug_blank_validation' => __('Listing Slug must not be blank.', GEODIR_CP_TEXTDOMAIN),
		'geodir_cp_listing_order_value_validation' => __('Enter valid order value.', GEODIR_CP_TEXTDOMAIN),
		
	);
	
	foreach ( $arr_alert_msg as $key => $value ) 
	{
		if ( !is_scalar($value) )
			continue;
		$arr_alert_msg[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
	}
	
	$script = "var geodir_custom_post_type_all_js_msg = " . json_encode($arr_alert_msg) . ';';
	echo '';
}