PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 1.8.21
Advanced Ads – Ad Manager & AdSense v1.8.21
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 / views / placements.php
advanced-ads / admin / views Last commit date
notices 9 years ago ad-display-metabox.php 8 years ago ad-group-edit.php 9 years ago ad-group-list-ads.php 9 years ago ad-group-list-form-row.php 9 years ago ad-group-list-header.php 10 years ago ad-group-list-row.php 10 years ago ad-group.php 9 years ago ad-info-after-textarea.php 9 years ago ad-info-bottom.php 8 years ago ad-info-top.php 8 years ago ad-info.php 10 years ago ad-list-details-column.php 10 years ago ad-list-filters.php 9 years ago ad-list-no-ads.php 8 years ago ad-list-timing-column.php 8 years ago ad-main-metabox.php 9 years ago ad-output-metabox.php 9 years ago ad-parameters-metabox.php 9 years ago ad-parameters-size.php 9 years ago ad-submitbox-meta.php 9 years ago ad-visitor-metabox.php 8 years ago checks.php 8 years ago feedback-disable.php 8 years ago index.php 12 years ago overview-addons-line.php 8 years ago overview-widget.php 8 years ago overview.php 8 years ago pitch-bundle.php 8 years ago pitch-pro-tab.php 8 years ago pitch-tracking.php 8 years ago placement-injection-top.php 8 years ago placements-ad-label-position.php 9 years ago placements-ad-label.php 9 years ago placements-content-index.php 9 years ago placements-item.php 9 years ago placements.php 8 years ago post-ad-settings-metabox.php 9 years ago setting-license.php 8 years ago setting-target.php 8 years ago settings-disable-ads.php 10 years ago settings.php 8 years ago support.php 8 years ago
placements.php
210 lines
1 <?php
2 /**
3 * the view for the placements page
4 */
5 ?><div class="wrap">
6 <?php if ( isset($_GET['message'] ) ) :
7 if ( $_GET['message'] === 'error' ) :
8 ?><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><?php
9 elseif ( $_GET['message'] === 'updated' ) :
10 ?><div id="message" class="updated"><p><?php _e( 'Placements updated', 'advanced-ads' ); ?></p></div><?php
11 endif; ?>
12 <?php endif; ?>
13 <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
14 <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>
15 <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>
16 <?php if ( isset($placements) && is_array( $placements ) && count( $placements ) ) :
17 do_action( 'advanced-ads-placements-list-before', $placements ); ?>
18 <h2><?php _e( 'Placements', 'advanced-ads' ); ?></h2>
19 <form method="POST" action="">
20 <table class="widefat advads-placements-table striped">
21 <thead>
22 <tr>
23 <th><?php _e( 'Type', 'advanced-ads' ); ?></th>
24 <th><?php _e( 'Name', 'advanced-ads' ); ?></th>
25 <th><?php _e( 'Options', 'advanced-ads' ); ?></th>
26 <?php do_action( 'advanced-ads-placements-list-column-header' ); ?>
27 <th></th>
28 </tr>
29 </thead>
30 <tbody>
31 <?php // order by slug
32 ksort( $placements );
33 foreach ( $placements as $_placement_slug => $_placement ) :
34 $type_missing = false;
35 if( isset( $_placement['type'] ) && ! isset( $placement_types[$_placement['type']] )) {
36 $missed_type = $_placement['type'];
37 $_placement['type'] = 'default';
38 $type_missing = true;
39 }
40 ?><tr id="single-placement-<?php echo $_placement_slug; ?>">
41 <td><?php
42 if( $type_missing ) : // type is not given
43 ?><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><?php
44 elseif( isset($_placement['type'] )) :
45 if( isset( $placement_types[$_placement['type']]['image'] )) :
46 ?><img src="<?php echo $placement_types[$_placement['type']]['image'];
47 ?>" title="<?php echo $placement_types[$_placement['type']]['title'];
48 ?>" alt="<?php echo $placement_types[$_placement['type']]['title']; ?>"/><?php
49 else :
50 echo $placement_types[$_placement['type']]['title'];
51 endif;
52 else :
53 __( 'default', 'advanced-ads' );
54 endif;
55 ?></td>
56 <td><?php echo $_placement['name']; ?><br/>
57 <?php if( ! isset( $_placement['type'] ) || 'default' === $_placement['type']) :
58 $_placement['type'] = 'default';
59 ?><a class="usage-link"><?php _e( 'show usage', 'advanced-ads' ); ?></a><?php
60 endif;
61 ?></td>
62 <td class="advads-placements-table-options">
63 <input type="hidden" class="advads-placement-slug" value="<?php echo $_placement_slug; ?>"/>
64 <?php if( ! isset( $_placement['type'] ) || 'default' === $_placement['type']) : ?>
65 <div class="hidden advads-usage">
66 <label><?php _e( 'shortcode', 'advanced-ads' ); ?>
67 <code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo $_placement_slug; ?>"]'/></code>
68 </label>
69 <label><?php _e( 'template (PHP)', 'advanced-ads' ); ?>
70 <code><input type="text" onclick="this.select();" value="if( function_exists('the_ad_placement') ) { the_ad_placement('<?php echo $_placement_slug; ?>'); }"/></code>
71 </label>
72 </div>
73 <?php endif; ?>
74
75 <?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
76
77 <?php
78 ob_start();
79 include ADVADS_BASE_PATH . 'admin/views/placements-item.php';
80 $item_option_content = ob_get_clean();
81
82 Advanced_Ads_Admin_Options::render_option(
83 'placement-item',
84 __( 'Item', 'advanced-ads' ),
85 $item_option_content ); ?>
86 <?php switch ( $_placement['type'] ) :
87 case 'post_content' :
88
89 ob_start();
90 include ADVADS_BASE_PATH . 'admin/views/placements-content-index.php';
91 $option_content = ob_get_clean();
92
93 Advanced_Ads_Admin_Options::render_option(
94 'placement-content-injection-index',
95 __( 'position', 'advanced-ads' ),
96 $option_content );
97
98 if( ! function_exists( 'mb_convert_encoding' ) ) : ?>
99 <p><span class="advads-error-message"><?php _e( 'Important Notice', 'advanced-ads' ); ?>: </span><?php _e( 'Your server is missing an extension. This might break the content injection.<br/>Ignore this warning if everything works fine or else ask your hosting provider to enable <em>mbstring</em>.', 'advanced-ads' ); ?></p>
100 <?php endif;
101 break;
102 endswitch;
103 do_action( 'advanced-ads-placement-options-after', $_placement_slug, $_placement );
104 ob_start();
105
106 if ( 'header' !== $_placement['type'] ):
107 $_label = isset( $_placement['options']['ad_label'] ) ? $_placement['options']['ad_label'] : 'default';
108 $_position = ! empty( $_placement['options']['placement_position'] ) ? $_placement['options']['placement_position'] : 'default';
109 $_clearfix = ! empty( $_placement['options']['placement_clearfix'] );
110
111 ob_start();
112 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label.php';
113 if ( ! empty( $placement_types[ $_placement['type']]['options']['show_position'] ) ) :
114 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label-position.php';
115 endif;
116 $option_content = ob_get_clean();
117
118 Advanced_Ads_Admin_Options::render_option(
119 'placement-ad-label',
120 __( 'ad label', 'advanced-ads' ),
121 $option_content );
122
123 endif;
124
125 do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
126 $advanced_options = ob_get_clean();
127 if( $advanced_options ) :
128 ?><a class="advads-toggle-link advads-placement-options-link"><?php _e( 'show all options', 'advanced-ads' ); ?></a>
129 <?php
130 $hidden = ( isset( $_POST['advads-last-edited-placement'] ) && $_placement_slug == $_POST['advads-last-edited-placement'] ) ? '' : ' hidden'; ?>
131 <div class="advads-placements-advanced-options advads-placements-advanced-options-<?php echo $_placement_slug; echo $hidden; ?>"><?php
132 echo $advanced_options;
133 ?></div><?php
134 endif;
135 // information after options
136 if( isset( $_placement['type'] ) && 'header' === $_placement['type']) :
137 ?><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><?php
138 endif;
139
140 ?></td>
141 <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
142 <td>
143 <input type="checkbox" id="advads-placements-item-delete-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][delete]" value="1"/>
144 <label for="advads-placements-item-delete-<?php echo $_placement_slug; ?>"><?php _ex( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
145 </td>
146 </tr>
147 <?php endforeach; ?>
148 </tbody>
149 </table>
150 <div class="tablenav bottom">
151 <input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php _e( 'Save Placements', 'advanced-ads' ); ?>"/>
152 <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
153 <button type="button" title="<?php _e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form')"><?php
154 _e( 'New Placement', 'advanced-ads' ); ?></button>
155 <?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
156 </div>
157 <input type="hidden" name="advads-last-edited-placement" id="advads-last-edited-placement" value="0"/>
158 </form>
159 <?php do_action( 'advanced-ads-placements-list-after', $placements );
160 endif;
161
162 ?><form method="POST" action="" onsubmit="return advads_validate_placement_form();" class="advads-placements-new-form"<?php if ( isset($placements) && count( $placements ) ) echo ' style="display: none;"' ; ?>>
163 <h3>1. <?php _e( 'Choose a placement type', 'advanced-ads' ); ?></h3>
164 <p class="description"><?php printf(__( 'Placement types define where the ad is going to be displayed. Learn more about the different types from the <a href="%s">manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements' ); ?></p>
165 <div class= "advads-new-placement-types advads-buttonset">
166 <?php
167 if ( is_array( $placement_types ) ) {
168 foreach ( $placement_types as $_key => $_place ) :
169 if( isset( $_place['image'] )) :
170 $image = '<img src="' . $_place['image'] . '" alt="' . $_place['title'] . '"/>';
171 else :
172 $image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
173 endif;
174 ?><div class="advads-placement-type"><label for="advads-placement-type-<?php echo $_key; ?>"><?php echo $image; ?></label>
175 <input type="radio" id="advads-placement-type-<?php echo $_key; ?>" name="advads[placement][type]" value="<?php echo $_key; ?>"/>
176 <p class="advads-placement-description"><strong><?php echo $_place['title'] ?></strong><br/><?php echo $_place['description']; ?></p>
177 </div><?php
178 endforeach; };
179 ?></div>
180 <div class="clear"></div>
181 <p class="advads-error-message advads-placement-type-error"><?php _e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
182 <br/>
183 <h3>2. <?php _e( 'Choose a Name', 'advanced-ads' ); ?></h3>
184 <p class="description"><?php _e( 'The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. <em>Below Post Headline</em>.', 'advanced-ads' ); ?></p>
185 <p><input name="advads[placement][name]" class="advads-new-placement-name" type="text" value="" placeholder="<?php _e( 'Placement Name', 'advanced-ads' ); ?>"/></p>
186 <p class="advads-error-message advads-placement-name-error"><?php _e( 'Please enter a name for your placement.', 'advanced-ads' ); ?></p>
187 <h3>3. <?php _e( 'Choose the Ad or Group', 'advanced-ads' ); ?></h3>
188 <p class="description"><?php _e( 'The ad or group that should be displayed.', 'advanced-ads' ); ?></p>
189 <p><select name="advads[placement][item]">
190 <option value=""><?php _e( '--not selected--', 'advanced-ads' ); ?></option>
191 <?php if ( isset($items['groups']) ) : ?>
192 <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
193 <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
194 <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
195 <?php endforeach; ?>
196 </optgroup>
197 <?php endif; ?>
198 <?php if ( isset($items['ads']) ) : ?>
199 <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
200 <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
201 <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
202 <?php endforeach; ?>
203 </optgroup>
204 <?php endif; ?>
205 </select></p>
206 <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
207 <input type="submit" class="button button-primary" value="<?php _e( 'Save New Placement', 'advanced-ads' ); ?>"/>
208 </form>
209 </div>
210