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
ad-group-edit.php
86 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Add and edit an ad group (taxonomy) |
| 4 | * |
| 5 | * @package Advanced_Ads_Admin |
| 6 | * @author Thomas Maier <thomas.maier@webgilde.com> |
| 7 | * @license GPL-2.0+ |
| 8 | * @link https://wpadvancedads.com |
| 9 | * @copyright since 2013 Thomas Maier, webgilde GmbH |
| 10 | * @deprecated |
| 11 | */ |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | die( '-1' ); } |
| 15 | |
| 16 | if ( ! is_int( $group_id ) ) { |
| 17 | ?> |
| 18 | <div id="message" class="updated"><p><strong><?php esc_attr_e( 'You did not select an item for editing.', 'advanced-ads' ); ?></strong></p></div> |
| 19 | <?php |
| 20 | return; |
| 21 | } |
| 22 | |
| 23 | do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); |
| 24 | ?> |
| 25 | |
| 26 | <div class="wrap"> |
| 27 | <h1><?php echo $tax->labels->edit_item; ?></h1> |
| 28 | <div id="ajax-response"></div> |
| 29 | <form name="editgroup" id="editgroup" method="post" action="<?php echo Advanced_Ads_Groups_List::group_page_url(); ?>" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>> |
| 30 | <input type="hidden" name="action" value="editedgroup" /> |
| 31 | <input type="hidden" name="group_id" value="<?php echo $group_id; ?>" /> |
| 32 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" /> |
| 33 | <?php |
| 34 | wp_original_referer_field( true, 'previous' ); |
| 35 | wp_nonce_field( 'update-group_' . $group_id ); |
| 36 | ?> |
| 37 | <table class="form-table"> |
| 38 | <tr class="form-field form-required"> |
| 39 | <th scope="row" valign="top"><label for="name"><?php echo esc_attr_x( 'Name', 'Taxonomy Name', 'advanced-ads' ); ?></label></th> |
| 40 | <td><input name="name" id="name" type="text" value=" |
| 41 | <?php |
| 42 | if ( isset( $tag->name ) ) { |
| 43 | echo esc_attr( $tag->name ); } |
| 44 | ?> |
| 45 | " size="40" aria-required="true" /></td> |
| 46 | </tr> |
| 47 | <?php if ( ! global_terms_enabled() ) { ?> |
| 48 | <tr class="form-field"> |
| 49 | <th scope="row" valign="top"><label for="slug"><?php echo esc_attr_x( 'Slug', 'Taxonomy Slug', 'advanced-ads' ); ?></label></th> |
| 50 | <td><input name="slug" id="slug" type="text" value="<?php |
| 51 | if ( isset( $tag->slug ) ) { |
| 52 | echo esc_attr( apply_filters( 'editable_slug', $tag->slug ) ); } |
| 53 | ?>" size="40" /> |
| 54 | <p class="description"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></p></td> |
| 55 | </tr> |
| 56 | <?php |
| 57 | } |
| 58 | $text = ( isset( $tag->description ) ) ? $tag->description : ''; |
| 59 | ?> |
| 60 | <tr class="form-field"> |
| 61 | <th scope="row" valign="top"><label for="description"><?php echo esc_attr_x( 'Description', 'Taxonomy Description', 'advanced-ads' ); ?></label></th> |
| 62 | <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo esc_textarea( $text ); ?></textarea></td> |
| 63 | </tr> |
| 64 | <?php |
| 65 | |
| 66 | do_action( $taxonomy . '_edit_form_fields', $tag, $taxonomy ); |
| 67 | ?> |
| 68 | </table> |
| 69 | <?php |
| 70 | do_action( $taxonomy . '_edit_form', $tag, $taxonomy ); |
| 71 | |
| 72 | if ( 0 === $group_id ) { |
| 73 | submit_button(esc_attr__( 'Create new Ad Group', 'advanced-ads' ) ); |
| 74 | } else { |
| 75 | submit_button( esc_attr__( 'Update', 'advanced-ads' ) ); |
| 76 | } |
| 77 | ?> |
| 78 | </form> |
| 79 | </div> |
| 80 | <script type="text/javascript"> |
| 81 | try { |
| 82 | document.forms.edittag.name.focus(); |
| 83 | } catch (e) { |
| 84 | } |
| 85 | </script> |
| 86 |