Function Reference: get_gd_theme_compat_import_callback
Summary
Imports theme compatibility data for given theme.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
Package
GeoDirectory
Change Log
Since: 1.0.0
Source File
get_gd_theme_compat_import_callback() is located in geodirectory-admin/admin_functions.php [Line: 1930]
Source Code
function get_gd_theme_compat_import_callback() { global $wpdb; $themes = get_option('gd_theme_compats'); if (isset($_POST['theme']) && !empty($_POST['theme'])) { $json = json_decode(stripslashes($_POST['theme']), true); if (!empty($json) && is_array($json)) { $key = sanitize_text_field(key($json)); $themes[$key] = $json[$key]; update_option('gd_theme_compats', $themes); echo $key; die(); } } echo '0'; die(); }