Wp-Insert - Version 1.7.2

Version Description

Download this release

Release Info

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

Code changes from version 1.7.1 to 1.7.2

css/adminStyle.css CHANGED
@@ -81,4 +81,8 @@ background-color: #efefef;
81
  #wp_insert_page_list li img.handle {
82
  margin-right: 20px;
83
  cursor: move;
 
 
 
 
84
  }
81
  #wp_insert_page_list li img.handle {
82
  margin-right: 20px;
83
  cursor: move;
84
+ }
85
+
86
+ .column-postID {
87
+ width: 3em;
88
  }
includes/dashboardwidget.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('wp_dashboard_setup', 'wp_insert_add_dashboard_widgets' );
3
+ function wp_insert_dashboard_widget_function() {
4
+ include_once(ABSPATH . WPINC . '/feed.php');
5
+ $rss = fetch_feed('http://www.wp-insert.smartlogix.co.in/feed/');
6
+ if (!is_wp_error( $rss ) ) :
7
+ $maxitems = $rss->get_item_quantity(10);
8
+ $rss_items = $rss->get_items(0, $maxitems);
9
+ endif;
10
+ ?>
11
+ <ul>
12
+ <?php if ($maxitems == 0) echo '<li>No items.</li>';
13
+ else
14
+ foreach ($rss_items as $item) : ?>
15
+ <li><a href='<?php echo $item->get_permalink(); ?>'><?php echo $item->get_title(); ?></a></li>
16
+ <?php endforeach; ?>
17
+ </ul>
18
+ <?php
19
+ }
20
+
21
+ function wp_insert_add_dashboard_widgets() {
22
+ wp_add_dashboard_widget('wp_insert_dashboard_widget', 'Wp-Insert News', 'wp_insert_dashboard_widget_function');
23
+ }
24
+ ?>
includes/essentials.php CHANGED
@@ -135,5 +135,6 @@ require_once (dirname(__FILE__) . '/syntax-highlighter.php');
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
136
  require_once (dirname(__FILE__) . '/tandc.php');
137
  require_once (dirname(__FILE__) . '/feeds.php');
138
-
 
139
  ?>
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
136
  require_once (dirname(__FILE__) . '/tandc.php');
137
  require_once (dirname(__FILE__) . '/feeds.php');
138
+ require_once (dirname(__FILE__) . '/miscellaneous.php');
139
+ require_once (dirname(__FILE__) . '/dashboardwidget.php');
140
  ?>
includes/menu.php CHANGED
@@ -50,7 +50,12 @@ function wp_insert_add_menu() {
50
  'Title' => 'WYSIWYG Editor',
51
  'Handle' => 'manage-wysiwyg-editing',
52
  'Function' => 'smart_add_wysiwyg_pages'
53
- )
 
 
 
 
 
54
  );
55
 
56
  foreach($subMenuItems as $subMenuItem) {
50
  'Title' => 'WYSIWYG Editor',
51
  'Handle' => 'manage-wysiwyg-editing',
52
  'Function' => 'smart_add_wysiwyg_pages'
53
+ ),
54
+ 'miscellaneous' => array(
55
+ 'Title' => 'Miscellaneous',
56
+ 'Handle' => 'miscellaneous_options',
57
+ 'Function' => 'wp_insert_miscellaneous_pages'
58
+ ),
59
  );
60
 
