function PricerrTheme_affiliates_myplugin_activate() { global $wpdb; $ss = " CREATE TABLE `" . $wpdb->prefix . "job_affiliate_users` (\r\n\t\t\t`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,\r\n\t\t\t`owner_id` INT,\r\n\t\t\t`affiliate_id` INT ,\r\n\t\t\t`datemade` BIGINT \r\n\t\t\t\r\n\t) ENGINE = MYISAM "; $wpdb->query($ss); $ss = " CREATE TABLE `" . $wpdb->prefix . "job_affiliate_commissions` (\r\n\t\t\t`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,\r\n\t\t\t`uid` BIGINT,\r\n\t\t\t`pid` BIGINT ,\r\n\t\t\t`datemade` BIGINT,\r\n\t\t\t`datepaid` BIGINT,\r\n\t\t\t`amount` varchar(255) NOT NULL DEFAULT '0',\r\n\t\t\t`paid` TINYINT NOT NULL DEFAULT '0', \r\n\t\t\t`showme` TINYINT NOT NULL DEFAULT '1' \r\n\t\t\t\r\n\t) ENGINE = MYISAM "; $wpdb->query($ss); if (function_exists('PricerrTheme_insert_pages')) { PricerrTheme_insert_pages('PricerrTheme_my_account_affiliates_id', 'Affiliates', '[pricerr_theme_my_account_affiliates]', get_option('PricerrTheme_my_account_page_id')); } }
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_orders` ADD `request_cancellation` \t\t\t\ttinyint(4) NOT NULL default '0' ;"); $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_orders` ADD `force_cancellation` \t\t\t\ttinyint(4) NOT NULL default '0' ;"); $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_orders` ADD `accept_cancellation_request` \t\ttinyint(4) NOT NULL default '0' ;"); $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_orders` ADD `date_request_cancellation` \t\tbigint(20) NOT NULL default '0' ;"); $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_orders` ADD `date_accept_cancellation` \t\tbigint(20) NOT NULL default '0' ;"); $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "job_chatbox` CHANGE `message_to_buyer` `message_to_buyer` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL"); //--------------------------------------------------- $ss = "ALTER TABLE `" . $wpdb->prefix . "job_pm` ADD `show_to_source` TINYINT NOT NULL DEFAULT '1';"; $wpdb->query($ss); //--------------------------- $ss = "ALTER TABLE `" . $wpdb->prefix . "job_pm` ADD `show_to_destination` TINYINT NOT NULL DEFAULT '1';"; $wpdb->query($ss); PricerrTheme_insert_pages('PricerrTheme_all_categories_page_id', 'All Categories', '[pricerr_theme_all_categories]'); PricerrTheme_insert_pages('PricerrTheme_all_locations_page_id', 'All Locations', '[pricerr_theme_all_locations]'); PricerrTheme_insert_pages('PricerrTheme_advanced_search_id', 'Search Jobs', '[pricerr_theme_search_jobs]'); PricerrTheme_insert_pages('PricerrTheme_my_account_mutual_cancellation', 'Answer Cancellation Request', '[pricerr_theme_my_account_answer_cancel]', get_option('PricerrTheme_my_account_page_id')); } if (empty($opt2)) { add_filter('admin_head', 'PricerrTheme_run_at_first_widgets'); query_posts("post_type=job&order=DESC&orderby=id&posts_per_page=10000"); if (have_posts()) { while (have_posts()) { the_post(); $ttl = get_the_title(); $newttl = get_post_meta(get_the_ID(), 'title_variable', true); //title_variable pricerrTheme_reomve_i_will($ttl, get_post_meta(get_the_ID(),'price', true)); $npost = array(); $npost['ID'] = get_the_ID(); $npost['post_title'] = $newttl; wp_update_post($npost); }