Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
/**
* Render additional content below the ad edit page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.7.3
*
* @var WP_Post $post The ad WP post object.
*/
use AdvancedAds\Utilities\Conditional;
?>
<div id="advads-wizard-controls" class="hidden">
<button type="button" id="advads-wizard-controls-prev" class="button button-secondary button-large"><span class="dashicons dashicons-controls-back"></span>&nbsp;<?php echo esc_attr_x( 'previous', 'wizard navigation', 'advanced-ads' ); ?></button>
<button id="advads-wizard-controls-save" class="button button-primary button-large">
<?php echo esc_attr_x( 'save', 'wizard navigation', 'advanced-ads' ); ?>
<span class="dashicons dashicons-controls-forward"></span>
</button>
<button type="button" id="advads-wizard-controls-next" class="button button-primary button-large"><?php echo esc_attr_x( 'next', 'wizard navigation', 'advanced-ads' ); ?>&nbsp;<span class="dashicons dashicons-controls-forward"></span></button>
<p><a href="javascript:void(0)" class="advads-stop-wizard"><?php esc_attr_e( 'Stop Wizard and show all options', 'advanced-ads' ); ?></a></p>
</div>
<?php if ( $this->start_wizard_automatically() ) : ?>
<script>jQuery( document ).ready(function ($) { advads_wizard.start() });</script>
<?php
endif;
/**
* Support and review box
*/
if ( ! Conditional::is_any_addon_activated() ) :
include ADVADS_ABSPATH . 'admin/views/support-callout.php';
?>
<script>jQuery( document ).ready(function () { jQuery( '#advads-support-callout').insertAfter( '#ad-types-box' ); });</script>
<?php
endif;

View File

@@ -0,0 +1,45 @@
<?php
/**
* Display ad wizard controls.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.7.3
*/
use AdvancedAds\Utilities\WordPress;
?>
<button id="advads-start-wizard" type="button" class="header-action button advads-button-secondary">
<span class="dashicons dashicons-controls-play"></span><?php esc_html_e( 'Start Wizard', 'advanced-ads' ); ?>
</button>
<button id="advads-stop-wizard" type="button" class="header-action button advads-button-secondary advads-stop-wizard hidden">
<span class="dashicons dashicons-no"></span><?php esc_html_e( 'Stop Wizard', 'advanced-ads' ); ?>
</button>
<script>
// Move wizard button to head.
jQuery('#advads-start-wizard').appendTo('#advads-header-actions');
jQuery('.advads-stop-wizard').appendTo('#advads-header-actions');
</script>
<?php if ( $this->show_wizard_welcome() || ! WordPress::get_count_ads() ) : ?>
<div class="advads-ad-metabox postbox">
<?php
if ( ! WordPress::get_count_ads() ) {
include ADVADS_ABSPATH . 'admin/views/ad-list-no-ads.php';
} if ( $this->show_wizard_welcome() ) :
?>
<div id="advads-wizard-welcome">
<br/>
<a class="advads-stop-wizard dashicons-before dashicons-no" style="line-height: 1.6em; cursor: pointer;"><?php esc_html_e( 'Stop Wizard and show all options', 'advanced-ads' ); ?></a>
</div>
<script>
// Move wizard button to head
jQuery('#advads-hide-wizard-welcome').click( function(){ jQuery( '#advads-wizard-welcome' ).remove(); });
jQuery('#advads-end-wizard').insertBefore('h1');
</script>
<?php
endif;
?>
</div>
<?php
endif;

View File

@@ -0,0 +1,63 @@
<?php
/**
* Render schedule options in the publish meta box on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $curr_year Current year.
* @var int $curr_month Current month index.
* @var int $curr_day Current day.
* @var int $curr_hour Current hour.
* @var int $curr_minute Current minute.
* @var int $enabled Whether expiry date is enabled (1) or not (0).
* @var WP_Locale $wp_locale WordPress locale object for month names.
*/
?>
<div id="advanced-ads-expiry-date" class="misc-pub-section curtime misc-pub-curtime">
<label onclick="advads_toggle_box('#advanced-ads-expiry-date-enable', '#advanced-ads-expiry-date .inner')">
<input type="checkbox" id="advanced-ads-expiry-date-enable" name="advanced_ad[expiry_date][enabled]" value="1" <?php checked( $enabled, 1 ); ?>/>
<?php esc_html_e( 'Set expiry date', 'advanced-ads' ); ?>
</label>
<br/>
<div class="inner"<?php echo ( ! $enabled ) ? ' style="display:none;"' : ''; ?>>
<?php
$month_field = '<label><span class="screen-reader-text">' . __( 'Month', 'advanced-ads' ) . '</span><select class="advads-mm" name="advanced_ad[expiry_date][month]"' . ">\n";
for ( $i = 1; $i < 13; $i = ++$i ) {
$month_num = zeroise( $i, 2 );
$month_field .= "\t\t\t" . '<option value="' . $month_num . '" ' . selected( $curr_month, $month_num, false ) . '>';
$month_field .= sprintf(
/* translators: %1$s is the month number, %2$s is the month shortname. */
_x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', 'advanced-ads' ),
$month_num,
$wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) )
) . "</option>\n";
}
$month_field .= '</select></label>';
$day_field = '<label><span class="screen-reader-text">' . __( 'Day', 'advanced-ads' ) . '</span><input type="text" class="advads-jj" name="advanced_ad[expiry_date][day]" value="' . $curr_day . '" size="2" maxlength="2" autocomplete="off" /></label>';
$year_field = '<label><span class="screen-reader-text">' . __( 'Year', 'advanced-ads' ) . '</span><input type="text" class="advads-aa" name="advanced_ad[expiry_date][year]" value="' . $curr_year . '" size="4" maxlength="4" autocomplete="off" /></label>';
$hour_field = '<label><span class="screen-reader-text">' . __( 'Hour', 'advanced-ads' ) . '</span><input type="text" class="advads-hh" name="advanced_ad[expiry_date][hour]" value="' . $curr_hour . '" size="2" maxlength="2" autocomplete="off" /></label>';
$minute_field = '<label><span class="screen-reader-text">' . __( 'Minute', 'advanced-ads' ) . '</span><input type="text" class="advads-mn" name="advanced_ad[expiry_date][minute]" value="' . $curr_minute . '" size="2" maxlength="2" autocomplete="off" /></label>';
?>
<fieldset class="advads-timestamp">
<?php
// phpcs:disable
printf(
/* translators: %1$s month, %2$s day, %3$s year, %4$s hour, %5$s minute. */
_x( '%1$s %2$s, %3$s @ %4$s %5$s', 'order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute', 'advanced-ads' ),
$month_field,
$day_field,
$year_field,
$hour_field,
$minute_field
);
// phpcs:enable
?>
</fieldset>
(<?php echo esc_html( Advanced_Ads_Utils::get_timezone_name() ); ?>)
</div>
</div>

View File

@@ -0,0 +1,74 @@
<?php
/**
* Bulk edit fields
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0
*
* @var array $privacy_options privacy module options.
*/
use AdvancedAds\Admin\Quick_Bulk_Edit;
use AdvancedAds\Options;
global $wp_locale;
?>
<fieldset class="inline-edit-col-right advads-bulk-edit">
<div class="advads-bulk-edit-grid">
<label>
<span class="title"><?php esc_html_e( 'Debug mode', 'advanced-ads' ); ?></span>
<select name="debug_mode">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="on"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option value="off"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
</label>
<label>
<span class="title"><?php esc_html_e( 'Expiry date', 'advanced-ads' ); ?></span>
<select name="expiry_date">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="on"><?php esc_html_e( 'Set', 'advanced-ads' ); ?></option>
<option value="off"><?php esc_html_e( 'Unset', 'advanced-ads' ); ?></option>
</select>
</label>
<div class="expiry-inputs advads-datetime">
<?php Quick_Bulk_Edit::print_date_time_inputs(); ?>
</div>
<label>
<span class="title"><?php esc_html_e( 'Ad label', 'advanced-ads' ); ?></span>
<span>
<input type="text" name="ad_label" value="" placeholder="— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —" <?php echo Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ? '' : 'disabled'; ?>>
<?php if ( ! Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ) : ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php
printf(
/* Translators: %s is the URL to the settings page. */
esc_html__( 'Enable the Ad Label %1$s in the settings%2$s.', 'advanced-ads' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings' ) ) . '" target="_blank">',
'</a>'
);
?>
</span>
</span>
<?php endif; ?>
</span>
</label>
<?php if ( isset( $privacy_options['enabled'] ) ) : ?>
<label>
<span><?php esc_html_e( 'Ignore privacy settings', 'advanced-ads' ); ?></span>
<select name="ignore_privacy">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="on"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option value="off"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
</label>
<?php endif; ?>
</div>
</fieldset>

View File

@@ -0,0 +1,91 @@
<?php
/**
* Plugin deactivation feedback popup.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.47.0
*/
?>
<div id="advanced-ads-feedback-overlay" style="display: none;">
<div id="advanced-ads-feedback-content">
<span id="advanced-ads-feedback-overlay-close-button">&#x2715;</span>
<form action="" method="post">
<p>
<strong><?php esc_html_e( 'Why did you decide to disable Advanced Ads?', 'advanced-ads' ); ?></strong>
</p>
<ul>
<li class="advanced_ads_disable_help">
<label>
<input type="radio" name="advanced_ads_disable_reason" value="get help" checked="checked"/><?php esc_html_e( 'I have a problem, a question or need help.', 'advanced-ads' ); ?>
</label>
</li>
<li>
<textarea class="advanced_ads_disable_help_text" name="advanced_ads_disable_text[]" placeholder="<?php esc_attr_e( 'Please let us know how we can help', 'advanced-ads' ); ?>"></textarea>
</li>
<?php if ( $email ) : ?>
<li class="advanced_ads_disable_reply">
<label>
<?php esc_html_e( 'Send me free help to ', 'advanced-ads' ); ?>
<input type="email" name="advanced_ads_disable_reply_email" value="<?php echo esc_attr( $email ); ?>"/>
</label>
</li>
<?php endif; ?>
<li>
<label>
<input type="radio" name="advanced_ads_disable_reason" value="ads not showing up"/><?php esc_html_e( 'Ads are not showing up', 'advanced-ads' ); ?>
</label>
</li>
<li>
<label>
<input type="radio" name="advanced_ads_disable_reason" value="temporary"/><?php esc_html_e( 'It is only temporary', 'advanced-ads' ); ?>
</label>
</li>
<li>
<label>
<input type="radio" name="advanced_ads_disable_reason" value="missing feature"/><?php esc_html_e( 'I miss a feature', 'advanced-ads' ); ?>
</label>
</li>
<li>
<input type="text" name="advanced_ads_disable_text[]" value="" placeholder="<?php esc_html_e( 'Which one?', 'advanced-ads' ); ?>"/>
</li>
<li>
<label>
<input type="radio" name="advanced_ads_disable_reason" value="stopped showing ads"/><?php esc_html_e( 'I stopped using ads on my site.', 'advanced-ads' ); ?>
</label>
</li>
<li>
<label>
<input type="radio" name="advanced_ads_disable_reason" value="other plugin"/><?php esc_html_e( 'I switched to another plugin', 'advanced-ads' ); ?>
</label>
</li>
</ul>
<?php if ( $from ) : ?>
<input type="hidden" name="advanced_ads_disable_from" value="<?php echo esc_attr( $from ); ?>"/>
<?php endif; ?>
<input class="advanced-ads-feedback-submit button button-primary" type="submit" name="advanced_ads_disable_submit" value="<?php esc_attr_e( 'Send feedback & deactivate', 'advanced-ads' ); ?>"/>
<input class="advanced-ads-feedback-not-deactivate advanced-ads-feedback-submit button" type="submit" name="advanced_ads_keep_submit" value="<?php esc_attr_e( 'Send feedback', 'advanced-ads' ); ?>">
<?php wp_nonce_field( 'advanced_ads_disable_form', 'advanced_ads_disable_form_nonce' ); ?>
<a class="advanced-ads-feedback-only-deactivate" href="#"><?php esc_html_e( 'Only Deactivate', 'advanced-ads' ); ?></a>
</form>
<div id="advanced-ads-feedback-after-submit">
<h2 id="advanced-ads-feedback-after-submit-waiting" style="display: none">
<?php esc_html_e( 'Thanks for submitting your feedback. I will reply within 24 hours on working days.', 'advanced-ads' ); ?>
</h2>
<h2 id="advanced-ads-feedback-after-submit-goodbye" style="display: none">
<?php
printf(
/* translators: %s is the title of the website. */
wp_kses_post( __( 'All the best to you and <em>%s</em>.', 'advanced-ads' ) ),
esc_html( get_bloginfo( 'name' ) )
);
?>
</h2>
<p id="advanced-ads-feedback-after-submit-disabling-plugin" style="display: none">
<?php esc_html_e( 'Disabling the plugin now…', 'advanced-ads' ); ?>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,62 @@
<?php
/**
* Header on admin pages
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $title page title.
* @var WP_Screen $screen Current screen
* @var string $reset_href href attribute for the reset button
* @var bool $show_filter_button if the filter button is visible
* @var string $filter_disabled if the visible filter button is disabled
* @var string $new_button_label text displayed on the New button
* @var string $new_button_href href of the New button
* @var string $new_button_id id of the New button
* @var string $show_screen_options if to show the Screen Options button
* @var string $manual_url target of the manual link
* @var string $tooltip description that will show in a tooltip
*/
?>
<div id="advads-header">
<div id="advads-header-wrapper">
<div>
<svg class="advads-header-logo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" height="30" width="30" viewBox="0 0 351.7 352" xml:space="preserve"><path d="M252.2 149.6v125.1h-174.9v-174.9H202.4c-5.2-11.8-8-24.7-8-38.5s3-26.7 8-38.5h-37.7H0v267.9l8.8 8.8 -8.8-8.8C0 324.5 27.5 352 61.3 352l0 0h103.4 164.5V149.3c-11.8 5.2-25 8.3-38.8 8.3C276.9 157.6 264 154.6 252.2 149.6z" fill="#1C1B3A"/><circle cx="290.4" cy="61.3" r="61.3" fill="#0E75A4"/></svg>
<h1><?php echo esc_html( $title ); ?></h1>
</div>
<div id="advads-header-actions">
<?php if ( '' !== $new_button_label ) : ?>
<a href="<?php echo esc_url( $new_button_href ); ?>" class="header-action button advads-button-primary" id="<?php echo esc_attr( $new_button_id ); ?>">
<span class="dashicons dashicons-plus"></span><?php echo esc_html( $new_button_label ); ?>
</a>
<?php endif; ?>
<?php if ( '' !== $tooltip ) : ?>
<span class="advads-help"><span class="advads-tooltip"><?php echo esc_html( $tooltip ); ?></span></span>
<?php endif; ?>
</div>
<div id="advads-header-links">
<?php if ( '' !== $reset_href ) : ?>
<a id="advads-reset-filters" href="<?php echo esc_url( $reset_href ); ?>" class="button advads-button-secondary advads-button-icon-right">
<?php esc_html_e( 'Reset', 'advanced-ads' ); ?><span class="dashicons dashicons-undo"></span>
</a>
<?php endif; ?>
<?php if ( $show_filter_button ) : ?>
<button id="advads-show-filters" class="button advads-button-secondary advads-button-icon-right <?php echo esc_attr( $filter_disabled ); ?>" <?php disabled( $filter_disabled, 'disabled' ); ?>>
<?php esc_html_e( 'Filters', 'advanced-ads' ); ?><span class="dashicons dashicons-filter"></span>
</button>
<?php endif; ?>
<?php if ( $show_screen_options ) : ?>
<button id="advads-show-screen-options" class="button advads-button-secondary"><?php esc_html_e( 'Screen Options', 'advanced-ads' ); ?></button>
<?php endif; ?>
<?php if ( ! defined( 'AAP_VERSION' ) ) : ?>
<a href="https://wpadvancedads.com/add-ons/?utm_source=advanced-ads&utm_medium=link&utm_campaign=header-upgrade-<?php echo esc_attr( $screen->id ); ?>" target="_blank" class="advads-upgrade button advads-button-secondary advads-button-icon-right">
<?php esc_html_e( 'See all Add-ons', 'advanced-ads' ); ?><span class="dashicons dashicons-star-filled"></span>
</a>
<?php endif; ?>
<a href="<?php echo esc_url( $manual_url ); ?>?utm_source=advanced-ads&utm_medium=link&utm_campaign=header-manual-<?php echo esc_attr( $screen->id ); ?>" target="_blank" class="button advads-button-secondary advads-button-icon-right">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?><span class="dashicons dashicons-welcome-learn-more"></span>
</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,4 @@
<?php
/**
* Silence is golden.
*/

View File

@@ -0,0 +1,16 @@
<?php
/**
* Render Manual Link
*
* @package AdvancedAds
* @since 2.0.0
*
* @param string $title link text.
* @param string $url target URL.
*/
?>
<a class="advads-link advads-manual-link" href="<?php echo esc_url( $url ); ?>" target="_blank">
<?php echo esc_html( $title ); ?>
</a>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Render Adsense meta box on ad edit screen.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
* @var string $report_type Value is 'domain'.
* @var string $report_filter Filter to be used.
* @var string $pub_id Adsense ID.
*/
$pub_id = Advanced_Ads_AdSense_Data::get_instance()->get_adsense_id();
// Early bail!!
if ( ! $pub_id ) {
esc_html_e( 'There is an error in your AdSense setup.', 'advanced-ads' );
return;
}
Advanced_Ads_Overview_Widgets_Callbacks::adsense_stats_js( $pub_id );
$arguments = [
'type' => $report_type,
'filter' => $report_filter,
];
$report = new Advanced_Ads_AdSense_Report( $report_type, $report_filter );
echo '<div class="advanced-ads-adsense-dashboard" data-arguments="' . esc_js( wp_json_encode( $arguments ) ) . '">';
echo wp_kses_post( $report->get_markup() );
echo '</div>';

View File

@@ -0,0 +1,43 @@
<?php
/**
* Render additional information below the text area on the ad edit page
* currently "plain text" and "rich content" ad types
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*
* phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
*/
use AdvancedAds\Utilities\Validation;
if ( defined( 'WP_DEBUG' ) && WP_DEBUG &&
( $error = Validation::is_valid_ad_dom( $ad ) ) ) : // phpcs:ignore ?>
<p class="advads-notice-inline advads-error">
<?php
esc_html_e( 'The code of this ad might not work properly with the Content placement.', 'advanced-ads' );
?>
&nbsp;
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ),
[
'a' => [
'href' => [],
],
]
),
esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#support' ) )
);
?>
<span style="white-space:pre-wrap"><?php echo $error; ?></span>
</p>
<?php
endif;
do_action( 'advanced-ads-ad-params-below-textarea', $ad );

