Wp-Insert - Version 2.0.10

Version Description

Download this release

Release Info

Developer namith.jawahar
Plugin Icon 128x128 Wp-Insert
Version 2.0.10
Comparing to
See all releases

Code changes from version 2.0.9 to 2.0.10

includes/adwidgets/admin-page.php CHANGED
@@ -43,7 +43,7 @@ function wp_insert_adwidgets_content($post, $args) {
43
  $name = $args['args']['name'].'['.$location.']';
44
 
45
  if(!isset($data[$location])) { $data[$location] = array(); }
46
- $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
@@ -54,6 +54,8 @@ function wp_insert_adwidgets_content($post, $args) {
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
 
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
59
  $controls['rules_exclude_categories'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_categories]', $id.'-rules_exclude_categories', $data['rules_exclude_categories'], '', '', null, '', false);
@@ -112,6 +114,46 @@ function wp_insert_adwidgets_rules_content($controls) {
112
  'class' => 'rules',
113
  'rows' => array()
114
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  array_push(
116
  $rulesTable['rows'],
117
  array(
43
  $name = $args['args']['name'].'['.$location.']';
44
 
45
  if(!isset($data[$location])) { $data[$location] = array(); }
46
+ $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_loggedin', 'rules_exclude_mobile_devices', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
57
+ $controls['rules_exclude_loggedin'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_loggedin]', $id.'-rules_exclude_loggedin', $data['rules_exclude_loggedin'], '', '', null, '', false);
58
+ $controls['rules_exclude_mobile_devices'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_mobile_devices]', $id.'-rules_exclude_mobile_devices', $data['rules_exclude_mobile_devices'], '', '', null, '', false);
59
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
60
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
61
  $controls['rules_exclude_categories'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_categories]', $id.'-rules_exclude_categories', $data['rules_exclude_categories'], '', '', null, '', false);
114
  'class' => 'rules',
115
  'rows' => array()
116
  );
117
+ array_push(
118
+ $rulesTable['rows'],
119
+ array(
120
+ 'cells' => array(
121
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Logged in Users')
122
+ )
123
+ ),
124
+ array(
125
+ 'cells' => array(
126
+ array('content' => 'Status'),
127
+ array('content' => ' : '),
128
+ array('content' => $controls['rules_exclude_loggedin']['html'])
129
+ )
130
+ ),
131
+ array(
132
+ 'cells' => array(
133
+ array('colspan' => '3', 'content' => ' ')
134
+ )
135
+ )
136
+ );
137
+ array_push(
138
+ $rulesTable['rows'],
139
+ array(
140
+ 'cells' => array(
141
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Mobile Devices')
142
+ )
143
+ ),
144
+ array(
145
+ 'cells' => array(
146
+ array('content' => 'Status'),
147
+ array('content' => ' : '),
148
+ array('content' => $controls['rules_exclude_mobile_devices']['html'])
149
+ )
150
+ ),
151
+ array(
152
+ 'cells' => array(
153
+ array('colspan' => '3', 'content' => ' ')
154
+ )
155
+ )
156
+ );
157
  array_push(
158
  $rulesTable['rows'],
159
  array(
includes/adwidgets/widget.php CHANGED
@@ -19,7 +19,7 @@ class wpInsertAdWidget extends WP_Widget {
19
  echo $before_widget;
20
  if (!empty($title)) { echo $before_title.$title.$after_title; }
21
 
22
- if(($options['adwidgets-'.$instance['instance']]['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['adwidgets-'.$instance['instance']]['country_1'])))) {
23
  echo '<div class="wpInsert wpInsertAdWidget"'.(($options['adwidgets-'.$instance['instance']]['styles'] != '')?' style="'.$options['adwidgets-'.$instance['instance']]['styles'].'"':'').'>'.do_shortcode($options['adwidgets-'.$instance['instance']]['country_code_1']).'</div>';
24
  } else {
25
  echo '<div class="wpInsert wpInsertAdWidget"'.(($options['adwidgets-'.$instance['instance']]['styles'] != '')?' style="'.$options['adwidgets-'.$instance['instance']]['styles'].'"':'').'>'.do_shortcode($options['adwidgets-'.$instance['instance']]['ad_code_'.$wpInsertAdInstance]).'</div>';
19
  echo $before_widget;
20
  if (!empty($title)) { echo $before_title.$title.$after_title; }
21
 
22
+ if(($options['adwidgets-'.$instance['instance']]['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['adwidgets-'.$instance['instance']]['country_1'])))) {
23
  echo '<div class="wpInsert wpInsertAdWidget"'.(($options['adwidgets-'.$instance['instance']]['styles'] != '')?' style="'.$options['adwidgets-'.$instance['instance']]['styles'].'"':'').'>'.do_shortcode($options['adwidgets-'.$instance['instance']]['country_code_1']).'</div>';
24
  } else {
25
  echo '<div class="wpInsert wpInsertAdWidget"'.(($options['adwidgets-'.$instance['instance']]['styles'] != '')?' style="'.$options['adwidgets-'.$instance['instance']]['styles'].'"':'').'>'.do_shortcode($options['adwidgets-'.$instance['instance']]['ad_code_'.$wpInsertAdInstance]).'</div>';
includes/common/popups/categories.php CHANGED
@@ -32,7 +32,7 @@ require('../../../../../../wp-blog-header.php');
32
  $categories = get_categories('number=100&hide_empty=0');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
- $selected = split(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="category_picker" class="multiselect" multiple="multiple" >
32
  $categories = get_categories('number=100&hide_empty=0');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
+ $selected = explode(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="category_picker" class="multiselect" multiple="multiple" >
includes/common/popups/countries.php CHANGED
@@ -31,7 +31,7 @@ require('../../../../../../wp-blog-header.php');
31
  <?php
32
  $selected = null;
33
  if(isset($_GET['data'])) {
34
- $selected = split(',', urldecode((string)$_GET['data']));
35
  }
36
  ?>
37
  <select id="country_picker" class="multiselect" multiple="multiple" >
31
  <?php
32
  $selected = null;
33
  if(isset($_GET['data'])) {
34
+ $selected = explode(',', urldecode((string)$_GET['data']));
35
  }
36
  ?>
37
  <select id="country_picker" class="multiselect" multiple="multiple" >
includes/common/popups/instances.php CHANGED
@@ -43,7 +43,7 @@ function wp_insert_add_ordinal_number_suffix($num) {
43
  $posts_per_page = get_option('posts_per_page');
44
  $selected = null;
45
  if(isset($_GET['data'])) {
46
- $selected = split(',', urldecode((string)$_GET['data']));
47
  }
48
  ?>
49
  <select id="instance_picker" class="multiselect" multiple="multiple" >
43
  $posts_per_page = get_option('posts_per_page');
44
  $selected = null;
45
  if(isset($_GET['data'])) {
46
+ $selected = explode(',', urldecode((string)$_GET['data']));
47
  }
48
  ?>
49
  <select id="instance_picker" class="multiselect" multiple="multiple" >
includes/common/popups/pages.php CHANGED
@@ -32,7 +32,7 @@ require('../../../../../../wp-blog-header.php');
32
  $pages = get_pages('number=100');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
- $selected = split(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="page_picker" class="multiselect" multiple="multiple" >
32
  $pages = get_pages('number=100');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
+ $selected = explode(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="page_picker" class="multiselect" multiple="multiple" >
includes/common/popups/posts.php CHANGED
@@ -32,7 +32,7 @@ require('../../../../../../wp-blog-header.php');
32
  $posts = get_posts('numberposts=100');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
- $selected = split(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="post_picker" class="multiselect" multiple="multiple" >
32
  $posts = get_posts('numberposts=100');
33
  $selected = null;
34
  if(isset($_GET['data'])) {
35
+ $selected = explode(',', urldecode((string)$_GET['data']));
36
  }
37
  ?>
38
  <select id="post_picker" class="multiselect" multiple="multiple" >
includes/common/status.php CHANGED
@@ -51,57 +51,70 @@ function wp_insert_get_page_details() {
51
 
52
  function wp_insert_get_ad_status($rules) {
53
  if(!isset($rules)) { return false; }
54
- $rules = wp_insert_sanitize_array($rules, array('status', 'rules_exclude_home', 'rules_home_instances', 'rules_exclude_archives', 'rules_archives_instances', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_instances', 'rules_exclude_search', 'rules_search_instances', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions'));
55
 
56
  if(!$rules['status']) {
57
  return false;
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  global $wpInsertPostInstance;
60
  $page_details = wp_insert_get_page_details();
61
  switch($page_details['type']) {
62
  case 'HOME':
63
  if($rules['rules_exclude_home']) {
64
  return false;
65
- } else if($rules['rules_home_instances'] && (in_array($wpInsertPostInstance, split(',', $rules['rules_home_instances'])))) {
66
  return false;
67
  }
68
  break;
69
  case 'ARCHIVE':
70
  if($rules['rules_exclude_archives']) {
71
  return false;
72
- } else if($rules['rules_archives_instances'] && (in_array($wpInsertPostInstance, split(',', $rules['rules_archives_instances'])))) {
73
  return false;
74
  }
75
  break;
76
  case 'CATEGORY':
77
  if($rules['rules_exclude_categories']) {
78
  return false;
79
- } else if($rules['rules_categories_exceptions'] && (in_array($page_details['ID'], split(',', $rules['rules_categories_exceptions'])))) {
80
  return false;
81
- } else if($rules['rules_categories_instances'] && (in_array($wpInsertPostInstance, split(',', $rules['rules_categories_instances'])))) {
82
  return false;
83
  }
84
  break;
85
  case 'SEARCH':
86
  if($rules['rules_exclude_search']) {
87
  return false;
88
- } else if($rules['rules_search_instances'] && (in_array($wpInsertPostInstance, split(',', $rules['rules_search_instances'])))) {
89
  return false;
90
  }
91
  break;
92
  case 'PAGE':
93
  if($rules['rules_exclude_page']) {
94
  return false;
95
- } else if($rules['rules_page_exceptions'] && (in_array($page_details['ID'], split(',', $rules['rules_page_exceptions'])))) {
96
  return false;
97
  }
98
  break;
99
  case 'POST':
100
  if($rules['rules_exclude_post']) {
101
  return false;
102
- } else if($rules['rules_post_exceptions'] && (in_array($page_details['ID'], split(',', $rules['rules_post_exceptions'])))) {
103
  return false;
104
- } else if($rules['rules_categories_post_exceptions'] && is_array($page_details['categories']) && (count(array_intersect(array_unique($page_details['categories']), array_unique(split(',', $rules['rules_categories_post_exceptions'])))) > 0)) {
105
  return false;
106
  }
107
  break;
51
 
52
  function wp_insert_get_ad_status($rules) {
53
  if(!isset($rules)) { return false; }
54
+ $rules = wp_insert_sanitize_array($rules, array('status', 'rules_exclude_loggedin', 'rules_exclude_mobile_devices', 'rules_exclude_home', 'rules_home_instances', 'rules_exclude_archives', 'rules_archives_instances', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_instances', 'rules_exclude_search', 'rules_search_instances', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions'));
55
 
56
  if(!$rules['status']) {
57
  return false;
58
  }
59
+
60
+ if($rules['rules_exclude_loggedin']) {
61
+ if(is_user_logged_in()) {
62
+ return false;
63
+ }
64
+ }
65
+
66
+ if($rules['rules_exclude_mobile_devices']) {
67
+ if(wp_is_mobile()) {
68
+ return false;
69
+ }
70
+ }
71
+
72
  global $wpInsertPostInstance;
73
  $page_details = wp_insert_get_page_details();
74
  switch($page_details['type']) {
75
  case 'HOME':
76
  if($rules['rules_exclude_home']) {
77
  return false;
78
+ } else if($rules['rules_home_instances'] && (in_array($wpInsertPostInstance, explode(',', $rules['rules_home_instances'])))) {
79
  return false;
80
  }
81
  break;
82
  case 'ARCHIVE':
83
  if($rules['rules_exclude_archives']) {
84
  return false;
85
+ } else if($rules['rules_archives_instances'] && (in_array($wpInsertPostInstance, explode(',', $rules['rules_archives_instances'])))) {
86
  return false;
87
  }
88
  break;
89
  case 'CATEGORY':
90
  if($rules['rules_exclude_categories']) {
91
  return false;
92
+ } else if($rules['rules_categories_exceptions'] && (in_array($page_details['ID'], explode(',', $rules['rules_categories_exceptions'])))) {
93
  return false;
94
+ } else if($rules['rules_categories_instances'] && (in_array($wpInsertPostInstance, explode(',', $rules['rules_categories_instances'])))) {
95
  return false;
96
  }
97
  break;
98
  case 'SEARCH':
99
  if($rules['rules_exclude_search']) {
100
  return false;
101
+ } else if($rules['rules_search_instances'] && (in_array($wpInsertPostInstance, explode(',', $rules['rules_search_instances'])))) {
102
  return false;
103
  }
104
  break;
105
  case 'PAGE':
106
  if($rules['rules_exclude_page']) {
107
  return false;
108
+ } else if($rules['rules_page_exceptions'] && (in_array($page_details['ID'], explode(',', $rules['rules_page_exceptions'])))) {
109
  return false;
110
  }
111
  break;
112
  case 'POST':
113
  if($rules['rules_exclude_post']) {
114
  return false;
115
+ } else if($rules['rules_post_exceptions'] && (in_array($page_details['ID'], explode(',', $rules['rules_post_exceptions'])))) {
116
  return false;
117
+ } else if($rules['rules_categories_post_exceptions'] && is_array($page_details['categories']) && (count(array_intersect(array_unique($page_details['categories']), array_unique(explode(',', $rules['rules_categories_post_exceptions'])))) > 0)) {
118
  return false;
119
  }
120
  break;
includes/common/support.php CHANGED
@@ -16,11 +16,11 @@ function wp_insert_support_admin_init() {
16
  }
17
  add_settings_section('wp-insert-support-top', '', 'wp_insert_support_section', 'wp-insert-support');
18
  add_meta_box('wp_insert_facebook', 'Like Us On Facebook', 'wp_insert_facebook_content', 'wp-insert-support-top', 'advanced', 'high');
19
- add_meta_box('wp_insert_donate', 'Donate and Support Free Plugins', 'wp_insert_donate_content', 'wp-insert-support-top', 'advanced', 'high');
20
- add_meta_box('wp_insert_hate_campaign', 'Save Wp-Insert', 'wp_insert_hate_campaign_content', 'wp-insert-support-top', 'advanced', 'high');
21
  delete_option('wp_insert_showcase_submission');
22
  if(get_option('wp_insert_showcase_submission') != 'SUBMITTED') {
23
- add_meta_box('wp_insert_showcase', 'Showcase your Site', 'wp_insert_showcase_content', 'wp-insert-support-bottom', 'advanced', 'high');
24
  }
25
  }
26
 
@@ -31,7 +31,7 @@ function wp_insert_support_section() {
31
  }
32
 
33
  function wp_insert_facebook_content() {
34
- echo '<a href="https://www.facebook.com/SmartLogix"><img src="'.WP_INSERT_URL.'/includes/common/images/fb_like_btn.png" style="margin-top: 5px;" /></a>';
35
  }
36
 
37
  function wp_insert_donate_content() {
@@ -39,8 +39,8 @@ function wp_insert_donate_content() {
39
  }
40
 
41
  function wp_insert_hate_campaign_content() {
42
- echo '<p>Some users (most likely sponsored by some premium plugin) are spreading a Hate Campaign against Wp-Insert churning away Forum Posts and Negative reviews about the plugin on different sites.</p>';
43
- echo '<p>Please help us defend these unscrupulous activities by writing a honest <a href="http://wordpress.org/support/view/plugin-reviews/wp-insert">review</a> about the plugin and <a href="http://wordpress.org/plugins/wp-insert">rating</a> the plugin in the Plugin Repository.</p>';
44
  echo '<p>Most of you will think about leaving a rating or visiting the forum only when something goes wrong while thousands are using the plugin satisfactorily which unfortunately is not Reported OR Documented.</p>';
45
  echo '<p style="font-weight: bold; color: #FF0000;"">IF YOU FIND THIS PLUGIN USEFUL DO LEAVE A HONEST <a href="http://wordpress.org/plugins/wp-insert">RATING</a> AND <a href="http://wordpress.org/support/view/plugin-reviews/wp-insert">REVIEW</a> IN THE REPOSITORY AND HELP US AGAINST THE MARKETING CAMPAIGN AIMED TO TARNISH A HIGHLY USEFUL, FREE, FEATURE RICH PLUGIN.</p>';
46
  }
16
  }
17
  add_settings_section('wp-insert-support-top', '', 'wp_insert_support_section', 'wp-insert-support');
18
  add_meta_box('wp_insert_facebook', 'Like Us On Facebook', 'wp_insert_facebook_content', 'wp-insert-support-top', 'advanced', 'high');
19
+ add_meta_box('wp_insert_donate', 'Donate and Support Free Plugins', 'wp_insert_donate_content', 'wp-insert-support-bottom', 'advanced', 'high');
20
+ add_meta_box('wp_insert_hate_campaign', 'Save Wp-Insert', 'wp_insert_hate_campaign_content', 'wp-insert-support-bottom', 'advanced', 'high');
21
  delete_option('wp_insert_showcase_submission');
22
  if(get_option('wp_insert_showcase_submission') != 'SUBMITTED') {
23
+ //add_meta_box('wp_insert_showcase', 'Showcase your Site', 'wp_insert_showcase_content', 'wp-insert-support-bottom', 'advanced', 'high');
24
  }
25
  }
26
 
31
  }
32
 
33
  function wp_insert_facebook_content() {
34
+ echo '<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FSmartLogix&amp;width=256&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;header=false&amp;stream=false&amp;show_border=false&amp;appId=344044952413253" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:256px; height:258px;" allowTransparency="true"></iframe>';
35
  }
36
 
37
  function wp_insert_donate_content() {
39
  }
40
 
41
  function wp_insert_hate_campaign_content() {
42
+ //echo '<p>Some users (most likely sponsored by some premium plugin) are spreading a Hate Campaign against Wp-Insert churning away Forum Posts and Negative reviews about the plugin on different sites.</p>';
43
+ //echo '<p>Please help us defend these unscrupulous activities by writing a honest <a href="http://wordpress.org/support/view/plugin-reviews/wp-insert">review</a> about the plugin and <a href="http://wordpress.org/plugins/wp-insert">rating</a> the plugin in the Plugin Repository.</p>';
44
  echo '<p>Most of you will think about leaving a rating or visiting the forum only when something goes wrong while thousands are using the plugin satisfactorily which unfortunately is not Reported OR Documented.</p>';
45
  echo '<p style="font-weight: bold; color: #FF0000;"">IF YOU FIND THIS PLUGIN USEFUL DO LEAVE A HONEST <a href="http://wordpress.org/plugins/wp-insert">RATING</a> AND <a href="http://wordpress.org/support/view/plugin-reviews/wp-insert">REVIEW</a> IN THE REPOSITORY AND HELP US AGAINST THE MARKETING CAMPAIGN AIMED TO TARNISH A HIGHLY USEFUL, FREE, FEATURE RICH PLUGIN.</p>';
46
  }
includes/inpostads/admin-page.php CHANGED
@@ -29,9 +29,9 @@ function wp_insert_inpostads_content($post, $args) {
29
 
30
  if(!isset($data[$location])) { $data[$location] = array(); }
31
  if($location == 'middle') {
32
- $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles', 'minimum_character_count', 'paragraph_buffer_count'));
33
  } else {
34
- $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
35
  }
36
 
37
  $controls = array();
@@ -43,6 +43,8 @@ function wp_insert_inpostads_content($post, $args) {
43
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
44
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
45
 
 
 
46
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
47
  $controls['rules_home_instances'] = wp_insert_get_control('popup', false, $name.'[rules_home_instances]', $id.'-rules_home_instances', $data['rules_home_instances'], '', '', array('type' => 'instances'), '', false);
48
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
@@ -119,6 +121,46 @@ function wp_insert_inpostads_rules_content($controls) {
119
  'class' => 'rules',
120
  'rows' => array()
121
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  array_push(
123
  $rulesTable['rows'],
124
  array(
@@ -290,22 +332,22 @@ function wp_insert_inpostads_rules_content($controls) {
290
  )
291
  )
292
  );
293
- array_push(
294
- $rulesTable['rows'],
295
- array(
296
- 'cells' => array(
297
- array('colspan' => '3', 'content' => '&nbsp;')
298
- )
299
- ),
300
- array(
301
- 'cells' => array(
302
- array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Custom Post Types')
303
- )
304
- )
305
- );
306
 
307
  $post_types = get_post_types(array('public' => true, '_builtin' => false), 'object');
308
  if($post_types) {
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  foreach($post_types as $post_type) {
310
  array_push(
311
  $rulesTable['rows'],
29
 
30
  if(!isset($data[$location])) { $data[$location] = array(); }
31
  if($location == 'middle') {
32
+ $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_loggedin', 'rules_exclude_mobile_devices', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles', 'minimum_character_count', 'paragraph_buffer_count'));
33
  } else {
34
+ $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_loggedin', 'rules_exclude_mobile_devices', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
35
  }
36
 
37
  $controls = array();
43
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
44
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
45
 
46
+ $controls['rules_exclude_loggedin'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_loggedin]', $id.'-rules_exclude_loggedin', $data['rules_exclude_loggedin'], '', '', null, '', false);
47
+ $controls['rules_exclude_mobile_devices'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_mobile_devices]', $id.'-rules_exclude_mobile_devices', $data['rules_exclude_mobile_devices'], '', '', null, '', false);
48
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
49
  $controls['rules_home_instances'] = wp_insert_get_control('popup', false, $name.'[rules_home_instances]', $id.'-rules_home_instances', $data['rules_home_instances'], '', '', array('type' => 'instances'), '', false);
50
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
121
  'class' => 'rules',
122
  'rows' => array()
123
  );
124
+ array_push(
125
+ $rulesTable['rows'],
126
+ array(
127
+ 'cells' => array(
128
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Logged in Users')
129
+ )
130
+ ),
131
+ array(
132
+ 'cells' => array(
133
+ array('content' => 'Status'),
134
+ array('content' => '&nbsp;:&nbsp;'),
135
+ array('content' => $controls['rules_exclude_loggedin']['html'])
136
+ )
137
+ ),
138
+ array(
139
+ 'cells' => array(
140
+ array('colspan' => '3', 'content' => '&nbsp;')
141
+ )
142
+ )
143
+ );
144
+ array_push(
145
+ $rulesTable['rows'],
146
+ array(
147
+ 'cells' => array(
148
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Mobile Devices')
149
+ )
150
+ ),
151
+ array(
152
+ 'cells' => array(
153
+ array('content' => 'Status'),
154
+ array('content' => '&nbsp;:&nbsp;'),
155
+ array('content' => $controls['rules_exclude_mobile_devices']['html'])
156
+ )
157
+ ),
158
+ array(
159
+ 'cells' => array(
160
+ array('colspan' => '3', 'content' => '&nbsp;')
161
+ )
162
+ )
163
+ );
164
  array_push(
165
  $rulesTable['rows'],
166
  array(
332
  )
333
  )
334
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
335
 
336
  $post_types = get_post_types(array('public' => true, '_builtin' => false), 'object');
337
  if($post_types) {
338
+ array_push(
339
+ $rulesTable['rows'],
340
+ array(
341
+ 'cells' => array(
342
+ array('colspan' => '3', 'content' => '&nbsp;')
343
+ )
344
+ ),
345
+ array(
346
+ 'cells' => array(
347
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Custom Post Types')
348
+ )
349
+ )
350
+ );
351
  foreach($post_types as $post_type) {
352
  array_push(
353
  $rulesTable['rows'],
includes/inpostads/content.php CHANGED
@@ -23,7 +23,7 @@ function wp_insert_inpostads_filter_the_content($content) {
23
  $position = wp_insert_inpostads_get_middle_position('/p>', $content, $options['middle']['paragraph_buffer_count']);
24
  }
25
  if($position) {
26
- if(($options['middle']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['middle']['country_1'])))) {
27
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['country_code_1']).'</div>', $position, 3);
28
  } else {
29
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['ad_code_'.$wpInsertAdInstance]).'</div>', $position, 3);
@@ -37,7 +37,7 @@ function wp_insert_inpostads_filter_the_content($content) {
37
  $position = wp_insert_inpostads_get_middle_position('/p>', $content, $options['middle']['paragraph_buffer_count']);
38
  }
39
  if($position) {
40
- if(($options['middle']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['middle']['country_1'])))) {
41
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['country_code_1']).'</div>', $position, 3);
42
  } else {
43
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['ad_code_'.$wpInsertAdInstance]).'</div>', $position, 3);
@@ -48,28 +48,28 @@ function wp_insert_inpostads_filter_the_content($content) {
48
  }
49
  }
50
  if(wp_insert_get_ad_status($options['left'])) {
51
- if(($options['left']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['left']['country_1'])))) {
52
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; '.(($options['left']['styles'] != '')?$options['left']['styles']:'').'">'.do_shortcode($options['left']['country_code_1']).'</div>'.$content;
53
  } else {
54
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; '.(($options['left']['styles'] != '')?$options['left']['styles']:'').'">'.do_shortcode($options['left']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
55
  }
56
  }
57
  if(wp_insert_get_ad_status($options['right'])) {
58
- if(($options['right']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['right']['country_1'])))) {
59
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertRight" style="float: right; '.(($options['right']['styles'] != '')?$options['right']['styles']:'').'">'.do_shortcode($options['right']['country_code_1']).'</div>'.$content;
60
  } else {
61
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertRight" style="float: right; '.(($options['right']['styles'] != '')?$options['right']['styles']:'').'">'.do_shortcode($options['right']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
62
  }
63
  }
64
  if(wp_insert_get_ad_status($options['above'])) {
65
- if(($options['above']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['above']['country_1'])))) {
66
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertAbove"'.(($options['above']['styles'] != '')?' style="'.$options['above']['styles'].'"':'').'>'.do_shortcode($options['above']['country_code_1']).'</div>'.$content;
67
  } else {
68
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertAbove"'.(($options['above']['styles'] != '')?' style="'.$options['above']['styles'].'"':'').'>'.do_shortcode($options['above']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
69
  }
70
  }
71
  if(wp_insert_get_ad_status($options['below'])) {
72
- if(($options['below']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['below']['country_1'])))) {
73
  $content = $content.'<div class="wpInsert wpInsertInPostAd wpInsertBelow"'.(($options['below']['styles'] != '')?' style="'.$options['below']['styles'].'"':'').'>'.do_shortcode($options['below']['country_code_1']).'</div>';
74
  } else {
75
  $content = $content.'<div class="wpInsert wpInsertInPostAd wpInsertBelow"'.(($options['below']['styles'] != '')?' style="'.$options['below']['styles'].'"':'').'>'.do_shortcode($options['below']['ad_code_'.$wpInsertAdInstance]).'</div>';
23
  $position = wp_insert_inpostads_get_middle_position('/p>', $content, $options['middle']['paragraph_buffer_count']);
24
  }
25
  if($position) {
26
+ if(($options['middle']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['middle']['country_1'])))) {
27
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['country_code_1']).'</div>', $position, 3);
28
  } else {
29
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['ad_code_'.$wpInsertAdInstance]).'</div>', $position, 3);
37
  $position = wp_insert_inpostads_get_middle_position('/p>', $content, $options['middle']['paragraph_buffer_count']);
38
  }
39
  if($position) {
40
+ if(($options['middle']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['middle']['country_1'])))) {
41
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['country_code_1']).'</div>', $position, 3);
42
  } else {
43
  $content = substr_replace($content, '/p>'.'<div class="wpInsert wpInsertInPostAd wpInsertMiddle"'.(($options['middle']['styles'] != '')?' style="'.$options['middle']['styles'].'"':'').'>'.do_shortcode($options['middle']['ad_code_'.$wpInsertAdInstance]).'</div>', $position, 3);
48
  }
49
  }
50
  if(wp_insert_get_ad_status($options['left'])) {
51
+ if(($options['left']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['left']['country_1'])))) {
52
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; '.(($options['left']['styles'] != '')?$options['left']['styles']:'').'">'.do_shortcode($options['left']['country_code_1']).'</div>'.$content;
53
  } else {
54
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; '.(($options['left']['styles'] != '')?$options['left']['styles']:'').'">'.do_shortcode($options['left']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
55
  }
56
  }
57
  if(wp_insert_get_ad_status($options['right'])) {
58
+ if(($options['right']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['right']['country_1'])))) {
59
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertRight" style="float: right; '.(($options['right']['styles'] != '')?$options['right']['styles']:'').'">'.do_shortcode($options['right']['country_code_1']).'</div>'.$content;
60
  } else {
61
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertRight" style="float: right; '.(($options['right']['styles'] != '')?$options['right']['styles']:'').'">'.do_shortcode($options['right']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
62
  }
