Plugin Directory

Changeset 3148911


Ignore:
Timestamp:
09/09/2024 11:18:58 PM (19 months ago)
Author:
brightedge
Message:

WP plugin with the WP CLI fix

Location:
brightedge-autopilot/trunk
Files:
5 edited

Legend:

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

    r3143990 r3148911  
    44 * Plugin URI: https://www.brightedge.com/
    55 * Description: Enables BrightEdge Autopilot on your Wordpress site.
    6  * Version: 1.1.14
     6 * Version: 1.1.15
    77 * Author: BrightEdge
    88 * Author URI: https://www.brightedge.com/
     
    4949);
    5050
    51 if (function_exists('add_action')) {
    52     add_action('init', function () {
    53         $base_path = plugin_dir_path(__FILE__);
    54         new BEIXFLoader($base_path);
    55     });
     51/*********** custom code start ******************/
    5652
    57     // If using widgets: sets up sidebar and widgets
    58     add_action('widgets_init', __NAMESPACE__ . '\BEIXFLoader::registerWidget');
     53// Ensure WP_CLI is defined and check if it's active
     54if (!defined('WP_CLI')) {
     55    define('WP_CLI', false);
    5956}
     57
     58/*********** custom code end ******************/
     59
     60
     61// Only add actions if WP-CLI is not active
     62if (!WP_CLI) {
     63    if (function_exists('add_action')) {
     64        add_action('init', function () {
     65            $base_path = plugin_dir_path(__FILE__);
     66            new BEIXFLoader($base_path);
     67        });
     68
     69        // If using widgets: sets up sidebar and widgets
     70        add_action('widgets_init', __NAMESPACE__ . '\BEIXFLoader::registerWidget');
     71    }
     72}
  • brightedge-autopilot/trunk/readme.txt

    r3143990 r3148911  
    77Requires PHP: 5.5
    88Tested up to: 6.6.1
    9 Version: 1.1.14
     9Version: 1.1.15
    1010Copyright: BrightEdge Technologies, Inc.
    1111License: www.brightedge.com/infrastructure-product-terms
     
    2525
    2626== Changelog ==
     27
     281.1.15 =
     29* Release date: Sept 5, 2024
     30
     31**Update**
     32
     33* Added a fix for WP CLI
     34
    27351.1.14 =
    2836* Release date: Aug 28, 2024
  • brightedge-autopilot/trunk/src/Loader.php

    r2285207 r3148911  
    1515        defined('ABSPATH' ) or die( 'No direct access allowed!');
    1616        $this->base_path = $plugin_path;
     17
     18/*********** Custom code start ***************/
     19        // Skip frontend-specific setup if WP-CLI is active
     20        if (defined('WP_CLI') && WP_CLI) {
     21            return; // Exit the constructor if WP-CLI is active
     22        }
     23/*********** Custom code end ***************/
    1724
    1825        add_action(
     
    94101
    95102    protected function load(){
     103        // Skip the load method if WP-CLI is active
     104        if (defined('WP_CLI') && WP_CLI) {
     105            return;
     106        }
     107
    96108        $instance = new BEIXFController();
    97109        // Hook ensures rendering after conditional tags are available
  • brightedge-autopilot/trunk/src/be_ixf_client.php

    r2943291 r3148911  
    139139    public static $PRODUCT_NAME = "be_ixf";
    140140    public static $CLIENT_NAME = "php_sdk";
    141     public static $CLIENT_VERSION = "1.5.11";
     141    public static $CLIENT_VERSION = "1.5.12";
    142142
    143143    private static $API_VERSION = "1.0.0";
  • brightedge-autopilot/trunk/src/constants.php

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