Function Reference: geodir_category_count_script
Summary
Adds the category post count javascript code
Global Values
- $geodir_post_category_str
- (string) (required) The geodirectory post category.
- Default: None
Package
GeoDirectory
Change Log
Since: 1.0.0
Source File
geodir_category_count_script() is located in geodirectory-functions/custom_functions.php [Line: 966]
Source Code
function geodir_category_count_script() { global $geodir_post_category_str; if ( ! empty( $geodir_post_category_str ) ) { $geodir_post_category_str = serialize( $geodir_post_category_str ); } $all_var['post_category_array'] = html_entity_decode( (string) $geodir_post_category_str, ENT_QUOTES, 'UTF-8' ); $script = "var post_category_array = " . json_encode( $all_var ) . ';'; echo ''; }