PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 1.8.3
Advanced Ads – Ad Manager & AdSense v1.8.3
2.0.26 2.0.25 2.0.24 2.0.23 2.0.22 2.0.21 1.38.0 1.39.0 1.39.1 1.39.2 1.39.3 1.39.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.40.0 1.40.1 1.40.2 1.41.0 1.42.0 1.42.1 1.42.2 1.43.0 1.44.0 1.44.1 1.45.0 1.45.1 1.46.0 1.47.0 1.47.1 1.47.2 1.47.3 1.47.4 1.47.5 1.48.0 1.48.1 1.49.0 1.5.0 1.5.0.1 1.5.1 1.5.2 1.5.2.1 1.5.4 1.5.4.1 1.5.5 1.50.0 1.51.0 1.51.1 1.51.2 1.51.3 1.52.0 1.52.1 1.52.2 1.52.3 1.52.4 1.53.0 1.53.1 1.53.2 1.54.0 1.54.1 1.55.0 1.56.0 1.56.1 1.56.2 1.56.3 1.56.4 1.6 1.6.1 1.6.10 1.6.10.1 1.6.10.2 1.6.11 1.6.11.1 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.17.1 1.6.17.2 1.6.2 1.6.2.1 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.6 1.6.6.1 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.6.8.3 1.6.9 1.6.9.1 1.6.9.2 1.6.9.3 1.6.9.4 1.7 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.1.1 1.7.1.2 1.7.1.3 1.7.1.4 1.7.1.5 1.7.10 trunk 1.7.11 1.0.1 1.7.12 1.0.2 1.7.13 1.0.3 1.7.14 1.1.0 1.7.15 1.1.1 1.7.16 1.1.2 1.7.17 1.1.3 1.7.18 1.10 1.7.19 1.10.1 1.7.2 1.10.10 1.7.2.1 1.10.11 1.7.20 1.10.12 1.7.21 1.10.2 1.7.22 1.10.3 1.7.23 1.10.4 1.7.24 1.10.5 1.7.25 1.10.6 1.7.3 1.10.7 1.7.4 1.10.8 1.7.4.1 1.10.9 1.7.4.2 1.11 1.7.4.3 1.11.1 1.7.4.4 1.11.2 1.7.4.5 1.12 1.7.5 1.13 1.7.5.1 1.13.1 1.7.6 1.13.2 1.7.7 1.13.3 1.7.8 1.13.4 1.7.9 1.13.5 1.7.9.1 1.13.6 1.7.9.2 1.13.7 1.7.9.3 1.13.8 1.8 1.14 1.8.1 1.14.1 1.8.10 1.14.10 1.8.11 1.14.11 1.8.12 1.14.2 1.8.13 1.14.3 1.8.14 1.14.4 1.8.15 1.14.5 1.8.16 1.14.6 1.8.17 1.14.7 1.8.18 1.14.8 1.8.19 1.14.9 1.8.2 1.15 1.8.20 1.16 1.8.21 1.16.1 1.8.22 1.17 1.8.23 1.17.1 1.8.24 1.17.10 1.8.25 1.17.10-rc.1 1.8.26 1.17.11 1.8.27 1.17.12 1.8.28 1.17.12-rc.1 1.8.29 1.17.2 1.8.3 1.17.3 1.8.30 1.17.4 1.8.4 1.17.5 1.8.5 1.17.6 1.8.6 1.17.7 1.8.7 1.17.8 1.8.8 1.17.9 1.8.9 1.17.9-beta.1 1.9 1.18.0 2.0.0 1.19.0 2.0.1 1.19.1 2.0.10 1.2 2.0.11 1.2.1 2.0.12 1.2.2 2.0.13 1.2.3 2.0.14 1.2.4 2.0.15 1.2.5 2.0.16 1.2.6 2.0.17 1.2.7 2.0.18 1.20.0 2.0.19 1.20.0-rc.1 2.0.2 1.20.0-rc.2 2.0.20 1.20.1 2.0.3 1.20.2 2.0.4 1.20.3 2.0.5 1.21.0 2.0.6 1.21.1 2.0.7 1.22.0 2.0.8 1.22.1 2.0.9 1.22.2 1.23.0 1.23.1 1.23.2 1.24.0 1.24.1 1.24.2 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.29.0 1.29.1 1.3 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.30.0 1.30.1 1.30.2 1.30.2-rc.1 1.30.3 1.30.4 1.30.4-rc.1 1.30.5 1.31.0 1.31.1 1.32.0 1.32.0-rc.1 1.33.0 1.33.1 1.33.2 1.34.0 1.35.0 1.35.1 1.36.0 1.36.1 1.36.2 1.36.3 1.37.0 1.37.1 1.37.2
advanced-ads / admin / includes / class-overview-widgets.php
advanced-ads / admin / includes Last commit date
class-ad-groups-list.php 9 years ago class-ad-type.php 9 years ago class-licenses.php 9 years ago class-menu.php 9 years ago class-meta-box.php 9 years ago class-notices.php 9 years ago class-options.php 9 years ago class-overview-widgets.php 9 years ago class-settings.php 9 years ago class-shortcode-creator.php 9 years ago notices.php 9 years ago shortcode-creator-l10n.php 10 years ago
class-overview-widgets.php
264 lines
1 <?php
2 /**
3 * container class for callbacks for overview widgets
4 *
5 * @package WordPress
6 * @subpackage Advanced Ads Plugin
7 * @since 1.4.3
8 */
9 class Advanced_Ads_Overview_Widgets_Callbacks {
10
11 /**
12 * set the overview page to one column layout so widgets can get ordered horizontally
13 *
14 * @since 1.4.3
15 * @param arr $columns columns array
16 * @return int $columns
17 */
18 static function one_column_overview_page( $columns ) {
19 // $columns['toplevel_page_advanced-ads'] = 1;
20 return $columns;
21 }
22
23 /**
24 * set the overview page to one column layout so widgets can get ordered horizontally
25 * this overwrites user settings
26 *
27 * @since 1.4.3
28 * @return int $columns
29 */
30 function one_column_overview_page_user() {
31 // return 1;
32 }
33
34 /**
35 * register the plugin overview widgets
36 *
37 * @since 1.4.3
38 * @param obj $screen
39 */
40 public static function setup_overview_widgets($screen){
41
42 // abort if not on the overview page
43 if ( ! isset($screen->id) || $screen->id !== 'toplevel_page_advanced-ads' ) { return; }
44
45 add_meta_box('advads_overview_news', __( 'Tips and Tutorials', 'advanced-ads' ),
46 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_subscribe'), $screen->id, 'normal', 'high');
47 add_meta_box('advads_overview_addon_help', __( 'Setup and Optimization Help', 'advanced-ads' ),
48 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_help'), $screen->id, 'normal', 'high');
49 add_meta_box('advads_overview_support', __( 'Manual and Support', 'advanced-ads' ),
50 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_support'), $screen->id, 'normal', 'high');
51
52 // add widgets for pro add ons
53 add_meta_box('advads_overview_addon_pro', __( 'Advanced Ads Pro', 'advanced-ads' ),
54 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_pro'), $screen->id, 'side', 'high');
55 add_meta_box('advads_overview_addon_tracking', __( 'Tracking and Stats', 'advanced-ads' ),
56 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_tracking'), $screen->id, 'side', 'high');
57 add_meta_box('advads_overview_addon_responsive', __( 'Responsive and Mobile ads', 'advanced-ads' ),
58 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_responsive'), $screen->id, 'side', 'high');
59 add_meta_box('advads_overview_addon_geotargeting', __( 'Geo Targeting', 'advanced-ads' ),
60 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_geotargeting'), $screen->id, 'side', 'high');
61 add_meta_box('advads_overview_addon_sticky', __( 'Sticky ads', 'advanced-ads' ),
62 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sticky'), $screen->id, 'side', 'high');
63 add_meta_box('advads_overview_addon_layer', __( 'PopUps and Layers', 'advanced-ads' ),
64 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_layer'), $screen->id, 'side', 'high');
65 add_meta_box('advads_overview_addon_slider', __( 'Ad Slider', 'advanced-ads' ),
66 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_slider'), $screen->id, 'side', 'high');
67 add_meta_box('advads_overview_addon_sellingads', __( 'Selling Ads', 'advanced-ads' ),
68 array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sellingads'), $screen->id, 'side', 'high');
69
70 do_action( 'advanced-ads-overview-widgets-after', $screen );
71 }
72
73 /**
74 * subscribe widget
75 *
76 * @since 1.5.4
77 */
78 public static function render_subscribe(){
79
80 $is_subscribed = Advanced_Ads_Admin_Notices::get_instance()->is_subscribed();
81 $options = Advanced_Ads_Admin_Notices::get_instance()->options();
82
83 $_notice = 'nl_free_addons';
84 if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
85 ?><div class="advads-admin-notice">
86 <p><?php _e( 'Get 2 <strong>free add-ons</strong> for joining the newsletter.', 'advanced-ads' ); ?></p>
87 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Join now', 'advanced-ads'); ?></button>
88 </div><?php
89 }
90
91 $_notice = 'nl_adsense';
92 if ( ! isset($options['closed'][ $_notice ] ) ) {
93 ?><div class="advads-admin-notice">
94 <p><?php _e( 'Learn more about how and <strong>how much you can earn with AdSense</strong> and Advanced Ads from the dedicated newsletter group.', 'advanced-ads' ); ?></p>
95 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Subscribe me now', 'advanced-ads'); ?></button>
96 </div><?php
97 }
98
99 $_notice = 'nl_first_steps';
100 if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
101 ?><div class="advads-admin-notice">
102 <p><?php _e( 'Get the first steps and more tutorials to your inbox.', 'advanced-ads' ); ?></p>
103 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Send it now', 'advanced-ads'); ?></button>
104 </div><?php
105 }
106
107 $model = Advanced_Ads::get_instance()->get_model();
108 $recent_ads = $model->get_ads();
109
110 // get next steps
111 self::render_next_steps( $recent_ads );
112 }
113
114 /**
115 * render next-steps
116 */
117 private static function render_next_steps($recent_ads = array()){
118 $model = Advanced_Ads::get_instance()->get_model();
119 $groups = $model->get_ad_groups();
120 $placements = $model->get_ad_placements_array();
121
122 $next_steps = array();
123
124 if ( count( $recent_ads ) == 0 ) :
125 $next_steps[] = '<p><a class="button button-primary" href="' . admin_url( 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG ) .
126 '">' . __( 'Create your first ad', 'advanced-ads' ) . '</a></p>';
127 endif;
128 if ( count( $groups ) == 0 ) :
129 $next_steps[] = '<p class="description">' . __( 'Ad Groups contain ads and are currently used to rotate multiple ads on a single spot.', 'advanced-ads' ) . '</p>' .
130 '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-groups' ) .
131 '">' . __( 'Create your first group', 'advanced-ads' ) . '</a></p>';
132 endif;
133 if ( count( $placements ) == 0 ) :
134 $next_steps[] = '<p class="description">' . __( 'Ad Placements are the best way to manage where to display ads and groups.', 'advanced-ads' ) . '</p>'
135 . '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-placements' ) .
136 '">' . __( 'Create your first placement', 'advanced-ads' ) . '</a></p>';
137 endif;
138
139 // display all options
140 if ( count( $next_steps ) > 0 ){
141 ?><br/><h4><?php _e( 'Next steps', 'advanced-ads' ); ?></h4><?php
142 foreach ( $next_steps as $_step ){
143 echo $_step;
144 }
145 }
146 }
147
148 /**
149 * support widget
150 */
151 public static function render_support(){
152 ?><ul>
153 <li><?php printf( __( '<a href="%s" target="_blank">Manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
154 <li><?php printf( __( '<a href="%s" target="_blank">FAQ and Support</a>', 'advanced-ads' ), ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
155 <li><?php printf( __( 'Vote for a <a href="%s" target="_blank">feature</a>', 'advanced-ads' ), ADVADS_URL . 'feature-requests/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
156 <li><?php printf( __( 'Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a href="%s" target="_blank">wordpress.org</a>', 'advanced-ads' ), 'https://wordpress.org/support/plugin/advanced-ads/reviews/?filter=5#new-post' ); ?></li>
157 </ul><?php
158 }
159
160 /**
161 * help widget
162 */
163 public static function render_help(){
164
165 ?><p><?php _e( 'Need help to set up and optimize your ads? Need custom coding on your site? Ask me for a quote.', 'advanced-ads' ); ?></p>
166 <p><a class="button button-primary" href="mailto:support@wpadvancedads.com?subject=<?php printf( __( 'Help with ads on %s', 'advanced-ads' ), home_url()); ?>"><?php
167 _e( 'Get an offer', 'advanced-ads' ); ?></a></p><?php
168 }
169
170 /**
171 * pro add-on widget
172 */
173 public static function render_add_on_pro(){
174
175 ?><p><?php _e( 'Ad management for advanced websites.', 'advanced-ads' ); ?></p><ul class='list'>
176 <li><?php _e( 'Cache-busting', 'advanced-ads' ); ?></li>
177 <li><?php _e( 'Advanced visitor conditions', 'advanced-ads' ); ?></li>
178 <li><?php _e( 'Flash ads with fallback', 'advanced-ads' ); ?></li>
179 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
180 _e( 'Get Pro', 'advanced-ads' ); ?></a></p><?php
181 }
182
183 /**
184 * tracking add-on widget
185 */
186 public static function render_add_on_tracking(){
187
188 ?><p><?php _e( 'Track the impressions of and clicks on your ads.', 'advanced-ads' ); ?></p><ul class='list'>
189 <li><?php _e( '2 methods to count impressions', 'advanced-ads' ); ?></li>
190 <li><?php _e( 'beautiful stats for all or single ads', 'advanced-ads' ); ?></li>
191 <li><?php _e( 'group stats by day, week or month', 'advanced-ads' ); ?></li>
192 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
193 _e( 'Get the Tracking add-on', 'advanced-ads' ); ?></a></p><?php
194 }
195
196 /**
197 * responsive add-on widget
198 */
199 public static function render_add_on_responsive(){
200
201 ?><p><?php _e( 'Display ads based on the size of your visitor’s browser or device.', 'advanced-ads' ); ?></p><ul class='list'>
202 <li><?php _e( 'set a range (from … to …) pixels for the browser size', 'advanced-ads' ); ?></li>
203 <li><?php _e( 'set custom sizes for AdSense responsive ads', 'advanced-ads' ); ?></li>
204 <li><?php _e( 'list all ads by their responsive settings', 'advanced-ads' ); ?></li>
205 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
206 _e( 'Get the Responsive add-on', 'advanced-ads' ); ?></a></p><?php
207 }
208
209 /**
210 * geo targeting add-on widget
211 */
212 public static function render_add_on_geotargeting(){
213
214 ?><p><?php _e( 'Target visitors by their geo location.', 'advanced-ads' ); ?></p><ul class='list'>
215 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/geo-targeting/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
216 _e( 'Get the Geo Targeting add-on', 'advanced-ads' ); ?></a></p><?php
217 }
218
219 /**
220 * sticky add-on widget
221 */
222 public static function render_add_on_sticky(){
223
224 ?><p><?php _e( 'Fix ads to the browser while users are scrolling and create best performing anchor ads.', 'advanced-ads' ); ?></p><ul class='list'>
225 <li><?php _e( 'position ads that don’t scroll with the screen', 'advanced-ads' ); ?></li>
226 <li><?php _e( 'build anchor ads not only on mobile devices', 'advanced-ads' ); ?></li>
227 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
228 _e( 'Get the Sticky add-on', 'advanced-ads' ); ?></a></p><?php
229 }
230
231 /**
232 * layer add-on widget
233 */
234 public static function render_add_on_layer(){
235
236 ?><p><?php _e( 'Display content and ads in layers and popups on custom events.', 'advanced-ads' ); ?></p><ul class='list'>
237 <li><?php _e( 'display a popup after a user interaction like scrolling', 'advanced-ads' ); ?></li>
238 <li><?php _e( 'optional background overlay', 'advanced-ads' ); ?></li>
239 <li><?php _e( 'allow users to close the popup', 'advanced-ads' ); ?></li>
240 </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
241 _e( 'Get the PopUp and Layer add-on', 'advanced-ads' ); ?></a></p><?php
242 }
243
244 /**
245 * slider add-on widget
246 */
247 public static function render_add_on_slider(){
248
249 ?><p><?php _e( 'Create a beautiful and simple slider from your ads.', 'advanced-ads' ); ?></p>
250 <p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/slider/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
251 _e( 'Get the Slider add-on', 'advanced-ads' ); ?></a></p><?php
252 }
253
254 /**
255 * selling ads add-on widget
256 */
257 public static function render_add_on_sellingads(){
258 ?><p><?php _e( 'Let advertisers purchase ad space directly on the frontend of your site.', 'advanced-ads' ); ?></p>
259 <p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/selling-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
260 _e( 'Get the Selling Ads add-on', 'advanced-ads' ); ?></a></p><?php
261 }
262
263 }
264