Plugin Directory

Changeset 2378318


Ignore:
Timestamp:
09/09/2020 08:51:49 PM (6 years ago)
Author:
brightedge
Message:

1.1.6

Location:
brightedge-autopilot/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • brightedge-autopilot/trunk/be_ixf_php_wp.php

    r2304216 r2378318  
    44 * Plugin URI: https://www.brightedge.com/
    55 * Description: Enables BrightEdge Autopilot on your Wordpress site.
    6  * Version: 1.1.2
     6 * Version: 1.1.6
    77 * Author: BrightEdge
    88 * Author URI: https://www.brightedge.com/
  • brightedge-autopilot/trunk/readme.txt

    r2304216 r2378318  
    66Author: BrightEdge
    77Requires PHP: 5.5
    8 Version: 1.1.2
     8Version: 1.1.6
    99Copyright: BrightEdge Technologies, Inc.
    1010License: www.brightedge.com/infrastructure-product-terms
     
    2424
    2525== Changelog ==
     26= 1.1.6 =
     27* Release date: June 29, 2020
     28
     29**Update**
     30
     31* Change WordPress hook for link block
     32
     33
     34= 1.1.5 =
     35* Release date: June 16, 2020
     36
     37**Update**
     38
     39* Support api.brightedge.com endpoint
     40
     41
     42= 1.1.4 =
     43* Release date: June 10, 2020
     44
     45**Update**
     46
     47* Support debug info
     48* Remove filter to avoid multiple injection
     49
     50
     51= 1.1.3 =
     52* Release date: May 27, 2020
     53
     54**Update**
     55
     56* Support body_open and body_1 at the same time
     57
    2658
    2759= 1.1.2 =
  • brightedge-autopilot/trunk/src/View.php

    r2285207 r2378318  
    1717            && $this->checkBodyStr($this->controller->ixf_body_open_data)){
    1818                $this->ixfAddBodyOpenBlock();
    19             } else if (isset($this->controller->ixf_data)
     19            }
     20
     21            if (isset($this->controller->ixf_data)
    2022            && $this->checkBodyStr($this->controller->ixf_data)){
    2123                // body 1
     
    2931                    $this->ixfAddBody1Block();
    3032                }
     33            }
     34
     35            if(isset($this->controller->ixf_close_data)){
     36                $this->ixfAddCloseBlock();
    3137            }
    3238        }
     
    8793        }
    8894
    89         if(isset($this->controller->ixf_close_data)){
    90             echo $this->controller->ixf_close_data;
    91         }
     95        remove_filter('wp_footer', array($this, 'ixfRenderBody1BlockAboveFooter'));
    9296    }
    9397
     
    108112        }
    109113
    110         if(isset($this->controller->ixf_close_data)){
    111             echo $this->controller->ixf_close_data;
    112         }
     114        remove_filter('wp_footer', array($this, 'ixfRenderBody1BlockFirstElementInFooter'));
    113115    }
    114116
     
    119121        }
    120122        if(is_singular()){
    121             add_filter('the_content', array($this, 'ixfRenderBodyOpenBlock'));
     123            add_action('wp_footer',function() {
     124                echo $this->controller->ixf_body_open_data;
     125            }, 99);
    122126        }
    123     }
    124 
    125     public function ixfRenderBodyOpenBlock($content = ''){
    126         ob_start();
    127 
    128         if (isset($this->controller->ixf_body_open_data)) {
    129             echo $this->controller->ixf_body_open_data;
    130         }
    131 
    132         echo $content;
    133 
    134         if(isset($this->controller->ixf_close_data)){
    135             echo $this->controller->ixf_close_data;
    136         }
    137         return ob_get_clean();
    138127    }
    139128
     
    165154        }
    166155
    167         if(isset($this->controller->ixf_close_data)){
    168             echo $this->controller->ixf_close_data;
    169         }
     156        remove_filter('the_content',  array($this, 'ixfRenderBody1Block'));
     157
    170158        return ob_get_clean();
    171159    }
     
    176164        if (isset($this->controller->ixf_data)){
    177165            echo $this->controller->ixf_data;
    178         }
    179 
    180         if(isset($this->controller->ixf_close_data)){
    181             echo $this->controller->ixf_close_data;
    182166        }
    183167
     
    200184            echo $this->controller->ixf_data;
    201185        }
     186    }
    202187
    203         if(isset($this->controller->ixf_close_data)){
     188    public function ixfAddCloseBlock(){
     189        add_action('wp_footer',function() {
    204190            echo $this->controller->ixf_close_data;
    205         }
     191        }, 100);
    206192    }
    207193}
  • brightedge-autopilot/trunk/src/be_ixf_client.php

    r2304216 r2378318  
    136136    public static $PRODUCT_NAME = "be_ixf";
    137137    public static $CLIENT_NAME = "php_sdk";
    138     public static $CLIENT_VERSION = "1.5.1";
     138    public static $CLIENT_VERSION = "1.5.2";
    139139
    140140    private static $API_VERSION = "1.0.0";
     
    297297                    && ($endpoint['scheme'] == "https" || $endpoint['scheme'] == "http")
    298298                    && isset($endpoint['host'])
    299                     && preg_match("/^ixf.*-api\.bc0a\.com$/", $endpoint['host'])) {
     299                    && (
     300                        $endpoint['host'] == "api.brightedge.com"
     301                        || preg_match("/^ixf.*-api\.bc0a\.com$/", $endpoint['host'])
     302                    )) {
    300303                    $this->allowDirectApi = false;
    301304                    $this->config[self::$API_ENDPOINT_CONFIG] = $_GET["ixf-endpoint"];
  • brightedge-autopilot/trunk/src/constants.php

    r2304216 r2378318  
    55class BEIXFConstants{
    66    // wordpress plugin version
    7     const WP_VERSION = '<meta name="be:wp" content="1.1.2">';
     7    const WP_VERSION = '<meta name="be:wp" content="1.1.6">';
    88    // account id
    99    const ACCOUNT_ID = 'account_id';
Note: See TracChangeset for help on using the changeset viewer.