View File

@@ -0,0 +1,108 @@
<?php
/**
* Render Layout/Output meta box on ad edit screen.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
use AdvancedAds\Admin\Upgrades;
use AdvancedAds\Options;
?>
<div class="advads-ad-positioning">
<?php echo ( new Advanced_Ads_Ad_Positioning( $ad ) )->return_admin_view(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<div class="advads-option-list">
<hr class="advads-hide-in-wizard"/>
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-id">
<?php esc_html_e( 'container ID', 'advanced-ads' ); ?>
</label>
<div class="advads-hide-in-wizard">
<input type="text" id="advads-output-wrapper-id" name="advanced_ad[output][wrapper-id]" value="<?php echo esc_attr( $ad->get_wrapper_id() ); ?>"/>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Specify the id of the ad container. Leave blank for random or no id.', 'advanced-ads' ); ?>
<?php esc_html_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?>
</span>
</span>
&nbsp;<p class="advads-notice-inline advads-error advads-output-wrapper-id-error hidden"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></p>
</div>
<hr class="advads-hide-in-wizard"/>
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-class">
<?php esc_html_e( 'container classes', 'advanced-ads' ); ?>
</label>
<div class="advads-hide-in-wizard">
<input type="text" id="advads-output-wrapper-class" name="advanced_ad[output][wrapper-class]" value="<?php echo esc_attr( $ad->get_wrapper_class() ); ?>"/>
<span class="advads-help"><span class="advads-tooltip"><?php esc_html_e( 'Specify one or more classes for the container. Separate multiple classes with a space', 'advanced-ads' ); ?>.</span></span>
</div>
<hr class="advads-hide-in-wizard"/>
<label class="label advads-hide-in-wizard" for="advads-output-ad-label">
<?php esc_html_e( 'Ad label', 'advanced-ads' ); ?>
</label>
<div class="advads-hide-in-wizard">
<input type="text" id="advads-output-ad-label" name="advanced_ad[output][ad_label]" value="<?php echo esc_attr( $ad->get_prop( 'ad_label' ) ); ?>" <?php echo Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ? '' : 'disabled'; ?>/>
<?php if ( ! Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ) : ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php
printf(
/* Translators: %s is the URL to the settings page. */
esc_html__( 'Enable the Ad Label %1$s in the settings%2$s.', 'advanced-ads' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings' ) ) . '" target="_blank">',
'</a>'
);
?>
</span>
</span>
<?php endif; ?>
</div>
<hr />
<label for="advads-output-debugmode" class="label advads-hide-in-wizard">
<?php esc_html_e( 'Enable debug mode', 'advanced-ads' ); ?>
</label>
<div class="advads-hide-in-wizard">
<input type="hidden" name="advanced_ad[debugmode]" value="off">
<input id="advads-output-debugmode" type="checkbox" name="advanced_ad[debugmode]" value="on" <?php checked( $ad->is_debug_mode() ); ?>/>
<a href="https://wpadvancedads.com/manual/ad-debug-mode/?utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank" class="advads-manual-link"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
</div>
<?php if ( ! defined( 'AAP_VERSION' ) ) : ?>
<hr class="advads-hide-in-wizard"/>
<label class="label advads-hide-in-wizard"><?php esc_html_e( 'Display only once', 'advanced-ads' ); ?></label>
<div class="advads-hide-in-wizard">
<?php esc_html_e( 'Display the ad only once per page', 'advanced-ads' ); ?>
<p>
<?php
Upgrades::pro_feature_link( 'upgrade-pro-display-only-once' );
?>
</p>
</div><hr class="advads-hide-in-wizard"/>
<label class="label advads-hide-in-wizard"><?php esc_html_e( 'Custom Code', 'advanced-ads' ); ?></label>
<div class="advads-hide-in-wizard">
<?php
esc_html_e( 'Place your own code below the ad', 'advanced-ads' );
?>
<p>
<?php
Upgrades::pro_feature_link( 'upgrade-pro-custom-code' );
?>
</p> </div>
<?php endif; ?>
<?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Render the ad type size parameter on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Ad_Type $ad_type Ad type instance.
*/
// dont show sizes for Google Ad Manager ads.
if ( 'gam' === $ad_type->get_id() ) {
return;
}
$show_reserve_space = in_array( $ad_type->get_id(), [ 'plain', 'content', 'group', 'adsense' ], true );
$enable_reserve_space = $show_reserve_space && $ad->is_space_reserved();
?>
<span class="label"><?php esc_html_e( 'size', 'advanced-ads' ); ?></span>
<div id="advanced-ads-ad-parameters-size">
<label>
<?php esc_html_e( 'width', 'advanced-ads' ); ?><input type="number" value="<?php echo esc_attr( $ad->get_width() ); ?>" name="advanced_ad[width]">px
</label>
<label>
<?php esc_html_e( 'height', 'advanced-ads' ); ?><input type="number" value="<?php echo esc_attr( $ad->get_height() ); ?>" name="advanced_ad[height]">px
</label>
<label<?php echo ! $show_reserve_space ? ' style="display:none;"' : ''; ?>>
<input type="checkbox" id="advads-wrapper-add-sizes" name="advanced_ad[reserve_space]" value="true" <?php checked( $enable_reserve_space ); ?>><?php esc_html_e( 'reserve this space', 'advanced-ads' ); ?>
</label>
<?php
if ( 'image' === $ad_type->get_id() ) :
$ad_type->show_original_image_size( $ad );
endif;
?>
</div>
<hr/>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Render the ad type parameters meta box on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
$ad_type = $ad->get_type_object();
do_action( "advanced-ads-ad-params-before-{$ad->get_type()}", $ad );
do_action( 'advanced-ads-ad-params-before', $ad );
?>
<div id="advanced-ads-tinymce-wrapper" style="display:none;">
<?php
$args = [
// used here instead of textarea_rows, because of display:none.
'editor_height' => 300,
'drag_drop_upload' => true,
];
wp_editor( '', 'advanced-ads-tinymce', $args );
?>
</div>
<div id="advanced-ads-ad-parameters" class="advads-option-list">
<?php
if ( $ad_type->has_size() ) {
include ADVADS_ABSPATH . 'views/admin/metaboxes/ads/ad-parameters-size.php';
}
?>
</div>
<?php
do_action( "advanced-ads-ad-params-after-{$ad->get_type()}", $ad );
do_action( 'advanced-ads-ad-params-after', $ad );

View File

@@ -0,0 +1,54 @@
<?php
/**
* Render targeting meta box for Display and Visitor Conditions on ad edit page
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
$display_conditions = $ad->get_display_conditions();
$visitor_conditions = $ad->get_visitor_conditions();
$display_conditions_available = empty( $display_conditions );
$visitor_conditions_available = empty( $visitor_conditions );
?>
<h3>
<?php echo esc_html__( 'Display Conditions', 'advanced-ads' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Limit the ad to pages that match the following conditions. Dont do anything here if the ad should appear everywhere you embed it.', 'advanced-ads' ); ?>
</span>
</span>
</h3>
<?php if ( $display_conditions_available ) : ?>
<div class="advads-show-in-wizard">
<p><?php esc_html_e( 'Click on the button below if the ad should NOT show up on all pages when included automatically.', 'advanced-ads' ); ?></p>
<button type="button" class="button button-secondary" id="advads-wizard-display-conditions-show"><?php esc_html_e( 'Hide the ad on some pages', 'advanced-ads' ); ?></button>
</div>
<?php endif; ?>
<div id="advads-display-conditions" <?php echo $display_conditions_available ? 'class="advads-hide-in-wizard"' : ''; ?>>
<?php Advanced_Ads_Display_Conditions::render_condition_list( $display_conditions, 'advads-ad-display-conditions' ); ?>
</div>
<?php do_action( 'advanced-ads-display-conditions-after', $ad ); ?>
<hr/>
<h3>
<?php echo esc_html__( 'Visitor Conditions', 'advanced-ads' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Target the ad to specific user groups that match the following conditions. Dont do anything here if all users should see the ad.', 'advanced-ads' ); ?>
</span>
</span>
</h3>
<?php if ( $visitor_conditions_available ) : ?>
<div class="advads-show-in-wizard">
<p><?php esc_html_e( 'Click on the button below if the ad should NOT be visible to all visitors', 'advanced-ads' ); ?></p>
<button type="button" class="button button-secondary" id="advads-wizard-visitor-conditions-show"><?php esc_html_e( 'Hide the ad from some users', 'advanced-ads' ); ?></button>
</div>
<?php endif; ?>
<div id="advads-visitor-conditions" <?php echo $visitor_conditions_available ? 'class="advads-hide-in-wizard"' : ''; ?>>
<?php Advanced_Ads_Visitor_Conditions::render_condition_list( $visitor_conditions, 'advads-ad-visitor-conditions' ); ?>
</div>
<?php do_action( 'advanced-ads-visitor-conditions-after', $ad ); ?>

View File

@@ -0,0 +1,68 @@
<?php
/**
* Render the types meta box on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
use AdvancedAds\Admin\Upgrades;
use AdvancedAds\Utilities\Conditional;
$types = wp_advads_get_ad_types();
if ( empty( $types ) ) : ?>
<p>
<?php esc_html_e( 'No ad types defined', 'advanced-ads' ); ?>
</p>
<?php
return;
endif;
?>
<ul id="advanced-ad-type">
<?php foreach ( $types as $ad_type ) : ?>
<li class="advanced-ads-type-list-<?php echo esc_attr( $ad_type->get_id() ); ?>">
<input
type="radio"
name="advanced_ad[type]"
id="advanced-ad-type-<?php echo esc_attr( $ad_type->get_id() ); ?>"
value="<?php echo esc_attr( $ad_type->get_id() ); ?>"
<?php checked( $ad->get_type(), $ad_type->get_id() ); ?>
<?php disabled( $ad_type->is_premium() ); ?>
/>
<label for="advanced-ad-type-<?php echo esc_attr( $ad_type->get_id() ); ?>"><?php echo esc_html( $ad_type->get_title() ); ?></label>
<?php if ( ! empty( $ad_type->get_description() ) ) : ?>
<span class="advads-help">
<span class="advads-tooltip"><?php echo esc_html( $ad_type->get_description() ); ?></span>
</span>
<?php endif; ?>
<?php
if ( $ad_type->get_upgrade_url() ) {
echo ' ';
Upgrades::upgrade_link(
__( 'Manual', 'advanced-ads' ),
$ad_type->get_upgrade_url(),
'upgrade-ad-type-' . $ad_type->get_id()
);
}
?>
</li>
<?php endforeach; ?>
</ul>
<?php
$_notice = 'nl_adsense';
$box_classes = 'mt-1 advads-notice-adsense' . ( 'adsense' !== $ad->get_type() ? ' !hidden' : '' );
if ( Advanced_Ads_Admin_Notices::get_instance()->can_display( $_notice ) && Conditional::user_can_subscribe( 'nl_first_steps' ) ) {
$text = sprintf(
/* translators: %s: number of add-ons. */
__( 'Subscribe to our free email course for Google AdSense, receive our newsletter for periodic tutorials, and get %s for Advanced Ads.', 'advanced-ads' ),
'<strong>' . __( '2 free add-ons', 'advanced-ads' ) . '</strong>'
);
include ADVADS_ABSPATH . '/admin/views/notices/inline.php';
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Option to enter notes for a given ad
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
$description = $ad->get_description();
?>
<label class="label" for="advads-usage-notes" onclick="advads_toggle('#advads-ad-notes textarea'); advads_toggle('#advads-ad-notes p')"><?php esc_html_e( 'notes', 'advanced-ads' ); ?></label>
<div id="advads-ad-notes">
<p title="<?php esc_html_e( 'click to change', 'advanced-ads' ); ?>" onclick="advads_toggle('#advads-ad-notes textarea'); advads_toggle('#advads-ad-notes p')">
<?php
if ( ! empty( $description ) ) {
echo nl2br( esc_html( $description ) );
} else {
esc_html_e( 'Click to add notes', 'advanced-ads' );
}
?>
<span class="dashicons dashicons-edit"></span>
</p>
<textarea name="advanced_ad[description]" id="advads-usage-notes"><?php echo esc_html( $description ); ?></textarea>
</div>
<hr/>