63
  }
64
  if(wp_insert_get_ad_status($options['above'])) {
65
+ if(($options['above']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['above']['country_1'])))) {
66
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertAbove"'.(($options['above']['styles'] != '')?' style="'.$options['above']['styles'].'"':'').'>'.do_shortcode($options['above']['country_code_1']).'</div>'.$content;
67
  } else {
68
  $content = '<div class="wpInsert wpInsertInPostAd wpInsertAbove"'.(($options['above']['styles'] != '')?' style="'.$options['above']['styles'].'"':'').'>'.do_shortcode($options['above']['ad_code_'.$wpInsertAdInstance]).'</div>'.$content;
69
  }
70
  }
71
  if(wp_insert_get_ad_status($options['below'])) {
72
+ if(($options['below']['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['below']['country_1'])))) {
73
  $content = $content.'<div class="wpInsert wpInsertInPostAd wpInsertBelow"'.(($options['below']['styles'] != '')?' style="'.$options['below']['styles'].'"':'').'>'.do_shortcode($options['below']['country_code_1']).'</div>';
74
  } else {
75
  $content = $content.'<div class="wpInsert wpInsertInPostAd wpInsertBelow"'.(($options['below']['styles'] != '')?' style="'.$options['below']['styles'].'"':'').'>'.do_shortcode($options['below']['ad_code_'.$wpInsertAdInstance]).'</div>';
includes/templateads/admin-page.php CHANGED
@@ -43,7 +43,7 @@ function wp_insert_templateads_content($post, $args) {
43
  $name = $args['args']['name'].'['.$location.']';
44
 
45
  if(!isset($data[$location])) { $data[$location] = array(); }
46
- $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
@@ -54,6 +54,8 @@ function wp_insert_templateads_content($post, $args) {
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
 
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
59
  $controls['rules_exclude_categories'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_categories]', $id.'-rules_exclude_categories', $data['rules_exclude_categories'], '', '', null, '', false);
@@ -116,6 +118,46 @@ function wp_insert_templateads_rules_content($controls) {
116
  'class' => 'rules',
117
  'rows' => array()
118
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  array_push(
120
  $rulesTable['rows'],
121
  array(
43
  $name = $args['args']['name'].'['.$location.']';
44
 
45
  if(!isset($data[$location])) { $data[$location] = array(); }
46
+ $data = wp_insert_sanitize_array($data[$location], array('status', 'ad_code_1', 'ad_code_2', 'ad_code_3', 'country_1', 'country_code_1', 'rules_exclude_loggedin', 'rules_exclude_mobile_devices', 'rules_exclude_home', 'rules_exclude_archives', 'rules_exclude_categories', 'rules_categories_exceptions', 'rules_categories_post_exceptions', 'rules_exclude_search', 'rules_exclude_page', 'rules_page_exceptions', 'rules_exclude_post', 'rules_post_exceptions', 'styles'));
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
  $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
57
+ $controls['rules_exclude_loggedin'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_loggedin]', $id.'-rules_exclude_loggedin', $data['rules_exclude_loggedin'], '', '', null, '', false);
58
+ $controls['rules_exclude_mobile_devices'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_mobile_devices]', $id.'-rules_exclude_mobile_devices', $data['rules_exclude_mobile_devices'], '', '', null, '', false);
59
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
60
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
61
  $controls['rules_exclude_categories'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_categories]', $id.'-rules_exclude_categories', $data['rules_exclude_categories'], '', '', null, '', false);
118
  'class' => 'rules',
119
  'rows' => array()
120
  );
121
+ array_push(
122
+ $rulesTable['rows'],
123
+ array(
124
+ 'cells' => array(
125
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Logged in Users')
126
+ )
127
+ ),
128
+ array(
129
+ 'cells' => array(
130
+ array('content' => 'Status'),
131
+ array('content' => '&nbsp;:&nbsp;'),
132
+ array('content' => $controls['rules_exclude_loggedin']['html'])
133
+ )
134
+ ),
135
+ array(
136
+ 'cells' => array(
137
+ array('colspan' => '3', 'content' => '&nbsp;')
138
+ )
139
+ )
140
+ );
141
+ array_push(
142
+ $rulesTable['rows'],
143
+ array(
144
+ 'cells' => array(
145
+ array('style' => 'text-align: left;', 'colspan' => '3', 'type' => 'th', 'content' => 'Mobile Devices')
146
+ )
147
+ ),
148
+ array(
149
+ 'cells' => array(
150
+ array('content' => 'Status'),
151
+ array('content' => '&nbsp;:&nbsp;'),
152
+ array('content' => $controls['rules_exclude_mobile_devices']['html'])
153
+ )
154
+ ),
155
+ array(
156
+ 'cells' => array(
157
+ array('colspan' => '3', 'content' => '&nbsp;')
158
+ )
159
+ )
160
+ );
161
  array_push(
162
  $rulesTable['rows'],
163
  array(
includes/templateads/template-tag.php CHANGED
@@ -8,7 +8,7 @@ function wp_template_ad($instance) {
8
  $options = get_option('wp_insert_more_templateads_options');
9
  }
10
  if(wp_insert_get_ad_status($options['templateads-'.$instance])) {
11
- if(($options['templateads-'.$instance]['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, split(',', $options['templateads-'.$instance]['country_1'])))) {
12
  echo '<div class="wpInsert wpInsertTemplateTag"'.(($options['templateads-'.$instance]['styles'] != '')?' style="'.$options['templateads-'.$instance]['styles'].'"':'').'>'.do_shortcode($options['templateads-'.$instance]['country_code_1']).'</div>';
13
  } else {
14
  echo '<div class="wpInsert wpInsertTemplateTag"'.(($options['templateads-'.$instance]['styles'] != '')?' style="'.$options['templateads-'.$instance]['styles'].'"':'').'>'.do_shortcode($options['templateads-'.$instance]['ad_code_'.$wpInsertAdInstance]).'</div>';
8
  $options = get_option('wp_insert_more_templateads_options');
9
  }
10
  if(wp_insert_get_ad_status($options['templateads-'.$instance])) {
11
+ if(($options['templateads-'.$instance]['country_1'] != '') && ($wpInsertGeoLocation != '') && (in_array($wpInsertGeoLocation, explode(',', $options['templateads-'.$instance]['country_1'])))) {
12
  echo '<div class="wpInsert wpInsertTemplateTag"'.(($options['templateads-'.$instance]['styles'] != '')?' style="'.$options['templateads-'.$instance]['styles'].'"':'').'>'.do_shortcode($options['templateads-'.$instance]['country_code_1']).'</div>';
13
  } else {
14
  echo '<div class="wpInsert wpInsertTemplateTag"'.(($options['templateads-'.$instance]['styles'] != '')?' style="'.$options['templateads-'.$instance]['styles'].'"':'').'>'.do_shortcode($options['templateads-'.$instance]['ad_code_'.$wpInsertAdInstance]).'</div>';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Namith Jawahar
3
  Donate link:www.wp-insert.smartlogix.co.in/support
4
  Tags: adsense,google,widget,post,admin,plugin,ads,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 3.2
6
- Tested up to: 3.8
7
- Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
3
  Donate link:www.wp-insert.smartlogix.co.in/support
4
  Tags: adsense,google,widget,post,admin,plugin,ads,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 3.2
6
+ Tested up to: 3.9.2
7
+ Stable tag: 2.0.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
wp-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Wp-Insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
6
- Version: 2.0.9
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
@@ -31,7 +31,7 @@ if(!defined('WP_INSERT_URL'))
31
  if(!defined('WP_INSERT_DIR'))
32
  define('WP_INSERT_DIR',WP_PLUGIN_DIR.'/wp-insert');
33
  if(!defined('WP_INSERT_VERSION'))
34
- define('WP_INSERT_VERSION', '2.0.8');
35
  /*Includes*/
36
  require_once (dirname(__FILE__).'/includes/includes.php');
37
  ?>
3
  Plugin Name: Wp-Insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
6
+ Version: 2.0.10
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
31
  if(!defined('WP_INSERT_DIR'))
32
  define('WP_INSERT_DIR',WP_PLUGIN_DIR.'/wp-insert');
33
  if(!defined('WP_INSERT_VERSION'))
34
+ define('WP_INSERT_VERSION', '2.0.10');
35
  /*Includes*/
36
  require_once (dirname(__FILE__).'/includes/includes.php');
37
  ?>