PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 1.16.1
Advanced Ads – Ad Manager & AdSense v1.16.1
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 / views / placements.php
advanced-ads / admin / views Last commit date
conditions 6 years ago notices 6 years ago ad-conditions-string-operators.php 7 years ago ad-group-edit.php 7 years ago ad-group-list-ads.php 7 years ago ad-group-list-form-row.php 6 years ago ad-group-list-header.php 7 years ago ad-group-list-row.php 7 years ago ad-group.php 6 years ago ad-info-after-textarea.php 7 years ago ad-info-bottom.php 6 years ago ad-info-top.php 7 years ago ad-info.php 7 years ago ad-list-details-column.php 7 years ago ad-list-filters.php 6 years ago ad-list-no-ads.php 6 years ago ad-list-shortcode-column.php 7 years ago ad-list-timing-column.php 7 years ago ad-main-metabox.php 6 years ago ad-output-metabox.php 6 years ago ad-parameters-metabox.php 6 years ago ad-parameters-size.php 6 years ago ad-submitbox-meta.php 7 years ago checks.php 6 years ago feedback-disable.php 6 years ago gadsense-dashboard.php 6 years ago index.php 7 years ago overview-addons-line.php 7 years ago overview-notice-row.php 6 years ago overview-notices.php 6 years ago overview-widget.php 6 years ago overview.php 6 years ago pitch-bundle.php 7 years ago pitch-pro-tab.php 7 years ago pitch-tracking.php 7 years ago placement-form.php 6 years ago placement-injection-top.php 6 years ago placements-ad-label-position.php 7 years ago placements-ad-label.php 7 years ago placements-content-index.php 7 years ago placements-item.php 6 years ago placements.php 6 years ago post-ad-settings-metabox.php 6 years ago setting-disable-post-types.php 6 years ago setting-license.php 6 years ago setting-target.php 7 years ago settings-disable-ads.php 6 years ago settings.php 6 years ago support-callout.php 6 years ago support.php 7 years ago
placements.php
223 lines
1 <?php
2 /**
3 * The view for the placements page
4 */
5 ?><div class="wrap">
6 <?php
7 if ( isset( $_GET['message'] ) ) :
8 if ( $_GET['message'] === 'error' ) :
9 ?>
10 <div id="message" class="error"><p><?php _e( 'Couldn’t create the new placement. Please check your form field and whether the name is already in use.', 'advanced-ads' ); ?></p></div>
11 <?php
12 elseif ( $_GET['message'] === 'updated' ) :
13 ?>
14 <div id="message" class="updated"><p><?php _e( 'Placements updated', 'advanced-ads' ); ?></p></div>
15 <?php
16 endif;
17 ?>
18 <?php endif; ?>
19 <h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1>
20 <a href="#" class="page-title-action" title="<?php _e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form'); advads_scroll_to_element('#advads-placements-new-form');"><?php
21 _e( 'New Placement', 'advanced-ads' );
22 ?></a>
23
24 <hr class="wp-header-end">
25
26 <p class="description"><?php _e( 'Placements are physically places in your theme and posts. You can use them if you plan to change ads and ad groups on the same place without the need to change your templates.', 'advanced-ads' ); ?></p>
27 <p class="description"><?php printf( __( 'See also the manual for more information on <a href="%s">placements</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements' ); ?></p>
28 <?php
29
30 // add placement form.
31 include_once ADVADS_BASE_PATH . 'admin/views/placement-form.php';
32
33 if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
34 do_action( 'advanced-ads-placements-list-before', $placements );
35 ?>
36 <h2><?php _e( 'Placements', 'advanced-ads' ); ?></h2>
37 <form method="POST" action="" id="advanced-ads-placements-form">
38 <table class="widefat advads-placements-table striped">
39 <thead>
40 <tr>
41 <th><?php _e( 'Type', 'advanced-ads' ); ?></th>
42 <th><?php _e( 'Name', 'advanced-ads' ); ?></th>
43 <th><?php _e( 'Options', 'advanced-ads' ); ?></th>
44 <?php do_action( 'advanced-ads-placements-list-column-header' ); ?>
45 <th></th>
46 </tr>
47 </thead>
48 <tbody>
49 <?php
50 // order by slug
51 ksort( $placements );
52 foreach ( $placements as $_placement_slug => $_placement ) :
53 $type_missing = false;
54 if ( isset( $_placement['type'] ) && ! isset( $placement_types[ $_placement['type'] ] ) ) {
55 $missed_type = $_placement['type'];
56 $_placement['type'] = 'default';
57 $type_missing = true;
58 }
59 ?>
60 <tr id="single-placement-<?php echo $_placement_slug; ?>" class="advanced-ads-placement-row">
61 <td>
62 <?php
63 if ( $type_missing ) : // type is not given
64 ?>
65 <p class="advads-error-message"><?php printf( __( 'Placement type "%s" is missing and was reset to "default".<br/>Please check if the responsible add-on is activated.', 'advanced-ads' ), $missed_type ); ?></p>
66 <?php
67 elseif ( isset( $_placement['type'] ) ) :
68 if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) :
69 ?>
70 <img src="
71 <?php
72 echo $placement_types[ $_placement['type'] ]['image'];
73 ?>
74 " title="
75 <?php
76 echo $placement_types[ $_placement['type'] ]['title'];
77 ?>
78 " alt="<?php echo $placement_types[ $_placement['type'] ]['title']; ?>"/>
79 <?php
80 else :
81 echo $placement_types[ $_placement['type'] ]['title'];
82 endif;
83 else :
84 __( 'default', 'advanced-ads' );
85 endif;
86 ?>
87 </td>
88 <td><?php echo $_placement['name']; ?><br/>
89 <?php
90 if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) :
91 $_placement['type'] = 'default';
92 ?>
93 <a class="usage-link"><?php _e( 'show usage', 'advanced-ads' ); ?></a>
94 <?php
95 endif;
96 ?>
97 </td>
98 <td class="advads-placements-table-options">
99 <input type="hidden" class="advads-placement-slug" value="<?php echo $_placement_slug; ?>"/>
100 <?php if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) : ?>
101 <div class="hidden advads-usage">
102 <label><?php _e( 'shortcode', 'advanced-ads' ); ?>
103 <code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo $_placement_slug; ?>"]'/></code>
104 </label>
105 <label><?php _e( 'template (PHP)', 'advanced-ads' ); ?>
106 <code><input type="text" onclick="this.select();" value="if( function_exists('the_ad_placement') ) { the_ad_placement('<?php echo $_placement_slug; ?>'); }"/></code>
107 </label>
108 </div>
109 <?php endif; ?>
110
111 <?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
112
113 <?php
114 ob_start();
115 include ADVADS_BASE_PATH . 'admin/views/placements-item.php';
116 $item_option_content = ob_get_clean();
117
118 Advanced_Ads_Admin_Options::render_option(
119 'placement-item',
120 __( 'Item', 'advanced-ads' ),
121 $item_option_content
122 );
123 ?>
124 <?php
125 switch ( $_placement['type'] ) :
126 case 'post_content':
127 ob_start();
128 include ADVADS_BASE_PATH . 'admin/views/placements-content-index.php';
129 do_action( 'advanced-ads-placement-post-content-position', $_placement_slug, $_placement );
130 $option_content = ob_get_clean();
131
132 Advanced_Ads_Admin_Options::render_option(
133 'placement-content-injection-index',
134 __( 'position', 'advanced-ads' ),
135 $option_content
136 );
137
138 if ( ! extension_loaded( 'dom' ) ) :
139 ?>
140 <p><span class="advads-error-message"><?php _e( 'Important Notice', 'advanced-ads' ); ?>: </span><?php printf( __( 'Missing PHP extensions could cause issues. Please ask your hosting provider to enable them: %s', 'advanced-ads' ), 'dom (php_xml)' ); ?></p>
141 <?php
142 endif;
143 break;
144 endswitch;
145 do_action( 'advanced-ads-placement-options-after', $_placement_slug, $_placement );
146 ob_start();
147
148 if ( 'header' !== $_placement['type'] ) :
149 $_label = isset( $_placement['options']['ad_label'] ) ? $_placement['options']['ad_label'] : 'default';
150 $_position = ! empty( $_placement['options']['placement_position'] ) ? $_placement['options']['placement_position'] : 'default';
151 $_clearfix = ! empty( $_placement['options']['placement_clearfix'] );
152
153 ob_start();
154 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label.php';
155 if ( ! empty( $placement_types[ $_placement['type'] ]['options']['show_position'] ) ) :
156 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label-position.php';
157 endif;
158 $option_content = ob_get_clean();
159
160 Advanced_Ads_Admin_Options::render_option(
161 'placement-ad-label',
162 __( 'ad label', 'advanced-ads' ),
163 $option_content
164 );
165
166 endif;
167
168 do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
169 $advanced_options = ob_get_clean();
170 if ( $advanced_options ) :
171 ?>
172 <a class="advads-toggle-link advads-placement-options-link" data-placement="<?php echo $_placement_slug ?>"><?php _e( 'show all options', 'advanced-ads' ); ?></a>
173 <?php
174 $hidden = ( isset( $_POST['advads-last-edited-placement'] ) && $_placement_slug == $_POST['advads-last-edited-placement'] ) ? '' : ' hidden';
175 ?>
176 <div class="advads-placements-advanced-options advads-placements-advanced-options-
177 <?php
178 echo $_placement_slug;
179 echo $hidden;
180 ?>
181 ">
182 <?php
183 echo $advanced_options;
184 ?>
185 </div>
186 <?php
187 endif;
188 // information after options
189 if ( isset( $_placement['type'] ) && 'header' === $_placement['type'] ) :
190 ?>
191 <br/><p><?php printf( __( 'Tutorial: <a href="%s" target="_blank">How to place visible ads in the header of your website</a>.', 'advanced-ads' ), ADVADS_URL . 'place-ads-in-website-header/#utm_source=advanced-ads&utm_medium=link&utm_campaign=header-ad-tutorial' ); ?></p>
192 <?php
193 endif;
194
195 ?>
196 </td>
197 <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
198 <td>
199 <input type="checkbox" id="advads-placements-item-delete-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][delete]" value="1"/>
200 <label for="advads-placements-item-delete-<?php echo $_placement_slug; ?>"><?php _ex( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
201 </td>
202 </tr>
203 <?php endforeach; ?>
204 </tbody>
205 </table>
206 <div class="tablenav bottom">
207 <input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php _e( 'Save Placements', 'advanced-ads' ); ?>"/>
208 <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ); ?>
209 <button type="button" title="<?php _e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form'); advads_scroll_to_element('#advads-placements-new-form');">
210 <?php
211 _e( 'New Placement', 'advanced-ads' );
212 ?>
213 </button>
214 <?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
215 </div>
216 <input type="hidden" name="advads-last-edited-placement" id="advads-last-edited-placement" value="0"/>
217 </form>
218 <?php
219 do_action( 'advanced-ads-placements-list-after', $placements );
220 endif;
221
222 ?></div>
223