View File

@@ -0,0 +1,30 @@
<?php
/**
* Render usage information for ads.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
?>
<label class="label" for="advads-usage-shortcode"><?php esc_html_e( 'Shortcode', 'advanced-ads' ); ?></label>
<div class="advads-usage">
<code><input type="text" id="advads-usage-shortcode" onclick="this.select();" value='[the_ad id="<?php echo esc_attr( $ad->get_id() ); ?>"]' readonly/></code>
</div>
<hr/>
<label class="label" for="advads-usage-function"><?php esc_html_e( 'Template (PHP)', 'advanced-ads' ); ?></label>
<div class="advads-usage">
<code><input type="text" id="advads-usage-function" onclick="this.select();" value="&lt;?php the_ad('<?php echo esc_attr( $ad->get_id() ); ?>'); ?&gt;" readonly/></code>
<?php
printf(
/* translators: 1: is an opening a tag, 2: is a closing a tag */
esc_html__( 'Find more display options in the %1$smanual%2$s.', 'advanced-ads' ),
'<a href="https://wpadvancedads.com/manual/placements/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-ad-title" target="_blank" class="advads-manual-link">',
'</a>'
);
?>
</div>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Render the Usage meta box on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var Ad $ad Ad instance.
*/
?>
<div id="advads-ad-usage" class="advads-option-list">
<?php
require_once ADVADS_ABSPATH . 'views/admin/metaboxes/ads/ad-usage-notes.php';
require_once ADVADS_ABSPATH . 'views/admin/metaboxes/ads/ad-usage-shortcodes.php';
?>
</div>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Render the Usage meta box on the ad edit screen
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var WP_Post|object $post Post instance.
* @var array $values Setting array.
*/
wp_nonce_field( 'advads_post_meta_box', 'advads_post_meta_box_nonce' );
?>
<p>
<a href="https://wpadvancedads.com/how-to-block-ads-on-a-specific-page/?utm_source=advanced-ads&utm_medium=link&utm_campaign=disable-ads-on-specific-pages" target="_blank">
<?php esc_html_e( 'How to disable ads on specific pages', 'advanced-ads' ); ?>
</a>
</p>
<label>
<input type="checkbox" name="advanced_ads[disable_ads]" value="1"<?php checked( $values['disable_ads'] ?? false ); ?>/>
<?php esc_html_e( 'Disable ads on this page', 'advanced-ads' ); ?>
</label>
<?php
do_action( 'advanced_ads_render_post_meta_box', $post, $values );

View File

@@ -0,0 +1,47 @@
<?php
/**
* Page/Post bulk edit fields
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0
*/
use AdvancedAds\Admin\Upgrades;
?>
<fieldset class="inline-edit-col-right">
<table class="advads-bulk-edit-fields">
<tr>
<td>
<span class="title"><?php esc_html_e( 'Disable ads', 'advanced-ads' ); ?></span></td>
<td>
<label>
<select name="advads_disable_ads">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="on"><?php esc_html_e( 'Disable', 'advanced-ads' ); ?></option>
<option value="off"><?php esc_html_e( 'Allow', 'advanced-ads' ); ?></option>
</select>
</label>
</td>
</tr>
<tr>
<td>
<span class="title"><?php esc_html_e( 'Disable injection into the content', 'advanced-ads' ); ?></span></td>
<td>
<label>
<select name="advads_disable_the_content" <?php echo defined( 'AAP_VERSION' ) ? null : 'disabled'; ?>>
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="on"><?php esc_html_e( 'Disable', 'advanced-ads' ); ?></option>
<option value="off"><?php esc_html_e( 'Allow', 'advanced-ads' ); ?></option>
</select>
<?php
if ( ! defined( 'AAP_VERSION' ) ) {
Upgrades::upgrade_link( '', 'https://wpadvancedads.com/advanced-ads-pro/', 'upgrade-pro-disable-post-quick-edit' );
}
?>
</label>
</td>
</tr>
</table>
</fieldset>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Page/Post quick edit fields
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0
*
* @var string $post_type current post type.
*/
use AdvancedAds\Admin\Upgrades;
?>
<fieldset class="inline-edit-col-right" disabled>
<div class="inline-edit-col">
<div class="inline-edit-group wp-clearfix">
<label class="alignleft">
<input type="checkbox" name="advads-disable-ads" value="1"/>
<span class="checkbox-title">
<?php echo 'page' === $post_type ? esc_html__( 'Disable ads on this page', 'advanced-ads' ) : esc_html__( 'Disable ads on this post', 'advanced-ads' ); ?>
</span>
</label>
</div>
<div class="inline-edit-group wp-clearfix">
<?php $pro_installed = defined( 'AAP_VERSION' ); ?>
<label class="alignleft">
<input type="checkbox" name="<?php echo esc_attr( $pro_installed ? 'advads-disable-the-content' : '' ); ?>" value="1" <?php echo $pro_installed ? '' : 'disabled'; ?>>
<span class="checkbox-title"><?php esc_html_e( 'Disable automatic ad injection into the content', 'advanced-ads' ); ?></span>
<?php if ( ! $pro_installed ) : ?>
( <?php Upgrades::upgrade_link( '', 'https://wpadvancedads.com/advanced-ads-pro/', 'upgrade-pro-disable-post-quick-edit' ); ?>)
<?php endif; ?>
</label>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Render Placement Bulk Edit Form
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0.0
*/
?>
<fieldset class="inline-edit-col-right advanced-ads advads-bulk-edit">
<div class="inline-edit-col">
<div class="wp-clearfix">
<label>
<span class="title"><?php esc_html_e( 'Ad Label', 'advanced-ads' ); ?></span>
<select name="ad_label">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads' ); ?> —</option>
<option value="default"><?php esc_html_e( 'Default', 'advanced-ads' ); ?></option>
<option value="enabled"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option value="disabled"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
</label>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,23 @@
<?php
/**
* Markup for the placement item select box.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
$placement_type = wp_advads_get_placement_type( 'default' );
?>
<select id="advads-placement-item" name="advads[placement][item]" class="advads-placement-item-select">
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
<?php foreach ( $placement_type->get_allowed_items() as $item_group ) : ?>
<optgroup label="<?php echo esc_attr( $item_group['label'] ); ?>">
<?php foreach ( $item_group['items'] as $item_id => $item_name ) : ?>
<option value="<?php echo esc_attr( $item_id ); ?>">
<?php echo esc_html( $item_name ); ?>
</option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>

View File

@@ -0,0 +1,94 @@
<?php
/**
* Render form to create new placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $placements_description Whether a placement already exists.
*/
if ( '' !== $placements_description ) : ?>
<p class="description">
<?php echo esc_html( $placements_description ); ?>
<a href="https://wpadvancedads.com/manual/placements/?utm_source=advanced-ads&utm_medium=link&utm_campaign=placements" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</p>
<?php endif; ?>
<form method="POST" class="advads-placements-new-form advads-form" id="advads-placements-new-form">
<input type="hidden" name="nonce" value="<?php echo esc_attr( wp_create_nonce( 'advads-create-placement' ) ); ?>"/>
<h3>1. <?php esc_html_e( 'Choose a placement type', 'advanced-ads' ); ?></h3>
<p class="description">
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( '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' ),
[
'a' => [
'href' => [],
],
]
),
'https://wpadvancedads.com/manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements'
);
?>
</p>
<?php require 'placement-types.php'; ?>
<?php
// show Pro placements if Pro is not activated.
if ( ! defined( 'AAP_VERSION' ) ) :
require ADVADS_ABSPATH . 'admin/views/upgrades/pro-placements.php';
endif;
?>
<div class="clear"></div>
<p class="advads-notice-inline advads-error advads-form-type-error">
<?php esc_html_e( 'Please select a type.', 'advanced-ads' ); ?>
</p>
<br/>
<h3>2.
<label for="advads-placement-title">
<?php esc_html_e( 'Choose a Name', 'advanced-ads' ); ?>
</label>
</h3>
<p>
<input name="advads[placement][title]" id="advads-placement-title" class="advads-form-name" type="text" value="" placeholder="<?php esc_html_e( 'Placement Name', 'advanced-ads' ); ?>"/>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. Below Post Headline.', 'advanced-ads' ); ?>
</span>
</span>
</p>
<p class="advads-notice-inline advads-error advads-form-name-error">
<?php esc_html_e( 'Please enter a name.', 'advanced-ads' ); ?>
</p>
<h3>
3. <label for="advads-placement-item">
<?php esc_html_e( 'Choose the Ad or Group', 'advanced-ads' ); ?>
</label>
</h3>
<p>
<?php require 'item-select.php'; ?>
</p>
<?php wp_nonce_field( 'advads-new-placement', 'advads_placement' ); ?>
<input type="hidden" name="action_advads" value="new_placement">
</form>
<script type="text/html" id="tmpl-advads-placement-ad-select">
<select name="advads[placement][item]" id="advads-placement-item">
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
<# for ( group of data.items ) { #>
<optgroup label="{{ group.label }}">
<# for ( item_id in group.items ) { #>
<option value="{{ item_id }}">
{{ group.items[item_id] }}
</option>
<# } #>
</optgroup>
<# } #>
</select>
</script>

View File

@@ -0,0 +1,40 @@
<?php
/**
* Render all placement types for forms.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
$placement_types = wp_advads_get_placement_types();
if ( empty( $placement_types ) ) {
return '';
}
usort(
$placement_types,
function ( $a, $b ) {
return $a->get_order() - $b->get_order();
}
);
?>
<div class="advads-form-types advads-buttonset">
<?php foreach ( $placement_types as $placement_type ) : ?>
<div class="advads-form-type advads-placement-type">
<label for="advads-form-type-<?php echo esc_attr( $placement_type->get_id() ); ?>">
<?php if ( ! empty( $placement_type->get_image() ) ) : ?>
<img src="<?php echo esc_attr( $placement_type->get_image() ); ?>" alt="<?php echo esc_attr( $placement_type->get_title() ); ?>"/>
<?php else : ?>
<strong><?php echo esc_html( $placement_type->get_title() ); ?></strong><br/>
<p class="description"><?php echo esc_html( $placement_type->get_description() ); ?></p>
<?php endif; ?>
</label>
<input type="radio" id="advads-form-type-<?php echo esc_attr( $placement_type->get_id() ); ?>" name="advads[placement][type]" value="<?php echo esc_attr( $placement_type->get_id() ); ?>"/>
<div class="advads-form-description">
<h4><?php echo esc_html( $placement_type->get_title() ); ?></h4>
<?php echo esc_html( $placement_type->get_description() ); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@@ -0,0 +1,46 @@
<?php
/**
* Render the edit modal for the placement.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*
* @var int $user_id
* @var int $author_id
* @var string $options Marked-up options.
*/
use AdvancedAds\Abstracts\Placement;
?>
<form name="post" method="post" id="<?php echo esc_attr( $this->get_form_id() ); ?>">
<input type="hidden" name="nonce" value="<?php echo esc_attr( wp_create_nonce( 'advads-update-placement' ) ); ?>"/>
<input type="hidden" name="post_ID" value="<?php echo absint( $placement->get_id() ); ?>">
<?php
$slug = $placement->get_slug();
/**
* Hook before placement options
*
* @param string $slug the placement slug.
* @param Placement $placement the placement.
*/
do_action( 'advanced-ads-placement-options-before', $slug, $placement );
$this->render_settings();
/**
* Hook after placement options
*
* @param string $slug the placement slug.
* @param Placement $placement the placement.
*/
do_action( 'advanced-ads-placement-options-after', $slug, $placement );
?>
</form>

View File

@@ -0,0 +1,39 @@
<?php
/**
* Render ad label position option for placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var string $position Value of the position option.
* @var bool $clearfix Value of the position clearfix option.
*/
?>
<label title="<?php esc_html_e( 'default', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][placement_position]" value="default" <?php checked( $position, 'default' ); ?>/>
<?php esc_html_e( 'default', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'left', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][placement_position]" value="left" <?php checked( $position, 'left' ); ?>/>
<?php esc_html_e( 'left', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'center', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][placement_position]" value="center" <?php checked( $position, 'center' ); ?>/>
<?php esc_html_e( 'center', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'right', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][placement_position]" value="right" <?php checked( $position, 'right' ); ?>/>
<?php esc_html_e( 'right', 'advanced-ads' ); ?>
</label>
<p>
<label>
<input type="checkbox" name="advads[placements][options][placement_clearfix]" value="1" <?php checked( $clearfix, 1 ); ?>/>
<?php esc_html_e( 'Check this if you dont want the following elements to float around the ad. (adds a placement_clearfix)', 'advanced-ads' ); ?>
</label>
</p>

View File

