Plugin Directory

Changeset 1591764


Ignore:
Timestamp:
02/08/2017 01:58:34 PM (9 years ago)
Author:
affiliatesolutions
Message:

Update

Location:
moreads-se/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • moreads-se/trunk/lib/Ads/Generic.php

    r1578071 r1591764  
    273273
    274274        if(MASE_Pro::isSubscriptionActive() && MASE_Pro::isVMTAPIActive() && isset($_POST['_connection_ids'])) {
    275             $data['_connection_ids'] = sanitize_text_field($_POST['_connection_ids']);
     275            $ids = is_array($_POST['_connection_ids']) ? implode(",", $_POST['_connection_ids']) : $_POST['_connection_ids'];
     276            $data['_connection_ids'] = sanitize_text_field($ids);
    276277        }
    277278
     
    335336            $real_post_id = $insert_post;
    336337        }
    337         wp_set_post_terms($real_post_id, sanitize_text_field($data['post_tags']), MASE_PREFIX.'ad_tags');
     338        $post_tags = is_array($data['post_tags']) ? implode(",", $data['post_tags']) : $data['post_tags'];
     339        wp_set_post_terms($real_post_id, sanitize_text_field($post_tags), MASE_PREFIX.'ad_tags');
    338340
    339341        foreach(array('media_type','media_size','target_url', 'ad_id', 'countries', 'connection_ids', 'device_ids') as $k) {
  • moreads-se/trunk/lib/Ads/MetaBoxes.php

    r1580158 r1591764  
    3636        global $post;
    3737        $_connections = get_post_meta($post->ID, '_connection_ids', true);
     38
    3839        if(empty($_connections)) $_connections = MASE_CONNECTION_3G.','.MASE_CONNECTION_WIFI;
    3940        $_selected_connections = explode(",", $_connections);
  • moreads-se/trunk/lib/MASE.php

    r1580165 r1591764  
    390390    public static function print_js_zones() { ?>
    391391
    392         <?php foreach(self::$JS_ZONES as $zone) { ?>
     392            <?php foreach(self::$JS_ZONES as $zone) { ?>
    393393            <?php if(isset($zone['src'])) { ?>
    394                 <script type="text/javascript">
    395                     var s = document.createElement('script');
    396                     s.type = 'text/javascript';
    397                     s.async = true;
    398                     s.src = '<?php echo $zone['src']; ?>';
    399                     var x = document.getElementsByTagName('script')[0];
    400                     x.parentNode.insertBefore(s, x);
    401                 </script>
     394            <script type="text/javascript">
     395            var s = document.createElement('script');
     396            s.type = 'text/javascript';
     397            s.async = true;
     398            s.src = '<?php echo $zone['src']; ?>';
     399            var x = document.getElementsByTagName('script')[0];
     400            x.parentNode.insertBefore(s, x);
     401            </script>
    402402            <?php } elseif(isset($zone['html'])) { ?>
    403                 <?php echo $zone['html']; ?>
     403            <?php echo $zone['html']; ?>
    404404            <?php } else { ?>
    405                 <script type="text/javascript">
    406                     <?php echo $zone['js']; ?>
    407                 </script>
     405            <script type="text/javascript">
     406            <?php echo $zone['js']; ?>
     407            </script>
    408408            <?php } ?>
    409         <?php } ?>
     409            <?php } ?>
    410410        </script>
    411411        <?php
     
    421421        echo "<script type=\"text/javascript\" src=\"".MASE_URL.'static/js_delivr/show_ads.js'."\"></script>";
    422422        if(MASE::isWidgetJSDeliveryActive()) {
    423             echo "<script type=\"text/javascript\">";
    424             echo file_get_contents(MASE_DIR.'/static/js_delivr/atomic.min.js')."\n";
    425             echo file_get_contents(MASE_DIR.'/static/js_delivr/deliver.js')."\n";
    426             echo "</script>";
     423        echo "<script type=\"text/javascript\">";
     424        echo file_get_contents(MASE_DIR.'/static/js_delivr/atomic.min.js')."\n";
     425        echo file_get_contents(MASE_DIR.'/static/js_delivr/deliver.js')."\n";
     426        echo "</script>";
    427427        }
    428428    }
     
    454454            $res = get_post_meta($id, 'menu-item-mase-is-menu-zone', true);
    455455            if(!empty($res)) {
    456                 $zone_identifier = MASE_PREFIX.'menu_zone_ads_'.$id;
    457                 $zone_ads = get_option($zone_identifier);
    458                 $device_id = MASE::get_user_device();
    459 
    460                 if(!empty($zone_ads)) {
     456                    $zone_identifier = MASE_PREFIX.'menu_zone_ads_'.$id;
     457                    $zone_ads = get_option($zone_identifier);
     458                    $device_id = MASE::get_user_device();
     459
     460                    if(!empty($zone_ads)) {
    461461                    $query_args = array();
    462462                    $query_args['disabled'] = 0;
     
    514514                        switch($widget_info['widget_base']) {
    515515                            case 'mase_banner_widget':
    516                                 $widget_class = 'MASE_Banner_Widget';
    517                                 break;
     516                            $widget_class = 'MASE_Banner_Widget';
     517                            break;
    518518                            case 'mase_float_widget':
    519                                 $widget_class = 'MASE_Float_Widget';
    520                                 break;
     519                            $widget_class = 'MASE_Float_Widget';
     520                            break;
    521521                            case 'mase_popup_widget':
    522                                 $widget_class = 'MASE_Popup_Widget';
    523                                 break;
     522                            $widget_class = 'MASE_Popup_Widget';
     523                            break;
    524524                            case 'mase_textlink_widget':
    525                                 $widget_class = 'MASE_TextLink_Widget';
    526                                 break;
     525                            $widget_class = 'MASE_TextLink_Widget';
     526                            break;
    527527                            case 'mase_exitintent_widget':
    528                                 $widget_class = 'MASE_ExitIntent_Widget';
    529                                 break;
     528                            $widget_class = 'MASE_ExitIntent_Widget';
     529                            break;
    530530                        }
    531531
  • moreads-se/trunk/lib/MASE_Pro.php

    r1580158 r1591764  
    181181        }
    182182
     183        $data['data'] = array_values($data['data']);
    183184        echo json_encode($data);
    184185        die();
  • moreads-se/trunk/lib/Pages/Statistics.php

    r1580158 r1591764  
    1212                        <div style="display: inline-block; margin-right: 3px;">
    1313                            <select class="mase_select2_simple" style="width:130px;" id="MASE_selectTimerangeTable" name="timerange">
    14                                 <option value="today"><?php _e('Today', MASE_TEXT_DOMAIN); ?></option>
     14                                <option selected="SELECTED" value="today"><?php _e('Today', MASE_TEXT_DOMAIN); ?></option>
    1515                                <option value="yesterday"><?php _e('Yesterday', MASE_TEXT_DOMAIN); ?></option>
    1616                                <option value="thisweek"><?php _e('This Week', MASE_TEXT_DOMAIN); ?></option>
    1717                                <option value="lastweek"><?php _e('Last Week', MASE_TEXT_DOMAIN); ?></option>
    18                                 <option selected="SELECTED" value="thismonth"><?php _e('This Month', MASE_TEXT_DOMAIN); ?></option>
     18                                <option value="thismonth"><?php _e('This Month', MASE_TEXT_DOMAIN); ?></option>
    1919                                <option value="lastmonth"><?php _e('Last Month', MASE_TEXT_DOMAIN); ?></option>
    2020                                <option value="last30days"><?php _e('Last 30 Days', MASE_TEXT_DOMAIN); ?></option>
     
    8787                                <?php _e('Country', MASE_TEXT_DOMAIN); ?>
    8888                            </a>
     89                            <button id="stats-apply" style="margin-top: -23px; margin-right: 10px; margin-left: 10px;" class="btn btn-primary"><?php _e('Apply', MASE_TEXT_DOMAIN); ?></button>
    8990                        </div>
    90                         <span style="float:right; margin-right: 10px;" class=""><b><?php _e('Group By Columns', MASE_TEXT_DOMAIN); ?> </b></span>
     91                        <span style="float:right; margin-right: 10px; line-height: 30px;" class=""><b><?php _e('Group By Columns', MASE_TEXT_DOMAIN); ?> </b></span>
    9192                    </div>
    9293                </div>
  • moreads-se/trunk/ma-se.php

    r1580158 r1591764  
    44Plugin URI:         https://www.affiliate-solutions.xyz/produkte/moreads-se/
    55Description:        moreAds SE is a standalone ad server used as a WordPress plugin
    6 Version:            1.4.9
     6Version:            1.5.0
    77Author:             Affiliate Solutions S.L.U
    88Author URI:         https://www.affiliate-solutions.xyz/produkte/moreads-se/
  • moreads-se/trunk/readme.txt

    r1580158 r1591764  
    44
    55Requires at least: 4.4
    6 Tested up to: 4.7.1
     6Tested up to: 4.7.2
    77Stable tag: trunk
    88License: GPLv2 or later
     
    6363== Changelog ==
    6464
     65= 1.5.0 =
     66
     67* Added support for WordPress 4.7.2
     68* Modified Statistics
     69* Fixed small bugs
     70
    6571= 1.4.9 =
    6672
  • moreads-se/trunk/static/js/app_statistics.js

    r1490826 r1591764  
    235235            "processing": true,
    236236            "serverSide": true,
    237             "ajax": mase_app.ajax_url+'?action=mase_stats_query&'+$(this.form_selector).serialize(),
     237            "ajax": mase_app.ajax_url+'?action=mase_stats_query&timerange=today&'+$(this.form_selector).serialize(),
    238238            "footerCallback": function ( row, data, start, end, display ) {
    239239                Number.prototype.formatMoney = function(c, d, t){
     
    302302            }
    303303
    304             $(this.select2_domain_selector).mase_s2(this.select2_domain_options).on('change', this.updateView.bind(this));
    305             $(this.select2_device_selector).mase_s2(this.select2_device_options).on('change', this.updateView.bind(this));
    306             $(this.select2_user_selector).mase_s2(this.select2_user_options).on('change', this.updateView.bind(this));
    307             $(this.select2_connection_selector).mase_s2(this.select2_connection_options).on('change', this.updateView.bind(this));
    308             $(this.select2_country_selector).mase_s2(this.select2_country_options).on('change', this.updateView.bind(this));
    309             $(this.select2_time_selector).on('change', this.updateView.bind(this));
    310             $('body').on('click', this.datatable_search_update_selector, this.updateSearchEvent.bind(this));
    311 
     304            $(this.select2_domain_selector).mase_s2(this.select2_domain_options);
     305            $(this.select2_device_selector).mase_s2(this.select2_device_options);
     306            $(this.select2_user_selector).mase_s2(this.select2_user_options);
     307            $(this.select2_connection_selector).mase_s2(this.select2_connection_options);
     308            $(this.select2_country_selector).mase_s2(this.select2_country_options);
     309            $('#stats-apply').on('click', this.updateView.bind(this));
    312310
    313311            if(mase_app.lng == "de_DE") {
     
    332330                // Toggle the visibility
    333331                column.visible(!column.visible());
    334                 STATISTICS.selectGroupAndFetchData();
     332                //STATISTICS.selectGroupAndFetchData();
    335333            });
    336334
     
    351349                }
    352350            });
    353             url=mase_app.ajax_url+'?action=mase_stats_query&'+
    354                 $(this.form_selector).serialize()+"&group=" +group.join(),
     351            var url=mase_app.ajax_url+'?action=mase_stats_query&'+$(this.form_selector).serialize()+"&group=" +group.join();
    355352            this.datatable_element.ajax.url(url).load();
    356353        }
Note: See TracChangeset for help on using the changeset viewer.