Plugin Directory

Changeset 3487830


Ignore:
Timestamp:
03/21/2026 03:45:13 PM (8 days ago)
Author:
wildoperation
Message:

Update to version 1.1.27 from GitHub

Location:
ad-commander
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ad-commander/tags/1.1.27/ad-commander.php

    r3487808 r3487830  
    44 * Plugin URI:      https://wpadcommander.com
    55 * Description:     Insert, schedule and track custom advertising banners or script ads from AdSense, Amazon, and other affiliate networks into your site.
    6  * Version:         1.1.26
     6 * Version:         1.1.27
    77 * Author:          Wild Operation
    88 * Author URI:      https://wildoperation.com
     
    1414 * @subpackage Ad Commander - Banner & Ad Manager
    1515 * @since 1.0.0
    16  * @version 1.1.26
     16 * @version 1.1.27
    1717 */
    1818
  • ad-commander/tags/1.1.27/includes/AdCommander.php

    r3487808 r3487830  
    1313     */
    1414    public static function version() {
    15         return '1.1.26';
     15        return '1.1.27';
    1616    }
    1717
  • ad-commander/tags/1.1.27/includes/Admin.php

    r3487808 r3487830  
    12421242            <img src="<?php echo esc_url( AdCommander::assets_url() . 'img/logo.svg' ); ?>" alt="<?php echo esc_attr( AdCommander::title() ); ?>" class="adcmdr-logo" />
    12431243            <div class="adcmdr-btn-group">
    1244                 <?php if ( ! ProBridge::instance()->is_pro_loaded() ) : ?>
     1244            <?php if ( ! ProBridge::instance()->is_pro_loaded() ) : ?>
    12451245                <a href="<?php echo esc_url( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ) ); ?>" class="button button-adcmdr-primary" target="_blank"><?php esc_html_e( 'Get Pro', 'ad-commander' ); ?></a>
    12461246                <?php endif; ?>
     
    12501250        </div>
    12511251            <?php
    1252         endif;
     1252            endif;
    12531253    }
    12541254
     
    13471347            </div>
    13481348            <div class="inside">
    1349                 <?php echo wp_kses_post( $content ); ?>
     1349            <?php echo wp_kses_post( $content ); ?>
    13501350            </div>
    13511351        </div>
     
    14031403        ?>
    14041404        <h2><?php _e( 'System Information for Debugging', 'ad-commander' ); ?></h2>
     1405        <p><?php _e( 'If you are experiencing issues with the plugin, please copy and paste the following information in your support request. This will help us to debug the issue.', 'ad-commander' ); ?></p>
     1406        <p><?php _e( 'IMPORTANT: May contain your geolocation information if geotargeting is enabled.', 'ad-commander' ); ?></p>
    14051407        <?php
    14061408        $settings = self::settings();
     
    14381440
    14391441            if ( ! empty( $group['sections'] ) ) {
    1440                 foreach ( $group['sections'] as $section ) {
     1442                foreach ( $group['sections'] as $section_key => $section ) {
    14411443                    if ( empty( $section['fields'] ) ) {
    14421444                        continue;
     
    14511453
    14521454                        $value   = isset( $raw_group[ $field_key ] ) ? $raw_group[ $field_key ] : null;
    1453                         $lines[] = $this->format_debug_line( $label, $this->format_debug_value( $value ) );
     1455                        $lines[] = $this->format_debug_line( $label, $this->format_debug_value( $value, ( in_array( $field_key, array( 'maxmind_license_key', 'pro_license_key' ) ) ) ) );
     1456                    }
     1457
     1458                    if ( $section_key === 'geotargeting' && ProBridge::instance()->is_pro_loaded() ) {
     1459                        $visitor = GeoPro::instance()->get_visitor( true );
     1460                        if ( $visitor && ! empty( $visitor ) ) {
     1461                            $lines[] = '';
     1462                            $lines[] = '### ' . __( 'Current Visitor Geo', 'ad-commander' );
     1463
     1464                            $visitor_labels = array(
     1465                                'lookup_types'   => __( 'Lookup Types', 'ad-commander' ),
     1466                                'city'           => __( 'City', 'ad-commander' ),
     1467                                'region'         => __( 'Region', 'ad-commander' ),
     1468                                'country_code'   => __( 'Country Code', 'ad-commander' ),
     1469                                'continent_code' => __( 'Continent Code', 'ad-commander' ),
     1470                                'lat'            => __( 'Latitude', 'ad-commander' ),
     1471                                'lng'            => __( 'Longitude', 'ad-commander' ),
     1472                            );
     1473
     1474                            foreach ( $visitor_labels as $key => $label ) {
     1475                                if ( isset( $visitor[ $key ] ) ) {
     1476                                    $value   = is_array( $visitor[ $key ] ) ? implode( ', ', $visitor[ $key ] ) : $visitor[ $key ];
     1477                                    $lines[] = $this->format_debug_line( $label, $value );
     1478                                }
     1479                            }
     1480                        }
    14541481                    }
    14551482                }
     
    14571484        }
    14581485
    1459         /**
    1460         * WordPress Environment
    1461         */
    1462         global $wpdb;
    1463 
    1464         $lines[] = '';
    1465         $lines[] = '## ' . __( 'WordPress Environment', 'ad-commander' );
    1466         $lines[] = '';
    1467         $lines[] = $this->format_debug_line( __( 'Home URL', 'ad-commander' ), home_url() );
    1468         $lines[] = $this->format_debug_line( __( 'Site URL', 'ad-commander' ), site_url() );
    1469         $lines[] = $this->format_debug_line( __( 'REST API Base URL', 'ad-commander' ), rest_url() );
    1470         $lines[] = $this->format_debug_line( __( 'WordPress Version', 'ad-commander' ), get_bloginfo( 'version' ) );
    1471         $lines[] = $this->format_debug_line( __( 'WordPress Multisite', 'ad-commander' ), is_multisite() ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1472         $lines[] = $this->format_debug_line( __( 'WordPress Memory Limit', 'ad-commander' ), WP_MEMORY_LIMIT );
    1473         $lines[] = $this->format_debug_line( __( 'WordPress Debug Mode', 'ad-commander' ), ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1474         $lines[] = $this->format_debug_line( __( 'WordPress Debug Log', 'ad-commander' ), ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1475         $lines[] = $this->format_debug_line( __( 'WordPress Cron', 'ad-commander' ), ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? __( 'No', 'ad-commander' ) : __( 'Yes', 'ad-commander' ) );
    1476         $lines[] = $this->format_debug_line( __( 'WordPress Locale', 'ad-commander' ), get_locale() );
    1477 
    1478         /**
    1479         * Active Theme
    1480         */
    1481         $theme        = wp_get_theme();
    1482         $theme_author = $theme->get( 'Author' );
    1483         $theme_detail = $theme_author ? 'by ' . wp_strip_all_tags( $theme_author ) . ' — ' . $theme->get( 'Version' ) : $theme->get( 'Version' );
    1484 
    1485         $lines[] = '';
    1486         $lines[] = '## ' . __( 'Active Theme', 'ad-commander' );
    1487         $lines[] = '';
    1488         $lines[] = $this->format_debug_line( $theme->get( 'Name' ), $theme_detail );
     1486            /**
     1487            * WordPress Environment
     1488            */
     1489            global $wpdb;
     1490
     1491            $lines[] = '';
     1492            $lines[] = '## ' . __( 'WordPress Environment', 'ad-commander' );
     1493            $lines[] = '';
     1494            $lines[] = $this->format_debug_line( __( 'Home URL', 'ad-commander' ), home_url() );
     1495            $lines[] = $this->format_debug_line( __( 'Site URL', 'ad-commander' ), site_url() );
     1496            $lines[] = $this->format_debug_line( __( 'REST API Base URL', 'ad-commander' ), rest_url() );
     1497            $lines[] = $this->format_debug_line( __( 'WordPress Version', 'ad-commander' ), get_bloginfo( 'version' ) );
     1498            $lines[] = $this->format_debug_line( __( 'WordPress Multisite', 'ad-commander' ), is_multisite() ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1499            $lines[] = $this->format_debug_line( __( 'WordPress Memory Limit', 'ad-commander' ), WP_MEMORY_LIMIT );
     1500            $lines[] = $this->format_debug_line( __( 'WordPress Debug Mode', 'ad-commander' ), ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1501            $lines[] = $this->format_debug_line( __( 'WordPress Debug Log', 'ad-commander' ), ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1502            $lines[] = $this->format_debug_line( __( 'WordPress Cron', 'ad-commander' ), ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? __( 'No', 'ad-commander' ) : __( 'Yes', 'ad-commander' ) );
     1503            $lines[] = $this->format_debug_line( __( 'WordPress Locale', 'ad-commander' ), get_locale() );
     1504
     1505            /**
     1506            * Active Theme
     1507            */
     1508            $theme        = wp_get_theme();
     1509            $theme_author = $theme->get( 'Author' );
     1510            $theme_detail = $theme_author ? 'by ' . wp_strip_all_tags( $theme_author ) . ' — ' . $theme->get( 'Version' ) : $theme->get( 'Version' );
     1511
     1512            $lines[] = '';
     1513            $lines[] = '## ' . __( 'Active Theme', 'ad-commander' );
     1514            $lines[] = '';
     1515            $lines[] = $this->format_debug_line( $theme->get( 'Name' ), $theme_detail );
    14891516
    14901517        if ( $theme->parent() ) {
     
    14921519        }
    14931520
    1494         /**
    1495         * Active Plugins
    1496         */
    1497         $active_plugins = get_option( 'active_plugins', array() );
    1498         $all_plugins    = get_plugins();
    1499 
    1500         $lines[] = '';
    1501         $lines[] = '## ' . __( 'Active Plugins', 'ad-commander' );
    1502         $lines[] = '';
     1521            /**
     1522            * Active Plugins
     1523            */
     1524            $active_plugins = get_option( 'active_plugins', array() );
     1525            $all_plugins    = get_plugins();
     1526
     1527            $lines[] = '';
     1528            $lines[] = '## ' . __( 'Active Plugins', 'ad-commander' );
     1529            $lines[] = '';
    15031530
    15041531        foreach ( $active_plugins as $plugin_path ) {
     
    15111538        }
    15121539
    1513         /**
    1514         * Server Environment
    1515         */
    1516         $lines[] = '';
    1517         $lines[] = '## ' . __( 'Server Environment', 'ad-commander' );
    1518         $lines[] = '';
    1519         $lines[] = $this->format_debug_line( __( 'Web Server', 'ad-commander' ), isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : __( 'Unknown', 'ad-commander' ) );
    1520         $lines[] = $this->format_debug_line( __( 'PHP Version', 'ad-commander' ), function_exists( 'phpversion' ) ? phpversion() : __( 'Unknown', 'ad-commander' ) );
    1521         $lines[] = $this->format_debug_line( __( 'PHP Memory Limit', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'memory_limit' ) : __( 'Unknown', 'ad-commander' ) );
    1522         $lines[] = $this->format_debug_line( __( 'PHP Max Execution Time', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'max_execution_time' ) : __( 'Unknown', 'ad-commander' ) );
    1523         $lines[] = $this->format_debug_line( __( 'PHP Max Upload Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'upload_max_filesize' ) : __( 'Unknown', 'ad-commander' ) );
    1524         $lines[] = $this->format_debug_line( __( 'PHP Max Post Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'post_max_size' ) : __( 'Unknown', 'ad-commander' ) );
    1525         $lines[] = $this->format_debug_line( __( 'cURL Enabled', 'ad-commander' ), function_exists( 'curl_version' ) ? __( 'Yes', 'ad-commander' ) . ' (' . curl_version()['version'] . ')' : __( 'No', 'ad-commander' ) );
    1526         $lines[] = $this->format_debug_line( __( 'OpenSSL', 'ad-commander' ), defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : __( 'No', 'ad-commander' ) );
    1527 
    1528         /**
    1529         * Database
    1530         */
    1531         $lines[] = '';
    1532         $lines[] = '## ' . __( 'Database', 'ad-commander' );
    1533         $lines[] = '';
    1534         $lines[] = $this->format_debug_line( __( 'Database System', 'ad-commander' ), ! empty( $wpdb->db_server_info() ) ? $wpdb->db_server_info() : __( 'Unknown', 'ad-commander' ) );
    1535         $lines[] = $this->format_debug_line( __( 'Database Version', 'ad-commander' ), $wpdb->db_version() );
    1536         $lines[] = $this->format_debug_line( __( 'Database Character Set', 'ad-commander' ), ! empty( $wpdb->charset ) ? $wpdb->charset : __( 'Unknown', 'ad-commander' ) );
    1537         $lines[] = $this->format_debug_line( __( 'Database Collation', 'ad-commander' ), ! empty( $wpdb->collate ) ? $wpdb->collate : __( 'Unknown', 'ad-commander' ) );
    1538         $lines[] = $this->format_debug_line( __( 'Database Prefix', 'ad-commander' ), $wpdb->prefix );
    1539 
    1540         /**
    1541         * Date and Time
    1542         */
    1543         $lines[] = '';
    1544         $lines[] = '## ' . __( 'Date and Time', 'ad-commander' );
    1545         $lines[] = '';
    1546         $lines[] = $this->format_debug_line( __( 'WordPress Timezone', 'ad-commander' ), wp_timezone_string() );
    1547         $lines[] = $this->format_debug_line( __( 'Server Time (UTC)', 'ad-commander' ), gmdate( 'Y-m-d H:i:s' ) );
    1548         $lines[] = $this->format_debug_line( __( 'Local Time', 'ad-commander' ), wp_date( 'Y-m-d H:i:s' ) );
    1549 
    1550         $output = implode( "\n", $lines );
     1540            /**
     1541            * Server Environment
     1542            */
     1543            $lines[] = '';
     1544            $lines[] = '## ' . __( 'Server Environment', 'ad-commander' );
     1545            $lines[] = '';
     1546            $lines[] = $this->format_debug_line( __( 'Web Server', 'ad-commander' ), isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : __( 'Unknown', 'ad-commander' ) );
     1547            $lines[] = $this->format_debug_line( __( 'PHP Version', 'ad-commander' ), function_exists( 'phpversion' ) ? phpversion() : __( 'Unknown', 'ad-commander' ) );
     1548            $lines[] = $this->format_debug_line( __( 'PHP Memory Limit', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'memory_limit' ) : __( 'Unknown', 'ad-commander' ) );
     1549            $lines[] = $this->format_debug_line( __( 'PHP Max Execution Time', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'max_execution_time' ) : __( 'Unknown', 'ad-commander' ) );
     1550            $lines[] = $this->format_debug_line( __( 'PHP Max Upload Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'upload_max_filesize' ) : __( 'Unknown', 'ad-commander' ) );
     1551            $lines[] = $this->format_debug_line( __( 'PHP Max Post Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'post_max_size' ) : __( 'Unknown', 'ad-commander' ) );
     1552            $lines[] = $this->format_debug_line( __( 'cURL Enabled', 'ad-commander' ), function_exists( 'curl_version' ) ? __( 'Yes', 'ad-commander' ) . ' (' . curl_version()['version'] . ')' : __( 'No', 'ad-commander' ) );
     1553            $lines[] = $this->format_debug_line( __( 'OpenSSL', 'ad-commander' ), defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : __( 'No', 'ad-commander' ) );
     1554
     1555            /**
     1556            * Database
     1557            */
     1558            $lines[] = '';
     1559            $lines[] = '## ' . __( 'Database', 'ad-commander' );
     1560            $lines[] = '';
     1561            $lines[] = $this->format_debug_line( __( 'Database System', 'ad-commander' ), ! empty( $wpdb->db_server_info() ) ? $wpdb->db_server_info() : __( 'Unknown', 'ad-commander' ) );
     1562            $lines[] = $this->format_debug_line( __( 'Database Version', 'ad-commander' ), $wpdb->db_version() );
     1563            $lines[] = $this->format_debug_line( __( 'Database Character Set', 'ad-commander' ), ! empty( $wpdb->charset ) ? $wpdb->charset : __( 'Unknown', 'ad-commander' ) );
     1564            $lines[] = $this->format_debug_line( __( 'Database Collation', 'ad-commander' ), ! empty( $wpdb->collate ) ? $wpdb->collate : __( 'Unknown', 'ad-commander' ) );
     1565            $lines[] = $this->format_debug_line( __( 'Database Prefix', 'ad-commander' ), $wpdb->prefix );
     1566
     1567            /**
     1568            * Date and Time
     1569            */
     1570            $lines[] = '';
     1571            $lines[] = '## ' . __( 'Date and Time', 'ad-commander' );
     1572            $lines[] = '';
     1573            $lines[] = $this->format_debug_line( __( 'WordPress Timezone', 'ad-commander' ), wp_timezone_string() );
     1574            $lines[] = $this->format_debug_line( __( 'Server Time (UTC)', 'ad-commander' ), gmdate( 'Y-m-d H:i:s' ) );
     1575            $lines[] = $this->format_debug_line( __( 'Local Time', 'ad-commander' ), wp_date( 'Y-m-d H:i:s' ) );
     1576
     1577            $output = implode( "\n", $lines );
    15511578        ?>
    15521579        <div class="adcmdr-debug">
     
    15541581            <textarea readonly="readonly" onclick="this.select();"><?php echo esc_textarea( $output ); ?></textarea>
    15551582        </div>
    1556         <?php
    1557     }
    1558 
    1559     /**
    1560     * Format a single line for the debug textarea.
    1561     *
    1562     * @param string $label The label.
    1563     * @param string $value The value.
    1564     *
    1565     * @return string
    1566     */
     1583            <?php
     1584    }
     1585
     1586        /**
     1587        * Format a single line for the debug textarea.
     1588        *
     1589        * @param string $label The label.
     1590        * @param string $value The value.
     1591        *
     1592        * @return string
     1593        */
    15671594    private function format_debug_line( $label, $value ) {
    1568         return $label . ': ' . $value;
    1569     }
    1570 
    1571     /**
    1572     * Format a value for debug display.
    1573     *
    1574     * @param mixed $value The value to format.
    1575     *
    1576     * @return string
    1577     */
    1578     private function format_debug_value( $value ) {
     1595        return esc_html( $label ) . ': ' . esc_html( $value );
     1596    }
     1597
     1598        /**
     1599        * Format a value for debug display.
     1600        *
     1601        * @param mixed $value The value to format.
     1602        *
     1603        * @return string
     1604        */
     1605    private function format_debug_value( $value, $exists_only = false ) {
    15791606        if ( is_null( $value ) || ( is_string( $value ) && '' === $value ) ) {
    15801607            return '—';
    15811608        }
    15821609
    1583         if ( is_bool( $value ) ) {
     1610        if ( is_bool( $value ) || ( $exists_only && ! empty( $value ) ) ) {
    15841611            return $value ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' );
    15851612        }
     
    16121639    }
    16131640
    1614     /**
    1615     * Register settings from settings array.
    1616     *
    1617     * @return void
    1618     */
     1641        /**
     1642        * Register settings from settings array.
     1643        *
     1644        * @return void
     1645        */
    16191646    public function register_settings() {
    16201647        $this->sf()->add_sections_and_settings(
     
    16241651    }
    16251652
    1626     /**
    1627     * Sanitize input by type.
    1628     *
    1629     * @param array $input The input to sanitize.
    1630     *
    1631     * @return array
    1632     */
     1653        /**
     1654        * Sanitize input by type.
     1655        *
     1656        * @param array $input The input to sanitize.
     1657        *
     1658        * @return array
     1659        */
    16331660    private function sanitize_by_key_type( $input ) {
    16341661        $output = array();
     
    16771704    }
    16781705
    1679     /**
    1680     * Sanitize general group.
    1681     *
    1682     * @param array $input The input to sanitize.
    1683     *
    1684     * @return array
    1685     */
     1706        /**
     1707        * Sanitize general group.
     1708        *
     1709        * @param array $input The input to sanitize.
     1710        *
     1711        * @return array
     1712        */
    16861713    public function sanitize_adcmdr_general( $input ) {
    16871714        Maintenance::flush_css_transients();
     
    16891716    }
    16901717
    1691     /**
    1692     * Sanitize admin group.
    1693     *
    1694     * @param array $input The input to sanitize.
    1695     *
    1696     * @return array
    1697     */
     1718        /**
     1719        * Sanitize admin group.
     1720        *
     1721        * @param array $input The input to sanitize.
     1722        *
     1723        * @return array
     1724        */
    16981725    public function sanitize_adcmdr_admin( $input ) {
    16991726        return $this->sanitize_by_key_type( $input );
    17001727    }
    17011728
    1702     /**
    1703     * Sanitize tracking group.
    1704     *
    1705     * @param array $input The input to sanitize.
    1706     *
    1707     * @return array
    1708     */
     1729        /**
     1730        * Sanitize tracking group.
     1731        *
     1732        * @param array $input The input to sanitize.
     1733        *
     1734        * @return array
     1735        */
    17091736    public function sanitize_adcmdr_tracking( $input ) {
    17101737        return $this->sanitize_by_key_type( $input );
    17111738    }
    17121739
    1713     /**
    1714     * Sanitize adsense group.
    1715     *
    1716     * @param array $input The input to sanitize.
    1717     *
    1718     * @return array
    1719     */
     1740        /**
     1741        * Sanitize adsense group.
     1742        *
     1743        * @param array $input The input to sanitize.
     1744        *
     1745        * @return array
     1746        */
    17201747    public function sanitize_adcmdr_adsense( $input ) {
    17211748        return $this->sanitize_by_key_type( $input );
    17221749    }
    17231750
    1724     /**
    1725     * Sanitize privacy group.
    1726     *
    1727     * @param array $input The input to sanitize.
    1728     *
    1729     * @return array
    1730     */
     1751        /**
     1752        * Sanitize privacy group.
     1753        *
     1754        * @param array $input The input to sanitize.
     1755        *
     1756        * @return array
     1757        */
    17311758    public function sanitize_adcmdr_privacy( $input ) {
    17321759        return $this->sanitize_by_key_type( $input );
    17331760    }
    17341761
    1735     /**
    1736     * Sanitize geotargeting group.
    1737     *
    1738     * @param array $input The input to sanitize.
    1739     *
    1740     * @return array
    1741     */
     1762        /**
     1763        * Sanitize geotargeting group.
     1764        *
     1765        * @param array $input The input to sanitize.
     1766        *
     1767        * @return array
     1768        */
    17421769    public function sanitize_adcmdr_targeting( $input ) {
    17431770        return $this->sanitize_by_key_type( $input );
    17441771    }
    17451772
    1746     /**
    1747     * Sanitize add-on group.
    1748     *
    1749     * @param array $input The input to sanitize.
    1750     *
    1751     * @return array
    1752     */
     1773        /**
     1774        * Sanitize add-on group.
     1775        *
     1776        * @param array $input The input to sanitize.
     1777        *
     1778        * @return array
     1779        */
    17531780    public function sanitize_adcmdr_addons( $input ) {
    17541781        return $this->sanitize_by_key_type( $input );
    17551782    }
    17561783
    1757     /**
    1758     * Create an underscored key from a string.
    1759     *
    1760     * @param string $key The key to convert.
    1761     *
    1762     * @return string
    1763     */
     1784        /**
     1785        * Create an underscored key from a string.
     1786        *
     1787        * @param string $key The key to convert.
     1788        *
     1789        * @return string
     1790        */
    17641791    public function _key( $key ) {
    17651792        return str_replace( '-', '_', $key );
    17661793    }
    17671794
    1768     /**
    1769     * Create a nonce array.
    1770     * This is not an actual nonce. This array is used for creating and checking unique nonces.
    1771     *
    1772     * @param string $action The action..
    1773     * @param string $key The key to create the nonce string from.
    1774     *
    1775     * @return array
    1776     */
     1795        /**
     1796        * Create a nonce array.
     1797        * This is not an actual nonce. This array is used for creating and checking unique nonces.
     1798        *
     1799        * @param string $action The action..
     1800        * @param string $key The key to create the nonce string from.
     1801        *
     1802        * @return array
     1803        */
    17771804    protected function nonce( $action, $key ) {
    17781805        return array(
     
    17821809    }
    17831810
    1784     /**
    1785     * Create a nonce field.
    1786     *
    1787     * @param array $nonce_arr A nonce array.
    1788     * @param bool  $referrer Whether to include the referrer field.
    1789     *
    1790     * @return void
    1791     */
     1811        /**
     1812        * Create a nonce field.
     1813        *
     1814        * @param array $nonce_arr A nonce array.
     1815        * @param bool  $referrer Whether to include the referrer field.
     1816        *
     1817        * @return void
     1818        */
    17921819    protected function nonce_field( $nonce_arr, $referrer = false ) {
    17931820        wp_nonce_field( $nonce_arr['action'], $nonce_arr['name'], $referrer );
    17941821    }
    17951822
    1796     /**
    1797     * Create a string for use in your nonce.
    1798     *
    1799     * @param string $action Action name.
    1800     *
    1801     * @return string
    1802     */
     1823        /**
     1824        * Create a string for use in your nonce.
     1825        *
     1826        * @param string $action Action name.
     1827        *
     1828        * @return string
     1829        */
    18031830    protected function nonce_string( $action ) {
    18041831        return sanitize_title( Util::ns( 'n-' . $action ) );
    18051832    }
    18061833
    1807     /**
    1808     * Create an action string for use in your nonce.
    1809     *
    1810     * @param string $action Action name.
    1811     *
    1812     * @return string
    1813     */
     1834        /**
     1835        * Create an action string for use in your nonce.
     1836        *
     1837        * @param string $action Action name.
     1838        *
     1839        * @return string
     1840        */
    18141841    protected function action_string( $action ) {
    18151842        return self::_key( sanitize_title( Util::ns( $action, '_' ) ) );
    18161843    }
    18171844
    1818     /**
    1819     * Authorizes actions for non-settings pages.
    1820     * Interfaces with WOAdmin to check nonce, capability, and required $_POST keys.
    1821     *
    1822     * @param mixed       $action_key The action key to authorized.
    1823     * @param array       $required_post Any required post keys.
    1824     * @param string|bool $capability The capability required to process this action.
    1825     *
    1826     * @return void
    1827     */
     1845        /**
     1846        * Authorizes actions for non-settings pages.
     1847        * Interfaces with WOAdmin to check nonce, capability, and required $_POST keys.
     1848        *
     1849        * @param mixed       $action_key The action key to authorized.
     1850        * @param array       $required_post Any required post keys.
     1851        * @param string|bool $capability The capability required to process this action.
     1852        *
     1853        * @return void
     1854        */
    18281855    protected function check_ajax_action( $action_key, $required_post = array(), $capability = false ) {
    18291856        /**
     
    18401867    }
    18411868
    1842     /**
    1843     * Call back for settings section.
    1844     *
    1845     * @return void
    1846     */
     1869        /**
     1870        * Call back for settings section.
     1871        *
     1872        * @return void
     1873        */
    18471874    public function settings_callback_adcmdr_defaults() {
    18481875        ?>
    18491876           
    18501877        <p><?php esc_html_e( 'These settings can be overridden by individual ads if needed.', 'ad-commander' ); ?></p>
    1851         <?php
    1852     }
    1853 
    1854     /**
    1855     * Call back for settings section.
    1856     *
    1857     * @return void
    1858     */
     1878            <?php
     1879    }
     1880
     1881        /**
     1882        * Call back for settings section.
     1883        *
     1884        * @return void
     1885        */
    18591886    public function settings_callback_adcmdr_consent() {
    18601887        if ( Util::render_method() === 'serverside' ) {
     
    18641891        ?>
    18651892        <p><?php esc_html_e( 'Ad Commander does not create a consent banner. These settings allow you to integrate with a consent management plugin.', 'ad-commander' ); ?></p>
    1866         <?php
    1867     }
    1868 
    1869     /**
    1870     * Call back for settings section.
    1871     *
    1872     * @return void
    1873     */
     1893            <?php
     1894    }
     1895
     1896        /**
     1897        * Call back for settings section.
     1898        *
     1899        * @return void
     1900        */
    18741901    public function settings_callback_adcmdr_general() {}
    18751902
    1876     /**
    1877     * Call back for settings section.
    1878     *
    1879     * @return void
    1880     */
     1903        /**
     1904        * Call back for settings section.
     1905        *
     1906        * @return void
     1907        */
    18811908    public function settings_callback_adcmdr_tracking_methods() {}
    18821909
    1883     /**
    1884     * Call back for settings section.
    1885     *
    1886     * @return void
    1887     */
     1910        /**
     1911        * Call back for settings section.
     1912        *
     1913        * @return void
     1914        */
    18881915    public function settings_callback_adcmdr_disable_ads() {}
    18891916
    1890     /**
    1891     * Call back for settings section.
    1892     *
    1893     * @return void
    1894     */
     1917        /**
     1918        * Call back for settings section.
     1919        *
     1920        * @return void
     1921        */
    18951922    public function settings_callback_adcmdr_advanced_settings() {}
    18961923
    1897     /**
    1898     * Call back for settings section.
    1899     *
    1900     * @return void
    1901     */
     1924        /**
     1925        * Call back for settings section.
     1926        *
     1927        * @return void
     1928        */
    19021929    public function settings_callback_adcmdr_admin() {
    19031930    }
    19041931
    1905     /**
    1906     * Call back for settings section.
    1907     *
    1908     * @return void
    1909     */
     1932        /**
     1933        * Call back for settings section.
     1934        *
     1935        * @return void
     1936        */
    19101937    public function settings_callback_adcmdr_notifications() {}
    19111938
    1912     /**
    1913     * Call back for settings section.
    1914     *
    1915     * @return void
    1916     */
     1939        /**
     1940        * Call back for settings section.
     1941        *
     1942        * @return void
     1943        */
    19171944    public function settings_callback_adcmdr_misc() {}
    19181945
    1919     /**
    1920     * Call back for settings section.
    1921     *
    1922     * @return void
    1923     */
     1946        /**
     1947        * Call back for settings section.
     1948        *
     1949        * @return void
     1950        */
    19241951    public function settings_callback_adcmdr_onboarding() {}
    19251952
    1926     /**
    1927     * Call back for settings section.
    1928     *
    1929     * @return void
    1930     */
     1953        /**
     1954        * Call back for settings section.
     1955        *
     1956        * @return void
     1957        */
    19311958    public function settings_callback_adcmdr_geotargeting() {}
    19321959
    1933     /**
    1934     * Call back for settings section.
    1935     *
    1936     * @return void
    1937     */
     1960        /**
     1961        * Call back for settings section.
     1962        *
     1963        * @return void
     1964        */
    19381965    public function settings_callback_adcmdr_multisite() {}
    19391966
    1940     /**
    1941     * Call back for settings section.
    1942     *
    1943     * @return void
    1944     */
     1967        /**
     1968        * Call back for settings section.
     1969        *
     1970        * @return void
     1971        */
    19451972    public function settings_callback_adcmdr_ads_txt() {
    19461973        ?>
    19471974        <p><?php esc_html_e( 'Ad Commander will attempt to generate an ads.txt in the root of your website. If an AdSense account is enabled, it will be included, along with any additional records added below.', 'ad-commander' ); ?></p>
    1948         <?php
    1949     }
    1950 
    1951     /**
    1952     * Call back for settings section.
    1953     *
    1954     * @return void
    1955     */
     1975            <?php
     1976    }
     1977
     1978        /**
     1979        * Call back for settings section.
     1980        *
     1981        * @return void
     1982        */
    19561983    public function settings_callback_adcmdr_disable_tracking() {
    19571984        ?>
    19581985        <p><?php esc_html_e( 'Fine-tune tracking settings by disabling some features below.', 'ad-commander' ); ?></p>
    1959         <?php
    1960     }
    1961 
    1962     /**
    1963     * Call back for settings section.
    1964     *
    1965     * @return void
    1966     */
     1986            <?php
     1987    }
     1988
     1989        /**
     1990        * Call back for settings section.
     1991        *
     1992        * @return void
     1993        */
    19671994    public function settings_callback_adcmdr_tracking() {}
    19681995
    1969     /**
    1970     * Call back for settings section.
    1971     *
    1972     * @return void
    1973     */
     1996        /**
     1997        * Call back for settings section.
     1998        *
     1999        * @return void
     2000        */
    19742001    public function settings_callback_adcmdr_licenses() {}
    19752002
    1976     /**
    1977     * Call back for settings section.
    1978     *
    1979     * @return void
    1980     */
     2003        /**
     2004        * Call back for settings section.
     2005        *
     2006        * @return void
     2007        */
    19812008    public function settings_callback_adcmdr_support() {}
    19822009
    1983     /**
    1984     * Call back for settings section.
    1985     *
    1986     * @return void
    1987     */
     2010        /**
     2011        * Call back for settings section.
     2012        *
     2013        * @return void
     2014        */
    19882015    public function settings_callback_adcmdr_adsense() {}
    19892016
    1990     /**
    1991     * Perform actions during add-on options updates.
    1992     * Specifically, determine if the license key has changed.
    1993     *
    1994     * @param mixed $new_value The new value of the option.
    1995     * @param mixed $old_value The old value of the option.
    1996     *
    1997     * @return mixed
    1998     */
     2017        /**
     2018        * Perform actions during add-on options updates.
     2019        * Specifically, determine if the license key has changed.
     2020        *
     2021        * @param mixed $new_value The new value of the option.
     2022        * @param mixed $old_value The old value of the option.
     2023        *
     2024        * @return mixed
     2025        */
    19992026    public function addon_options_updated( $new_value, $old_value ) {
    20002027
     
    20182045    }
    20192046
    2020     /**
    2021     * Callback for settings field.
    2022     *
    2023     * @return void
    2024     */
     2047        /**
     2048        * Callback for settings field.
     2049        *
     2050        * @return void
     2051        */
    20252052    public function field_adcmdr_pro_license_key() {
    20262053        $pro_bridge = ProBridge::instance();
     
    20862113    }
    20872114
    2088     /**
    2089     * Callback for settings field.
    2090     *
    2091     * @return void
    2092     */
     2115        /**
     2116        * Callback for settings field.
     2117        *
     2118        * @return void
     2119        */
    20932120    public function field_adcmdr_geo_service() {
    20942121        $id            = array( $this->sf()->key( 'targeting' ) => 'geo_service' );
     
    21252152    }
    21262153
    2127     /**
    2128     * Callback for settings field.
    2129     *
    2130     * @return void
    2131     */
     2154        /**
     2155        * Callback for settings field.
     2156        *
     2157        * @return void
     2158        */
    21322159    public function field_adcmdr_maxmind_license_key() {
    21332160        if ( ProBridge::instance()->is_pro_loaded() ) {
     
    21362163    }
    21372164
    2138     /**
    2139     * Callback for settings field.
    2140     *
    2141     * @return void
    2142     */
     2165        /**
     2166        * Callback for settings field.
     2167        *
     2168        * @return void
     2169        */
    21432170    public function field_adcmdr_maxmind_database_update() {
    21442171        if ( ProBridge::instance()->is_pro_loaded() ) {
     
    21472174    }
    21482175
    2149     /**
    2150     * Callback for settings field.
    2151     *
    2152     * @return void
    2153     */
     2176        /**
     2177        * Callback for settings field.
     2178        *
     2179        * @return void
     2180        */
    21542181    public function field_adcmdr_render_method() {
    21552182        $pro_only = array( 'clientside', 'smart' );
     
    22062233    }
    22072234
    2208     /**
    2209     * Callback for settings field.
    2210     *
    2211     * @return void
    2212     */
     2235        /**
     2236        * Callback for settings field.
     2237        *
     2238        * @return void
     2239        */
    22132240    public function field_adcmdr_ad_label() {
    22142241        $id = array( $this->sf()->key( 'general' ) => 'ad_label' );
     
    22232250    }
    22242251
    2225     /**
    2226     * Callback for settings field.
    2227     *
    2228     * @return void
    2229     */
     2252        /**
     2253        * Callback for settings field.
     2254        *
     2255        * @return void
     2256        */
    22302257    public function field_adcmdr_prefix() {
    22312258        $id = array( $this->sf()->key( 'general' ) => 'prefix' );
     
    22342261    }
    22352262
    2236 
    2237     /**
    2238      * Callback for settings field.
    2239      *
    2240      * @return void
    2241      */
     2263        /**
     2264         * Callback for settings field.
     2265         *
     2266         * @return void
     2267         */
    22422268    public function field_adcmdr_loading_animation() {
    22432269        $id = array( $this->sf()->key( 'general' ) => 'loading_animation' );
     
    22482274    }
    22492275
    2250     /**
    2251     * Callback for settings field.
    2252     *
    2253     * @return void
    2254     */
     2276        /**
     2277        * Callback for settings field.
     2278        *
     2279        * @return void
     2280        */
    22552281    public function field_adcmdr_lazy_load_ads() {
    22562282        $id            = array( $this->sf()->key( 'general' ) => 'lazy_load_ads' );
     
    22812307    }
    22822308
    2283     /**
    2284     * Callback for settings field.
    2285     *
    2286     * @return void
    2287     */
     2309        /**
     2310        * Callback for settings field.
     2311        *
     2312        * @return void
     2313        */
    22882314    public function field_adcmdr_disable_onboarding_global() {
    22892315        $id = array( $this->sf()->key( 'admin' ) => 'disable_onboarding_global' );
     
    22932319    }
    22942320
    2295     /**
    2296     * Callback for settings field.
    2297     *
    2298     * @return void
    2299     */
     2321        /**
     2322        * Callback for settings field.
     2323        *
     2324        * @return void
     2325        */
    23002326    public function field_adcmdr_disable_onboarding_ads() {
    23012327        $id = array( $this->sf()->key( 'admin' ) => 'disable_onboarding_ads' );
     
    23052331    }
    23062332
    2307     /**
    2308     * Callback for settings field.
    2309     *
    2310     * @return void
    2311     */
     2333        /**
     2334        * Callback for settings field.
     2335        *
     2336        * @return void
     2337        */
    23122338    public function field_adcmdr_disable_doc_links() {
    23132339        $id = array( $this->sf()->key( 'admin' ) => 'disable_doc_links' );
     
    23172343    }
    23182344
    2319     /**
    2320     * Callback for settings field.
    2321     *
    2322     * @return void
    2323     */
     2345        /**
     2346        * Callback for settings field.
     2347        *
     2348        * @return void
     2349        */
    23242350    public function field_adcmdr_disable_virtual_adstxt() {
    23252351        $id = array( $this->sf()->key( 'general' ) => 'disable_virtual_adstxt' );
     
    23552381    }
    23562382
    2357     /**
    2358     * Callback for settings field.
    2359     *
    2360     * @return void
    2361     */
     2383        /**
     2384        * Callback for settings field.
     2385        *
     2386        * @return void
     2387        */
    23622388    public function field_adcmdr_ads_txt_records() {
    23632389        $id = array( $this->sf()->key( 'general' ) => 'ads_txt_records' );
     
    23852411    }
    23862412
    2387     /**
    2388     * Callback for settings field.
    2389     *
    2390     * @return void
    2391     */
     2413        /**
     2414        * Callback for settings field.
     2415        *
     2416        * @return void
     2417        */
    23922418    public function field_adcmdr_newwindow() {
    23932419        $id = array( $this->sf()->key( 'general' ) => 'newwindow' );
     
    23972423    }
    23982424
    2399     /**
    2400     * Callback for settings field.
    2401     *
    2402     * @return void
    2403     */
     2425        /**
     2426        * Callback for settings field.
     2427        *
     2428        * @return void
     2429        */
    24042430    public function field_adcmdr_rel_attributes() {
    24052431        $id = array( $this->sf()->key( 'general' ) => 'rel_attributes' );
     
    24152441    }
    24162442
    2417     /**
    2418     * Callback for settings field.
    2419     *
    2420     * @return void
    2421     */
     2443        /**
     2444        * Callback for settings field.
     2445        *
     2446        * @return void
     2447        */
    24222448    public function field_adcmdr_responsive_banners() {
    24232449        $id = array( $this->sf()->key( 'general' ) => 'responsive_banners' );
     
    24312457    }
    24322458
    2433     /**
    2434     * Callback for settings field.
    2435     *
    2436     * @return void
    2437     */
     2459        /**
     2460        * Callback for settings field.
     2461        *
     2462        * @return void
     2463        */
    24382464    public function field_adcmdr_filter_priority() {
    24392465        $id       = array( $this->sf()->key( 'general' ) => 'filter_priority' );
     
    24432469    }
    24442470
    2445     /**
    2446     * Callback for settings field.
    2447     *
    2448     * @return void
    2449     */
     2471        /**
     2472        * Callback for settings field.
     2473        *
     2474        * @return void
     2475        */
    24502476    public function field_adcmdr_disable_stylesheets() {
    24512477        $id = array( $this->sf()->key( 'general' ) => 'disable_stylesheets' );
     
    24552481    }
    24562482
    2457     /**
    2458     * Callback for settings field.
    2459     *
    2460     * @return void
    2461     */
     2483        /**
     2484        * Callback for settings field.
     2485        *
     2486        * @return void
     2487        */
    24622488    public function field_adcmdr_bots_disable_ads() {
    24632489        $id = array( $this->sf()->key( 'general' ) => 'bots_disable_ads' );
     
    24682494    }
    24692495
    2470     /**
    2471     * Callback for settings field.
    2472     *
    2473     * @return void
    2474     */
     2496        /**
     2497        * Callback for settings field.
     2498        *
     2499        * @return void
     2500        */
    24752501    public function field_adcmdr_disable_all() {
    24762502        $id = array( $this->sf()->key( 'general' ) => 'disable_all' );
     
    24802506    }
    24812507
    2482     /**
    2483     * Callback for settings field.
    2484     *
    2485     * @return void
    2486     */
     2508        /**
     2509        * Callback for settings field.
     2510        *
     2511        * @return void
     2512        */
    24872513    public function field_adcmdr_disable_user_roles() {
    24882514        $roles = TargetingVisitor::parse_roles_to_values();
     
    24922518    }
    24932519
    2494     /**
    2495     * Callback for settings field.
    2496     *
    2497     * @return void
    2498     */
     2520        /**
     2521        * Callback for settings field.
     2522        *
     2523        * @return void
     2524        */
    24992525    public function field_adcmdr_allow_editors() {
    25002526        $id = array( $this->sf()->key( 'admin' ) => 'allow_editors' );
     
    25052531    }
    25062532
    2507     /**
    2508     * Callback for settings field.
    2509     *
    2510     * @return void
    2511     */
     2533        /**
     2534        * Callback for settings field.
     2535        *
     2536        * @return void
     2537        */
    25122538    public function field_adcmdr_allow_unfiltered_html() {
    25132539        $id = array( $this->sf()->key( 'admin' ) => 'allow_unfiltered_html' );
     
    25182544    }
    25192545
    2520     /**
    2521     * Callback for settings field.
    2522     *
    2523     * @return void
    2524     */
     2546        /**
     2547        * Callback for settings field.
     2548        *
     2549        * @return void
     2550        */
    25252551    public function field_adcmdr_delete_data() {
    25262552        $id = array( $this->sf()->key( 'admin' ) => 'delete_data' );
     
    25312557    }
    25322558
    2533     /**
    2534     * Callback for settings field.
    2535     *
    2536     * @return void
    2537     */
     2559        /**
     2560        * Callback for settings field.
     2561        *
     2562        * @return void
     2563        */
    25382564    public function field_adcmdr_disable_track_impressions() {
    25392565        $id = array( $this->sf()->key( 'tracking' ) => 'disable_track_impressions' );
     
    25432569    }
    25442570
    2545     /**
    2546     * Callback for settings field.
    2547     *
    2548     * @return void
    2549     */
     2571        /**
     2572        * Callback for settings field.
     2573        *
     2574        * @return void
     2575        */
    25502576    public function field_adcmdr_disable_track_clicks() {
    25512577        $id = array( $this->sf()->key( 'tracking' ) => 'disable_track_clicks' );
     
    25552581    }
    25562582
    2557     /**
    2558     * Callback for settings field.
    2559     *
    2560     * @return void
    2561     */
     2583        /**
     2584        * Callback for settings field.
     2585        *
     2586        * @return void
     2587        */
    25622588    public function field_adcmdr_enable_local_tracking() {
    25632589        $id = array( $this->sf()->key( 'tracking' ) => 'enable_local_tracking' );
     
    25692595    }
    25702596
    2571     /**
    2572     * Callback for settings field.
    2573     *
    2574     * @return void
    2575     */
     2597        /**
     2598        * Callback for settings field.
     2599        *
     2600        * @return void
     2601        */
    25762602    public function field_adcmdr_enable_3p_tracking() {
    25772603        $id            = array( $this->sf()->key( 'tracking' ) => 'enable_3p_tracking' );
     
    25932619    }
    25942620
    2595     /**
    2596     * Callback for settings field.
    2597     *
    2598     * @return void
    2599     */
     2621        /**
     2622        * Callback for settings field.
     2623        *
     2624        * @return void
     2625        */
    26002626    public function field_adcmdr_enable_ga_tracking() {
    26012627        $id = array( $this->sf()->key( 'tracking' ) => 'enable_ga_tracking' );
     
    26182644    }
    26192645
    2620     /**
    2621     * Callback for settings field.
    2622     *
    2623     * @return void
    2624     */
     2646        /**
     2647        * Callback for settings field.
     2648        *
     2649        * @return void
     2650        */
    26252651    public function field_adcmdr_ga_tracking_ids() {
    26262652        $id = array( $this->sf()->key( 'tracking' ) => 'ga_tracking_ids' );
     
    26312657    }
    26322658
    2633     /**
    2634     * Callback for settings field.
    2635     *
    2636     * @return void
    2637     */
     2659        /**
     2660        * Callback for settings field.
     2661        *
     2662        * @return void
     2663        */
    26382664    public function field_adcmdr_ga_anonymize_ip() {
    26392665        $id = array( $this->sf()->key( 'tracking' ) => 'ga_anonymize_ip' );
     
    26422668    }
    26432669
    2644     /**
    2645     * Callback for settings field.
    2646     *
    2647     * @return void
    2648     */
     2670        /**
     2671        * Callback for settings field.
     2672        *
     2673        * @return void
     2674        */
    26492675    public function field_adcmdr_disable_amp_analytics() {
    26502676        $id = array( $this->sf()->key( 'tracking' ) => 'disable_amp_analytics' );
     
    26542680    }
    26552681
    2656     /**
    2657     * Callback for settings field.
    2658     *
    2659     * @return void
    2660     */
     2682        /**
     2683        * Callback for settings field.
     2684        *
     2685        * @return void
     2686        */
    26612687    public function field_adcmdr_disable_amp_pixel() {
    26622688        $id = array( $this->sf()->key( 'tracking' ) => 'disable_amp_pixel' );
     
    26702696    }
    26712697
    2672     /**
    2673     * Callback for settings field.
    2674     *
    2675     * @return void
    2676     */
     2698        /**
     2699        * Callback for settings field.
     2700        *
     2701        * @return void
     2702        */
    26772703    public function field_adcmdr_bots_disable_tracking() {
    26782704        $id = array( $this->sf()->key( 'tracking' ) => 'bots_disable_tracking' );
     
    26832709    }
    26842710
    2685     /**
    2686     * Callback for settings field.
    2687     *
    2688     * @return void
    2689     */
     2711        /**
     2712        * Callback for settings field.
     2713        *
     2714        * @return void
     2715        */
    26902716    public function field_adcmdr_adsense_account() {
    26912717        $pub_id            = $this->sf()->get( 'adsense_account', 'adsense' );
     
    27532779            ?>
    27542780        </div>
    2755         <?php
    2756     }
    2757 
    2758     /**
    2759     * Call back for settings section.
    2760     *
    2761     * @return void
    2762     */
     2781            <?php
     2782    }
     2783
     2784        /**
     2785        * Call back for settings section.
     2786        *
     2787        * @return void
     2788        */
    27632789    public function settings_callback_adcmdr_amp_defaults() {
    27642790        ?>
    27652791           
    27662792        <p><?php esc_html_e( 'These settings can be overridden by individual ads if needed.', 'ad-commander' ); ?></p>
    2767         <?php
    2768     }
    2769 
    2770     /**
    2771     * Call back for settings section.
    2772     *
    2773     * @return void
    2774     */
     2793            <?php
     2794    }
     2795
     2796        /**
     2797        * Call back for settings section.
     2798        *
     2799        * @return void
     2800        */
    27752801    public function settings_callback_adcmdr_auto_ads() {
    27762802    }
    27772803
    2778     /**
    2779     * Callback for settings field.
    2780     *
    2781     * @return void
    2782     */
     2804        /**
     2805        * Callback for settings field.
     2806        *
     2807        * @return void
     2808        */
    27832809    public function field_adcmdr_adsense_amp_ad_mode() {
    27842810        $id    = array( $this->sf()->key( 'adsense' ) => 'adsense_amp_ad_mode' );
     
    27982824    }
    27992825
    2800 
    2801     /**
    2802      * Callback for settings field.
    2803      *
    2804      * @return void
    2805      */
     2826        /**
     2827         * Callback for settings field.
     2828         *
     2829         * @return void
     2830         */
    28062831    public function field_adcmdr_insert_adsense_head_code() {
    28072832        $id = array( $this->sf()->key( 'adsense' ) => 'insert_adsense_head_code' );
     
    28152840    }
    28162841
    2817     /**
    2818     * Callback for settings field.
    2819     *
    2820     * @return void
    2821     */
     2842        /**
     2843        * Callback for settings field.
     2844        *
     2845        * @return void
     2846        */
    28222847    public function field_adcmdr_enable_amp_auto_ads() {
    28232848        $id = array( $this->sf()->key( 'adsense' ) => 'enable_amp_auto_ads' );
     
    28362861    }
    28372862
    2838     /**
    2839     * Callback for settings field.
    2840     *
    2841     * @return void
    2842     */
     2863        /**
     2864        * Callback for settings field.
     2865        *
     2866        * @return void
     2867        */
    28432868    public function field_adcmdr_disable_adsense_account_alerts() {
    28442869        $pub_id            = $this->sf()->get( 'adsense_account', 'adsense' );
     
    28512876    }
    28522877
    2853 
    2854     /**
    2855      * Callback for settings field.
    2856      *
    2857      * @return void
    2858      */
     2878        /**
     2879         * Callback for settings field.
     2880         *
     2881         * @return void
     2882         */
    28592883    public function field_adcmdr_consent_required() {
    28602884        $id = array( $this->sf()->key( 'privacy' ) => 'consent_required' );
     
    28702894    }
    28712895
    2872     /**
    2873     * Callback for settings field.
    2874     *
    2875     * @return void
    2876     */
     2896        /**
     2897        * Callback for settings field.
     2898        *
     2899        * @return void
     2900        */
    28772901    public function field_adcmdr_consent_cookie_name() {
    28782902        $id = array( $this->sf()->key( 'privacy' ) => 'consent_cookie_name' );
     
    28832907    }
    28842908
    2885     /**
    2886     * Callback for settings field.
    2887     *
    2888     * @return void
    2889     */
     2909        /**
     2910        * Callback for settings field.
     2911        *
     2912        * @return void
     2913        */
    28902914    public function field_adcmdr_consent_cookie_value() {
    28912915        $id = array( $this->sf()->key( 'privacy' ) => 'consent_cookie_value' );
     
    28962920    }
    28972921
    2898     /**
    2899     * Callback for settings field.
    2900     *
    2901     * @return void
    2902     */
     2922        /**
     2923        * Callback for settings field.
     2924        *
     2925        * @return void
     2926        */
    29032927    public function field_adcmdr_consent_cookie_comparison() {
    29042928        $options = array(
     
    29212945    }
    29222946
    2923     /**
    2924     * Create classes for use on a meta item.
    2925     *
    2926     * @param array $suffixes An array of suffices to append.
    2927     *
    2928     * @return string
    2929     */
     2947        /**
     2948        * Create classes for use on a meta item.
     2949        *
     2950        * @param array $suffixes An array of suffices to append.
     2951        *
     2952        * @return string
     2953        */
    29302954    public static function metaitem_classes( $suffixes = array() ) {
    29312955        $classes = array( 'adcmdr-metaitem' );
     
    29442968    }
    29452969
    2946     /**
    2947     * Interfaces with WOMeta message and adds classes.
    2948     *
    2949     * @param string $message The message to display.
    2950     * @param array  $classes Any additional classes.
    2951     * @param array  $args Additional arguments.
    2952     *
    2953     * @return string
    2954     */
     2970        /**
     2971        * Interfaces with WOMeta message and adds classes.
     2972        *
     2973        * @param string $message The message to display.
     2974        * @param array  $classes Any additional classes.
     2975        * @param array  $args Additional arguments.
     2976        *
     2977        * @return string
     2978        */
    29552979    protected function info( $message, $classes = array(), $args = array() ) {
    29562980        $classes   = Util::arrayify( $classes );
     
    29642988    }
    29652989
    2966     /**
    2967     * Display an add-on table.
    2968     *
    2969     * @return string
    2970     */
     2990        /**
     2991        * Display an add-on table.
     2992        *
     2993        * @return string
     2994        */
    29712995    protected function get_addons() {
    29722996        $html = '';
     
    29933017            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    29943018            $this->start_div( array( Util::ns( 'addon-features' ), Util::ns( 'pro-features' ) ), array( 'display' => false ) ) .
    2995                 Html::h3( AdCommander::title() . ' Pro' ) .
    2996                 Html::ul( $lis, Util::ns( 'addon' ) ) .
    2997                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    2998                 Html::abtn( self::pro_upgrade_url( array( 'utm_medium' => 'button' ) ), __( 'Upgrade to Pro', 'ad-commander' ) ) .
    2999                 Html::abtn( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ), 'Learn more', '_blank', true ) .
    3000                 $this->end_div( array( 'display' => false ) ) .
     3019            Html::h3( AdCommander::title() . ' Pro' ) .
     3020            Html::ul( $lis, Util::ns( 'addon' ) ) .
     3021            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3022            Html::abtn( self::pro_upgrade_url( array( 'utm_medium' => 'button' ) ), __( 'Upgrade to Pro', 'ad-commander' ) ) .
     3023            Html::abtn( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ), 'Learn more', '_blank', true ) .
     3024            $this->end_div( array( 'display' => false ) ) .
    30013025            $this->end_div( array( 'display' => false ) ) .
    30023026            $this->end_div( array( 'display' => false ) );
     
    30193043            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    30203044            $this->start_div( Util::ns( 'addon-features' ), array( 'display' => false ) ) .
    3021                 Html::h3( __( 'Ad Commander Tools', 'ad-commander' ) ) .
    3022                 Html::ul( $lis, Util::ns( 'addon' ) ) .
    3023                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    3024                 Html::abtn( AddonBridge::addon_url( 'tools' ), __( 'Download Add-on', 'ad-commander' ) ) .
    3025                 $this->end_div( array( 'display' => false ) ) .
     3045            Html::h3( __( 'Ad Commander Tools', 'ad-commander' ) ) .
     3046            Html::ul( $lis, Util::ns( 'addon' ) ) .
     3047            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3048            Html::abtn( AddonBridge::addon_url( 'tools' ), __( 'Download Add-on', 'ad-commander' ) ) .
     3049            $this->end_div( array( 'display' => false ) ) .
    30263050            $this->end_div( array( 'display' => false ) ) .
    30273051            $this->end_div( array( 'display' => false ) );
     
    30353059            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    30363060            $this->start_div( Util::ns( 'addon-features' ), array( 'display' => false ) ) .
    3037                 Html::h3( __( 'Screen Stay Awake', 'ad-commander' ) ) .
    3038                 Html::p( $p ) .
    3039                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    3040                 Html::abtn( AddonBridge::addon_url( 'scrnsa' ), __( 'Download Plugin', 'ad-commander' ) ) .
    3041                 $this->end_div( array( 'display' => false ) ) .
     3061            Html::h3( __( 'Screen Stay Awake', 'ad-commander' ) ) .
     3062            Html::p( $p ) .
     3063            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3064            Html::abtn( AddonBridge::addon_url( 'scrnsa' ), __( 'Download Plugin', 'ad-commander' ) ) .
     3065            $this->end_div( array( 'display' => false ) ) .
    30423066            $this->end_div( array( 'display' => false ) ) .
    30433067            $this->end_div( array( 'display' => false ) );
     
    30513075    }
    30523076
    3053     /**
    3054     * Modify the ad or placement post title if it's blank.
    3055     *
    3056     * @param array $post_data The current post data.
    3057     *
    3058     * @return array
    3059     */
     3077        /**
     3078        * Modify the ad or placement post title if it's blank.
     3079        *
     3080        * @param array $post_data The current post data.
     3081        *
     3082        * @return array
     3083        */
    30603084    public function modify_post_title( $post_data ) {
    30613085
  • ad-commander/tags/1.1.27/readme.txt

    r3487808 r3487830  
    44Requires at least: 6.2
    55Tested up to: 6.9
    6 Stable tag: 1.1.26
     6Stable tag: 1.1.27
    77Requires PHP: 7.4
    88License: GPLv3
     
    119119
    120120== Changelog ==
     121= 1.1.27 =
     122* Add geolocation information to debugging info
     123* Hide MaxMind license from debugging info
     124
    121125= 1.1.26 =
    122126* Add system status tab to settings
  • ad-commander/trunk/ad-commander.php

    r3487808 r3487830  
    44 * Plugin URI:      https://wpadcommander.com
    55 * Description:     Insert, schedule and track custom advertising banners or script ads from AdSense, Amazon, and other affiliate networks into your site.
    6  * Version:         1.1.26
     6 * Version:         1.1.27
    77 * Author:          Wild Operation
    88 * Author URI:      https://wildoperation.com
     
    1414 * @subpackage Ad Commander - Banner & Ad Manager
    1515 * @since 1.0.0
    16  * @version 1.1.26
     16 * @version 1.1.27
    1717 */
    1818
  • ad-commander/trunk/includes/AdCommander.php

    r3487808 r3487830  
    1313     */
    1414    public static function version() {
    15         return '1.1.26';
     15        return '1.1.27';
    1616    }
    1717
  • ad-commander/trunk/includes/Admin.php

    r3487808 r3487830  
    12421242            <img src="<?php echo esc_url( AdCommander::assets_url() . 'img/logo.svg' ); ?>" alt="<?php echo esc_attr( AdCommander::title() ); ?>" class="adcmdr-logo" />
    12431243            <div class="adcmdr-btn-group">
    1244                 <?php if ( ! ProBridge::instance()->is_pro_loaded() ) : ?>
     1244            <?php if ( ! ProBridge::instance()->is_pro_loaded() ) : ?>
    12451245                <a href="<?php echo esc_url( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ) ); ?>" class="button button-adcmdr-primary" target="_blank"><?php esc_html_e( 'Get Pro', 'ad-commander' ); ?></a>
    12461246                <?php endif; ?>
     
    12501250        </div>
    12511251            <?php
    1252         endif;
     1252            endif;
    12531253    }
    12541254
     
    13471347            </div>
    13481348            <div class="inside">
    1349                 <?php echo wp_kses_post( $content ); ?>
     1349            <?php echo wp_kses_post( $content ); ?>
    13501350            </div>
    13511351        </div>
     
    14031403        ?>
    14041404        <h2><?php _e( 'System Information for Debugging', 'ad-commander' ); ?></h2>
     1405        <p><?php _e( 'If you are experiencing issues with the plugin, please copy and paste the following information in your support request. This will help us to debug the issue.', 'ad-commander' ); ?></p>
     1406        <p><?php _e( 'IMPORTANT: May contain your geolocation information if geotargeting is enabled.', 'ad-commander' ); ?></p>
    14051407        <?php
    14061408        $settings = self::settings();
     
    14381440
    14391441            if ( ! empty( $group['sections'] ) ) {
    1440                 foreach ( $group['sections'] as $section ) {
     1442                foreach ( $group['sections'] as $section_key => $section ) {
    14411443                    if ( empty( $section['fields'] ) ) {
    14421444                        continue;
     
    14511453
    14521454                        $value   = isset( $raw_group[ $field_key ] ) ? $raw_group[ $field_key ] : null;
    1453                         $lines[] = $this->format_debug_line( $label, $this->format_debug_value( $value ) );
     1455                        $lines[] = $this->format_debug_line( $label, $this->format_debug_value( $value, ( in_array( $field_key, array( 'maxmind_license_key', 'pro_license_key' ) ) ) ) );
     1456                    }
     1457
     1458                    if ( $section_key === 'geotargeting' && ProBridge::instance()->is_pro_loaded() ) {
     1459                        $visitor = GeoPro::instance()->get_visitor( true );
     1460                        if ( $visitor && ! empty( $visitor ) ) {
     1461                            $lines[] = '';
     1462                            $lines[] = '### ' . __( 'Current Visitor Geo', 'ad-commander' );
     1463
     1464                            $visitor_labels = array(
     1465                                'lookup_types'   => __( 'Lookup Types', 'ad-commander' ),
     1466                                'city'           => __( 'City', 'ad-commander' ),
     1467                                'region'         => __( 'Region', 'ad-commander' ),
     1468                                'country_code'   => __( 'Country Code', 'ad-commander' ),
     1469                                'continent_code' => __( 'Continent Code', 'ad-commander' ),
     1470                                'lat'            => __( 'Latitude', 'ad-commander' ),
     1471                                'lng'            => __( 'Longitude', 'ad-commander' ),
     1472                            );
     1473
     1474                            foreach ( $visitor_labels as $key => $label ) {
     1475                                if ( isset( $visitor[ $key ] ) ) {
     1476                                    $value   = is_array( $visitor[ $key ] ) ? implode( ', ', $visitor[ $key ] ) : $visitor[ $key ];
     1477                                    $lines[] = $this->format_debug_line( $label, $value );
     1478                                }
     1479                            }
     1480                        }
    14541481                    }
    14551482                }
     
    14571484        }
    14581485
    1459         /**
    1460         * WordPress Environment
    1461         */
    1462         global $wpdb;
    1463 
    1464         $lines[] = '';
    1465         $lines[] = '## ' . __( 'WordPress Environment', 'ad-commander' );
    1466         $lines[] = '';
    1467         $lines[] = $this->format_debug_line( __( 'Home URL', 'ad-commander' ), home_url() );
    1468         $lines[] = $this->format_debug_line( __( 'Site URL', 'ad-commander' ), site_url() );
    1469         $lines[] = $this->format_debug_line( __( 'REST API Base URL', 'ad-commander' ), rest_url() );
    1470         $lines[] = $this->format_debug_line( __( 'WordPress Version', 'ad-commander' ), get_bloginfo( 'version' ) );
    1471         $lines[] = $this->format_debug_line( __( 'WordPress Multisite', 'ad-commander' ), is_multisite() ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1472         $lines[] = $this->format_debug_line( __( 'WordPress Memory Limit', 'ad-commander' ), WP_MEMORY_LIMIT );
    1473         $lines[] = $this->format_debug_line( __( 'WordPress Debug Mode', 'ad-commander' ), ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1474         $lines[] = $this->format_debug_line( __( 'WordPress Debug Log', 'ad-commander' ), ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
    1475         $lines[] = $this->format_debug_line( __( 'WordPress Cron', 'ad-commander' ), ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? __( 'No', 'ad-commander' ) : __( 'Yes', 'ad-commander' ) );
    1476         $lines[] = $this->format_debug_line( __( 'WordPress Locale', 'ad-commander' ), get_locale() );
    1477 
    1478         /**
    1479         * Active Theme
    1480         */
    1481         $theme        = wp_get_theme();
    1482         $theme_author = $theme->get( 'Author' );
    1483         $theme_detail = $theme_author ? 'by ' . wp_strip_all_tags( $theme_author ) . ' — ' . $theme->get( 'Version' ) : $theme->get( 'Version' );
    1484 
    1485         $lines[] = '';
    1486         $lines[] = '## ' . __( 'Active Theme', 'ad-commander' );
    1487         $lines[] = '';
    1488         $lines[] = $this->format_debug_line( $theme->get( 'Name' ), $theme_detail );
     1486            /**
     1487            * WordPress Environment
     1488            */
     1489            global $wpdb;
     1490
     1491            $lines[] = '';
     1492            $lines[] = '## ' . __( 'WordPress Environment', 'ad-commander' );
     1493            $lines[] = '';
     1494            $lines[] = $this->format_debug_line( __( 'Home URL', 'ad-commander' ), home_url() );
     1495            $lines[] = $this->format_debug_line( __( 'Site URL', 'ad-commander' ), site_url() );
     1496            $lines[] = $this->format_debug_line( __( 'REST API Base URL', 'ad-commander' ), rest_url() );
     1497            $lines[] = $this->format_debug_line( __( 'WordPress Version', 'ad-commander' ), get_bloginfo( 'version' ) );
     1498            $lines[] = $this->format_debug_line( __( 'WordPress Multisite', 'ad-commander' ), is_multisite() ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1499            $lines[] = $this->format_debug_line( __( 'WordPress Memory Limit', 'ad-commander' ), WP_MEMORY_LIMIT );
     1500            $lines[] = $this->format_debug_line( __( 'WordPress Debug Mode', 'ad-commander' ), ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1501            $lines[] = $this->format_debug_line( __( 'WordPress Debug Log', 'ad-commander' ), ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' ) );
     1502            $lines[] = $this->format_debug_line( __( 'WordPress Cron', 'ad-commander' ), ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? __( 'No', 'ad-commander' ) : __( 'Yes', 'ad-commander' ) );
     1503            $lines[] = $this->format_debug_line( __( 'WordPress Locale', 'ad-commander' ), get_locale() );
     1504
     1505            /**
     1506            * Active Theme
     1507            */
     1508            $theme        = wp_get_theme();
     1509            $theme_author = $theme->get( 'Author' );
     1510            $theme_detail = $theme_author ? 'by ' . wp_strip_all_tags( $theme_author ) . ' — ' . $theme->get( 'Version' ) : $theme->get( 'Version' );
     1511
     1512            $lines[] = '';
     1513            $lines[] = '## ' . __( 'Active Theme', 'ad-commander' );
     1514            $lines[] = '';
     1515            $lines[] = $this->format_debug_line( $theme->get( 'Name' ), $theme_detail );
    14891516
    14901517        if ( $theme->parent() ) {
     
    14921519        }
    14931520
    1494         /**
    1495         * Active Plugins
    1496         */
    1497         $active_plugins = get_option( 'active_plugins', array() );
    1498         $all_plugins    = get_plugins();
    1499 
    1500         $lines[] = '';
    1501         $lines[] = '## ' . __( 'Active Plugins', 'ad-commander' );
    1502         $lines[] = '';
     1521            /**
     1522            * Active Plugins
     1523            */
     1524            $active_plugins = get_option( 'active_plugins', array() );
     1525            $all_plugins    = get_plugins();
     1526
     1527            $lines[] = '';
     1528            $lines[] = '## ' . __( 'Active Plugins', 'ad-commander' );
     1529            $lines[] = '';
    15031530
    15041531        foreach ( $active_plugins as $plugin_path ) {
     
    15111538        }
    15121539
    1513         /**
    1514         * Server Environment
    1515         */
    1516         $lines[] = '';
    1517         $lines[] = '## ' . __( 'Server Environment', 'ad-commander' );
    1518         $lines[] = '';
    1519         $lines[] = $this->format_debug_line( __( 'Web Server', 'ad-commander' ), isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : __( 'Unknown', 'ad-commander' ) );
    1520         $lines[] = $this->format_debug_line( __( 'PHP Version', 'ad-commander' ), function_exists( 'phpversion' ) ? phpversion() : __( 'Unknown', 'ad-commander' ) );
    1521         $lines[] = $this->format_debug_line( __( 'PHP Memory Limit', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'memory_limit' ) : __( 'Unknown', 'ad-commander' ) );
    1522         $lines[] = $this->format_debug_line( __( 'PHP Max Execution Time', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'max_execution_time' ) : __( 'Unknown', 'ad-commander' ) );
    1523         $lines[] = $this->format_debug_line( __( 'PHP Max Upload Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'upload_max_filesize' ) : __( 'Unknown', 'ad-commander' ) );
    1524         $lines[] = $this->format_debug_line( __( 'PHP Max Post Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'post_max_size' ) : __( 'Unknown', 'ad-commander' ) );
    1525         $lines[] = $this->format_debug_line( __( 'cURL Enabled', 'ad-commander' ), function_exists( 'curl_version' ) ? __( 'Yes', 'ad-commander' ) . ' (' . curl_version()['version'] . ')' : __( 'No', 'ad-commander' ) );
    1526         $lines[] = $this->format_debug_line( __( 'OpenSSL', 'ad-commander' ), defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : __( 'No', 'ad-commander' ) );
    1527 
    1528         /**
    1529         * Database
    1530         */
    1531         $lines[] = '';
    1532         $lines[] = '## ' . __( 'Database', 'ad-commander' );
    1533         $lines[] = '';
    1534         $lines[] = $this->format_debug_line( __( 'Database System', 'ad-commander' ), ! empty( $wpdb->db_server_info() ) ? $wpdb->db_server_info() : __( 'Unknown', 'ad-commander' ) );
    1535         $lines[] = $this->format_debug_line( __( 'Database Version', 'ad-commander' ), $wpdb->db_version() );
    1536         $lines[] = $this->format_debug_line( __( 'Database Character Set', 'ad-commander' ), ! empty( $wpdb->charset ) ? $wpdb->charset : __( 'Unknown', 'ad-commander' ) );
    1537         $lines[] = $this->format_debug_line( __( 'Database Collation', 'ad-commander' ), ! empty( $wpdb->collate ) ? $wpdb->collate : __( 'Unknown', 'ad-commander' ) );
    1538         $lines[] = $this->format_debug_line( __( 'Database Prefix', 'ad-commander' ), $wpdb->prefix );
    1539 
    1540         /**
    1541         * Date and Time
    1542         */
    1543         $lines[] = '';
    1544         $lines[] = '## ' . __( 'Date and Time', 'ad-commander' );
    1545         $lines[] = '';
    1546         $lines[] = $this->format_debug_line( __( 'WordPress Timezone', 'ad-commander' ), wp_timezone_string() );
    1547         $lines[] = $this->format_debug_line( __( 'Server Time (UTC)', 'ad-commander' ), gmdate( 'Y-m-d H:i:s' ) );
    1548         $lines[] = $this->format_debug_line( __( 'Local Time', 'ad-commander' ), wp_date( 'Y-m-d H:i:s' ) );
    1549 
    1550         $output = implode( "\n", $lines );
     1540            /**
     1541            * Server Environment
     1542            */
     1543            $lines[] = '';
     1544            $lines[] = '## ' . __( 'Server Environment', 'ad-commander' );
     1545            $lines[] = '';
     1546            $lines[] = $this->format_debug_line( __( 'Web Server', 'ad-commander' ), isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : __( 'Unknown', 'ad-commander' ) );
     1547            $lines[] = $this->format_debug_line( __( 'PHP Version', 'ad-commander' ), function_exists( 'phpversion' ) ? phpversion() : __( 'Unknown', 'ad-commander' ) );
     1548            $lines[] = $this->format_debug_line( __( 'PHP Memory Limit', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'memory_limit' ) : __( 'Unknown', 'ad-commander' ) );
     1549            $lines[] = $this->format_debug_line( __( 'PHP Max Execution Time', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'max_execution_time' ) : __( 'Unknown', 'ad-commander' ) );
     1550            $lines[] = $this->format_debug_line( __( 'PHP Max Upload Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'upload_max_filesize' ) : __( 'Unknown', 'ad-commander' ) );
     1551            $lines[] = $this->format_debug_line( __( 'PHP Max Post Size', 'ad-commander' ), function_exists( 'ini_get' ) ? ini_get( 'post_max_size' ) : __( 'Unknown', 'ad-commander' ) );
     1552            $lines[] = $this->format_debug_line( __( 'cURL Enabled', 'ad-commander' ), function_exists( 'curl_version' ) ? __( 'Yes', 'ad-commander' ) . ' (' . curl_version()['version'] . ')' : __( 'No', 'ad-commander' ) );
     1553            $lines[] = $this->format_debug_line( __( 'OpenSSL', 'ad-commander' ), defined( 'OPENSSL_VERSION_TEXT' ) ? OPENSSL_VERSION_TEXT : __( 'No', 'ad-commander' ) );
     1554
     1555            /**
     1556            * Database
     1557            */
     1558            $lines[] = '';
     1559            $lines[] = '## ' . __( 'Database', 'ad-commander' );
     1560            $lines[] = '';
     1561            $lines[] = $this->format_debug_line( __( 'Database System', 'ad-commander' ), ! empty( $wpdb->db_server_info() ) ? $wpdb->db_server_info() : __( 'Unknown', 'ad-commander' ) );
     1562            $lines[] = $this->format_debug_line( __( 'Database Version', 'ad-commander' ), $wpdb->db_version() );
     1563            $lines[] = $this->format_debug_line( __( 'Database Character Set', 'ad-commander' ), ! empty( $wpdb->charset ) ? $wpdb->charset : __( 'Unknown', 'ad-commander' ) );
     1564            $lines[] = $this->format_debug_line( __( 'Database Collation', 'ad-commander' ), ! empty( $wpdb->collate ) ? $wpdb->collate : __( 'Unknown', 'ad-commander' ) );
     1565            $lines[] = $this->format_debug_line( __( 'Database Prefix', 'ad-commander' ), $wpdb->prefix );
     1566
     1567            /**
     1568            * Date and Time
     1569            */
     1570            $lines[] = '';
     1571            $lines[] = '## ' . __( 'Date and Time', 'ad-commander' );
     1572            $lines[] = '';
     1573            $lines[] = $this->format_debug_line( __( 'WordPress Timezone', 'ad-commander' ), wp_timezone_string() );
     1574            $lines[] = $this->format_debug_line( __( 'Server Time (UTC)', 'ad-commander' ), gmdate( 'Y-m-d H:i:s' ) );
     1575            $lines[] = $this->format_debug_line( __( 'Local Time', 'ad-commander' ), wp_date( 'Y-m-d H:i:s' ) );
     1576
     1577            $output = implode( "\n", $lines );
    15511578        ?>
    15521579        <div class="adcmdr-debug">
     
    15541581            <textarea readonly="readonly" onclick="this.select();"><?php echo esc_textarea( $output ); ?></textarea>
    15551582        </div>
    1556         <?php
    1557     }
    1558 
    1559     /**
    1560     * Format a single line for the debug textarea.
    1561     *
    1562     * @param string $label The label.
    1563     * @param string $value The value.
    1564     *
    1565     * @return string
    1566     */
     1583            <?php
     1584    }
     1585
     1586        /**
     1587        * Format a single line for the debug textarea.
     1588        *
     1589        * @param string $label The label.
     1590        * @param string $value The value.
     1591        *
     1592        * @return string
     1593        */
    15671594    private function format_debug_line( $label, $value ) {
    1568         return $label . ': ' . $value;
    1569     }
    1570 
    1571     /**
    1572     * Format a value for debug display.
    1573     *
    1574     * @param mixed $value The value to format.
    1575     *
    1576     * @return string
    1577     */
    1578     private function format_debug_value( $value ) {
     1595        return esc_html( $label ) . ': ' . esc_html( $value );
     1596    }
     1597
     1598        /**
     1599        * Format a value for debug display.
     1600        *
     1601        * @param mixed $value The value to format.
     1602        *
     1603        * @return string
     1604        */
     1605    private function format_debug_value( $value, $exists_only = false ) {
    15791606        if ( is_null( $value ) || ( is_string( $value ) && '' === $value ) ) {
    15801607            return '—';
    15811608        }
    15821609
    1583         if ( is_bool( $value ) ) {
     1610        if ( is_bool( $value ) || ( $exists_only && ! empty( $value ) ) ) {
    15841611            return $value ? __( 'Yes', 'ad-commander' ) : __( 'No', 'ad-commander' );
    15851612        }
     
    16121639    }
    16131640
    1614     /**
    1615     * Register settings from settings array.
    1616     *
    1617     * @return void
    1618     */
     1641        /**
     1642        * Register settings from settings array.
     1643        *
     1644        * @return void
     1645        */
    16191646    public function register_settings() {
    16201647        $this->sf()->add_sections_and_settings(
     
    16241651    }
    16251652
    1626     /**
    1627     * Sanitize input by type.
    1628     *
    1629     * @param array $input The input to sanitize.
    1630     *
    1631     * @return array
    1632     */
     1653        /**
     1654        * Sanitize input by type.
     1655        *
     1656        * @param array $input The input to sanitize.
     1657        *
     1658        * @return array
     1659        */
    16331660    private function sanitize_by_key_type( $input ) {
    16341661        $output = array();
     
    16771704    }
    16781705
    1679     /**
    1680     * Sanitize general group.
    1681     *
    1682     * @param array $input The input to sanitize.
    1683     *
    1684     * @return array
    1685     */
     1706        /**
     1707        * Sanitize general group.
     1708        *
     1709        * @param array $input The input to sanitize.
     1710        *
     1711        * @return array
     1712        */
    16861713    public function sanitize_adcmdr_general( $input ) {
    16871714        Maintenance::flush_css_transients();
     
    16891716    }
    16901717
    1691     /**
    1692     * Sanitize admin group.
    1693     *
    1694     * @param array $input The input to sanitize.
    1695     *
    1696     * @return array
    1697     */
     1718        /**
     1719        * Sanitize admin group.
     1720        *
     1721        * @param array $input The input to sanitize.
     1722        *
     1723        * @return array
     1724        */
    16981725    public function sanitize_adcmdr_admin( $input ) {
    16991726        return $this->sanitize_by_key_type( $input );
    17001727    }
    17011728
    1702     /**
    1703     * Sanitize tracking group.
    1704     *
    1705     * @param array $input The input to sanitize.
    1706     *
    1707     * @return array
    1708     */
     1729        /**
     1730        * Sanitize tracking group.
     1731        *
     1732        * @param array $input The input to sanitize.
     1733        *
     1734        * @return array
     1735        */
    17091736    public function sanitize_adcmdr_tracking( $input ) {
    17101737        return $this->sanitize_by_key_type( $input );
    17111738    }
    17121739
    1713     /**
    1714     * Sanitize adsense group.
    1715     *
    1716     * @param array $input The input to sanitize.
    1717     *
    1718     * @return array
    1719     */
     1740        /**
     1741        * Sanitize adsense group.
     1742        *
     1743        * @param array $input The input to sanitize.
     1744        *
     1745        * @return array
     1746        */
    17201747    public function sanitize_adcmdr_adsense( $input ) {
    17211748        return $this->sanitize_by_key_type( $input );
    17221749    }
    17231750
    1724     /**
    1725     * Sanitize privacy group.
    1726     *
    1727     * @param array $input The input to sanitize.
    1728     *
    1729     * @return array
    1730     */
     1751        /**
     1752        * Sanitize privacy group.
     1753        *
     1754        * @param array $input The input to sanitize.
     1755        *
     1756        * @return array
     1757        */
    17311758    public function sanitize_adcmdr_privacy( $input ) {
    17321759        return $this->sanitize_by_key_type( $input );
    17331760    }
    17341761
    1735     /**
    1736     * Sanitize geotargeting group.
    1737     *
    1738     * @param array $input The input to sanitize.
    1739     *
    1740     * @return array
    1741     */
     1762        /**
     1763        * Sanitize geotargeting group.
     1764        *
     1765        * @param array $input The input to sanitize.
     1766        *
     1767        * @return array
     1768        */
    17421769    public function sanitize_adcmdr_targeting( $input ) {
    17431770        return $this->sanitize_by_key_type( $input );
    17441771    }
    17451772
    1746     /**
    1747     * Sanitize add-on group.
    1748     *
    1749     * @param array $input The input to sanitize.
    1750     *
    1751     * @return array
    1752     */
     1773        /**
     1774        * Sanitize add-on group.
     1775        *
     1776        * @param array $input The input to sanitize.
     1777        *
     1778        * @return array
     1779        */
    17531780    public function sanitize_adcmdr_addons( $input ) {
    17541781        return $this->sanitize_by_key_type( $input );
    17551782    }
    17561783
    1757     /**
    1758     * Create an underscored key from a string.
    1759     *
    1760     * @param string $key The key to convert.
    1761     *
    1762     * @return string
    1763     */
     1784        /**
     1785        * Create an underscored key from a string.
     1786        *
     1787        * @param string $key The key to convert.
     1788        *
     1789        * @return string
     1790        */
    17641791    public function _key( $key ) {
    17651792        return str_replace( '-', '_', $key );
    17661793    }
    17671794
    1768     /**
    1769     * Create a nonce array.
    1770     * This is not an actual nonce. This array is used for creating and checking unique nonces.
    1771     *
    1772     * @param string $action The action..
    1773     * @param string $key The key to create the nonce string from.
    1774     *
    1775     * @return array
    1776     */
     1795        /**
     1796        * Create a nonce array.
     1797        * This is not an actual nonce. This array is used for creating and checking unique nonces.
     1798        *
     1799        * @param string $action The action..
     1800        * @param string $key The key to create the nonce string from.
     1801        *
     1802        * @return array
     1803        */
    17771804    protected function nonce( $action, $key ) {
    17781805        return array(
     
    17821809    }
    17831810
    1784     /**
    1785     * Create a nonce field.
    1786     *
    1787     * @param array $nonce_arr A nonce array.
    1788     * @param bool  $referrer Whether to include the referrer field.
    1789     *
    1790     * @return void
    1791     */
     1811        /**
     1812        * Create a nonce field.
     1813        *
     1814        * @param array $nonce_arr A nonce array.
     1815        * @param bool  $referrer Whether to include the referrer field.
     1816        *
     1817        * @return void
     1818        */
    17921819    protected function nonce_field( $nonce_arr, $referrer = false ) {
    17931820        wp_nonce_field( $nonce_arr['action'], $nonce_arr['name'], $referrer );
    17941821    }
    17951822
    1796     /**
    1797     * Create a string for use in your nonce.
    1798     *
    1799     * @param string $action Action name.
    1800     *
    1801     * @return string
    1802     */
     1823        /**
     1824        * Create a string for use in your nonce.
     1825        *
     1826        * @param string $action Action name.
     1827        *
     1828        * @return string
     1829        */
    18031830    protected function nonce_string( $action ) {
    18041831        return sanitize_title( Util::ns( 'n-' . $action ) );
    18051832    }
    18061833
    1807     /**
    1808     * Create an action string for use in your nonce.
    1809     *
    1810     * @param string $action Action name.
    1811     *
    1812     * @return string
    1813     */
     1834        /**
     1835        * Create an action string for use in your nonce.
     1836        *
     1837        * @param string $action Action name.
     1838        *
     1839        * @return string
     1840        */
    18141841    protected function action_string( $action ) {
    18151842        return self::_key( sanitize_title( Util::ns( $action, '_' ) ) );
    18161843    }
    18171844
    1818     /**
    1819     * Authorizes actions for non-settings pages.
    1820     * Interfaces with WOAdmin to check nonce, capability, and required $_POST keys.
    1821     *
    1822     * @param mixed       $action_key The action key to authorized.
    1823     * @param array       $required_post Any required post keys.
    1824     * @param string|bool $capability The capability required to process this action.
    1825     *
    1826     * @return void
    1827     */
     1845        /**
     1846        * Authorizes actions for non-settings pages.
     1847        * Interfaces with WOAdmin to check nonce, capability, and required $_POST keys.
     1848        *
     1849        * @param mixed       $action_key The action key to authorized.
     1850        * @param array       $required_post Any required post keys.
     1851        * @param string|bool $capability The capability required to process this action.
     1852        *
     1853        * @return void
     1854        */
    18281855    protected function check_ajax_action( $action_key, $required_post = array(), $capability = false ) {
    18291856        /**
     
    18401867    }
    18411868
    1842     /**
    1843     * Call back for settings section.
    1844     *
    1845     * @return void
    1846     */
     1869        /**
     1870        * Call back for settings section.
     1871        *
     1872        * @return void
     1873        */
    18471874    public function settings_callback_adcmdr_defaults() {
    18481875        ?>
    18491876           
    18501877        <p><?php esc_html_e( 'These settings can be overridden by individual ads if needed.', 'ad-commander' ); ?></p>
    1851         <?php
    1852     }
    1853 
    1854     /**
    1855     * Call back for settings section.
    1856     *
    1857     * @return void
    1858     */
     1878            <?php
     1879    }
     1880
     1881        /**
     1882        * Call back for settings section.
     1883        *
     1884        * @return void
     1885        */
    18591886    public function settings_callback_adcmdr_consent() {
    18601887        if ( Util::render_method() === 'serverside' ) {
     
    18641891        ?>
    18651892        <p><?php esc_html_e( 'Ad Commander does not create a consent banner. These settings allow you to integrate with a consent management plugin.', 'ad-commander' ); ?></p>
    1866         <?php
    1867     }
    1868 
    1869     /**
    1870     * Call back for settings section.
    1871     *
    1872     * @return void
    1873     */
     1893            <?php
     1894    }
     1895
     1896        /**
     1897        * Call back for settings section.
     1898        *
     1899        * @return void
     1900        */
    18741901    public function settings_callback_adcmdr_general() {}
    18751902
    1876     /**
    1877     * Call back for settings section.
    1878     *
    1879     * @return void
    1880     */
     1903        /**
     1904        * Call back for settings section.
     1905        *
     1906        * @return void
     1907        */
    18811908    public function settings_callback_adcmdr_tracking_methods() {}
    18821909
    1883     /**
    1884     * Call back for settings section.
    1885     *
    1886     * @return void
    1887     */
     1910        /**
     1911        * Call back for settings section.
     1912        *
     1913        * @return void
     1914        */
    18881915    public function settings_callback_adcmdr_disable_ads() {}
    18891916
    1890     /**
    1891     * Call back for settings section.
    1892     *
    1893     * @return void
    1894     */
     1917        /**
     1918        * Call back for settings section.
     1919        *
     1920        * @return void
     1921        */
    18951922    public function settings_callback_adcmdr_advanced_settings() {}
    18961923
    1897     /**
    1898     * Call back for settings section.
    1899     *
    1900     * @return void
    1901     */
     1924        /**
     1925        * Call back for settings section.
     1926        *
     1927        * @return void
     1928        */
    19021929    public function settings_callback_adcmdr_admin() {
    19031930    }
    19041931
    1905     /**
    1906     * Call back for settings section.
    1907     *
    1908     * @return void
    1909     */
     1932        /**
     1933        * Call back for settings section.
     1934        *
     1935        * @return void
     1936        */
    19101937    public function settings_callback_adcmdr_notifications() {}
    19111938
    1912     /**
    1913     * Call back for settings section.
    1914     *
    1915     * @return void
    1916     */
     1939        /**
     1940        * Call back for settings section.
     1941        *
     1942        * @return void
     1943        */
    19171944    public function settings_callback_adcmdr_misc() {}
    19181945
    1919     /**
    1920     * Call back for settings section.
    1921     *
    1922     * @return void
    1923     */
     1946        /**
     1947        * Call back for settings section.
     1948        *
     1949        * @return void
     1950        */
    19241951    public function settings_callback_adcmdr_onboarding() {}
    19251952
    1926     /**
    1927     * Call back for settings section.
    1928     *
    1929     * @return void
    1930     */
     1953        /**
     1954        * Call back for settings section.
     1955        *
     1956        * @return void
     1957        */
    19311958    public function settings_callback_adcmdr_geotargeting() {}
    19321959
    1933     /**
    1934     * Call back for settings section.
    1935     *
    1936     * @return void
    1937     */
     1960        /**
     1961        * Call back for settings section.
     1962        *
     1963        * @return void
     1964        */
    19381965    public function settings_callback_adcmdr_multisite() {}
    19391966
    1940     /**
    1941     * Call back for settings section.
    1942     *
    1943     * @return void
    1944     */
     1967        /**
     1968        * Call back for settings section.
     1969        *
     1970        * @return void
     1971        */
    19451972    public function settings_callback_adcmdr_ads_txt() {
    19461973        ?>
    19471974        <p><?php esc_html_e( 'Ad Commander will attempt to generate an ads.txt in the root of your website. If an AdSense account is enabled, it will be included, along with any additional records added below.', 'ad-commander' ); ?></p>
    1948         <?php
    1949     }
    1950 
    1951     /**
    1952     * Call back for settings section.
    1953     *
    1954     * @return void
    1955     */
     1975            <?php
     1976    }
     1977
     1978        /**
     1979        * Call back for settings section.
     1980        *
     1981        * @return void
     1982        */
    19561983    public function settings_callback_adcmdr_disable_tracking() {
    19571984        ?>
    19581985        <p><?php esc_html_e( 'Fine-tune tracking settings by disabling some features below.', 'ad-commander' ); ?></p>
    1959         <?php
    1960     }
    1961 
    1962     /**
    1963     * Call back for settings section.
    1964     *
    1965     * @return void
    1966     */
     1986            <?php
     1987    }
     1988
     1989        /**
     1990        * Call back for settings section.
     1991        *
     1992        * @return void
     1993        */
    19671994    public function settings_callback_adcmdr_tracking() {}
    19681995
    1969     /**
    1970     * Call back for settings section.
    1971     *
    1972     * @return void
    1973     */
     1996        /**
     1997        * Call back for settings section.
     1998        *
     1999        * @return void
     2000        */
    19742001    public function settings_callback_adcmdr_licenses() {}
    19752002
    1976     /**
    1977     * Call back for settings section.
    1978     *
    1979     * @return void
    1980     */
     2003        /**
     2004        * Call back for settings section.
     2005        *
     2006        * @return void
     2007        */
    19812008    public function settings_callback_adcmdr_support() {}
    19822009
    1983     /**
    1984     * Call back for settings section.
    1985     *
    1986     * @return void
    1987     */
     2010        /**
     2011        * Call back for settings section.
     2012        *
     2013        * @return void
     2014        */
    19882015    public function settings_callback_adcmdr_adsense() {}
    19892016
    1990     /**
    1991     * Perform actions during add-on options updates.
    1992     * Specifically, determine if the license key has changed.
    1993     *
    1994     * @param mixed $new_value The new value of the option.
    1995     * @param mixed $old_value The old value of the option.
    1996     *
    1997     * @return mixed
    1998     */
     2017        /**
     2018        * Perform actions during add-on options updates.
     2019        * Specifically, determine if the license key has changed.
     2020        *
     2021        * @param mixed $new_value The new value of the option.
     2022        * @param mixed $old_value The old value of the option.
     2023        *
     2024        * @return mixed
     2025        */
    19992026    public function addon_options_updated( $new_value, $old_value ) {
    20002027
     
    20182045    }
    20192046
    2020     /**
    2021     * Callback for settings field.
    2022     *
    2023     * @return void
    2024     */
     2047        /**
     2048        * Callback for settings field.
     2049        *
     2050        * @return void
     2051        */
    20252052    public function field_adcmdr_pro_license_key() {
    20262053        $pro_bridge = ProBridge::instance();
     
    20862113    }
    20872114
    2088     /**
    2089     * Callback for settings field.
    2090     *
    2091     * @return void
    2092     */
     2115        /**
     2116        * Callback for settings field.
     2117        *
     2118        * @return void
     2119        */
    20932120    public function field_adcmdr_geo_service() {
    20942121        $id            = array( $this->sf()->key( 'targeting' ) => 'geo_service' );
     
    21252152    }
    21262153
    2127     /**
    2128     * Callback for settings field.
    2129     *
    2130     * @return void
    2131     */
     2154        /**
     2155        * Callback for settings field.
     2156        *
     2157        * @return void
     2158        */
    21322159    public function field_adcmdr_maxmind_license_key() {
    21332160        if ( ProBridge::instance()->is_pro_loaded() ) {
     
    21362163    }
    21372164
    2138     /**
    2139     * Callback for settings field.
    2140     *
    2141     * @return void
    2142     */
     2165        /**
     2166        * Callback for settings field.
     2167        *
     2168        * @return void
     2169        */
    21432170    public function field_adcmdr_maxmind_database_update() {
    21442171        if ( ProBridge::instance()->is_pro_loaded() ) {
     
    21472174    }
    21482175
    2149     /**
    2150     * Callback for settings field.
    2151     *
    2152     * @return void
    2153     */
     2176        /**
     2177        * Callback for settings field.
     2178        *
     2179        * @return void
     2180        */
    21542181    public function field_adcmdr_render_method() {
    21552182        $pro_only = array( 'clientside', 'smart' );
     
    22062233    }
    22072234
    2208     /**
    2209     * Callback for settings field.
    2210     *
    2211     * @return void
    2212     */
     2235        /**
     2236        * Callback for settings field.
     2237        *
     2238        * @return void
     2239        */
    22132240    public function field_adcmdr_ad_label() {
    22142241        $id = array( $this->sf()->key( 'general' ) => 'ad_label' );
     
    22232250    }
    22242251
    2225     /**
    2226     * Callback for settings field.
    2227     *
    2228     * @return void
    2229     */
     2252        /**
     2253        * Callback for settings field.
     2254        *
     2255        * @return void
     2256        */
    22302257    public function field_adcmdr_prefix() {
    22312258        $id = array( $this->sf()->key( 'general' ) => 'prefix' );
     
    22342261    }
    22352262
    2236 
    2237     /**
    2238      * Callback for settings field.
    2239      *
    2240      * @return void
    2241      */
     2263        /**
     2264         * Callback for settings field.
     2265         *
     2266         * @return void
     2267         */
    22422268    public function field_adcmdr_loading_animation() {
    22432269        $id = array( $this->sf()->key( 'general' ) => 'loading_animation' );
     
    22482274    }
    22492275
    2250     /**
    2251     * Callback for settings field.
    2252     *
    2253     * @return void
    2254     */
     2276        /**
     2277        * Callback for settings field.
     2278        *
     2279        * @return void
     2280        */
    22552281    public function field_adcmdr_lazy_load_ads() {
    22562282        $id            = array( $this->sf()->key( 'general' ) => 'lazy_load_ads' );
     
    22812307    }
    22822308
    2283     /**
    2284     * Callback for settings field.
    2285     *
    2286     * @return void
    2287     */
     2309        /**
     2310        * Callback for settings field.
     2311        *
     2312        * @return void
     2313        */
    22882314    public function field_adcmdr_disable_onboarding_global() {
    22892315        $id = array( $this->sf()->key( 'admin' ) => 'disable_onboarding_global' );
     
    22932319    }
    22942320
    2295     /**
    2296     * Callback for settings field.
    2297     *
    2298     * @return void
    2299     */
     2321        /**
     2322        * Callback for settings field.
     2323        *
     2324        * @return void
     2325        */
    23002326    public function field_adcmdr_disable_onboarding_ads() {
    23012327        $id = array( $this->sf()->key( 'admin' ) => 'disable_onboarding_ads' );
     
    23052331    }
    23062332
    2307     /**
    2308     * Callback for settings field.
    2309     *
    2310     * @return void
    2311     */
     2333        /**
     2334        * Callback for settings field.
     2335        *
     2336        * @return void
     2337        */
    23122338    public function field_adcmdr_disable_doc_links() {
    23132339        $id = array( $this->sf()->key( 'admin' ) => 'disable_doc_links' );
     
    23172343    }
    23182344
    2319     /**
    2320     * Callback for settings field.
    2321     *
    2322     * @return void
    2323     */
     2345        /**
     2346        * Callback for settings field.
     2347        *
     2348        * @return void
     2349        */
    23242350    public function field_adcmdr_disable_virtual_adstxt() {
    23252351        $id = array( $this->sf()->key( 'general' ) => 'disable_virtual_adstxt' );
     
    23552381    }
    23562382
    2357     /**
    2358     * Callback for settings field.
    2359     *
    2360     * @return void
    2361     */
     2383        /**
     2384        * Callback for settings field.
     2385        *
     2386        * @return void
     2387        */
    23622388    public function field_adcmdr_ads_txt_records() {
    23632389        $id = array( $this->sf()->key( 'general' ) => 'ads_txt_records' );
     
    23852411    }
    23862412
    2387     /**
    2388     * Callback for settings field.
    2389     *
    2390     * @return void
    2391     */
     2413        /**
     2414        * Callback for settings field.
     2415        *
     2416        * @return void
     2417        */
    23922418    public function field_adcmdr_newwindow() {
    23932419        $id = array( $this->sf()->key( 'general' ) => 'newwindow' );
     
    23972423    }
    23982424
    2399     /**
    2400     * Callback for settings field.
    2401     *
    2402     * @return void
    2403     */
     2425        /**
     2426        * Callback for settings field.
     2427        *
     2428        * @return void
     2429        */
    24042430    public function field_adcmdr_rel_attributes() {
    24052431        $id = array( $this->sf()->key( 'general' ) => 'rel_attributes' );
     
    24152441    }
    24162442
    2417     /**
    2418     * Callback for settings field.
    2419     *
    2420     * @return void
    2421     */
     2443        /**
     2444        * Callback for settings field.
     2445        *
     2446        * @return void
     2447        */
    24222448    public function field_adcmdr_responsive_banners() {
    24232449        $id = array( $this->sf()->key( 'general' ) => 'responsive_banners' );
     
    24312457    }
    24322458
    2433     /**
    2434     * Callback for settings field.
    2435     *
    2436     * @return void
    2437     */
     2459        /**
     2460        * Callback for settings field.
     2461        *
     2462        * @return void
     2463        */
    24382464    public function field_adcmdr_filter_priority() {
    24392465        $id       = array( $this->sf()->key( 'general' ) => 'filter_priority' );
     
    24432469    }
    24442470
    2445     /**
    2446     * Callback for settings field.
    2447     *
    2448     * @return void
    2449     */
     2471        /**
     2472        * Callback for settings field.
     2473        *
     2474        * @return void
     2475        */
    24502476    public function field_adcmdr_disable_stylesheets() {
    24512477        $id = array( $this->sf()->key( 'general' ) => 'disable_stylesheets' );
     
    24552481    }
    24562482
    2457     /**
    2458     * Callback for settings field.
    2459     *
    2460     * @return void
    2461     */
     2483        /**
     2484        * Callback for settings field.
     2485        *
     2486        * @return void
     2487        */
    24622488    public function field_adcmdr_bots_disable_ads() {
    24632489        $id = array( $this->sf()->key( 'general' ) => 'bots_disable_ads' );
     
    24682494    }
    24692495
    2470     /**
    2471     * Callback for settings field.
    2472     *
    2473     * @return void
    2474     */
     2496        /**
     2497        * Callback for settings field.
     2498        *
     2499        * @return void
     2500        */
    24752501    public function field_adcmdr_disable_all() {
    24762502        $id = array( $this->sf()->key( 'general' ) => 'disable_all' );
     
    24802506    }
    24812507
    2482     /**
    2483     * Callback for settings field.
    2484     *
    2485     * @return void
    2486     */
     2508        /**
     2509        * Callback for settings field.
     2510        *
     2511        * @return void
     2512        */
    24872513    public function field_adcmdr_disable_user_roles() {
    24882514        $roles = TargetingVisitor::parse_roles_to_values();
     
    24922518    }
    24932519
    2494     /**
    2495     * Callback for settings field.
    2496     *
    2497     * @return void
    2498     */
     2520        /**
     2521        * Callback for settings field.
     2522        *
     2523        * @return void
     2524        */
    24992525    public function field_adcmdr_allow_editors() {
    25002526        $id = array( $this->sf()->key( 'admin' ) => 'allow_editors' );
     
    25052531    }
    25062532
    2507     /**
    2508     * Callback for settings field.
    2509     *
    2510     * @return void
    2511     */
     2533        /**
     2534        * Callback for settings field.
     2535        *
     2536        * @return void
     2537        */
    25122538    public function field_adcmdr_allow_unfiltered_html() {
    25132539        $id = array( $this->sf()->key( 'admin' ) => 'allow_unfiltered_html' );
     
    25182544    }
    25192545
    2520     /**
    2521     * Callback for settings field.
    2522     *
    2523     * @return void
    2524     */
     2546        /**
     2547        * Callback for settings field.
     2548        *
     2549        * @return void
     2550        */
    25252551    public function field_adcmdr_delete_data() {
    25262552        $id = array( $this->sf()->key( 'admin' ) => 'delete_data' );
     
    25312557    }
    25322558
    2533     /**
    2534     * Callback for settings field.
    2535     *
    2536     * @return void
    2537     */
     2559        /**
     2560        * Callback for settings field.
     2561        *
     2562        * @return void
     2563        */
    25382564    public function field_adcmdr_disable_track_impressions() {
    25392565        $id = array( $this->sf()->key( 'tracking' ) => 'disable_track_impressions' );
     
    25432569    }
    25442570
    2545     /**
    2546     * Callback for settings field.
    2547     *
    2548     * @return void
    2549     */
     2571        /**
     2572        * Callback for settings field.
     2573        *
     2574        * @return void
     2575        */
    25502576    public function field_adcmdr_disable_track_clicks() {
    25512577        $id = array( $this->sf()->key( 'tracking' ) => 'disable_track_clicks' );
     
    25552581    }
    25562582
    2557     /**
    2558     * Callback for settings field.
    2559     *
    2560     * @return void
    2561     */
     2583        /**
     2584        * Callback for settings field.
     2585        *
     2586        * @return void
     2587        */
    25622588    public function field_adcmdr_enable_local_tracking() {
    25632589        $id = array( $this->sf()->key( 'tracking' ) => 'enable_local_tracking' );
     
    25692595    }
    25702596
    2571     /**
    2572     * Callback for settings field.
    2573     *
    2574     * @return void
    2575     */
     2597        /**
     2598        * Callback for settings field.
     2599        *
     2600        * @return void
     2601        */
    25762602    public function field_adcmdr_enable_3p_tracking() {
    25772603        $id            = array( $this->sf()->key( 'tracking' ) => 'enable_3p_tracking' );
     
    25932619    }
    25942620
    2595     /**
    2596     * Callback for settings field.
    2597     *
    2598     * @return void
    2599     */
     2621        /**
     2622        * Callback for settings field.
     2623        *
     2624        * @return void
     2625        */
    26002626    public function field_adcmdr_enable_ga_tracking() {
    26012627        $id = array( $this->sf()->key( 'tracking' ) => 'enable_ga_tracking' );
     
    26182644    }
    26192645
    2620     /**
    2621     * Callback for settings field.
    2622     *
    2623     * @return void
    2624     */
     2646        /**
     2647        * Callback for settings field.
     2648        *
     2649        * @return void
     2650        */
    26252651    public function field_adcmdr_ga_tracking_ids() {
    26262652        $id = array( $this->sf()->key( 'tracking' ) => 'ga_tracking_ids' );
     
    26312657    }
    26322658
    2633     /**
    2634     * Callback for settings field.
    2635     *
    2636     * @return void
    2637     */
     2659        /**
     2660        * Callback for settings field.
     2661        *
     2662        * @return void
     2663        */
    26382664    public function field_adcmdr_ga_anonymize_ip() {
    26392665        $id = array( $this->sf()->key( 'tracking' ) => 'ga_anonymize_ip' );
     
    26422668    }
    26432669
    2644     /**
    2645     * Callback for settings field.
    2646     *
    2647     * @return void
    2648     */
     2670        /**
     2671        * Callback for settings field.
     2672        *
     2673        * @return void
     2674        */
    26492675    public function field_adcmdr_disable_amp_analytics() {
    26502676        $id = array( $this->sf()->key( 'tracking' ) => 'disable_amp_analytics' );
     
    26542680    }
    26552681
    2656     /**
    2657     * Callback for settings field.
    2658     *
    2659     * @return void
    2660     */
     2682        /**
     2683        * Callback for settings field.
     2684        *
     2685        * @return void
     2686        */
    26612687    public function field_adcmdr_disable_amp_pixel() {
    26622688        $id = array( $this->sf()->key( 'tracking' ) => 'disable_amp_pixel' );
     
    26702696    }
    26712697
    2672     /**
    2673     * Callback for settings field.
    2674     *
    2675     * @return void
    2676     */
     2698        /**
     2699        * Callback for settings field.
     2700        *
     2701        * @return void
     2702        */
    26772703    public function field_adcmdr_bots_disable_tracking() {
    26782704        $id = array( $this->sf()->key( 'tracking' ) => 'bots_disable_tracking' );
     
    26832709    }
    26842710
    2685     /**
    2686     * Callback for settings field.
    2687     *
    2688     * @return void
    2689     */
     2711        /**
     2712        * Callback for settings field.
     2713        *
     2714        * @return void
     2715        */
    26902716    public function field_adcmdr_adsense_account() {
    26912717        $pub_id            = $this->sf()->get( 'adsense_account', 'adsense' );
     
    27532779            ?>
    27542780        </div>
    2755         <?php
    2756     }
    2757 
    2758     /**
    2759     * Call back for settings section.
    2760     *
    2761     * @return void
    2762     */
     2781            <?php
     2782    }
     2783
     2784        /**
     2785        * Call back for settings section.
     2786        *
     2787        * @return void
     2788        */
    27632789    public function settings_callback_adcmdr_amp_defaults() {
    27642790        ?>
    27652791           
    27662792        <p><?php esc_html_e( 'These settings can be overridden by individual ads if needed.', 'ad-commander' ); ?></p>
    2767         <?php
    2768     }
    2769 
    2770     /**
    2771     * Call back for settings section.
    2772     *
    2773     * @return void
    2774     */
     2793            <?php
     2794    }
     2795
     2796        /**
     2797        * Call back for settings section.
     2798        *
     2799        * @return void
     2800        */
    27752801    public function settings_callback_adcmdr_auto_ads() {
    27762802    }
    27772803
    2778     /**
    2779     * Callback for settings field.
    2780     *
    2781     * @return void
    2782     */
     2804        /**
     2805        * Callback for settings field.
     2806        *
     2807        * @return void
     2808        */
    27832809    public function field_adcmdr_adsense_amp_ad_mode() {
    27842810        $id    = array( $this->sf()->key( 'adsense' ) => 'adsense_amp_ad_mode' );
     
    27982824    }
    27992825
    2800 
    2801     /**
    2802      * Callback for settings field.
    2803      *
    2804      * @return void
    2805      */
     2826        /**
     2827         * Callback for settings field.
     2828         *
     2829         * @return void
     2830         */
    28062831    public function field_adcmdr_insert_adsense_head_code() {
    28072832        $id = array( $this->sf()->key( 'adsense' ) => 'insert_adsense_head_code' );
     
    28152840    }
    28162841
    2817     /**
    2818     * Callback for settings field.
    2819     *
    2820     * @return void
    2821     */
     2842        /**
     2843        * Callback for settings field.
     2844        *
     2845        * @return void
     2846        */
    28222847    public function field_adcmdr_enable_amp_auto_ads() {
    28232848        $id = array( $this->sf()->key( 'adsense' ) => 'enable_amp_auto_ads' );
     
    28362861    }
    28372862
    2838     /**
    2839     * Callback for settings field.
    2840     *
    2841     * @return void
    2842     */
     2863        /**
     2864        * Callback for settings field.
     2865        *
     2866        * @return void
     2867        */
    28432868    public function field_adcmdr_disable_adsense_account_alerts() {
    28442869        $pub_id            = $this->sf()->get( 'adsense_account', 'adsense' );
     
    28512876    }
    28522877
    2853 
    2854     /**
    2855      * Callback for settings field.
    2856      *
    2857      * @return void
    2858      */
     2878        /**
     2879         * Callback for settings field.
     2880         *
     2881         * @return void
     2882         */
    28592883    public function field_adcmdr_consent_required() {
    28602884        $id = array( $this->sf()->key( 'privacy' ) => 'consent_required' );
     
    28702894    }
    28712895
    2872     /**
    2873     * Callback for settings field.
    2874     *
    2875     * @return void
    2876     */
     2896        /**
     2897        * Callback for settings field.
     2898        *
     2899        * @return void
     2900        */
    28772901    public function field_adcmdr_consent_cookie_name() {
    28782902        $id = array( $this->sf()->key( 'privacy' ) => 'consent_cookie_name' );
     
    28832907    }
    28842908
    2885     /**
    2886     * Callback for settings field.
    2887     *
    2888     * @return void
    2889     */
     2909        /**
     2910        * Callback for settings field.
     2911        *
     2912        * @return void
     2913        */
    28902914    public function field_adcmdr_consent_cookie_value() {
    28912915        $id = array( $this->sf()->key( 'privacy' ) => 'consent_cookie_value' );
     
    28962920    }
    28972921
    2898     /**
    2899     * Callback for settings field.
    2900     *
    2901     * @return void
    2902     */
     2922        /**
     2923        * Callback for settings field.
     2924        *
     2925        * @return void
     2926        */
    29032927    public function field_adcmdr_consent_cookie_comparison() {
    29042928        $options = array(
     
    29212945    }
    29222946
    2923     /**
    2924     * Create classes for use on a meta item.
    2925     *
    2926     * @param array $suffixes An array of suffices to append.
    2927     *
    2928     * @return string
    2929     */
     2947        /**
     2948        * Create classes for use on a meta item.
     2949        *
     2950        * @param array $suffixes An array of suffices to append.
     2951        *
     2952        * @return string
     2953        */
    29302954    public static function metaitem_classes( $suffixes = array() ) {
    29312955        $classes = array( 'adcmdr-metaitem' );
     
    29442968    }
    29452969
    2946     /**
    2947     * Interfaces with WOMeta message and adds classes.
    2948     *
    2949     * @param string $message The message to display.
    2950     * @param array  $classes Any additional classes.
    2951     * @param array  $args Additional arguments.
    2952     *
    2953     * @return string
    2954     */
     2970        /**
     2971        * Interfaces with WOMeta message and adds classes.
     2972        *
     2973        * @param string $message The message to display.
     2974        * @param array  $classes Any additional classes.
     2975        * @param array  $args Additional arguments.
     2976        *
     2977        * @return string
     2978        */
    29552979    protected function info( $message, $classes = array(), $args = array() ) {
    29562980        $classes   = Util::arrayify( $classes );
     
    29642988    }
    29652989
    2966     /**
    2967     * Display an add-on table.
    2968     *
    2969     * @return string
    2970     */
     2990        /**
     2991        * Display an add-on table.
     2992        *
     2993        * @return string
     2994        */
    29712995    protected function get_addons() {
    29722996        $html = '';
     
    29933017            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    29943018            $this->start_div( array( Util::ns( 'addon-features' ), Util::ns( 'pro-features' ) ), array( 'display' => false ) ) .
    2995                 Html::h3( AdCommander::title() . ' Pro' ) .
    2996                 Html::ul( $lis, Util::ns( 'addon' ) ) .
    2997                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    2998                 Html::abtn( self::pro_upgrade_url( array( 'utm_medium' => 'button' ) ), __( 'Upgrade to Pro', 'ad-commander' ) ) .
    2999                 Html::abtn( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ), 'Learn more', '_blank', true ) .
    3000                 $this->end_div( array( 'display' => false ) ) .
     3019            Html::h3( AdCommander::title() . ' Pro' ) .
     3020            Html::ul( $lis, Util::ns( 'addon' ) ) .
     3021            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3022            Html::abtn( self::pro_upgrade_url( array( 'utm_medium' => 'button' ) ), __( 'Upgrade to Pro', 'ad-commander' ) ) .
     3023            Html::abtn( AdCommander::public_site_url( '', array( 'utm_medium' => 'button' ) ), 'Learn more', '_blank', true ) .
     3024            $this->end_div( array( 'display' => false ) ) .
    30013025            $this->end_div( array( 'display' => false ) ) .
    30023026            $this->end_div( array( 'display' => false ) );
     
    30193043            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    30203044            $this->start_div( Util::ns( 'addon-features' ), array( 'display' => false ) ) .
    3021                 Html::h3( __( 'Ad Commander Tools', 'ad-commander' ) ) .
    3022                 Html::ul( $lis, Util::ns( 'addon' ) ) .
    3023                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    3024                 Html::abtn( AddonBridge::addon_url( 'tools' ), __( 'Download Add-on', 'ad-commander' ) ) .
    3025                 $this->end_div( array( 'display' => false ) ) .
     3045            Html::h3( __( 'Ad Commander Tools', 'ad-commander' ) ) .
     3046            Html::ul( $lis, Util::ns( 'addon' ) ) .
     3047            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3048            Html::abtn( AddonBridge::addon_url( 'tools' ), __( 'Download Add-on', 'ad-commander' ) ) .
     3049            $this->end_div( array( 'display' => false ) ) .
    30263050            $this->end_div( array( 'display' => false ) ) .
    30273051            $this->end_div( array( 'display' => false ) );
     
    30353059            $html .= $this->start_div( Util::ns( 'addons' ), array( 'display' => false ) ) .
    30363060            $this->start_div( Util::ns( 'addon-features' ), array( 'display' => false ) ) .
    3037                 Html::h3( __( 'Screen Stay Awake', 'ad-commander' ) ) .
    3038                 Html::p( $p ) .
    3039                 $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
    3040                 Html::abtn( AddonBridge::addon_url( 'scrnsa' ), __( 'Download Plugin', 'ad-commander' ) ) .
    3041                 $this->end_div( array( 'display' => false ) ) .
     3061            Html::h3( __( 'Screen Stay Awake', 'ad-commander' ) ) .
     3062            Html::p( $p ) .
     3063            $this->start_div( 'adcmdr-btn-group', array( 'display' => false ) ) .
     3064            Html::abtn( AddonBridge::addon_url( 'scrnsa' ), __( 'Download Plugin', 'ad-commander' ) ) .
     3065            $this->end_div( array( 'display' => false ) ) .
    30423066            $this->end_div( array( 'display' => false ) ) .
    30433067            $this->end_div( array( 'display' => false ) );
     
    30513075    }
    30523076
    3053     /**
    3054     * Modify the ad or placement post title if it's blank.
    3055     *
    3056     * @param array $post_data The current post data.
    3057     *
    3058     * @return array
    3059     */
     3077        /**
     3078        * Modify the ad or placement post title if it's blank.
     3079        *
     3080        * @param array $post_data The current post data.
     3081        *
     3082        * @return array
     3083        */
    30603084    public function modify_post_title( $post_data ) {
    30613085
  • ad-commander/trunk/readme.txt

    r3487808 r3487830  
    44Requires at least: 6.2
    55Tested up to: 6.9
    6 Stable tag: 1.1.26
     6Stable tag: 1.1.27
    77Requires PHP: 7.4
    88License: GPLv3
     
    119119
    120120== Changelog ==
     121= 1.1.27 =
     122* Add geolocation information to debugging info
     123* Hide MaxMind license from debugging info
     124
    121125= 1.1.26 =
    122126* Add system status tab to settings
Note: See TracChangeset for help on using the changeset viewer.