WP News and Scrolling Widgets - Version 3.2.11

Version Description

(09/12/2016) = * [*] Resolved conflict when 'WP News and Widget - Masonry Layout' plugin is activated.

Download this release

Release Info

Developer anoopranawat
Plugin Icon 128x128 WP News and Scrolling Widgets
Version 3.2.11
Comparing to
See all releases

Code changes from version 3.2.9 to 3.2.11

admin/wpnw-how-it-work.php ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Pro Designs and Plugins Feed
4
+ *
5
+ * @package WP News and Scrolling Widgets
6
+ * @since 1.0.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( !defined( 'ABSPATH' ) ) exit;
11
+
12
+ // Action to add menu
13
+ add_action('admin_menu', 'wpnw_register_design_page');
14
+
15
+ /**
16
+ * Register plugin design page in admin menu
17
+ *
18
+ * @package WP News and Scrolling Widgets
19
+ * @since 1.0.0
20
+ */
21
+ function wpnw_register_design_page() {
22
+ add_submenu_page( 'edit.php?post_type='.WPNW_POST_TYPE, __('How it works, our plugins and offers', 'sp-news-and-widget'), __('How It Works', 'sp-news-and-widget'), 'manage_options', 'wpnw-designs', 'wpnw_designs_page' );
23
+ }
24
+
25
+ /**
26
+ * Function to display plugin design HTML
27
+ *
28
+ * @package WP News and Scrolling Widgets
29
+ * @since 1.0.0
30
+ */
31
+ function wpnw_designs_page() {
32
+
33
+ $wpos_feed_tabs = wpnw_help_tabs();
34
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'how-it-work';
35
+ ?>
36
+
37
+ <div class="wrap wpnwm-wrap">
38
+
39
+ <h2 class="nav-tab-wrapper">
40
+ <?php
41
+ foreach ($wpos_feed_tabs as $tab_key => $tab_val) {
42
+ $tab_name = $tab_val['name'];
43
+ $active_cls = ($tab_key == $active_tab) ? 'nav-tab-active' : '';
44
+ $tab_link = add_query_arg( array( 'post_type' => WPNW_POST_TYPE, 'page' => 'wpnw-designs', 'tab' => $tab_key), admin_url('edit.php') );
45
+ ?>
46
+
47
+ <a class="nav-tab <?php echo $active_cls; ?>" href="<?php echo $tab_link; ?>"><?php echo $tab_name; ?></a>
48
+
49
+ <?php } ?>
50
+ </h2>
51
+
52
+ <div class="wpnwm-tab-cnt-wrp">
53
+ <?php
54
+ if( isset($active_tab) && $active_tab == 'how-it-work' ) {
55
+ wpnw_howitwork_page();
56
+ }
57
+ else if( isset($active_tab) && $active_tab == 'plugins-feed' ) {
58
+ echo wpnw_get_plugin_design( 'plugins-feed' );
59
+ } else {
60
+ echo wpnw_get_plugin_design( 'offers-feed' );
61
+ }
62
+ ?>
63
+ </div><!-- end .wpnwm-tab-cnt-wrp -->
64
+
65
+ </div><!-- end .wpnwm-wrap -->
66
+
67
+ <?php
68
+ }
69
+
70
+ /**
71
+ * Gets the plugin design part feed
72
+ *
73
+ * @package WP News and Scrolling Widgets
74
+ * @since 1.0.0
75
+ */
76
+ function wpnw_get_plugin_design( $feed_type = '' ) {
77
+
78
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : '';
79
+
80
+ // If tab is not set then return
81
+ if( empty($active_tab) ) {
82
+ return false;
83
+ }
84
+
85
+ // Taking some variables
86
+ $wpos_feed_tabs = wpnw_help_tabs();
87
+ $transient_key = isset($wpos_feed_tabs[$active_tab]['transient_key']) ? $wpos_feed_tabs[$active_tab]['transient_key'] : 'wpnwm_' . $active_tab;
88
+ $url = isset($wpos_feed_tabs[$active_tab]['url']) ? $wpos_feed_tabs[$active_tab]['url'] : '';
89
+ $transient_time = isset($wpos_feed_tabs[$active_tab]['transient_time']) ? $wpos_feed_tabs[$active_tab]['transient_time'] : 172800;
90
+ $cache = get_transient( $transient_key );
91
+
92
+ if ( false === $cache ) {
93
+
94
+ $feed = wp_remote_get( esc_url_raw( $url ), array( 'timeout' => 120, 'sslverify' => false ) );
95
+ $response_code = wp_remote_retrieve_response_code( $feed );
96
+
97
+ if ( ! is_wp_error( $feed ) && $response_code == 200 ) {
98
+ if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
99
+ $cache = wp_remote_retrieve_body( $feed );
100
+ set_transient( $transient_key, $cache, $transient_time );
101
+ }
102
+ } else {
103
+ $cache = '<div class="error"><p>' . __( 'There was an error retrieving the data from the server. Please try again later.', 'sp-news-and-widget' ) . '</div>';
104
+ }
105
+ }
106
+ return $cache;
107
+ }
108
+
109
+ /**
110
+ * Function to get plugin feed tabs
111
+ *
112
+ * @package WP News and Scrolling Widgets
113
+ * @since 1.0.0
114
+ */
115
+ function wpnw_help_tabs() {
116
+ $wpos_feed_tabs = array(
117
+ 'how-it-work' => array(
118
+ 'name' => __('How It Works', 'sp-news-and-widget'),
119
+ ),
120
+ 'plugins-feed' => array(
121
+ 'name' => __('Our Plugins', 'sp-news-and-widget'),
122
+ 'url' => 'http://wponlinesupport.com/plugin-data-api/plugins-data.php',
123
+ 'transient_key' => 'wpos_plugins_feed',
124
+ 'transient_time' => 172800
125
+ ),
126
+ 'offers-feed' => array(
127
+ 'name' => __('WPOS Offers', 'sp-news-and-widget'),
128
+ 'url' => 'http://wponlinesupport.com/plugin-data-api/wpos-offers.php',
129
+ 'transient_key' => 'wpos_offers_feed',
130
+ 'transient_time' => 86400,
131
+ )
132
+ );
133
+ return $wpos_feed_tabs;
134
+ }
135
+
136
+ /**
137
+ * Function to get 'How It Works' HTML
138
+ *
139
+ * @package WP News and Scrolling Widgets
140
+ * @since 1.0.0
141
+ */
142
+ function wpnw_howitwork_page() { ?>
143
+
144
+ <style type="text/css">
145
+ .wpos-pro-box .hndle{background-color:#0073AA; color:#fff;}
146
+ .wpos-pro-box .postbox{background:#dbf0fa none repeat scroll 0 0; border:1px solid #0073aa; color:#191e23;}
147
+ .postbox-container .wpos-list li:before{font-family: dashicons; content: "\f139"; font-size:20px; color: #0073aa; vertical-align: middle;}
148
+ .wpnwm-wrap .wpos-button-full{display:block; text-align:center; box-shadow:none; border-radius:0;}
149
+ .wpnwm-shortcode-preview{background-color: #e7e7e7; font-weight: bold; padding: 2px 5px; display: inline-block; margin:0 0 2px 0;}
150
+ </style>
151
+
152
+ <div class="post-box-container">
153
+ <div id="poststuff">
154
+ <div id="post-body" class="metabox-holder columns-2">
155
+
156
+ <!--How it workd HTML -->
157
+ <div id="post-body-content">
158
+ <div class="metabox-holder">
159
+ <div class="meta-box-sortables ui-sortable">
160
+ <div class="postbox">
161
+
162
+ <h3 class="hndle">
163
+ <span><?php _e( 'How It Works - Display and shortcode', 'sp-news-and-widget' ); ?></span>
164
+ </h3>
165
+
166
+ <div class="inside">
167
+ <table class="form-table">
168
+ <tbody>
169
+ <tr>
170
+ <th>
171
+ <label><?php _e('Geeting Started with News and widget', 'sp-news-and-widget'); ?>:</label>
172
+ </th>
173
+ <td>
174
+ <ul>
175
+ <li><?php _e('Step-1: This plugin create a News menu tab in WordPress menu with custom post type.".', 'sp-news-and-widget'); ?></li>
176
+ <li><?php _e('Step-2: Go to "News --> Add news item tab".', 'sp-news-and-widget'); ?></li>
177
+ <li><?php _e('Step-3: Add blog title, description, category, and images as featured image.', 'sp-news-and-widget'); ?></li>
178
+ <li><?php _e('Step-4: Repeat this process and add multiple news item', 'sp-news-and-widget'); ?></li>
179
+ <li><?php _e('Step-4: To display news category wise you can use category shortcode under "News --> News category"', 'sp-news-and-widget'); ?></li>
180
+ </ul>
181
+ </td>
182
+ </tr>
183
+
184
+ <tr>
185
+ <th>
186
+ <label><?php _e('How Shortcode Works', 'sp-news-and-widget'); ?>:</label>
187
+ </th>
188
+ <td>
189
+ <ul>
190
+ <li><?php _e('Step-1. Create a page like Our News OR Latest News.', 'sp-news-and-widget'); ?></li>
191
+ <li><?php _e('<b>Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"</b>', 'sp-news-and-widget'); ?></li>
192
+ <li><?php _e('Step-2. Put below shortcode as per your need.', 'sp-news-and-widget'); ?></li>
193
+ </ul>
194
+ </td>
195
+ </tr>
196
+
197
+ <tr>
198
+ <th>
199
+ <label><?php _e('All Shortcodes', 'sp-news-and-widget'); ?>:</label>
200
+ </th>
201
+ <td>
202
+ <span class="wpnwm-shortcode-preview">[sp_news grid="list"]</span> – <?php _e('News in List View', 'sp-news-and-widget'); ?> <br />
203
+ <span class="wpnwm-shortcode-preview">[sp_news grid="1"]</span> – <?php _e('Display News in grid 1', 'sp-news-and-widget'); ?> <br />
204
+ <span class="wpnwm-shortcode-preview">[sp_news grid="2"]</span> – <?php _e('Display News in grid 2', 'sp-news-and-widget'); ?> <br />
205
+ <span class="wpnwm-shortcode-preview">[sp_news grid="3"]</span> – <?php _e('Display News in grid 3', 'sp-news-and-widget'); ?>
206
+ </td>
207
+ </tr>
208
+
209
+ <tr>
210
+ <th>
211
+ <label><?php _e('Need Support?', 'sp-news-and-widget'); ?></label>
212
+ </th>
213
+ <td>
214
+ <p><?php _e('Check plugin document for shortcode parameters and demo for designs.', 'sp-news-and-widget'); ?></p> <br/>
215
+ <a class="button button-primary" href="https://www.wponlinesupport.com/plugins-documentation/document-wp-news-and-scrolling-widgets/?utm_source=hp&event=doc" target="_blank"><?php _e('Documentation', 'sp-news-and-widget'); ?></a>
216
+ <a class="button button-primary" href="http://demo.wponlinesupport.com/sp-news/?utm_source=hp&event=demo" target="_blank"><?php _e('Demo for Designs', 'sp-news-and-widget'); ?></a>
217
+ </td>
218
+ </tr>
219
+ </tbody>
220
+ </table>
221
+ </div><!-- .inside -->
222
+ </div><!-- #general -->
223
+ </div><!-- .meta-box-sortables ui-sortable -->
224
+ </div><!-- .metabox-holder -->
225
+ </div><!-- #post-body-content -->
226
+
227
+ <!--Upgrad to Pro HTML -->
228
+ <div id="postbox-container-1" class="postbox-container">
229
+ <div class="metabox-holder wpos-pro-box">
230
+ <div class="meta-box-sortables ui-sortable">
231
+ <div class="postbox" style="">
232
+
233
+ <h3 class="hndle">
234
+ <span><?php _e( 'Upgrate to Pro', 'sp-news-and-widget' ); ?></span>
235
+ </h3>
236
+ <div class="inside">
237
+ <ul class="wpos-list">
238
+ <li>50 stunning and cool designs</li>
239
+ <li>News Ticker Feature</li>
240
+ <li>20+ Slider/Carousel Designs</li>
241
+ <li>20+ Grid Layout Designs</li>
242
+ <li>4 shortcodes</li>
243
+ <li>Recent News Slider</li>
244
+ <li>Recent News Carousel</li>
245
+ <li>Recent News in Grid view</li>
246
+ <li>Create a News Page OR News website</li>
247
+ <li>6 different types of widgets</li>
248
+ <li>Custom Read More link for News Post</li>
249
+ <li>News display with categories</li>
250
+ <li>Drag & Drop feature to display News post in your desired order and other 6 types of order parameter</li>
251
+ <li>Publicize' support with Jetpack to publish your News post on your social network</li>
252
+ <li>Custom CSS</li>
253
+ <li>100% Multi language</li>
254
+ </ul>
255
+ <a class="button button-primary wpos-button-full" href="https://www.wponlinesupport.com/wp-plugin/sp-news-and-scrolling-widgets/?utm_source=hp&event=go_premium" target="_blank"><?php _e('Go Premium ', 'sp-news-and-widget'); ?></a>
256
+ <p><a class="button button-primary wpos-button-full" href="http://demo.wponlinesupport.com/prodemo/news-plugin-pro/?utm_source=hp&event=pro_demo" target="_blank"><?php _e('View PRO Demo ', 'sp-news-and-widget'); ?></a> </p>
257
+ </div><!-- .inside -->
258
+ </div><!-- #general -->
259
+ </div><!-- .meta-box-sortables ui-sortable -->
260
+ </div><!-- .metabox-holder -->
261
+
262
+ <!-- Help to improve this plugin! -->
263
+ <div class="metabox-holder">
264
+ <div class="meta-box-sortables ui-sortable">
265
+ <div class="postbox">
266
+ <h3 class="hndle">
267
+ <span><?php _e( 'Help to improve this plugin!', 'sp-news-and-widget' ); ?></span>
268
+ </h3>
269
+ <div class="inside">
270
+ <p>Enjoyed this plugin? You can help by rate this plugin <a href="https://wordpress.org/support/plugin/sp-news-and-widget/reviews/?filter=5" target="_blank">5 stars!</a></p>
271
+ </div><!-- .inside -->
272
+ </div><!-- #general -->
273
+ </div><!-- .meta-box-sortables ui-sortable -->
274
+ </div><!-- .metabox-holder -->
275
+ </div><!-- #post-container-1 -->
276
+
277
+ </div><!-- #post-body -->
278
+ </div><!-- #poststuff -->
279
+ </div><!-- #post-box-container -->
280
+ <?php }
news_menu_function.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
-
3
- add_action('admin_menu', 'free_register_newsdesigns_submenu_page');
4
-
5
- function free_register_newsdesigns_submenu_page() {
6
- add_submenu_page( 'edit.php?post_type=news', 'Pro News Designs', 'Pro News Designs', 'manage_options', 'newsdesigns-submenu-page', 'free_newsdesigns_page_callback' );
7
- }
8
-
9
- function free_newsdesigns_page_callback() {
10
- $wpnw_feed_tabs = array(
11
- 'design-feed' => __('Plugin Designs', 'sp-news-and-widget'),
12
- 'plugins-feed' => __('Our Plugins', 'sp-news-and-widget')
13
- );
14
-
15
-
16
- $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'design-feed';
17
- ?>
18
-
19
- <div class="wrap wpnw-wrap">
20
-
21
- <h2 class="nav-tab-wrapper">
22
- <?php
23
- foreach ($wpnw_feed_tabs as $tab_key => $tab_val) {
24
-
25
- $active_cls = ($tab_key == $active_tab) ? 'nav-tab-active' : '';
26
- $tab_link = add_query_arg( array('post_type' => WPNW_POST_TYPE, 'page' => 'newsdesigns-submenu-page', 'tab' => $tab_key), admin_url('edit.php') );
27
- ?>
28
-
29
- <a class="nav-tab <?php echo $active_cls; ?>" href="<?php echo $tab_link; ?>"><?php echo $tab_val; ?></a>
30
-
31
- <?php } ?>
32
- </h2>
33
-
34
- <div class="wpnw-tab-cnt-wrp">
35
- <?php
36
- if( isset($_GET['tab']) && $_GET['tab'] == 'plugins-feed' ) {
37
- echo wpnw_get_design( 'plugins-feed' );
38
- } else {
39
- echo wpnw_get_design();
40
- }
41
- ?>
42
- </div><!-- end .wpnw-tab-cnt-wrp -->
43
-
44
- </div><!-- end .wpnw-wrap -->
45
-
46
- <?php
47
- }
48
-
49
- /**
50
- * Gets the plugin design part feed
51
- *
52
- * @package WP News and three widgets
53
- * @since 3.2.6
54
- */
55
- function wpnw_get_design( $feed_type = '' ) {
56
-
57
- $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'design-feed';
58
-
59
- $cache = get_transient( 'wpnw_' . $active_tab );
60
-
61
- if ( false === $cache ) {
62
-
63
- // Feed URL
64
- if( $feed_type == 'plugins-feed' ) {
65
- $url = 'http://wponlinesupport.com/plugin-data-api/plugins-data.php';
66
- } else {
67
- $url = 'http://wponlinesupport.com/plugin-data-api/wp-news-and-widget/wp-news-and-widget.php';
68
- }
69
-
70
- $feed = wp_remote_get( esc_url_raw( $url ), array( 'timeout' => 120, 'sslverify' => false ) );
71
-
72
- if ( ! is_wp_error( $feed ) ) {
73
- if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
74
- $cache = wp_remote_retrieve_body( $feed );
75
- set_transient( 'wpnw_' . $active_tab, $cache, 172800 );
76
- }
77
- } else {
78
- $cache = '<div class="error"><p>' . __( 'There was an error retrieving the data from the server. Please try again later.', 'sp-news-and-widget' ) . '</div>';
79
- }
80
- }
81
- return $cache;
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: wponlinesupport, wordpress news plugin, news website, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
- Tested up to: 4.6.1
6
  Author URI: http://wponlinesupport.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
@@ -157,6 +157,14 @@ Yse <code> [sp_news] </code>
157
 
158
  == Changelog ==
159
 
 
 
 
 
 
 
 
 
160
  = 3.2.9 (10/17/2016) =
161
  * [+] Added design to readmore button and pagination.
162
  * [+] Added design for widgets section.
@@ -237,6 +245,14 @@ Yse <code> [sp_news] </code>
237
 
238
  == Upgrade Notice ==
239
 
 
 
 
 
 
 
 
 
240
  = 3.2.9 (10/17/2016) =
241
  * [+] Added design to readmore button and pagination.
242
  * [+] Added design for widgets section.
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: wponlinesupport, wordpress news plugin, news website, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
+ Tested up to: 4.7
6
  Author URI: http://wponlinesupport.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
157
 
158
  == Changelog ==
159
 
160
+ = 3.2.11 (09/12/2016) =
161
+ * [*] Resolved conflict when 'WP News and Widget - Masonry Layout' plugin is activated.
162
+
163
+ = 3.2.10 (28/10/2016) =
164
+ * [+] Added "How it Work" tab.
165
+ * [-] Removed Pro design tab.
166
+ * Fixed some css issue.
167
+
168
  = 3.2.9 (10/17/2016) =
169
  * [+] Added design to readmore button and pagination.
170
  * [+] Added design for widgets section.
245
 
246
  == Upgrade Notice ==
247
 
248
+ = 3.2.11 (09/12/2016) =
249
+ * [*] Resolved conflict when 'WP News and Widget - Masonry Layout' plugin is activated.
250
+
251
+ = 3.2.10 (28/10/2016) =
252
+ * [+] Added "How it Work" tab.
253
+ * [-] Removed Pro design tab.
254
+ * Fixed some css issue.
255
+
256
  = 3.2.9 (10/17/2016) =
257
  * [+] Added design to readmore button and pagination.
258
  * [+] Added design for widgets section.
sp-news-and-widget.php CHANGED
@@ -1,19 +1,23 @@
1
  <?php
2
  /*
3
- Plugin Name: WP News and three widgets(static, scrolling and with thumbs)
4
  Plugin URL: http://www.wponlinesupport.com/
5
  Text Domain: sp-news-and-widget
6
  Domain Path: /languages/
7
  Description: A simple News and three widgets(static, scrolling and with thumbs) plugin
8
- Version: 3.2.9
9
  Author: WP Online Support
10
  Author URI: http://www.wponlinesupport.com/
11
  Contributors: WP Online Support
12
  */
13
 
14
  if( !defined( 'WPNW_VERSION' ) ) {
15
- define( 'WPNW_VERSION', '3.2.9' ); // Version of plugin
16
  }
 
 
 
 
17
  if( !defined( 'WPNW_POST_TYPE' ) ) {
18
  define( 'WPNW_POST_TYPE', 'news' ); // Plugin post type
19
  }
@@ -128,7 +132,6 @@ add_action( 'wp_enqueue_scripts','wpnawstyle_css_script' );
128
  }
129
 
130
  require_once( 'widget_function.php' );
131
- require_once( 'news_menu_function.php' );
132
 
133
  function wpnaw_get_news( $atts, $content = null ){
134
  // setup the query
@@ -367,6 +370,11 @@ function news_category_columns($out, $column_name, $theme_id) {
367
  default:
368
  break;
369
  }
370
- return $out;
 
 
371
 
 
 
 
372
  }
1
  <?php
2
  /*
3
+ Plugin Name: WP News and Scrolling Widgets
4
  Plugin URL: http://www.wponlinesupport.com/
5
  Text Domain: sp-news-and-widget
6
  Domain Path: /languages/
7
  Description: A simple News and three widgets(static, scrolling and with thumbs) plugin
8
+ Version: 3.2.11
9
  Author: WP Online Support
10
  Author URI: http://www.wponlinesupport.com/
11
  Contributors: WP Online Support
12
  */
13
 
14
  if( !defined( 'WPNW_VERSION' ) ) {
15
+ define( 'WPNW_VERSION', '3.2.11' ); // Version of plugin
16
  }
17
+ if( !defined( 'WPNW_DIR' ) ) {
18
+ define( 'WPNW_DIR', dirname( __FILE__ ) ); // Plugin dir
19
+ }
20
+
21
  if( !defined( 'WPNW_POST_TYPE' ) ) {
22
  define( 'WPNW_POST_TYPE', 'news' ); // Plugin post type
23
  }
132
  }
133
 
134
  require_once( 'widget_function.php' );
 
135
 
136
  function wpnaw_get_news( $atts, $content = null ){
137
  // setup the query
370
  default:
371
  break;
372
  }
373
+ return $out;
374
+
375
+ }
376
 
377
+ // How it work file, Load admin files
378
+ if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
379
+ require_once( WPNW_DIR . '/admin/wpnw-how-it-work.php' );
380
  }