PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 1.7
Advanced Ads – Ad Manager & AdSense v1.7
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 10 years ago class-notices.php 10 years ago class-overview-widgets.php 10 years ago class-shortcode-creator.php 10 years ago notices.php 10 years ago shortcode-creator-l10n.php 10 years ago
class-overview-widgets.php
252 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
68 }
69
70 /**
71 * subscribe widget
72 *
73 * @since 1.5.4
74 */
75 public static function render_subscribe(){
76
77 $is_subscribed = Advanced_Ads_Admin_Notices::get_instance()->is_subscribed();
78 $options = Advanced_Ads_Admin_Notices::get_instance()->options();
79
80 $_notice = 'nl_free_addons';
81 if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
82 ?><div class="advads-admin-notice">
83 <p><?php _e( 'Get 2 <strong>free add-ons</strong> for joining the newsletter.', 'advanced-ads' ); ?></p>
84 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Join now', 'advanced-ads'); ?></button>
85 </div><?php
86 }
87
88 $_notice = 'nl_adsense';
89 if ( ! isset($options['closed'][ $_notice ] ) ) {
90 ?><div class="advads-admin-notice">
91 <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>
92 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Subscribe me now', 'advanced-ads'); ?></button>
93 </div><?php
94 }
95
96 $_notice = 'nl_first_steps';
97 if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
98 ?><div class="advads-admin-notice">
99 <p><?php _e( 'Get the first steps and more tutorials to your inbox.', 'advanced-ads' ); ?></p>
100 <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Send it now', 'advanced-ads'); ?></button>
101 </div><?php
102 }
103
104 $model = Advanced_Ads::get_instance()->get_model();
105 $recent_ads = $model->get_ads();
106
107 // get next steps
108 self::render_next_steps( $recent_ads );
109 }
110
111 /**
112 * render next-steps
113 */
114 private static function render_next_steps($recent_ads = array()){
115 $model = Advanced_Ads::get_instance()->get_model();
116 $groups = $model->get_ad_groups();
117 $placements = $model->get_ad_placements_array();
118
119 $next_steps = array();
120
121 if ( count( $recent_ads ) == 0 ) :
122 $next_steps[] = '<p><a class="button button-primary" href="' . admin_url( 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG ) .
123 '">' . __( 'Create your first ad', 'advanced-ads' ) . '</a></p>';
124 endif;
125 if ( count( $groups ) == 0 ) :
126 $next_steps[] = '<p class="description">' . __( 'Ad Groups contain ads and are currently used to rotate multiple ads on a single spot.', 'advanced-ads' ) . '</p>' .
127 '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-groups' ) .
128 '">' . __( 'Create your first group', 'advanced-ads' ) . '</a></p>';
129 endif;
130 if ( count( $placements ) == 0 ) :
131 $next_steps[] = '<p class="description">' . __( 'Ad Placements are the best way to manage where to display ads and groups.', 'advanced-ads' ) . '</p>'
132 . '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-placements' ) .
133 '">' . __( 'Create your first placement', 'advanced-ads' ) . '</a></p>';
134 endif;
135
136 // display all options
137 if ( count( $next_steps ) > 0 ){
138 ?><br/><h4><?php _e( 'Next steps', 'advanced-ads' ); ?></h4><?php
139 foreach ( $next_steps as $_step ){
140 echo $_step;
141 }
142 }
143 }
144
145 /**
146 * support widget
147 */
148 public static function render_support(){
149 ?><ul>
150 <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>
151 <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>
152 <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>
153 <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/view/plugin-reviews/advanced-ads' ); ?></li>
154 </ul><?php
155 }
156
157 /**
158 * help widget
159 */
160 public static function render_help(){
161
162 ?><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>
163 <p><a class="button button-primary" href="mailto:support@wpadvancedads.com?subject=<?php printf( __( 'Help with ads on %s', 'advanced-ads' ), home_url()); ?>"><?php
164 _e( 'Get an offer', 'advanced-ads' ); ?></a></p><?php
165 }
166
167 /**
168 * pro add-on widget
169 */
170 public static function render_add_on_pro(){
171
172 ?><p><?php _e( 'Ad management for advanced websites.', 'advanced-ads' ); ?></p><ul class='list'>
173 <li><?php _e( 'Cache-busting', 'advanced-ads' ); ?></li>
174 <li><?php _e( 'Advanced visitor conditions', 'advanced-ads' ); ?></li>
175 <li><?php _e( 'Flash ads with fallback', 'advanced-ads' ); ?></li>
176 </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
177 _e( 'Get Pro', 'advanced-ads' ); ?></a></p><?php
178 }
179
180 /**
181 * tracking add-on widget
182 */
183 public static function render_add_on_tracking(){
184
185 ?><p><?php _e( 'Track the impressions of and clicks on your ads.', 'advanced-ads' ); ?></p><ul class='list'>
186 <li><?php _e( '2 methods to count impressions', 'advanced-ads' ); ?></li>
187 <li><?php _e( 'beautiful stats for all or single ads', 'advanced-ads' ); ?></li>
188 <li><?php _e( 'group stats by day, week or month', 'advanced-ads' ); ?></li>
189 </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
190 _e( 'Get the Tracking add-on', 'advanced-ads' ); ?></a></p><?php
191 }
192
193 /**
194 * responsive add-on widget
195 */
196 public static function render_add_on_responsive(){
197
198 ?><p><?php _e( 'Display ads based on the size of your visitor’s browser or device.', 'advanced-ads' ); ?></p><ul class='list'>
199 <li><?php _e( 'set a range (from … to …) pixels for the browser size', 'advanced-ads' ); ?></li>
200 <li><?php _e( 'set custom sizes for AdSense responsive ads', 'advanced-ads' ); ?></li>
201 <li><?php _e( 'list all ads by their responsive settings', 'advanced-ads' ); ?></li>
202 </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
203 _e( 'Get the Responsive add-on', 'advanced-ads' ); ?></a></p><?php
204 }
205
206 /**
207 * geo targeting add-on widget
208 */
209 public static function render_add_on_geotargeting(){
210
211 ?><p><?php _e( 'Target visitors by their geo location.', 'advanced-ads' ); ?></p><ul class='list'>
212 </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
213 _e( 'Get the Geo Targeting add-on', 'advanced-ads' ); ?></a></p><?php
214 }
215
216 /**
217 * sticky add-on widget
218 */
219 public static function render_add_on_sticky(){
220
221 ?><p><?php _e( 'Fix ads to the browser while users are scrolling and create best performing anchor ads.', 'advanced-ads' ); ?></p><ul class='list'>
222 <li><?php _e( 'position ads that don’t scroll with the screen', 'advanced-ads' ); ?></li>
223 <li><?php _e( 'build anchor ads not only on mobile devices', 'advanced-ads' ); ?></li>
224 </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
225 _e( 'Get the Sticky add-on', 'advanced-ads' ); ?></a></p><?php
226 }
227
228 /**
229 * layer add-on widget
230 */
231 public static function render_add_on_layer(){
232
233 ?><p><?php _e( 'Display content and ads in layers and popups on custom events.', 'advanced-ads' ); ?></p><ul class='list'>
234 <li><?php _e( 'display a popup after a user interaction like scrolling', 'advanced-ads' ); ?></li>
235 <li><?php _e( 'optional background overlay', 'advanced-ads' ); ?></li>
236 <li><?php _e( 'allow users to close the popup', 'advanced-ads' ); ?></li>
237 </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
238 _e( 'Get the PopUp and Layer add-on', 'advanced-ads' ); ?></a></p><?php
239 }
240
241 /**
242 * slider add-on widget
243 */
244 public static function render_add_on_slider(){
245
246 ?><p><?php _e( 'Create a beautiful and simple slider from your ads.', 'advanced-ads' ); ?></p>
247 <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
248 _e( 'Get the Slider add-on', 'advanced-ads' ); ?></a></p><?php
249 }
250
251 }
252