PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 1.8.5
Advanced Ads – Ad Manager & AdSense v1.8.5
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 8 years ago ad-display-metabox.php 8 years ago ad-group-edit.php 8 years ago ad-group-list-ads.php 8 years ago ad-group-list-form-row.php 8 years ago ad-group-list-header.php 10 years ago ad-group-list-row.php 10 years ago ad-group.php 8 years ago ad-info-after-textarea.php 8 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 8 years ago ad-list-no-ads.php 8 years ago ad-list-timing-column.php 8 years ago ad-main-metabox.php 8 years ago ad-output-metabox.php 8 years ago ad-parameters-metabox.php 8 years ago ad-parameters-size.php 8 years ago ad-submitbox-meta.php 8 years ago ad-visitor-metabox.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 placement-injection-top.php 8 years ago placements-ad-label-position.php 8 years ago placements-ad-label.php 8 years ago placements-content-index.php 8 years ago placements-item.php 8 years ago placements.php 8 years ago post-ad-settings-metabox.php 8 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
207 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 <?php if( ! isset( $_placement['type'] ) || 'default' === $_placement['type']) : ?>
64 <div class="hidden advads-usage">
65 <label><?php _e( 'shortcode', 'advanced-ads' ); ?>
66 <code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo $_placement_slug; ?>"]'/></code>
67 </label>
68 <label><?php _e( 'template (PHP)', 'advanced-ads' ); ?>
69 <code><input type="text" onclick="this.select();" value="if( function_exists('the_ad_placement') ) { the_ad_placement('<?php echo $_placement_slug; ?>'); }"/></code>
70 </label>
71 </div>
72 <?php endif; ?>
73
74 <?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
75
76 <?php
77 ob_start();
78 include ADVADS_BASE_PATH . 'admin/views/placements-item.php';
79 $item_option_content = ob_get_clean();
80
81 Advanced_Ads_Admin_Options::render_option(
82 'placement-item',
83 __( 'Item', 'advanced-ads' ),
84 $item_option_content ); ?>
85 <?php switch ( $_placement['type'] ) :
86 case 'post_content' :
87
88 ob_start();
89 include ADVADS_BASE_PATH . 'admin/views/placements-content-index.php';
90 $option_content = ob_get_clean();
91
92 Advanced_Ads_Admin_Options::render_option(
93 'placement-content-injection-index',
94 __( 'position', 'advanced-ads' ),
95 $option_content );
96
97 if( ! function_exists( 'mb_convert_encoding' ) ) : ?>
98 <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>
99 <?php endif;
100 break;
101 endswitch;
102 do_action( 'advanced-ads-placement-options-after', $_placement_slug, $_placement );
103 ob_start();
104
105 if ( 'header' !== $_placement['type'] ):
106 $_label = isset( $_placement['options']['ad_label'] ) ? $_placement['options']['ad_label'] : 'default';
107 $_position = ! empty( $_placement['options']['placement_position'] ) ? $_placement['options']['placement_position'] : 'default';
108 $_clearfix = ! empty( $_placement['options']['placement_clearfix'] );
109
110 ob_start();
111 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label.php';
112 if ( ! empty( $placement_types[ $_placement['type']]['options']['show_position'] ) ) :
113 include ADVADS_BASE_PATH . 'admin/views/placements-ad-label-position.php';
114 endif;
115 $option_content = ob_get_clean();
116
117 Advanced_Ads_Admin_Options::render_option(
118 'placement-ad-label',
119 __( 'ad label', 'advanced-ads' ),
120 $option_content );
121
122 endif;
123
124 do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
125 $advanced_options = ob_get_clean();
126 if( $advanced_options ) :
127 ?><a class="advads-toggle-link" onclick="advads_toggle('.advads-placements-advanced-options-<?php
128 echo $_placement_slug; ?>')"><?php _e( 'show all options', 'advanced-ads' ); ?></a>
129 <div class="advads-placements-advanced-options-<?php echo $_placement_slug; ?>" style="display: none"><?php
130 echo $advanced_options;
131 ?></div><?php
132 endif;
133 // information after options
134 if( isset( $_placement['type'] ) && 'header' === $_placement['type']) :
135 ?><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
136 endif;
137
138 ?></td>
139 <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
140 <td>
141 <input type="checkbox" id="advads-placements-item-delete-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][delete]" value="1"/>
142 <label for="advads-placements-item-delete-<?php echo $_placement_slug; ?>"><?php _ex( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
143 </td>
144 </tr>
145 <?php endforeach; ?>
146 </tbody>
147 </table>
148 <div class="tablenav bottom">
149 <input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php _e( 'Save Placements', 'advanced-ads' ); ?>"/>
150 <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
151 <button type="button" title="<?php _e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form')"><?php
152 _e( 'New Placement', 'advanced-ads' ); ?></button>
153 <?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
154 </div>
155 </form>
156 <?php do_action( 'advanced-ads-placements-list-after', $placements );
157 endif;
158
159 ?><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;"' ; ?>>
160 <h3>1. <?php _e( 'Choose a placement type', 'advanced-ads' ); ?></h3>
161 <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>
162 <div class= "advads-new-placement-types advads-buttonset">
163 <?php
164 if ( is_array( $placement_types ) ) {
165 foreach ( $placement_types as $_key => $_place ) :
166 if( isset( $_place['image'] )) :
167 $image = '<img src="' . $_place['image'] . '" alt="' . $_place['title'] . '"/>';
168 else :
169 $image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
170 endif;
171 ?><div class="advads-placement-type"><label for="advads-placement-type-<?php echo $_key; ?>"><?php echo $image; ?></label>
172 <input type="radio" id="advads-placement-type-<?php echo $_key; ?>" name="advads[placement][type]" value="<?php echo $_key; ?>"/>
173 <p class="advads-placement-description"><strong><?php echo $_place['title'] ?></strong><br/><?php echo $_place['description']; ?></p>
174 </div><?php
175 endforeach; };
176 ?></div>
177 <div class="clear"></div>
178 <p class="advads-error-message advads-placement-type-error"><?php _e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
179 <br/>
180 <h3>2. <?php _e( 'Choose a Name', 'advanced-ads' ); ?></h3>
181 <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>
182 <p><input name="advads[placement][name]" class="advads-new-placement-name" type="text" value="" placeholder="<?php _e( 'Placement Name', 'advanced-ads' ); ?>"/></p>
183 <p class="advads-error-message advads-placement-name-error"><?php _e( 'Please enter a name for your placement.', 'advanced-ads' ); ?></p>
184 <h3>3. <?php _e( 'Choose the Ad or Group', 'advanced-ads' ); ?></h3>
185 <p class="description"><?php _e( 'The ad or group that should be displayed.', 'advanced-ads' ); ?></p>
186 <p><select name="advads[placement][item]">
187 <option value=""><?php _e( '--not selected--', 'advanced-ads' ); ?></option>
188 <?php if ( isset($items['groups']) ) : ?>
189 <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
190 <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
191 <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
192 <?php endforeach; ?>
193 </optgroup>
194 <?php endif; ?>
195 <?php if ( isset($items['ads']) ) : ?>
196 <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
197 <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
198 <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
199 <?php endforeach; ?>
200 </optgroup>
201 <?php endif; ?>
202 </select></p>
203 <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
204 <input type="submit" class="button button-primary" value="<?php _e( 'Save New Placement', 'advanced-ads' ); ?>"/>
205 </form>
206 </div>
207