61
  foreach($subMenuItems as $subMenuItem) {
includes/miscellaneous.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('admin_menu','wp_insert_update_notification');
3
+ add_action('widgets_init', 'wp_insert_unregister_widgets');
4
+
5
+ function wp_insert_update_notification() {
6
+ if(get_option('wp_insert_hide_core_update_notification_enable')) {
7
+ remove_action('admin_notices', 'update_nag', 3);
8
+ remove_filter('update_footer', 'core_update_footer');
9
+ }
10
+
11
+ if(get_option('wp_insert_show_id_enable')) {
12
+ add_filter('manage_posts_columns', 'wp_insert_posts_columns_header');
13
+ add_filter('manage_posts_custom_column', 'wp_insert_posts_columns_row', 10, 2);
14
+
15
+ add_filter('manage_pages_columns', 'wp_insert_posts_columns_header');
16
+ add_filter('manage_pages_custom_column', 'wp_insert_posts_columns_row', 10, 2);
17
+ }
18
+
19
+ if(get_option('wp_insert_load_theme_styles_enable')) {
20
+ add_filter('mce_css', 'wp_insert_editor_style');
21
+ }
22
+ }
23
+
24
+ function wp_insert_unregister_widgets() {
25
+ if(get_option('wp_insert_hide_default_widgets_enable')) {
26
+ unregister_widget('WP_Widget_Pages');
27
+ unregister_widget('WP_Widget_Calendar');
28
+ unregister_widget('WP_Widget_Archives');
29
+ unregister_widget('WP_Widget_Links');
30
+ unregister_widget('WP_Widget_Categories');
31
+ unregister_widget('WP_Widget_Recent_Posts');
32
+ unregister_widget('WP_Widget_Search');
33
+ unregister_widget('WP_Widget_Tag_Cloud');
34
+ unregister_widget('WP_Widget_Meta');
35
+ unregister_widget('WP_Widget_Recent_Comments');
36
+ unregister_widget('WP_Widget_RSS');
37
+ //unregister_widget('WP_Widget_Text');
38
+ }
39
+ }
40
+
41
+ function wp_insert_posts_columns_header($columns) {
42
+ $columns = array_merge(array_slice($columns, 0, 1), array('postID' => 'ID'),array_slice($columns, 1, count($columns)));
43
+ return $columns;
44
+ }
45
+ function wp_insert_posts_columns_row($columnTitle, $postID){
46
+ if($columnTitle == 'postID'){
47
+ echo $postID;
48
+ }
49
+ }
50
+
51
+ function wp_insert_editor_style($url) {
52
+ if (!empty($url)) $url .= ',';
53
+ $url .= trailingslashit(get_stylesheet_directory_uri()).'style.css';
54
+ return $url;
55
+ }
56
+
57
+
58
+ function wp_insert_miscellaneous_pages() {
59
+ global $screen_layout_columns;
60
+
61
+ add_meta_box('wp_insert_miscellaneous_core_update_notification', 'Hide Core Update Notification', 'wp_insert_miscellaneous_core_update_notification_HTML', 'col_1');
62
+ add_meta_box('wp_insert_hide_default_widgets', 'Hide Default Widgets', 'wp_insert_hide_default_widgets_HTML', 'col_1');
63
+ add_meta_box('wp_insert_show_id', 'Show ID in Post & Page Listing', 'wp_insert_show_id_HTML', 'col_1');
64
+ add_meta_box('wp_insert_load_theme_styles', 'Load theme styles in Visual Editor', 'wp_insert_load_theme_styles_HTML', 'col_1');
65
+
66
+ $parameters = 'wp_insert_hide_core_update_notification_enable, wp_insert_hide_default_widgets_enable, wp_insert_show_id_enable, wp_insert_load_theme_styles_enable';
67
+ wp_insert_settings_page_layout($parameters, 'WP-INSERT : Miscellaneous Options', 'miscellaneous');
68
+ }
69
+
70
+ function wp_insert_miscellaneous_core_update_notification_HTML() { ?>
71
+ <div>
72
+ <?php if(get_option('wp_insert_hide_core_update_notification_enable')) { ?>
73
+ <input type="button" id="wp_insert_hide_core_update_notification_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_hide_core_update_notification_enable_button', '#wp_insert_hide_core_update_notification_enable')"/>
74
+ <?php } else { ?>
75
+ <input type="button" id="wp_insert_hide_core_update_notification_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_hide_core_update_notification_enable_button', '#wp_insert_hide_core_update_notification_enable')"/>
76
+ <?php } ?>
77
+ <input style="display:none;" id="wp_insert_hide_core_update_notification_enable" name="wp_insert_hide_core_update_notification_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_hide_core_update_notification_enable')) echo ' checked="checked"'; ?> />
78
+ <p>
79
+ <small>
80
+ You can hide the message which says : "WordPress XX.XX.XX is available! Please update now." if you dont want users to accidently upgrade the core when you suspect an upgrade might break a feature.
81
+ </small>
82
+ </p>
83
+ </div>
84
+ <?php }
85
+
86
+ function wp_insert_hide_default_widgets_HTML() { ?>
87
+ <div>
88
+ <?php if(get_option('wp_insert_hide_default_widgets_enable')) { ?>
89
+ <input type="button" id="wp_insert_hide_default_widgets_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_hide_default_widgets_enable_button', '#wp_insert_hide_default_widgets_enable')"/>
90
+ <?php } else { ?>
91
+ <input type="button" id="wp_insert_hide_default_widgets_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_hide_default_widgets_enable_button', '#wp_insert_hide_default_widgets_enable')"/>
92
+ <?php } ?>
93
+ <input style="display:none;" id="wp_insert_hide_default_widgets_enable" name="wp_insert_hide_default_widgets_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_hide_default_widgets_enable')) echo ' checked="checked"'; ?> />
94
+ <p>
95
+ <small>
96
+ Disables all default widgets except the Text Widget
97
+ </small>
98
+ </p>
99
+ </div>
100
+ <?php }
101
+
102
+ function wp_insert_show_id_HTML() { ?>
103
+ <div>
104
+ <?php if(get_option('wp_insert_show_id_enable')) { ?>
105
+ <input type="button" id="wp_insert_show_id_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_show_id_enable_button', '#wp_insert_show_id_enable')"/>
106
+ <?php } else { ?>
107
+ <input type="button" id="wp_insert_show_id_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_show_id_enable_button', '#wp_insert_show_id_enable')"/>
108
+ <?php } ?>
109
+ <input style="display:none;" id="wp_insert_show_id_enable" name="wp_insert_show_id_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_show_id_enable')) echo ' checked="checked"'; ?> />
110
+ <p>
111
+ <small>
112
+ Disables all default widgets except the Text Widget
113
+ </small>
114
+ </p>
115
+ </div>
116
+ <?php }
117
+
118
+ function wp_insert_load_theme_styles_HTML() { ?>
119
+ <div>
120
+ <?php if(get_option('wp_insert_load_theme_styles_enable')) { ?>
121
+ <input type="button" id="wp_insert_load_theme_styles_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_load_theme_styles_enable_button', '#wp_insert_load_theme_styles_enable')"/>
122
+ <?php } else { ?>
123
+ <input type="button" id="wp_insert_load_theme_styles_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_load_theme_styles_enable_button', '#wp_insert_load_theme_styles_enable')"/>
124
+ <?php } ?>
125
+ <input style="display:none;" id="wp_insert_load_theme_styles_enable" name="wp_insert_load_theme_styles_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_load_theme_styles_enable')) echo ' checked="checked"'; ?> />
126
+ <p>
127
+ <small>
128
+ Disables all default widgets except the Text Widget
129
+ </small>
130
+ </p>
131
+ </div>
132
+ <?php }
133
+ ?>
includes/postpicker.php CHANGED
@@ -227,15 +227,22 @@ function ShowPostPicker(sender) {
227
  divPopup = CreatePopUp("Select Posts/Pages", 525, 390, YPos(sender) - 375, XPos(sender) + 150);
228
 
229
  <?php
230
- $pages = get_pages('numberposts=100&sort_column=menu_order');
231
- $posts = get_posts('numberposts=100&sort_column=desc');
 
232
  $allposts = "<select multiple name='fromBox' id='fromBox'>";
233
  $selectedposts = "<select multiple name='toBox' id='toBox'></select>";
234
  foreach($pages as $page) {
235
- $allposts .= "<option value='".$page->ID."'>".$page->post_title."</option>";
 
 
 
236
  }
237
  foreach($posts as $post) {
238
- $allposts .= "<option value='".$post->ID."'>".$post->post_title."</option>";
 
 
 
239
  }
240
  $allposts .= "</select>";
241
  echo 'divPopup.innerHTML = "'.$allposts.$selectedposts.'";';
@@ -260,4 +267,4 @@ function ShowPostPicker(sender) {
260
  document.getElementById('fromBox').focus();
261
  return false;
262
  }
263
- </script>
227
  divPopup = CreatePopUp("Select Posts/Pages", 525, 390, YPos(sender) - 375, XPos(sender) + 150);
228
 
229
  <?php
230
+ $count = 0;
231
+ $pages = get_pages('sort_column=menu_order');
232
+ $posts = get_posts('numberposts=-1&sort_column=desc');
233
  $allposts = "<select multiple name='fromBox' id='fromBox'>";
234
  $selectedposts = "<select multiple name='toBox' id='toBox'></select>";
235
  foreach($pages as $page) {
236
+ if($count < 100) {
237
+ $allposts .= "<option value='".$page->ID."'>".$page->post_title."</option>";
238
+ }
239
+ $count++;
240
  }
241
  foreach($posts as $post) {
242
+ if($count < 100) {
243
+ $allposts .= "<option value='".$post->ID."'>".$post->post_title."</option>";
244
+ }
245
+ $count++;
246
  }
247
  $allposts .= "</select>";
248
  echo 'divPopup.innerHTML = "'.$allposts.$selectedposts.'";';
267
  document.getElementById('fromBox').focus();
268
  return false;
269
  }
270
+ </script>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Namith Jawahar
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
  Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,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: 2.7
6
- Tested up to: 3.0
7
- Stable tag: 1.7.1
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
@@ -15,9 +15,8 @@ Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin
15
  Wp-Insert can manage your feeds, google analytics, blog editing and even make editing your themes easier for you.
16
  All from within a well contained and easy to use interface.
17
  **Features**
18
- Manage Ads (Completely Rewritten with a New and Powerful Interface)
19
- **Multiple Ad Network Support.** (You can now run any ad-network along with adsense or any other network)
20
- (Give the New Ad Manager a try)
21
  *In post ads - Allows you to insert your ads around and inside your content*
22
 
23
  * Allows copy/past of html, adsense and other ads code
@@ -88,8 +87,12 @@ Manage Ads (Completely Rewritten with a New and Powerful Interface)
88
  * Syntax HighLighting for theme editor
89
  * Syntax Highlighting for plugin editor
90
  * Different highlighting for different file types
91
- * Syntax Highlighting for Code snippets in posts and pages
92
- * Syntax Highlighting for Code in post and pages using shortcodes and custom fields.
 
 
 
 
93
 
94
  All these features in an easy to use and novice user friendly interface which can still cater to the geekiest of webmasters.
95
 
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
  Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,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: 2.7
6
+ Tested up to: 3.0.1
7
+ Stable tag: 1.7.2
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
15
  Wp-Insert can manage your feeds, google analytics, blog editing and even make editing your themes easier for you.
16
  All from within a well contained and easy to use interface.
17
  **Features**
18
+ **Manage Ads**
19
+ *Multiple Ad Network Support.* (You can now run any ad-network along with adsense or any other network)
 
20
  *In post ads - Allows you to insert your ads around and inside your content*
21
 
22
  * Allows copy/past of html, adsense and other ads code
87
  * Syntax HighLighting for theme editor
88
  * Syntax Highlighting for plugin editor
89
  * Different highlighting for different file types
90
+ * Syntax Highlighting for Code snippets in posts and pages
91
+ * Syntax Highlighting for Code in post and pages using shortcodes and custom fields.
92
+
93
+ **Miscellaneous Options**
94
+
95
+ * Several miscellaneous Options
96
 
97
  All these features in an easy to use and novice user friendly interface which can still cater to the geekiest of webmasters.
98
 
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: The ultimate wordpress plugin
6
- Version: 1.7.1
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
+ Version: 1.7.2
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin