get_results("select t.term_id,t.name from $wpdb->terms t join $wpdb->term_taxonomy tt on tt.term_id=t.term_id where tt.taxonomy=\"".CUSTOM_CATEGORY_TYPE1."\" and tt.parent=\"$mid\" order by t.name"); echo ''; } exit; } require_once (TEMPLATEPATH .'/admin/main.php');//wp-admin - post custom fields // Theme variables require_once (TEMPLATEPATH . '/library/functions/theme_variables.php'); require_once (TEMPLATEPATH .'/admin_menu.php'); //wp-admin sidebar menu require_once (TEMPLATEPATH .'/language.php'); //language file //** ADMINISTRATION FILES **// // Theme admin functions require_once ($functions_path . 'admin_functions.php'); // Theme admin options require_once ($functions_path . 'admin_options.php'); // Theme admin Settings require_once ($functions_path . 'admin_settings.php'); //** FRONT-END FILES **// // Widgets require_once ($functions_path . 'widgets_functions.php'); // General Widgets require_once ($functions_path . 'common_widgets.php'); // Custom require_once ($functions_path . 'custom_functions.php'); // Comments require_once ($functions_path . 'comments_functions.php'); require_once ($functions_path . 'yoast-canonical.php'); require_once ($functions_path . 'yoast-breadcrumbs.php'); require_once ($functions_path . 'most-popular.php'); include_once ($functions_path . 'custom_post_type.php'); // custom texonomy include_once ($functions_path . 'listing_filters.php'); // filter settings //theme.php function autoinstall_admin_header() { global $wpdb; if(strstr($_SERVER['REQUEST_URI'],'themes.php') && $_REQUEST['template']=='' && $_GET['page']=='') { if($_REQUEST['dummy']=='del') { delete_dummy_data(); $dummy_deleted = __('

All Dummy data has been removed from your database successfully!

'); } if($_REQUEST['dummy_insert']) { require_once (TEMPLATEPATH . '/auto_install.php'); } if($_REQUEST['activated']=='true') { $theme_actived_success = __('

Theme activated successfully.

'); } $post_counts = $wpdb->get_var("select count(post_id) from $wpdb->postmeta where (meta_key='pt_dummy_content' || meta_key='tl_dummy_content') and meta_value=1"); if($post_counts>0) { $dummy_data_msg = __(sprintf('

Sample data has been populated on your site. Wish to delete sample data?
Yes Delete Please!

',site_url('/wp-admin/themes.php?dummy=del'))); }else { $dummy_data_msg = sprintf(__('

Would you like to auto install this theme and populate sample data on your site?
Yes, insert sample data please

'),site_url('/wp-admin/themes.php?dummy_insert=1')); } define('THEME_ACTIVE_MESSAGE','
'.$theme_actived_success.$dummy_deleted.$dummy_data_msg.'
'); echo THEME_ACTIVE_MESSAGE; } } add_action("admin_head", "autoinstall_admin_header"); // please comment this line if you wish to DEACTIVE SAMPLE DATA INSERT. function delete_dummy_data() { global $wpdb; delete_option('sidebars_widgets'); //delete widgets $productArray = array(); $pids_sql = "select p.ID from $wpdb->posts p join $wpdb->postmeta pm on pm.post_id=p.ID where (meta_key='pt_dummy_content' || meta_key='tl_dummy_content') and meta_value=1"; $pids_info = $wpdb->get_results($pids_sql); foreach($pids_info as $pids_info_obj) { wp_delete_post($pids_info_obj->ID); } } function get_image_cutting_edge($args=array()) { if($args['image_cut']) { $cut_post =$args['image_cut']; }else { $cut_post = get_option('ptthemes_image_x_cut'); } if($cut_post) { if($cut_post=='top') { $thumb_url .= "&a=t"; }elseif($cut_post=='bottom') { $thumb_url .= "&a=b"; }elseif($cut_post=='left') { $thumb_url .= "&a=l"; }elseif($cut_post=='right') { $thumb_url .= "&a=r"; }elseif($cut_post=='top right') { $thumb_url .= "&a=tr"; }elseif($cut_post=='top left') { $thumb_url .= "&a=tl"; }elseif($cut_post=='bottom right') { $thumb_url .= "&a=br"; }elseif($cut_post=='bottom left') { $thumb_url .= "&a=bl"; } } return $thumb_url; } ?> Guaranteed Financing In Florida! | Auto Reps