@@ -0,0 +1,24 @@
<?php
/**
* Render ad label option for placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var string $label value of the label option.
*/
?>
<label title="<?php esc_html_e( 'default', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][ad_label]" value="default" <?php checked( $label, 'default' ); ?>/>
<?php esc_html_e( 'default', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'enabled', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][ad_label]" value="enabled" <?php checked( $label, 'enabled' ); ?>/>
<?php esc_html_e( 'enabled', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'disabled', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][options][ad_label]" value="disabled" <?php checked( $label, 'disabled' ); ?>/>
<?php esc_html_e( 'disabled', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,55 @@
<?php
/**
* Render content index option for placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var string $placement_slug Placement slug.
* @var string $xpath xpath option.
* @var string $selected_tag The currently selected tag.
* @var array $tags Array of tags; indexded by tag value is label. cf. Content_Injection::get_tags().
* @var string $index The currently selected index.
* @var array $positions Available positions.
* @var string $selected_position The currently selected position, defaults to 'after'.
* @var bool $start_from_bottom Whether to start counting from bottom.
*/
?>
<select name="advads[placements][options][position]">
<?php foreach ( $positions as $position => $position_label ) : ?>
<option value="<?php echo esc_attr( $position ); ?>" <?php selected( $selected_position, $position ); ?>>
<?php echo esc_html( $position_label ); ?>
</option>
<?php endforeach; ?>
</select>
<input type="number" name="advads[placements][options][index]" value="<?php echo (int) $index; ?>" min="1"/>.
<select class="advads-placements-content-tag" name="advads[placements][options][tag]">
<?php foreach ( $tags as $tag => $tag_label ) : // phpcs:ignore ?>
<option value="<?php echo esc_attr( $tag ); ?>" <?php selected( $selected_tag, $tag ); ?>>
<?php echo esc_html( $tag_label ); ?>
</option>
<?php endforeach; ?>
</select>
<div id="advads-frontend-element-<?php echo esc_attr( $placement_slug ); ?>" class="advads-placements-content-custom-xpath<?php echo 'custom' !== $selected_tag ? ' hidden' : ''; ?>">
<input name="advads[placements][options][xpath]" class="advads-frontend-element" type="text" value="<?php echo esc_html( $xpath ); ?>" placeholder="<?php esc_html_e( 'use xpath, e.g. `p[not(parent::blockquote)]`', 'advanced-ads' ); ?>"/>
<button style="display:none; color: red;" type="button" class="advads-deactivate-frontend-picker button ">
<?php echo esc_html_x( 'stop selection', 'frontend picker', 'advanced-ads' ); ?>
</button>
<button type="button" class="advads-activate-frontend-picker button " data-placementid="<?php echo esc_attr( $placement_slug ); ?>" data-pathtype="xpath" data-boundary="true">
<?php esc_html_e( 'select position', 'advanced-ads' ); ?>
</button>
</div>
<p>
<label>
<input type="checkbox" name="advads[placements][options][start_from_bottom]" value="1" <?php checked( $start_from_bottom ); ?>>
<?php esc_html_e( 'start counting from bottom', 'advanced-ads' ); ?>
</label>
</p>

View File

@@ -0,0 +1,17 @@
<?php
/**
* Render inline css option for placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var string $placement_slug Slug of the current placement.
* @var string $placement Placement with all options.
*/
?>
<input
type="text"
value="<?php echo esc_attr( $inline_css ); ?>"
name="advads[placements][options][inline-css]"/>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Markup for the placement item select box.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
?>
<div class="advads-placement-item-select-wrap">
<select
id="advads-placements-modal-item-<?php echo esc_attr( $placement->get_id() ); ?>"
name="advads[placements][item]"
class="advads-placement-item-select"
>
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
<?php foreach ( $placement->get_type_object()->get_allowed_items() as $item_group ) : ?>
<optgroup label="<?php echo esc_attr( $item_group['label'] ); ?>">
<?php foreach ( $item_group['items'] as $item_id => $item_name ) : ?>
<option value="<?php echo esc_attr( $item_id ); ?>"<?php selected( $placement->get_item(), $item_id ); ?>>
<?php echo esc_html( $item_name ); ?>
</option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<a class="advads-placement-item-edit" href="<?php echo esc_url( $placement->get_item_object() ? $placement->get_item_object()->get_edit_link() : '#' ); ?>" title="<?php esc_attr_e( 'Edit item', 'advanced-ads' ); ?>">
<span class="dashicons dashicons-external"></span>
</a>
</div>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Render the input to change the placement name.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
?>
<input type="text" name="post_title" size="30" value="<?php echo esc_html( $placement->get_title() ); ?>">
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Modifying the placement name will result in a change to the placement slug as well. Remember to update any customized CSS accordingly.', 'advanced-ads' ); ?>
</span>
</span>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Markup for the placement status select box.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
$statuses = [
'draft' => __( 'Draft', 'advanced-ads' ),
'publish' => __( 'Publish', 'advanced-ads' ),
]
?>
<div class="advads-placement-status-select-wrap">
<select
id="advads-placements-modal-status-<?php echo esc_attr( $placement->get_id() ); ?>"
name="post_status"
class="advads-placement-status-select"
>
<?php foreach ( $statuses as $key => $status ) : // phpcs:ignore ?>
<option value="<?php echo esc_attr( $key ); ?>"<?php selected( $placement->get_status(), $key ); ?>>
<?php echo esc_html( $status ); ?>
</option>
<?php endforeach; ?>
</select>
</div>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Placement Quick Edit form
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
?>
<fieldset class="inline-edit-col-left advanced-ads" disabled>
<div class="inline-edit-col">
<div class="inline-edit-group">
<label class="alignleft">
<span class="title"><?php esc_html_e( 'Status', 'advanced-ads' ); ?></span>
<select name="status">
<option value="publish"><?php esc_html_e( 'Published', 'advanced-ads' ); ?></option>
<option value="draft"><?php esc_html_e( 'Draft', 'advanced-ads' ); ?></option>
</select>
</label>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,57 @@
<?php
/**
* Quick edit fields
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0
*
* @var array $privacy_options privacy module options.
*/
use AdvancedAds\Options;
global $wp_locale;
?>
<fieldset class="inline-edit-col-right advads-quick-edit" disabled>
<div class="inline-edit-col">
<div class="wp-clearfix">
<label><input value="1" type="checkbox" name="debugmode"><?php esc_html_e( 'Debug mode', 'advanced-ads' ); ?></label>
</div>
<div class="wp-clearfix">
<label><input type="checkbox" name="enable_expiry" value="1"/><?php esc_html_e( 'Set expiry date', 'advanced-ads' ); ?></label>
<div class="expiry-inputs advads-datetime">
<?php \AdvancedAds\Admin\Quick_Bulk_Edit::print_date_time_inputs(); ?>
</div>
</div>
<?php if ( isset( $privacy_options['enabled'] ) ) : ?>
<div class="wp-clearfix">
<label><input type="checkbox" name="ignore_privacy" value="1"/><?php esc_html_e( 'Ignore privacy settings', 'advanced-ads' ); ?></label>
</div>
<?php endif; ?>
<div class="wp-clearfix">
<label>
<span class="title"><?php esc_html_e( 'Ad label', 'advanced-ads' ); ?></span>
<input type="text" name="ad_label" value="" <?php echo Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ? '' : 'disabled'; ?>>
<?php if ( ! Options::instance()->get( 'advanced-ads.custom-label.enabled' ) ) : ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php
printf(
/* Translators: %s is the URL to the settings page. */
esc_html__( 'Enable the Ad Label %1$s in the settings%2$s.', 'advanced-ads' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings' ) ) . '" target="_blank">',
'</a>'
);
?>
</span>
</span>
<?php endif; ?>
</label>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Screen Options for ads & placements list
* #list-view-mode needs to be here to fix an issue were the list view mode cannot be reset automatically. Saving the form again does that.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.47.0
*
* @var array $optional_filters All available filters.
* @var bool $is_filter_permanent Show filters permanently.
*/
?>
<input id="list-view-mode" type="hidden" name="mode" value="list">
<input type="hidden" name="advanced-ads-screen-options[screen-id]" value="<?php echo esc_attr( get_current_screen()->id ); ?>">
<fieldset class="metabox-prefs advads-show-filter">
<legend><?php esc_html_e( 'Filters', 'advanced-ads' ); ?></legend>
<?php if ( ! empty( $optional_filters ) ) : ?>
<?php foreach ( $optional_filters as $filter_key => $filter ) : ?>
<input id="advads-so-filters-<?php echo esc_attr( $filter_key ); ?>" type="checkbox" name="advanced-ads-screen-options[filters_to_show][]" value="<?php echo esc_attr( $filter_key ); ?>" <?php checked( in_array( $filter_key, $selected_filters, true ) ); ?> />
<label for="advads-so-filters-<?php echo esc_attr( $filter_key ); ?>"><?php echo esc_html( $filter ); ?></label>
<?php endforeach; ?>
<br><br>
<?php endif; ?>
<input id="advads-so-show-filters" type="checkbox" name="advanced-ads-screen-options[show-filters]" value="true" <?php checked( $is_filter_permanent ); ?> />
<label for="advads-so-show-filters"><?php esc_html_e( 'Show filters permanently', 'advanced-ads' ); ?></label>
</fieldset>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Dashboard page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
use AdvancedAds\Admin\Welcome;
use AdvancedAds\Modules\ProductExperimentationFramework\Module;
?>
<div class="wrap">
<span class="wp-header-end"></span>
<?php do_action( 'advanced-ads-admin-overview-before' ); ?>
<div id="advads-overview">
<?php Module::get_instance()->render( 'overview' ); ?>
<?php Welcome::get()->display(); ?>
<?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?>
</div>
<?php do_action( 'advanced-ads-admin-overview-after' ); ?>
</div>

View File

@@ -0,0 +1,67 @@
<?php
/**
* Render form to create a new ad group.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
use AdvancedAds\Admin\Upgrades;
$group_types = wp_advads_get_group_types();
?>
<form method="post" name="new-group" class="advads-group-new-form advads-form" id="advads-group-new-form">
<input type="hidden" name="nonce" value="<?php echo esc_attr( wp_create_nonce( 'advads-create-group' ) ); ?>">
<h3>1. <?php esc_html_e( 'Choose the type', 'advanced-ads' ); ?></h3>
<div class="advads-form-types advads-buttonset">
<?php
foreach ( $group_types as $group_type ) :
if ( $group_type->is_premium() ) {
continue;
}
?>
<div class="advads-form-type">
<label for="advads-form-type-<?php echo esc_attr( $group_type->get_id() ); ?>">
<img src="<?php echo esc_attr( $group_type->get_image() ); ?>" alt="<?php echo esc_attr( $group_type->get_title() ); ?>"/>
</label>
<input type="radio" id="advads-form-type-<?php echo esc_attr( $group_type->get_id() ); ?>" name="advads-group-type" value="<?php echo esc_attr( $group_type->get_id() ); ?>"/>
<div class="advads-form-description">
<h4><?php echo esc_html( $group_type->get_title() ); ?></h4>
<?php echo esc_html( $group_type->get_description() ); ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php if ( wp_advads_get_group_type_manager()->has_premium() ) : ?>
<div class="advads-form-types">
<?php
foreach ( $group_types as $group_type ) :
if ( ! $group_type->is_premium() ) {
continue;
}
?>
<div class="advads-form-type">
<label class="advads-button advads-pro-link">
<span class="advads-button-text">
<img src="<?php echo esc_attr( $group_type->get_image() ); ?>" alt="<?php echo esc_attr( $group_type->get_title() ); ?>"/>
</span>
</label>
<p class="advads-form-description">
<strong><?php echo esc_html( $group_type->get_title() ); ?></strong>
</p>
</div>
<?php endforeach; ?>
</div>
<div class="clear"></div>
<h4>
<?php Upgrades::upgrade_link( __( 'Get all group types with All Access', 'advanced-ads' ), 'https://wpadvancedads.com/add-ons/all-access/', 'upgrades-pro-groups' ); ?>
</h4>
<?php endif; ?>
<div class="clear"></div>
<p class="advads-notice-inline advads-error advads-form-type-error"><?php esc_html_e( 'Please select a type.', 'advanced-ads' ); ?></p>
<br/>
<h3>2. <?php esc_html_e( 'Choose a name', 'advanced-ads' ); ?></h3>
<input type="text" name="advads-group-name" class="advads-form-name" placeholder="<?php esc_attr_e( 'Group title', 'advanced-ads' ); ?>"/>
<p class="advads-notice-inline advads-error advads-form-name-error"><?php esc_html_e( 'Please enter a name.', 'advanced-ads' ); ?></p>
</form>

View File

@@ -0,0 +1,60 @@
<?php
/**
* Groups page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var WP_List_Table|false $wp_list_table The groups list table
*/
use AdvancedAds\Modal;
use AdvancedAds\Entities;
use AdvancedAds\Utilities\Conditional;
?>
<span class="wp-header-end"></span>
<div class="wrap">
<?php
ob_start();
if ( empty( $wp_list_table->items ) ) :
?>
<p>
<?php
echo esc_html( Entities::get_group_description() );
?>
<a href="https://wpadvancedads.com/manual/ad-groups/?utm_source=advanced-ads&utm_medium=link&utm_campaign=groups" target="_blank" class="advads-manual-link"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
</p>
<?php
endif;
require ADVADS_ABSPATH . 'views/admin/screens/group-form.php';
Modal::create(
[
'modal_slug' => 'group-new',
'modal_content' => ob_get_clean(),
'modal_title' => __( 'New Ad Group', 'advanced-ads' ),
'close_validation' => 'advads_validate_new_form',
]
);
?>
<div id="ajax-response"></div>
<div id="advads-group-filter">
<?php $wp_list_table->render_filters(); ?>
</div>
<div id="advads-ad-group-list">
<?php $wp_list_table->display(); ?>
</div>
</div>
<?php
// no groups and no filters then open the new group modal.
if ( empty( $wp_list_table->items ) && ! Conditional::has_filter_or_search() ) :
?>
<script>
window.location.hash = '#modal-group-new';
</script>
<?php
endif;

View File

@@ -0,0 +1,11 @@
<?php
/**
* Onboarding screen.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
defined( 'ABSPATH' ) || exit;
?>
<div id="advads-onboarding-wizard"></div>

View File

@@ -0,0 +1,63 @@
<?php
/**
* Settings page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
// array with setting tabs for frontend.
$setting_tabs = apply_filters(
'advanced-ads-setting-tabs',
[
'general' => [
'page' => wp_advads()->screens->get_hook( 'settings' ),
'group' => ADVADS_SLUG,
'tabid' => 'general',
'title' => __( 'General', 'advanced-ads' ),
],
]
);
?><div class="wrap">
<h2 style="display: none;"><!-- There needs to be an empty H2 headline at the top of the page so that WordPress can properly position admin notifications --></h2>
<?php Advanced_Ads_Checks::show_issues(); ?>
<?php settings_errors(); ?>
<div class="nav-tab-wrapper" id="advads-tabs">
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
<a class="nav-tab" id="<?php echo esc_attr( $_setting_tab_id ); ?>-tab"
href="#top#<?php echo esc_attr( $_setting_tab_id ); ?>"><?php echo esc_html( $_setting_tab['title'] ); ?></a>
<?php endforeach; ?>
<a class="nav-tab" id="support-tab"
href="#top#support"><?php esc_html_e( 'Support', 'advanced-ads' ); ?></a>
</div>
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
<div id="<?php echo esc_attr( $_setting_tab_id ); ?>" class="advads-tab">
<div id="advads-sub-menu-<?php echo esc_attr( $_setting_tab_id ); ?>" class="advads-tab-sub-menu"></div>
<?php do_action( 'advanced_ads_settings_before_form', $_setting_tab_id, $_setting_tab ); ?>
<form class="advads-settings-tab-main-form" method="post" action="options.php">
<?php
if ( isset( $_setting_tab['group'] ) ) {
settings_fields( $_setting_tab['group'] );
}
do_settings_sections( $_setting_tab['page'] );
do_action( 'advanced-ads-settings-form', $_setting_tab_id, $_setting_tab );
if ( isset( $_setting_tab['group'] ) && 'advanced-ads-licenses' !== $_setting_tab['group'] ) {
submit_button( __( 'Save settings on this page', 'advanced-ads' ) );
}
?>
</form>
<?php do_action( 'advanced-ads-settings-tab-after-form', $_setting_tab_id, $_setting_tab ); ?>
</div>
<?php endforeach; ?>
<div id="support" class="advads-tab">
<?php require_once ADVADS_ABSPATH . 'admin/views/support.php'; ?>
</div>
<?php
do_action( 'advanced-ads-additional-settings-form' );
// print the filesystem credentials modal if needed.
Advanced_Ads_Filesystem::get_instance()->print_request_filesystem_credentials_modal();
?>
</div>

View File

@@ -0,0 +1,15 @@
<?php
/**
* Tools page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
?>
<div class="wrap advads-wrap">
<?php
$this->get_tabs_menu();
$this->get_tab_content();
?>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Ui Toolkit page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
?>
<div class="wrap advads-wrap">
<?php
$this->get_header(
[ 'title' => __( 'Ui Toolkit', 'advanced-ads' ) ]
);
$this->get_tabs_menu();
$this->get_tab_content();
?>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
// display notice if js file was overridden.
if ( ! $checked && apply_filters( 'advanced-ads-activate-advanced-js', $checked ) ) : ?>
<p><?php esc_html_e( 'The file is currently enabled by an add-on that needs it.', 'advanced-ads' ); ?></p>
<?php endif; ?>
<label>
<input id="advanced-ads-advanced-js" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[advanced-js]" <?php checked( $checked, 1 ); ?>>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'Enable advanced JavaScript functions (<a href="%s" target="_blank">here</a>). Some features and add-ons might override this setting if they need features from this file.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/javascript-functions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings'
);
?>
</label>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Template for allow unfiltered_html for user roles on multisites.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var WP_Role[] $user_roles_to_display Array of user roles that are allowed to edit ads.
* @var array $allowed_roles Array of user role names that are allowed to use unfiltered_html on ads.
*/
?>
<fieldset>
<legend><?php esc_html_e( 'Allow unfiltered HTML for these user roles:', 'advanced-ads' ); ?></legend>
<?php foreach ( $user_roles_to_display as $user_role ) : ?>
<p>
<input
type="checkbox"
id="<?php echo esc_attr( $user_role->name ); ?>"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[allow-unfiltered-html][]"
value="<?php echo esc_attr( $user_role->name ); ?>"
<?php checked( in_array( $user_role->name, $allowed_roles, true ) ); ?>
>
<label for="<?php echo esc_attr( $user_role->name ); ?>"><?php echo esc_html( $user_role->name ); ?></label>
</p>
<?php endforeach; ?>
</fieldset>
<p class="description">
<?php esc_html_e( 'Enabling this option for untrusted users may cause them to publish malicious or poorly formatted code in their ads and can be a potential security risk. You should carefully consider which user roles you grant this capability.', 'advanced-ads' ); ?>
</p>

View File

@@ -0,0 +1,26 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.2.0
*
* @var int $checked Value of 1, when the option is checked.
*/
use AdvancedAds\Utilities\Conditional;
?>
<label>
<input id="advanced-ads-block-bots" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[block-bots]" <?php checked( $checked, 1 ); ?>>
<?php if ( Conditional::is_ua_bot() ) : ?>
<span class="advads-notice-inline advads-error"><?php esc_html_e( 'You look like a bot', 'advanced-ads' ); ?></span>
<?php endif; ?>
<?php esc_html_e( 'Hide ads from crawlers, bots and empty user agents.', 'advanced-ads' ); ?>
<span class="description">
<a href="https://wpadvancedads.com/hide-ads-from-bots/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings" target="blank" class="advads-external-link">
<?php esc_html_e( 'Read this first', 'advanced-ads' ); ?>
</a>
</span>
</label>

View File

@@ -0,0 +1,51 @@
<?php
/**
* View to show the content injection settings.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<fieldset>
<label>
<input type="radio" value="on" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-enabled]" <?php echo ( 'on' === $enabled || ( '' === $enabled && ! empty( $everywhere ) ) ) ? 'checked' : ''; ?> onclick="toggle_visibility(this, '[name=\'<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]\']');" />
on
</label>
<label>
<input type="radio" value="off" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-enabled]" <?php echo ( 'off' === $enabled || 0 === $everywhere ) ? 'checked' : ''; ?> onclick="toggle_visibility(this, '[name=\'<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]\']');" />
off
</label>
</fieldset>
<br/>
<select name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]" style="min-width: 85px; display:<?php echo ( 'off' === $enabled || 0 === $everywhere ) ? 'none' : 'block'; ?>" >
<option value="1" <?php selected( $everywhere, 1 ); ?>>1</option>
<option value="2" <?php selected( $everywhere, 2 ); ?>>2</option>
<option value="3" <?php selected( $everywhere, 3 ); ?>>3</option>
<option value="4" <?php selected( $everywhere, 4 ); ?>>4</option>
<option value="5" <?php selected( $everywhere, 5 ); ?>>5</option>
<option value="6" <?php selected( $everywhere, 6 ); ?>>6</option>
<option value="7" <?php selected( $everywhere, 7 ); ?>>7</option>
<option value="8" <?php selected( $everywhere, 8 ); ?>>8</option>
<option value="9" <?php selected( $everywhere, 9 ); ?>>9</option>
<option value="10" <?php selected( $everywhere, 10 ); ?>>10</option>
<option value="-1" <?php echo ( -1 === $everywhere || $everywhere > 10 ) ? 'selected' : ''; ?>>all</option>
</select>
<p class="description">
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'To ensure compatibility, ads are not injected into excerpts or the full content of posts on archive pages. However, by enabling this option, you can override this restriction and set a limit on the number of posts where ads will be injected. Please note that if you want to insert ads between post listing items on archive pages, you can utilize the Post list placement (<a href="%s" target="_blank">manual</a>) feature.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
esc_url( 'https://wpadvancedads.com/manual/placement-post-lists/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-content-injection' )
);
?>
</p>

View File

@@ -0,0 +1,16 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-content-injection-level-disabled" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-level-disabled]" <?php checked( $checked, 1 ); ?>>
<?php esc_html_e( 'Advanced Ads ignores paragraphs and other elements in containers when injecting ads into the post content. Check this option to ignore this limitation and ads might show up again.', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Content injection priority setting.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input id="advanced-ads-content-injection-priority" type="number" value="<?php echo esc_attr( $priority ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-priority]" size="3"/>
<p class="description">
<?php
if ( $priority < 11 ) :
?>
<span class="advads-notice-inline advads-error"><?php esc_html_e( 'Please check your post content. A priority of 10 and below might cause issues (wpautop function might run twice).', 'advanced-ads' ); ?></span><br />
<?php
endif;
esc_html_e( 'Play with this value in order to change the priority of the injected ads compared to other auto injected elements in the post content.', 'advanced-ads' );
?>
</p>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Ad label settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var bool $enabled If label setting is enabled.
* @var string $label Label input text.
* @var bool $html_enabled HTML allowed or not.
*/
?>
<fieldset>
<input type="checkbox" <?php checked( $enabled, true ); ?> value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][enabled]"/>
<input id="advads-custom-label" type="text" value="<?php echo esc_html( $label ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][text]"/>
</fieldset>
<p class="description">
<?php esc_html_e( 'Displayed above ads.', 'advanced-ads' ); ?>&nbsp;
<a class="advads-manual-link" href="https://wpadvancedads.com/manual/advertisement-label/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-advertisement-label" target="_blank">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</p>
<label>
<input type="checkbox" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][html_enabled]" value="1" <?php checked( $html_enabled, true ); ?> />
<?php esc_html_e( 'Enable HTML for the field', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,100 @@
<?php
/**
* Render disable ads settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<label>
<input
id="advanced-ads-disable-ads-all"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][all]"
<?php checked( $disable_all, 1 ); ?>
>
<?php esc_html_e( 'Disable all ads in frontend', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Use this option to disable all ads in the frontend, but still be able to use the plugin.', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-404"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][404]"
<?php checked( $disable_404, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on 404 error pages', 'advanced-ads' ); ?>
</label>
<br/>
<label>
<input
id="advanced-ads-disable-ads-archives"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][archives]"
<?php checked( $disable_archives, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on non-singular pages', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'e.g. archive pages like categories, tags, authors, front page (if a list)', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-secondary"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][secondary]"
<?php checked( $disable_secondary, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on secondary queries', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Secondary queries are custom queries of posts outside the main query of a page. Try this option if you see ads injected on places where they shouldnt appear.', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-feed"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][feed]"
<?php checked( $disable_feed, 1 ); ?>
>
<?php esc_html_e( 'Disable ads in RSS Feed', 'advanced-ads' ); ?>
</label>
<br/>
<label>
<input
id="advanced-ads-disable-ads-rest-api"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][rest-api]"
<?php checked( $disable_rest_api, 1 ); ?>
>
<?php esc_html_e( 'Disable ads in REST API', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,21 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-disabled-notices" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disable-notices]" <?php checked( $checked, 1 ); ?>>
<?php
esc_html_e( 'Disable Ad Health in frontend and backend, warnings and internal notices like tips, tutorials, email newsletters and update notices.', 'advanced-ads' );
?>
<a href="https://wpadvancedads.com/manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-ad-health" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</label>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Disable post types upgrade notice.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
use AdvancedAds\Admin\Upgrades;
foreach ( $post_types as $_type_id => $_type ) :
$_label = sprintf( '%s (%s)', $_type->label, $_type_id );
if ( $type_label_counts[ $_type->label ] < 2 ) {
$_label = $_type->label;
}
?>
<label style="margin-right: 1em;"><input type="checkbox" disabled="disabled"><?php echo esc_html( $_label ); ?></label>
<?php endforeach; ?>
<p>
<?php esc_html_e( 'The free version provides the post type display condition on the ad edit page.', 'advanced-ads' ); ?>
</p>
<p>
<?php Upgrades::pro_feature_link( 'upgrade-pro-disable-post-type' ); ?>
</p>

View File

@@ -0,0 +1,31 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.47.0
*
* @var boolean $allow True, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-editors-manage-ads" type="checkbox" <?php checked( $allow, true ); ?> name="<?php echo esc_attr( ADVADS_SLUG ); ?>[editors-manage-ads]"/>
<?php esc_html_e( 'Allow editors to also manage and publish ads.', 'advanced-ads' ); ?>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'You can assign different ad-related roles on a user basis with <a href="%s" target="_blank">Advanced Ads Pro</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/add-ons/advanced-ads-pro/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings'
);
?>
</label>

View File

@@ -0,0 +1,14 @@
<?php
/**
* Render frontend prefix settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input id="advanced-ads-front-prefix" type="text" value="<?php echo esc_attr( $prefix ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[front-prefix]" />
<?php // deprecated. ?>
<input type="hidden" value="<?php echo esc_attr( $old_prefix ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[id-prefix]" />
<p class="description"><?php esc_html_e( 'Prefix of class and id attributes for elements created in the frontend.', 'advanced-ads' ); ?></p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Render IP Address settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input
id="<?php echo esc_attr( ADVADS_SLUG ); ?>-disable-ads-ip-address"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-ip-address][enabled]"
class="advads-has-sub-settings"
<?php checked( $disable_ip_addr, 1 ); ?>
>
<label for="<?php echo esc_attr( ADVADS_SLUG ); ?>-disable-ads-ip-address">
<?php esc_html_e( 'Activate module', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Enter one IP address per line for which no ads are displayed.', 'advanced-ads' ); ?>
</span>
</span>
<div class="advads-sub-settings" style="margin-top: 1em;">
<textarea
cols="50"
rows="5"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-ip-address][ips]"
placeholder="<?php esc_html_e( 'Enter one IP address per line for which no ads are displayed.', 'advanced-ads' ); ?>"
><?php echo esc_textarea( $ip_address ); ?></textarea>
</div>

View File

@@ -0,0 +1,22 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var array $roles Array of user roles.
* @var array $hide_for_roles Array of roles that should not see ads.
*/
?>
<div id="advads-settings-hide-by-user-role">
<?php foreach ( $roles as $_role => $_display_name ) : ?>
<label>
<input type="checkbox" value="<?php echo esc_attr( $_role ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-user-role][]"<?php checked( in_array( $_role, $hide_for_roles, true ), true ); ?>>
<?php echo esc_html( $_display_name ); ?>
</label>
<?php endforeach; ?>
</div>
<p class="description"><?php esc_html_e( 'Choose the roles a user must have in order to not see any ads.', 'advanced-ads' ); ?></p>

View File

@@ -0,0 +1,19 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $target Value of 1, when the option is checked.
*/
?>
<label>
<input name="<?php echo esc_attr( ADVADS_SLUG ); ?>[target-blank]" type="checkbox" value="1" <?php checked( 1, $target ); ?> />
<?php echo wp_kses( __( 'Open programmatically created links in a new window (use <code>target="_blank"</code>)', 'advanced-ads' ), [ 'code' => [] ] ); ?>
<a href="https://wpadvancedads.com/open-ad-in-new-window/?utm_source=advanced-ads&utm_medium=link&utm_campaign=open-new-window" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</label>

View File

@@ -0,0 +1,17 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var boolean $enabled Value of 1, when the option is checked.
*/
?>
<label>
<input type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[uninstall-delete-data]" <?php checked( $enabled, 1 ); ?>>
<?php esc_html_e( 'Clean up all data related to Advanced Ads when removing the plugin.', 'advanced-ads' ); ?>
</label>
<?php

View File

@@ -0,0 +1,10 @@
<?php
/**
* Addon box for the license settings page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0.0
*/
\Advanced_Ads_Overview_Widgets_Callbacks::render_addons( true, false );

View File

@@ -0,0 +1,31 @@
<?php
/**
* View to show the license section in the settings.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<p>
<a href="https://wpadvancedads.com/manual/how-to-install-an-add-on/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses-install-add-ons" target="_blank">
<?php esc_html_e( 'How to install and activate an add-on.', 'advanced-ads' ); ?>
</a>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'See also <a href="%s" target="_blank">Issues and questions about licenses</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/manual/purchase-licenses/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses'
);
?>
</p>
<input type="hidden" id="advads-licenses-ajax-referrer" value="<?php echo esc_attr( wp_create_nonce( 'advads_ajax_license_nonce' ) ); ?>"/>

View File

@@ -0,0 +1,12 @@
<?php
/**
* Render the Adsense ID column content in the ad list.
*
* @package AdvancedAds
* @var string $slotid Adsense Slot ID.
*/
?>
<?php if ( null !== $slotid ) : ?>
<div><?php echo esc_html( $slotid ); ?></div>
<?php endif; ?>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Render the "Date" column date in the ad list.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string $published_date ad published date.
* @var string $modified_date ad modified date.
*/
?>
<div class="advads-ad-list-date">
<?php if ( $modified_date === $published_date ) : ?>
<?php esc_html_e( 'Published', 'advanced-ads' ); ?>
<?php else : ?>
<?php esc_html_e( 'Last Modified', 'advanced-ads' ); ?>
<?php endif; ?>
<br/>
<?php echo esc_html( $modified_date ); ?>
</div>

View File

@@ -0,0 +1,10 @@
<?php
/**
* Render 'debug' column.
*
* @package AdvancedAds
*
* @var bool $debug_mode Debug mode checked or not.
*/
echo $debug_mode ? esc_html__( 'Enabled', 'advanced-ads' ) : '&mdash;';

View File

@@ -0,0 +1,15 @@
<?php
/**
* Render the "Notes" column content in the ad list.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string $description ad description.
*/
?>
<div class="advads-ad-list-description">
<?php echo esc_html( $description ); ?>
</div>

View File

@@ -0,0 +1,10 @@
<?php
/**
* Render 'debug' column.
*
* @package AdvancedAds
*
* @var bool $display_once 'Display once' checked or not.
*/
echo $display_once ? esc_html__( 'Enabled', 'advanced-ads' ) : '&mdash;';

View File

@@ -0,0 +1,10 @@
<?php
/**
* Render 'debug' column.
*
* @package AdvancedAds
*
* @var bool $privacyignore Debug mode checked or not.
*/
echo $privacyignore ? esc_html__( 'Enabled', 'advanced-ads' ) : '&mdash;';

View File

@@ -0,0 +1,13 @@
<?php
/**
* Render ad shortcode column in the ad overview list
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var int $ad_id Ad id.
*/
?>
<input class="advads-ad-injection-shortcode" onclick="this.select();" value="[the_ad id=&quot;<?php echo esc_attr( $ad_id ); ?>&quot;]"/>

View File

@@ -0,0 +1,16 @@
<?php
/**
* Render the ad size column content in the ad list.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string $size ad size string.
*/
?>
<span class="advads-ad-size">
<?php echo esc_html( $size ); ?>
</span>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Render content of the Ad Schedule column in the ad overview list
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string $html_classes Additonal values for class attribute.
* @var string[] $status_strings Status string.
* @var string $content_after HTML to load after the schedule content.
*/
?>
<fieldset class="inline-edit-col-left">
<div class="inline-edit-col <?php echo esc_attr( $html_classes ); ?>">
<p>
<?php echo wp_kses( implode( '<br/>', $status_strings ), [ 'br' => [] ] ); ?>
</p>
<?php echo $content_after; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
</fieldset>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Render the ad type column content in the ad list.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string $size_string Ad size string.
* @var Ad $ad Ad instance.
*/
use AdvancedAds\Framework\Utilities\Params;
$type_object = $ad->get_type_object();
?>
<span class="advads-ad-list-tooltip">
<span class="advads-ad-list-tooltip-content">
<strong><?php echo esc_html( $type_object->get_title() ); ?></strong><br/>
<?php if ( ! empty( $size_string ) ) : ?>
<span class="advads-ad-size"><?php echo esc_html( $size_string ); ?></span>
<?php endif; ?>
</span>
<a href="<?php echo esc_url( get_edit_post_link( $ad->get_id() ) ?? '' ); ?>">
<img src="<?php echo esc_url( $type_object->get_image() ); ?>" alt="<?php echo esc_attr( $type_object->get_title() ); ?>" title="<?php echo esc_attr( $type_object->get_title() ); ?>" width="50">
</a>
</span>
<?php
// Not inline edit, or no permission.
if (
! wp_verify_nonce( sanitize_key( Params::post( '_inline_edit' ) ), 'inlineeditnonce' ) ||
! current_user_can( 'advanced_ads_edit_ads' )
) {
return;
}
?>
<script>window.advancedAds.notifications.addSuccess( '<?php esc_html_e( 'Ad updated', 'advanced-ads' ); ?>' );</script>

View File

@@ -0,0 +1,48 @@
<?php
/**
* Render column.
*
* @package AdvancedAds
* @var int $ad_id Ad ID.
*/
$groups = wp_advads_get_group_repository()->get_groups_by_ad_id( $ad_id );
$placements = wp_advads_get_placement_repository()->find_by_item_id( 'ad_' . $ad_id );
if ( $groups ) :
?>
<strong><?php echo esc_html__( 'Groups', 'advanced-ads' ) . ':'; ?></strong>
<div>
<?php
$group_links = [];
foreach ( $groups as $group ) {
$group_links[] = '<a href="' . esc_attr( $group->get_edit_link() ) . '" target="_blank">'
. esc_html( $group->get_name() ) . '</a>';
}
echo implode( ', ', $group_links ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $group_links is HTML.
?>
</div>
<?php
endif;
if ( $groups && $placements ) {
echo '<br>';
}
if ( $placements ) :
?>
<strong><?php echo esc_html__( 'Placements', 'advanced-ads' ) . ':'; ?></strong>
<div>
<?php
$ids = [];
$placement_links = [];
foreach ( $placements as $placement ) {
$ids[] = $placement->get_id();
$placement_links[] = '<a href="' . esc_attr( $placement->get_edit_link() ) . '" target="_blank">'
. esc_html( $placement->get_title() ) . '</a>';
}
echo implode( ', ', $placement_links ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $placement_links is HTML.
?>
</div>
<?php
endif;

View File

@@ -0,0 +1,124 @@
<?php
/**
* Render ad list filters.
*
* @package AdvancedAds
*/
use AdvancedAds\Framework\Utilities\Params;
use AdvancedAds\Options;
// TODO: refactor whole filter system.
global $wp_query;
$screen = get_current_screen();
$filters_to_show = $screen->get_option( 'filters_to_show' ) ?? [];
$is_privacy_enabled = Options::instance()->get( 'privacy.enabled' );
$all_filters = wp_advads()->list_filters->get_all_filters();
$selected_ad_type = Params::request( 'adtype', '' );
$ad_size = Params::request( 'adsize', '' );
$ad_date = Params::request( 'addate', '' );
$ad_group = Params::request( 'adgroup', '' );
$ad_author = Params::request( 'ad_author', '' );
$ad_debug = Params::request( 'ad_debugmode', '' );
$ad_displayonce = Params::request( 'ad_displayonce', '' );
$ad_privacyignore = Params::request( 'ad_privacyignore', '' );
// hide the filter button. Can not filter correctly with "trashed" posts.
if ( 'trash' === Params::request( 'post_status', '' ) ) {
echo '<style type="text/css">#post-query-submit{display:none;}</style>';
}
$ad_types = wp_advads_get_ad_types();
usort(
$ad_types,
function ( $a, $b ) {
return strcmp( $a->get_title(), $b->get_title() );
}
);
?>
<div class="advads-ad-filters-container">
<!-- Types -->
<select id="advads-filter-type" name="adtype">
<option value="">- <?php esc_html_e( 'Ad Types', 'advanced-ads' ); ?> -</option>
<?php foreach ( $ad_types as $ad_type ) : ?>
<option <?php selected( $selected_ad_type, $ad_type->get_id() ); ?> value="<?php echo esc_attr( $ad_type->get_id() ); ?>"><?php echo esc_html( $ad_type->get_title() ); ?></option>
<?php endforeach; ?>
</select>
<!-- Sizes -->
<?php if ( ! empty( $all_filters['all_sizes'] ) ) : ?>
<select id="advads-filter-size" name="adsize">
<option value="">- <?php esc_html_e( 'Ad Sizes', 'advanced-ads' ); ?> -</option>
<?php foreach ( $all_filters['all_sizes'] as $key => $value ) : ?>
<option <?php selected( $ad_size, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<!-- Dates -->
<?php if ( ! empty( $all_filters['all_dates'] ) ) : ?>
<select id="advads-filter-date" name="addate">
<option value="">- <?php esc_html_e( 'Ad Dates', 'advanced-ads' ); ?> -</option>
<?php foreach ( $all_filters['all_dates'] as $key => $value ) : ?>
<option <?php selected( $ad_date, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<!-- Groups -->
<?php if ( ! empty( $all_filters['all_groups'] ) ) : ?>
<select id="advads-filter-group" name="adgroup">
<option value="">- <?php esc_html_e( 'Ad Groups', 'advanced-ads' ); ?> -</option>
<?php foreach ( $all_filters['all_groups'] as $key => $value ) : ?>
<option <?php selected( $ad_group, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<!-- Debug Mode -->
<?php if ( in_array( 'all_debug_mode', $filters_to_show, true ) ) : ?>
<select name="ad_debugmode">
<option value="">- <?php esc_html_e( 'Debug Mode', 'advanced-ads' ); ?> -</option>
<option <?php selected( $ad_debug, 'yes' ); ?> value="yes"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option <?php selected( $ad_debug, 'no' ); ?> value="no"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
<?php endif; ?>
<!-- Author -->
<?php if ( in_array( 'all_authors', $filters_to_show, true ) && ! empty( $all_filters['all_authors'] ) ) : ?>
<select name="ad_author">
<option value="">- <?php esc_html_e( 'Ad Authors', 'advanced-ads' ); ?> -</option>
<?php foreach ( $all_filters['all_authors'] as $key => $value ) : ?>
<option <?php selected( $ad_author, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<!-- Display once -->
<?php if ( defined( 'AAP_VERSION' ) && in_array( 'all_displayonce', $filters_to_show, true ) ) : ?>
<select name="ad_displayonce">
<option value="">- <?php esc_html_e( 'Display Once', 'advanced-ads' ); ?> -</option>
<option <?php selected( $ad_displayonce, 'yes' ); ?> value="yes"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option <?php selected( $ad_displayonce, 'no' ); ?> value="no"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
<?php endif; ?>
<!-- Privacy ignore -->
<?php if ( $is_privacy_enabled && in_array( 'all_privacyignore', $filters_to_show, true ) ) : ?>
<select name="ad_privacyignore">
<option value="">- <?php esc_html_e( 'Privacy Ignore', 'advanced-ads' ); ?> -</option>
<option <?php selected( $ad_privacyignore, 'yes' ); ?> value="yes"><?php esc_html_e( 'Enabled', 'advanced-ads' ); ?></option>
<option <?php selected( $ad_privacyignore, 'no' ); ?> value="no"><?php esc_html_e( 'Disabled', 'advanced-ads' ); ?></option>
</select>
<?php endif; ?>
<?php if ( isset( $wp_query->found_posts ) && $wp_query->found_posts > 0 ) : ?>
<?php do_action( 'advanced-ads-ad-list-filter-markup', $all_filters ); ?>
<?php endif; ?>
<a href="#" id="advads-ad-filter-customize"><?php esc_html_e( 'Customize filters', 'advanced-ads' ); ?></a>
</div>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Render the tooltip for ad status on the group overview page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var string[] $status_strings
* @var string $status_type
*/
?>
<span class="advads-help advads-help-no-icon advads-ad-status-icon advads-ad-status-icon-<?php echo esc_attr( $status_type ); ?>">
<span class="advads-tooltip">
<?php echo wp_kses( implode( '<br/>', $status_strings ), [ 'br' => [] ] ); ?>
</span>
</span>

View File

@@ -0,0 +1,41 @@
<?php
/**
* Render the view navigation items on the ad list.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var array $views_new list of views.
* @var bool $show_trash_delete_button if the trash delete button is visible.
*/
use AdvancedAds\Framework\Utilities\Str;
?>
<ul class="advanced-ads-ad-list-views">
<?php
foreach ( $views as $view ) :
$view = str_replace( [ ')', '(' ], '', $view );
$class = Str::contains( 'current', $view ) ? 'advads-button-primary' : 'advads-button-secondary';
?>
<li class="button <?php echo esc_attr( $class ); ?>">
<?php
echo wp_kses(
$view,
[
'a' => [ 'href' => [] ],
'span' => [ 'class' => [] ],
]
);
?>
</li>
<?php endforeach; ?>
</ul>
<?php if ( $show_trash_delete_button ) : ?>
<button type="submit" name="delete_all" id="delete_all" class="button advads-button-primary">
<span class="dashicons dashicons-trash"></span><?php esc_html_e( 'Empty Trash', 'advanced-ads' ); ?>
</button>
<?php
endif;

View File

@@ -0,0 +1,30 @@
<?php
/**
* Render the group details column content in the group table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Group $group Group instance.
*/
?>
<ul>
<li>
<?php
/*
* translators: %s is the ID of an ad group
*/
printf( esc_attr__( 'ID: %s', 'advanced-ads' ), absint( $group->get_id() ) );
?>
</li>
<li>
<strong>
<?php
/* translators: %s is the name of a group type */
printf( esc_html__( 'Type: %s', 'advanced-ads' ), esc_html( $group->get_type_object()->get_title() ) );
?>
</strong>
</li>
</ul>

View File

@@ -0,0 +1,21 @@
<?php
/**
* Render the group name column content in the group table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Group $group Group instance.
*/
?>
<div class="advads-table-name">
<a class="row-title" href="#modal-group-edit-<?php echo esc_attr( $group->get_id() ); ?>"><?php echo esc_html( $group->get_name() ); ?></a>
</div>
<?php if ( $this->type_error ) : ?>
<p class="advads-notice-inline advads-error">
<?php echo esc_html( $this->type_error ); ?>
</p>
<?php
endif;

View File

@@ -0,0 +1,16 @@
<?php
/**
* Render the group type column content in the group table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Group $group Group instance.
*/
$group_type = $group->get_type_object();
?>
<div class="advads-form-type">
<img src="<?php echo esc_url( $group_type->get_image() ); ?>" alt="<?php echo esc_attr( $group_type->get_title() ); ?>">
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Render the group usage column content in the group table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Group $group Group instance.
*/
?>
<div class="advads-usage">
<strong><?php esc_html_e( 'shortcode', 'advanced-ads' ); ?></strong>
<code><input type="text" onclick="this.select();" value='[the_ad_group id="<?php echo esc_attr( $group->get_id() ); ?>"]' readonly /></code>
<br/><br/>
<strong><?php esc_html_e( 'template (PHP)', 'advanced-ads' ); ?></strong>
<code><input type="text" onclick="this.select();" value="the_ad_group(<?php echo esc_attr( $group->get_id() ); ?>);" readonly /></code>
</div>

View File

@@ -0,0 +1,118 @@
<?php
/**
* Advanced Ads  form to edit ad groups in the admin
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var AdvancedAds\Abstracts\Group $group Group instance.
* @var string $this ->type_error Contains an error message if the group type is missing.
*/
use AdvancedAds\Admin\Upgrades;
use AdvancedAds\Utilities\WordPress;
$group_types = wp_advads_get_group_types();
$group_id = $group->get_id();
?>
<div class="advads-ad-group-form">
<form name="update-group" method="post">
<input type="hidden" name="nonce" value="<?php echo esc_attr( wp_create_nonce( 'advads-update-group' ) ); ?>">
<?php
echo $group->get_hints_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
ob_start();
?>
<input type="hidden" class="advads-group-id" name="advads-groups[<?php echo esc_attr( $group_id ); ?>][id]" value="<?php echo esc_attr( $group_id ); ?>"/>
<input type="text" name="advads-groups[<?php echo esc_attr( $group_id ); ?>][name]" value="<?php echo esc_attr( $group->get_name() ); ?>"/>
<?php
$option_content = ob_get_clean();
WordPress::render_option(
'group-name static',
__( 'Name', 'advanced-ads' ),
$option_content
);
ob_start();
?>
<div class="advads-ad-group-type">
<?php if ( $this->type_error ) : ?>
<p class="advads-notice-inline advads-error"><?php echo esc_html( $this->type_error ); ?></p>
<?php
endif;
foreach ( $group_types as $group_type ) :
if ( $group_type->is_premium() ) {
continue;
}
?>
<label title="<?php echo esc_html( $group_type->get_description() ); ?>">
<input type="radio" name="advads-groups[<?php echo esc_attr( $group_id ); ?>][type]" value="<?php echo esc_attr( $group_type->get_id() ); ?>" <?php checked( $group->get_type(), $group_type->get_id() ); ?>/>
<?php echo esc_html( $group_type->get_title() ); ?>
</label>
<?php endforeach; ?>
<?php
foreach ( $group_types as $group_type ) :
if ( ! $group_type->is_premium() ) {
continue;
}
?>
<label title="<?php echo esc_html( $group_type->get_description() ); ?>">
<input type="radio" name="advads-groups[<?php echo esc_attr( $group_id ); ?>][type]" value="<?php echo esc_attr( $group_type->get_id() ); ?>" disabled/>
<?php echo esc_html( $group_type->get_title() ); ?>
</label>
<?php endforeach; ?>
<?php if ( wp_advads_get_group_type_manager()->has_premium() ) : ?>
<label>
<?php Upgrades::upgrade_link( __( 'Get all group types with All Access', 'advanced-ads' ), 'https://wpadvancedads.com/add-ons/all-access/', 'upgrades-pro-groups' ); ?>
</label>
<?php endif; ?>
</div>
<?php
$option_content = ob_get_clean();
WordPress::render_option(
'group-type static',
esc_attr__( 'Type', 'advanced-ads' ),
$option_content
);
ob_start();
?>
<select name="advads-groups[<?php echo esc_attr( $group_id ); ?>][ad_count]">
<?php
$sorted_ads_count = count( $group->get_sorted_ads() );
$max_ads = $sorted_ads_count >= 10 ? $sorted_ads_count + 2 : 10;
for ( $i = 1; $i <= $max_ads; $i++ ) :
?>
<option <?php selected( $group->get_ad_count(), $i ); ?>><?php echo esc_html( $i ); ?></option>
<?php
endfor;
?>
<option <?php selected( $group->get_ad_count(), 'all' ); ?> value="all"><?php echo esc_attr_x( 'all', 'option to display all ads in an ad groups', 'advanced-ads' ); ?></option>
</select>
<?php
$option_content = ob_get_clean();
WordPress::render_option(
'group-number advads-group-type-default advads-group-type-ordered',
esc_attr__( 'Visible ads', 'advanced-ads' ),
$option_content,
esc_attr__( 'Number of ads that are visible at the same time', 'advanced-ads' )
);
do_action( 'advanced-ads-group-form-options', $group );
ob_start();
require ADVADS_ABSPATH . 'views/admin/tables/groups/list-row-option-ads.php';
$option_content = ob_get_clean();
WordPress::render_option(
'group-ads static',
esc_attr__( 'Ads', 'advanced-ads' ),
$option_content
);
?>
</form>
</div>

View File

@@ -0,0 +1,45 @@
<?php
/**
* Group Filter
*
* @package AdvancedAds
*
* @var Groups_List_Table $this
*/
use AdvancedAds\Constants;
use AdvancedAds\Admin\Groups_List_Table;
use AdvancedAds\Framework\Utilities\Params;
$group_type = Params::request( 'group_type' );
$group_types = wp_advads_get_group_types();
usort(
$group_types,
function ( $a, $b ) {
return strcasecmp( $a->get_title(), $b->get_title() );
}
);
?>
<form id="advads-group-filter-form" method="get">
<div id="filters">
<input type="hidden" name="page" value="<?php echo esc_attr( Params::get( 'page' ) ); ?>">
<select id="advads-group-filter-type" name="group_type">
<option value="">- <?php esc_html_e( 'all group types', 'advanced-ads' ); ?> -</option>
<?php foreach ( $group_types as $gtype ) : ?>
<option <?php selected( $group_type, $gtype->get_id() ); ?> value="<?php echo esc_attr( $gtype->get_id() ); ?>"><?php echo esc_html( $gtype->get_title() ); ?></option>
<?php endforeach; ?>
</select>
<input type="submit" class="button" value="Filter">
</div>
<div class="search-form">
<?php
$group_taxonomy = get_taxonomy( Constants::TAXONOMY_GROUP );
$this->search_box( $group_taxonomy->labels->search_items, 'tag' );
?>
</div>
</form>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Ads loop in a group.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var Group $group Group instance.
*/
esc_html_e( 'No ads assigned', 'advanced-ads' );
?>
<br/>
<?php if ( ! empty( $this->all_ads ) ) : ?>
<a href="#modal-group-edit-<?php echo esc_attr( $group->get_id() ); ?>">+ <?php esc_html_e( 'Add some', 'advanced-ads' ); ?></a>
<?php else : ?>
<a class="button create-first-ad" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=advanced_ads' ) ); ?>"><?php esc_html_e( 'Create your first ad', 'advanced-ads' ); ?></a>
<?php
endif;

View File

@@ -0,0 +1,85 @@
<?php
/**
* Ads loop in a group.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var Group $group Group instance.
*/
use AdvancedAds\Abstracts\Group;
use AdvancedAds\Utilities\WordPress;
$counter = 1;
$ad_count = $group->get_ads_count();
$weights = $group->get_ad_weights();
$group_ads = $group->get_ads();
usort($group_ads, function ($a, $b) {
return $b->get_weight() <=> $a->get_weight();
});
foreach ( $group_ads as $group_ad ) {
if ( ! $group_ad->is_status( 'publish' ) ) {
unset( $weights[ $group_ad->get_id() ] );
}
}
$weight_sum = array_sum( $weights );
?>
<div class="advads-ad-group-list-ads advads-table-flex">
<?php
foreach ( $group_ads as $ad ) :
$ad_weight_percentage = '';
?>
<div style="display: <?php echo $counter > 3 ? 'none' : 'flex'; ?>">
<div>
<a href="<?php echo esc_url( get_edit_post_link( $ad->get_id() ) ); ?>"><?php echo esc_html( $ad->get_title() ); ?></a>
</div>
<div>
<?php echo $ad->get_ad_schedule_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php
if ( 'default' === $group->get_type() && $weight_sum ) :
$weight = $ad->get_weight() ?? Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
$ad_weight_percentage = $ad->is_status( 'publish' ) ? WordPress::calculate_percentage( $weight, $weight_sum ) : '0%';
?>
<div class="advads-ad-group-list-ads-weight">
<span title="<?php esc_attr_e( 'Ad weight', 'advanced-ads' ); ?>"><?php echo esc_html( $ad_weight_percentage ); ?></span>
</div>
<?php endif; ?>
</div>
<?php
++$counter;
endforeach;
?>
</div>
<?php if ( $ad_count > 4 ) : ?>
<p>
<a href="javascript:void(0)" class="advads-group-ads-list-show-more">
<?php
/* translators: %d is a number. */
echo esc_html( sprintf( __( '+ show %d more ads', 'advanced-ads' ), $ad_count - 3 ) );
?>
</a>
</p>
<?php endif; ?>
<?php
if ( $ad_count > 1 ) :
$ad_count = 'all' === $group->get_display_ad_count() ? $ad_count : $group->get_display_ad_count();
/**
* Filters the displayed ad count on the ad groups page.
*
* @param int $ad_count The amount of displayed ads.
* @param Group $group The current ad group.
*/
$ad_count = (int) apply_filters( 'advanced-ads-group-displayed-ad-count', $ad_count, $group );
$ad_count = (int) apply_filters( 'advanced-ads-group-' . $group->get_type() . '-displayed-ad-count', $ad_count, $group );
/* translators: amount of ads displayed */
echo '<p>' . esc_html( sprintf( _n( 'Up to %d ad displayed.', 'Up to %d ads displayed', $ad_count, 'advanced-ads' ), $ad_count ) ) . '</p>';
endif;

View File

@@ -0,0 +1,98 @@
<?php
/**
* Render a list of ads included in an ad group
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var array $ad_form_rows HTML to render ad form.
* @var array $this->all_ads Array with ads that can be chosen from for the group.
* @var Group $group Group instance.
*/
$max_weight = $group->get_max_weight();
$sorted_ads = $group->get_sorted_ads();
?>
<table class="advads-group-ads">
<?php if ( $this->all_ads ) : ?>
<thead>
<tr>
<th class="group-sort group-ad" data-sortby="ad"><?php esc_html_e( 'Ad', 'advanced-ads' ); ?></th>
<th class="group-sort group-status" data-sortby="status"><?php esc_html_e( 'Status', 'advanced-ads' ); ?></th>
<th colspan="2" class="group-sort group-weight" data-sortby="weight"><?php esc_html_e( 'Weight', 'advanced-ads' ); ?></th>
</tr>
</thead>
<?php endif; ?>
<tbody>
<?php
foreach ( $sorted_ads as $ad_id => $ad ) :
$ad_object = wp_advads_get_ad( $ad_id );
$ad_url = add_query_arg(
[
'post' => $ad_id,
'action' => 'edit',
],
admin_url( 'post.php' )
);
/* translators: %s is the title for ad. */
$link_title = sprintf( esc_html__( 'Opens ad %s in a new tab', 'advanced-ads' ), $ad['title'] );
?>
<tr data-ad-id="<?php echo esc_attr( $ad_id ); ?>" data-group-id="<?php echo esc_attr( $group->get_id() ); ?>">
<td>
<a target="_blank" href="<?php echo esc_url( $ad_url ); ?>" title="<?php echo esc_attr( $link_title ); ?>">
<?php echo esc_html( $ad['title'] ); ?>
</a>
</td>
<td>
<?php
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output is already escaped.
echo $ad_object->get_ad_schedule_html();
?>
</td>
<td>
<select name="advads-groups[<?php echo esc_attr( $group->get_id() ); ?>][ads][<?php echo esc_attr( $ad_id ); ?>]">
<?php for ( $i = 0; $i <= $max_weight; $i++ ) : ?>
<option<?php selected( $ad['weight'], $i ); ?>><?php echo $i; // phpcs:ignore ?></option>
<?php endfor; ?>
</select>
</td>
<td>
<button type="button" class="advads-remove-ad-from-group button">x</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if ( $this->all_ads ) : ?>
<fieldset class="advads-group-add-ad">
<legend><?php esc_html_e( 'New Ad', 'advanced-ads' ); ?></legend>
<select class="advads-group-add-ad-list-ads">
<?php
foreach ( $this->all_ads as $ad_id => $ad_title ) {
$ad_status = wp_advads_get_ad( $ad_id )->get_ad_schedule_details();
printf(
'<option value="advads-groups[%1$d][ads][%2$d]" data-status="%3$s" data-status-string="%4$s">%5$s</option>',
absint( $group->get_id() ),
absint( $ad_id ),
esc_html( $ad_status['status_type'] ?? '' ),
esc_html( $ad_status['status_strings'][0] ?? '' ),
esc_html( $ad_title )
);
}
?>
</select>
<select class="advads-group-add-ad-list-weights">
<?php for ( $i = 0; $i <= $max_weight; $i++ ) : ?>
<option<?php selected( 10, $i ); ?>><?php echo absint( $i ); ?></option>
<?php endfor; ?>
</select>
<button type="button" class="button"><?php esc_html_e( 'add', 'advanced-ads' ); ?></button>
</fieldset>
<?php else : ?>
<a class="button" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=advanced_ads' ) ); ?>"><?php esc_html_e( 'Create your first ad', 'advanced-ads' ); ?></a>
<?php
endif;

View File

@@ -0,0 +1,40 @@
<?php
/**
* Render item option for placements.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
$placement_item = $placement->get_item_object();
$allowed_ads = $placement->get_type_object()->get_allowed_ads();
$allowed_groups = $placement->get_type_object()->get_allowed_groups();
$has_items = ! empty( $allowed_ads ) || ! empty( $allowed_groups );
// Show a button when no ads exist, yet.
if ( ! $has_items ) : ?>
<a class="button" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=advanced_ads' ) ); ?>">
<?php esc_html_e( 'Create your first ad', 'advanced-ads' ); ?>
</a>
<?php else : ?>
<label for="advads-placement-item-<?php echo esc_attr( $placement->get_slug() ); ?>" class="screen-reader-text">
<?php esc_html_e( 'Choose the Ad or Group', 'advanced-ads' ); ?>
</label>
<div class="advads-placement-item-select-wrap">
<?php include 'item-select.php'; ?>
<span class="advads-loader hidden"></span>
<a class="advads-placement-item-edit" href="<?php echo esc_url( $placement_item ? $placement_item->get_edit_link() : '#' ); ?>" style="display: <?php echo esc_attr( $placement_item && $placement_item->get_id() > 0 ? 'inline' : 'none' ); ?>" title="<?php esc_attr_e( 'Edit item', 'advanced-ads' ); ?>">
<span class="dashicons dashicons-external"></span>
</a>
</div>
<?php
endif;
/**
* Do action after the item select.
*/
do_action( 'advads-placement-item-select-after' );

View File

@@ -0,0 +1,40 @@
<?php
/**
* Render output of the placement conditions.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
$display_conditions = Advanced_Ads_Display_Conditions::get_instance();
$visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance();
?>
<?php if ( $placement->get_display_conditions() ) : ?>
<h4><?php echo esc_html__( 'Display Conditions', 'advanced-ads' ); ?></h4>
<ul>
<?php foreach ( $placement->get_display_conditions() as $condition ) : ?>
<?php if ( array_key_exists( $condition['type'], (array) $display_conditions->conditions ) ) : ?>
<li>
<?php echo esc_html( $display_conditions->conditions[ $condition['type'] ]['label'] ); ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if ( $placement->get_visitor_conditions() ) : ?>
<h4><?php echo esc_html__( 'Visitor Conditions', 'advanced-ads' ); ?></h4>
<ul>
<?php foreach ( $placement->get_visitor_conditions() as $condition ) : ?>
<?php if ( array_key_exists( $condition['type'], $visitor_conditions->conditions ) ) : ?>
<li>
<?php echo esc_html( $visitor_conditions->conditions[ $condition['type'] ]['label'] ); ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<a href="#modal-placement-edit-<?php echo esc_attr( $placement->get_id() ); ?>" data-placement="<?php echo esc_attr( $placement->get_id() ); ?>" class="advads-mobile-hidden"><?php esc_html_e( 'edit conditions', 'advanced-ads' ); ?></a>

View File

@@ -0,0 +1,33 @@
<?php
/**
* Render the placement name column content in the placement table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Placement $placement Placement instance.
*/
$type_object = $placement->get_type_object();
?>
<div class="advads-table-name">
<a class="row-title" href="#modal-placement-edit-<?php echo esc_attr( $placement->get_id() ); ?>"><?php echo esc_html( $placement->get_title() ); ?></a>
<?php if ( 'draft' === $placement->get_status() ) : ?>
<strong>— <span class="post-state"><?php esc_html_e( 'Draft', 'advanced-ads' ); ?></span></strong>
<?php endif; ?>
</div>
<?php if ( $type_object->is_premium() ) : ?>
<p class="advads-notice-inline advads-error">
<?php
echo esc_html(
sprintf(
/* translators: %s is the placement type string */
__( 'The originally selected placement type “%s” is not enabled.', 'advanced-ads' ),
$type_object->get_title()
)
);
?>
</p>
<?php
endif;

View File

@@ -0,0 +1,25 @@
<?php
/**
* Render the placement type column content in the placement table.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Placement $placement Placement instance.
*/
use AdvancedAds\Framework\Utilities\Params;
use AdvancedAds\Utilities\Conditional;
$placement_type = $placement->get_type_object();
?>
<div class="advads-form-type">
<img src="<?php echo esc_url( $placement_type->get_image() ); ?>" alt="<?php echo esc_attr( $placement_type->get_title() ); ?>" title="<?php echo esc_attr( $placement_type->get_title() ); ?>">
</div>
<?php
if ( ! wp_verify_nonce( sanitize_key( Params::post( '_inline_edit' ) ), 'inlineeditnonce' ) || ! Conditional::user_can( 'advanced_ads_manage_placements' ) ) {
return;
}
?>
<script>window.advancedAds.notifications.addSuccess( '<?php esc_html_e( 'Placement updated', 'advanced-ads' ); ?>' );</script>

View File

@@ -0,0 +1,30 @@
<?php
/**
* Content for the "Show Usage"
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var Placement $placement Placement instance.
*/
?>
<div class="advads-usage advads-placement-usage-modal">
<h2>
<label for="usage-shortcode-<?php echo esc_attr( $placement->get_slug() ); ?>">
<?php esc_html_e( 'Shortcode', 'advanced-ads' ); ?>
</label>
</h2>
<code>
<input class="widefat" type="text" id="usage-shortcode-<?php echo esc_attr( $placement->get_slug() ); ?>" onclick="this.select();" value='[the_ad_placement id="<?php echo esc_attr( $placement->get_slug() ); ?>"]' readonly />
</code>
<h2>
<label for="usage-template-<?php echo esc_attr( $placement->get_slug() ); ?>">
<?php esc_html_e( 'Template (PHP)', 'advanced-ads' ); ?>
</label>
</h2>
<code>
<input class="widefat" type="text" id="usage-template-<?php echo esc_attr( $placement->get_slug() ); ?>" onclick="this.select();" value="&lt;?php if ( function_exists( 'the_ad_placement' ) ) { the_ad_placement( '<?php echo esc_attr( $placement->get_slug() ); ?>' ); } ?&gt;" readonly />
</code>
</div>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Placement list table description.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*/
use AdvancedAds\Entities;
?>
<p class="description">
<?php echo esc_html( Entities::get_placement_description() ); ?>
<a href="https://wpadvancedads.com/manual/placements/?utm_source=advanced-ads&utm_medium=link&utm_campaign=placements" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</p>

View File

@@ -0,0 +1,26 @@
<?php
/**
* Filter placement types.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var string $current_type Currently filtered placement type.
*/
?>
<label class="screen-reader-text" for="advads_filter_placement_type">
<?php esc_html_e( 'Placement Type', 'advanced-ads' ); ?>
</label>
<select class="advads_filter_placement_type" id="advads_filter_placement_type" name="placement-type">
<option value=""><?php esc_html_e( '- show all types -', 'advanced-ads' ); ?></option>
<?php
$types = wp_advads_get_placement_type_manager()->get_dropdown_options();
foreach ( $types as $id => $title ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
?>
<option value="<?php echo esc_attr( $id ); ?>"<?php selected( $id, $current_type ); ?>>
<?php echo esc_html( $title ); ?>
</option>
<?php endforeach; ?>
</select>

View File

@@ -0,0 +1,28 @@
<?php
/**
* Show a note about placing ads in the header.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*/
?>
<div style="margin-top: 12px;">
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'Tutorial: <a href="%s" target="_blank">How to place visible ads in the header of your website</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/place-ads-in-website-header/?utm_source=advanced-ads&utm_medium=link&utm_campaign=header-ad-tutorial'
);
?>
</div>
<?php

View File

@@ -0,0 +1,30 @@
<?php
/**
* Markup for the placement item select box.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* @var Placement $placement Placement instance.
*/
?>
<select
id="advads-placements-item-<?php echo esc_attr( $placement->get_id() ); ?>"
name="item"
class="advads-placement-item-select js-update-placement-item"
data-placement-id="<?php echo esc_attr( $placement->get_id() ); ?>"
>
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
<?php foreach ( $placement->get_type_object()->get_allowed_items() as $item_group ) : ?>
<optgroup label="<?php echo esc_attr( $item_group['label'] ); ?>">
<?php foreach ( $item_group['items'] as $item_id => $item_name ) : ?>
<option value="<?php echo esc_attr( $item_id ); ?>"<?php selected( $placement->get_item(), $item_id ); ?>>
<?php echo esc_html( $item_name ); ?>
</option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>

View File

@@ -0,0 +1,39 @@
<?php
/**
* Render the view navigation items on the Placement screen.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.0
*
* @var array $views list of views.
* @var bool $show_trash_delete_button if the trash delete button is visible.
*/
use AdvancedAds\Framework\Utilities\Str;
?>
<ul class="advanced-ads-ad-list-views">
<?php
foreach ( $views as $view ) :
$view = str_replace( [ ')', '(' ], '', $view );
$class = Str::contains( 'current', $view ) ? 'advads-button-primary' : 'advads-button-secondary';
?>
<li class="button <?php echo esc_attr( $class ); ?>">
<?php
echo wp_kses(
$view,
[
'a' => [ 'href' => [] ],
'span' => [ 'class' => [] ],
]
);
?>
</li>
<?php endforeach; ?>
</ul>
<?php if ( $show_trash_delete_button ) : ?>
<button type="submit" name="delete_all" id="delete_all" class="button advads-button-primary">
<span class="dashicons dashicons-trash"></span><?php esc_html_e( 'Empty Trash', 'advanced-ads' ); ?>
</button>
<?php endif; ?>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Render import history table
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*
* phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
*/
$history = get_option( '_advads_importer_history', [] );
if ( empty( $history ) ) {
return;
}
?>
<div id="import-history" class="advads-import-history mt-8">
<header>
<h2 class="advads-h2"><?php esc_html_e( 'Import History', 'advanced-ads' ); ?></h2>
<p class="text-sm"><?php esc_html_e( 'Import history to rollback changes.', 'advanced-ads' ); ?></p>
</header>
<table class="widefat striped">
<thead>
<tr>
<td>Importer</td>
<td>Session Key</td>
<td>Ads Created</td>
<td>Create At</td>
<td></td>
</tr>
</thead>
<tbody>
<?php
foreach ( $history as $session_key => $session ) :
$importer = wp_advads()->importers->get_importer( $session['importer_id'] );
$delete_link = wp_nonce_url(
add_query_arg(
[
'action' => 'advads_import_delete',
'session_key' => $session['session_key'],
]
),
'advads_import_delete'
);
?>
<tr>
<td><?php echo $importer->get_title(); ?></td>
<td><?php echo $session['session_key']; ?></td>
<td><?php echo $session['count']; ?></td>
<td><?php echo wp_date( get_option( 'date_format' ), $session['created_at'] ); ?></td>
<td>
<a href="<?php echo esc_url( $delete_link ); ?>" class="button-link !text-red-500">Rollback Changes</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,20 @@
<?php
/**
* Render Importers
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
$size = size_format( $bytes );
$upload_dir = wp_upload_dir();
?>
<div class="advads-importers max-w-screen-lg">
<?php wp_advads()->importers->display_message(); ?>
<div class="wp-header-end hidden"></div>
<?php require 'plugin-importer.php'; ?>
<?php require 'other-plugin-importer.php'; ?>
<?php require 'import-history.php'; ?>
</div>

View File

@@ -0,0 +1,68 @@
<?php
/**
* Render Importers
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
use AdvancedAds\Framework\Utilities\Params;
use AdvancedAds\Utilities\WordPress;
$importers = wp_advads()->importers;
?>
<div class="advads-other-plugin-importer mt-8">
<header>
<h2 class="advads-h2"><?php esc_html_e( 'Other Plugins', 'advanced-ads' ); ?></h2>
<p class="text-sm"><?php esc_html_e( 'To make things even easier, we are working on new ways to import your settings and data from other plugins.', 'advanced-ads' ); ?></p>
</header>
<div class="advads-tab-container">
<div class="advads-tab-menu">
<?php
foreach ( $importers->get_importers() as $importer ) :
if ( ! $importer->is_detected() ) {
continue;
}
?>
<a id="nav-<?php echo esc_attr( $importer->get_id() ); ?>" href="#<?php echo esc_attr( $importer->get_id() ); ?>">
<?php echo $importer->get_icon(); // phpcs:ignore ?>
<span><?php echo esc_html( $importer->get_title() ); ?></span>
</a>
<?php endforeach; ?>
</div>
<div class="advads-tab-content">
<?php
foreach ( $importers->get_importers() as $importer ) :
if ( ! $importer->is_detected() ) {
continue;
}
?>
<form
id="<?php echo esc_attr( $importer->get_id() ); ?>"
class="advads-tab-target"
method="post"
action="<?php echo esc_url( Params::server( 'REQUEST_URI' ) . '#' . $importer->get_id() ); ?>">
<?php wp_nonce_field( 'advads_import' ); ?>
<input type="hidden" name="action" value="advads_import">
<input type="hidden" name="importer" value="<?php echo esc_attr( $importer->get_id() ); ?>">
<div class="advads-tab-content-body">
<?php if ( $importer->get_description() ) : ?>
<p class="text-base"><?php echo esc_html( $importer->get_description() ); ?></p>
<?php endif; ?>
<div class="pt-2">
<?php $importer->render_form(); ?>
</div>
</div>
<?php if ( $importer->show_button() ) : ?>
<div class="advads-tab-content-footer">
<button class="button button-primary button-large" type="submit">
<?php esc_html_e( 'Start Importing', 'advanced-ads' ); ?>&nbsp;<?php echo esc_html( $importer->get_title() ); ?>
</button>
</div>
<?php endif; ?>
</form>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,102 @@
<?php
/**
* Render Importers
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
use AdvancedAds\Utilities\WordPress;
use AdvancedAds\Framework\Utilities\Params;
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
$size = size_format( $bytes );
$upload_dir = wp_upload_dir();
?>
<div class="advads-plugin-importer mt-8">
<header>
<h2 class="advads-h2"><?php esc_html_e( 'Plugin Settings', 'advanced-ads' ); ?></h2>
<p class="text-sm">
<?php
esc_html_e( 'Import or export your Advanced Ads settings, This option is useful for replicating the ads configuration across multiple websites.', 'advanced-ads' );
WordPress::manual_link( 'https://wpadvancedads.com/manual/import-export/', 'tools-quicklinks' );
?>
</p>
</header>
<div class="advads-tab-container">
<div class="advads-tab-menu">
<a href="#import">
<span class="dashicons dashicons-database-import"></span>
<span><?php esc_html_e( 'Import Settings', 'advanced-ads' ); ?></span>
</a>
<a href="#export" class="is-active">
<span class="dashicons dashicons-database-export"></span>
<span><?php esc_html_e( 'Export Settings', 'advanced-ads' ); ?></span>
</a>
</div>
<div class="advads-tab-content">
<form id="import" class="advads-tab-target" enctype="multipart/form-data" method="post" action="<?php echo esc_url( Params::server( 'REQUEST_URI' ) ); ?>#import">
<div class="advads-tab-content-body">
<input type="hidden" name="action" value="advads_import">
<input type="hidden" name="importer" value="xml">
<?php wp_nonce_field( 'advads_import' ); ?>
<p>
<label>
<input class="advads_import_type" type="radio" name="import_type" value="xml_file" checked="checked" />
<?php esc_html_e( 'Choose an XML file', 'advanced-ads' ); ?>
</label>
</p>
<p>
<label>
<input class="advads_import_type" type="radio" name="import_type" value="xml_content" />
<?php esc_html_e( 'Copy an XML content', 'advanced-ads' ); ?>
</label>
</p>
<div id="advads_xml_file">
<?php if ( ! empty( $upload_dir['error'] ) ) : ?>
<p class="advads-notice-inline advads-error">
<?php esc_html_e( 'Before you can upload your import file, you will need to fix the following error:', 'advanced-ads' ); ?>
<strong><?php echo $upload_dir['error']; // phpcs:ignore ?>guu</strong>
</p>
<?php else : ?>
<p>
<input type="file" id="upload" name="import" size="25" /> (<?php /* translators: %s maximum size allowed */ printf( __( 'Maximum size: %s', 'advanced-ads' ), $size ); // phpcs:ignore ?>)
<input type="hidden" name="max_file_size" value="<?php echo $bytes; // phpcs:ignore ?>" />
</p>
<?php endif; ?>
</div>
<div id="advads_xml_content" style="display:none;">
<p><textarea id="xml_textarea" name="xml_textarea" rows="10" cols="20" class="large-text code"></textarea></p>
<?php WordPress::manual_link( 'https://wpadvancedads.com/manual/import-export/', 'tools-quicklinks', __( 'Ad Templates', 'advanced-ads' ) ); ?>
</div>
</div>
<div class="advads-tab-content-footer">
<button class="button button-primary button-large" type="submit">
<?php esc_html_e( 'Start Import', 'advanced-ads' ); ?>
</button>
</div>
</form>
<form id="export" class="advads-tab-target" method="post" action="<?php echo esc_url( Params::server( 'REQUEST_URI' ) ); ?>#export">
<div class="advads-tab-content-body">
<input type="hidden" name="action" value="advads_export">
<?php wp_nonce_field( 'advads_export' ); ?>
<p class="text-sm"><?php esc_html_e( 'When you click the button below Advanced Ads will create an XML file for you to save to your computer.', 'advanced-ads' ); ?></p>
<ul class="advads-checkbox-list mb-0">
<li><label><input type="checkbox" name="content[]" value="ads" checked="checked" /> <?php esc_html_e( 'Ads', 'advanced-ads' ); ?></label></li>
<li><label><input type="checkbox" name="content[]" value="groups" checked="checked" /> <?php esc_html_e( 'Groups', 'advanced-ads' ); ?></label></li>
<li><label><input type="checkbox" name="content[]" value="placements" checked="checked" /> <?php esc_html_e( 'Placements', 'advanced-ads' ); ?></label></li>
<li><label><input type="checkbox" name="content[]" value="options" /> <?php esc_html_e( 'Options', 'advanced-ads' ); ?></label></li>
</ul>
</div>
<div class="advads-tab-content-footer">
<button class="button button-primary button-large" type="submit">
<?php esc_html_e( 'Download Export File', 'advanced-ads' ); ?>
</button>
</div>
</form>
</div>
</div>
</div>

View File

@@ -0,0 +1,20 @@
<?php
/**
* Render System information
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
use AdvancedAds\Admin\System_Info;
$system_info = new System_Info();
?>
<div class="advads-system-information">
<h2><?php esc_html_e( 'System Information', 'advanced-ads' ); ?></h2>
<textarea id="advads-system-information" readonly><?php echo esc_textarea( $system_info->get_info() ); ?></textarea>
<button type="button" id="advads-system-information-copy" class="button button-primary">
<?php esc_html_e( 'Copy System Information', 'advanced-ads' ); ?>
</button>
</div>

View File

@@ -0,0 +1,11 @@
<?php
/**
* Render tools page
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.50.0
*/
?>
<h2>Coming Soon</h2>

Some files were not shown because too many files have changed in this diff Show More