Plugin Directory

Changeset 3059542


Ignore:
Timestamp:
03/27/2024 07:52:55 AM (2 years ago)
Author:
xtoool
Message:

add banner ads and fix bug

Location:
xtoool-ads-box/trunk
Files:
40 added
2 edited

Legend:

Unmodified
Added
Removed
  • xtoool-ads-box/trunk/readme.txt

    r3045328 r3059542  
    33Author URI: https://www.xtoool.com
    44Donate link: https://www.xtoool.com/wordpress/redirecter/
    5 Tags: ads, htaccess, product, image
     5Tags: ads, htaccess, product, image, apache, nginx, post, admin
    66Requires at least: 5.3
    77Tested up to: 6.3.2
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99Requires PHP: 5.4
    1010License: GPLv3
     
    2222Shortcode insertion: copy the ads bar's shortcode, insert it into the page
    2323Convenient management: you can edit the ads bar of multiple pages at one time
     24
     25Effect preview:
  • xtoool-ads-box/trunk/xtoool-ads-box.php

    r3044940 r3059542  
    44Plugin URI: https://www.xtoool.com/wordpress/
    55Description: Xtoool Ads Box helps you create High-converting product bars to engage customers and grow sales.
    6 Version: 1.0.0
     6Version: 1.0.1
    77Author: xtoool.com
    88Author URI: https://www.xtoool.com
     
    2424namespace plbProductListForBlog;
    2525
     26use Adsbx\AdsbxAdmin;
     27use Adsbx\Shortcode;
     28
    2629if ( ! defined( 'ABSPATH' ) ) {
    2730    exit;
     
    3841    private static $instance = null;
    3942    public $db;
    40     const XTPLB_VERSION = '1.0.0';
     43    const XTPLB_VERSION = '1.0.1';
     44    public $AdsbxAdmin_obj = null;
    4145
    4246    public function __construct(){
     
    5660        register_activation_hook(XTPLB_PATH, [$this, 'activate']);
    5761        $this->_initScript();
     62
     63        require_once 'lib/AdsbxAdmin.php';
     64        require_once 'lib/Shortcode.php';
     65        $this->AdsbxAdmin_obj = new AdsbxAdmin($this);
     66        new Shortcode($this);
    5867    }
    5968
     
    91100) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;';
    92101        $wpdb->query($sql3);
     102
     103
     104        $sql4 = 'CREATE TABLE if not exists `' . $wpdb->prefix . 'products_banner_blog` (
     105            `id` int(11) NOT NULL AUTO_INCREMENT,
     106  `name` varchar(255) NOT NULL default "",
     107  `image_url` varchar(255) NOT NULL default "",
     108  `regular_price` varchar(25) NOT NULL default "",
     109  `price` varchar(25) NOT NULL default "",
     110  `title` varchar(255) NOT NULL default "",
     111  `desc` text default null,
     112  `shop_btn_text` varchar(255) NOT NULL default "",
     113  `shop_btn_link` varchar(1000) NOT NULL default "",
     114  `sub_btn_text` varchar(255) NOT NULL default "",
     115  `sub_btn_link` varchar(1000) NOT NULL default "",
     116  `added_by` int(11) not null default 0,
     117  `added_date` datetime default null,
     118  `updated_by` int(11) not null default 0,
     119  `updated_date` datetime default null,
     120 
     121  PRIMARY KEY (`id`)
     122) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;';
     123        $wpdb->query($sql4);
    93124       
    94125    }
     
    266297    {
    267298        add_menu_page( 'Xtoool Ads Box', 'Xtoool Ads Box', 'manage_options', 'product_list', [&$this, 'productList'] );
     299        add_submenu_page( 'product_list', 'Add Banner Ad', 'Add Banner Ad', 'manage_options', 'add_bannder_ad', [$this->AdsbxAdmin_obj, 'add_bannder_ad'] );
     300        add_submenu_page( 'product_list', 'Banner Ad List', 'Banner Ad List', 'manage_options', 'bannder_ad_list', [$this->AdsbxAdmin_obj, 'bannder_ad_list'] );
    268301        add_submenu_page( 'product_list', 'Add product', 'Add product', 'manage_options', 'add_product', [&$this, 'addProduct'] );
    269302        add_submenu_page( 'product_list', 'products List', 'products List', 'manage_options', 'products_list_show', [&$this, 'productsShowList'] );
Note: See TracChangeset for help on using the changeset viewer.