Plugin Directory

Changeset 1948203


Ignore:
Timestamp:
09/27/2018 06:45:42 PM (8 years ago)
Author:
sparklit
Message:

Bug and compatibility fixes.

Location:
adbutler/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • adbutler/trunk/adbutler.php

    r1947600 r1948203  
    55Plugin URI: https://wordpress.org/plugins/adbutler
    66Description: AdButler ad management system integration plugin. Simplify deployment of your ad zones with this highly effective manner of deploying your publishing needs
    7 Version: 1.17
     7Version: 1.18
    88Author: AdButler
    99Author URI: http://www.adbutler.com
     
    2323define( 'ADBUTLER_CACHEURL', ADBUTLER_URLPATH . 'cache/' );
    2424define( 'ADBUTLER_ADSERVE_URL','https://adbutler.com/external_request.spark');
    25 define( 'ADBUTLER_PLUGIN_VERSION', '1.17');
     25define( 'ADBUTLER_PLUGIN_VERSION', '1.18');
    2626
    2727
  • adbutler/trunk/includes/adbutler_admin_settings.class

    r1947600 r1948203  
    291291
    292292                        <th>
    293                             <label class="adbutler-input-label" for="adbutler_type_select">
     293                            <label class="adbutler-input-label" for="adbutler_type_select_fixed">
    294294                                <?php _e('Delivery Method', 'spark_domain'); ?>
    295295                            </label>
     
    300300                                <label>
    301301                                    <select class="adbutler_type_select"
    302                                             id="adbutler_type_select"
    303                                             name="adbutler_type_select"
     302                                            id="adbutler_type_select_fixed"
     303                                            name="adbutler_type_select_fixed"
    304304                                        <?php disabled(!$enabled); ?>>
    305305                                        <?php foreach ($fixed_type_list as $k => $v) {
     
    314314                                           type="checkbox"
    315315                                        <?php checked($secure, 'on'); ?>
    316                                            id="adbutler_secure"
    317                                            name="adbutler_secure"
     316                                           id="adbutler_secure_fixed"
     317                                           name="adbutler_secure_fixed"
    318318                                        <?php disabled(!$enabled); ?>
    319319                                    />
     
    330330                        <th>
    331331                            <label class="adbutler-input-label"
    332                                    for="adbutler_type_select">
     332                                   for="adbutler_type_select_responsive">
    333333                                <?php _e('Delivery Method', 'spark_domain'); ?>
    334334                            </label>
     
    337337                        <td>
    338338                            <fieldset>
    339                                 <select class="adbutler_type_select"
    340                                         id="adbutler_type_select"
    341                                         name="adbutler_type_select"
     339                                <label>
     340                                    <select class="adbutler_type_select"
     341                                        id="adbutler_type_select_responsive"
     342                                        name="adbutler_type_select_responsive"
    342343                                        disabled>
    343344                                    <?php foreach ($responsive_type_list as $k => $v) {
     
    346347                                    <?php } ?>
    347348                                </select>
     349                                </label>
    348350                                <br>
    349351                                <label>
     
    351353                                           type="checkbox"
    352354                                        <?php checked($secure, 'on'); ?>
    353                                            id="adbutler_secure"
    354                                            name="adbutler_secure"
     355                                           id="adbutler_secure_responsive"
     356                                           name="adbutler_secure_responsive"
    355357                                        <?php disabled(!$enabled); ?>
    356358                                    />
     
    479481        if ($_POST['adbutler_interval_ads_enable'] === 'on') {
    480482            update_option(adbutler_interval_ads::OPTION_ZONE_ID, $_POST['adbutler_zone_select']);
    481             update_option(adbutler_interval_ads::OPTION_SECURE, $_POST['adbutler_secure']);
    482             update_option(adbutler_interval_ads::OPTION_TYPE, $_POST['adbutler_type_select']);
    483483            update_option(adbutler_interval_ads::OPTION_EXTRA_DATA, $_POST['adbutler_extra_data']);
    484484            update_option(adbutler_interval_ads::OPTION_CSS_CLASSES, $_POST['adbutler_css_classes']);
    485485            update_option(adbutler_interval_ads::OPTION_SIZE, $_POST['adbutler_size_hidden']);
    486486            update_option(adbutler_interval_ads::OPTION_NAME, $_POST['adbutler_name_hidden']);
    487             update_option(adbutler_interval_ads::OPTION_RESPONSIVE, $_POST['adbutler_responsive_hidden']);
     487
     488            $responsive = $_POST['adbutler_responsive_hidden'];
     489            update_option(adbutler_interval_ads::OPTION_RESPONSIVE, $responsive);
     490
     491            if ($responsive === 'FIXED') {
     492                update_option(adbutler_interval_ads::OPTION_SECURE, $_POST['adbutler_secure_fixed']);
     493                update_option(adbutler_interval_ads::OPTION_TYPE, $_POST['adbutler_type_select_fixed']);
     494            } else {
     495                update_option(adbutler_interval_ads::OPTION_SECURE, $_POST['adbutler_secure_responsive']);
     496                update_option(adbutler_interval_ads::OPTION_TYPE, $_POST['adbutler_type_select_responsive']);
     497            }
    488498
    489499            $nth_post = $_POST['adbutler_nth_post'] >= 1 ? $_POST['adbutler_nth_post'] : 1;
  • adbutler/trunk/includes/adbutler_header_bidding_widget.class

    r1947600 r1948203  
    172172    {
    173173        $strArray = explode(',', $str);
    174         $strArray = array_filter($strArray, function ($str) { return !empty(trim($str)); });
     174        $strArray = array_filter($strArray, function ($str) { return trim($str) == false; });
    175175        return array_map(function ($str) { return explode('x', trim($str)); }, $strArray);
    176176    }
  • adbutler/trunk/js/adbutler.js

    r1947600 r1948203  
    1616            }
    1717           
    18             if ($('.adbutler_widget').length > 0 ||($("[id^='customize-control-widget_adbutler-']"))) {
     18            if ($('.adbutler_widget, .adbutler_settings').length > 0 ||($("[id^='customize-control-widget_adbutler-']"))) {
    1919                adbutler.populate_zone_lists();
    2020            }
     
    3939        handle_zone_select: function (selectEl) {
    4040            var $select = $(selectEl),
    41                 $widget = $select.parents('.adbutler_widget'),
     41                $widget = $select.parents('.adbutler_widget, .adbutler_settings'),
    4242                $selected = $select.find('option:selected'),
    4343                zone_id = $selected.val();
     
    121121                });
    122122                $select.append(o.join(''));
     123                adbutler.handle_zone_select($select[0]);
    123124            });
    124125
  • adbutler/trunk/readme.txt

    r1947600 r1948203  
    6868
    6969== Changelog ==
    70 *1.17 Added support for header bidding ads. Header bidding ads can now be added as a widget or shortcode. Interval ads can now be targetted at specific pages.
     70*1.18 Bug and compatibility fixes.
     71*1.17 Added support for header bidding ads. Header bidding ads can now be added as a widget or shortcode. Interval ads can now be targeted at specific pages.
    7172*1.16 Fixed a CSS caching issue.
    7273*1.15 You now have the option of displaying an ad between posts. Configure this in AdButler > Interval Ads.
     
    8687== Upgrade notice ==
    8788
    88 Added support for header bidding ads. Interval ads can now be targetted at specific pages.
     89Added support for header bidding ads. Interval ads can now be targeted at specific pages.
    8990 
    9091
Note: See TracChangeset for help on using the changeset viewer.