Plugin Directory

Changeset 1838239


Ignore:
Timestamp:
03/11/2018 08:51:39 PM (8 years ago)
Author:
LeadBoxer
Message:
  • Fixed bugs and compatibility issues
Location:
leadboxer/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • leadboxer/trunk/init.php

    r1224856 r1838239  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23
    3     // Exit if accessed directly
    4     if ( ! defined( 'ABSPATH' ) ) exit;
     4if ( ! defined( 'LEADBOXER_DIR' ) ) {
     5    define( 'LEADBOXER_DIR', plugin_dir_path( __FILE__ ) );
     6}
    57
    6     /**
    7      * Plugin version
    8      *
    9      * @var string
    10      */
    11 
    12     if ( ! defined( 'LEADBOXER_DIR' ) ) {
    13         define( 'LEADBOXER_DIR', plugin_dir_path( __FILE__ ) );
    14     }
    15 
    16     if ( ! defined( 'LEADBOXER_URL' ) ) {
    17         define( 'LEADBOXER_URL', plugins_url( '/', __FILE__ ) );
    18     }
    19 
     8if ( ! defined( 'LEADBOXER_URL' ) ) {
     9    define( 'LEADBOXER_URL', plugins_url( '/', __FILE__ ) );
     10}
    2011?>
  • leadboxer/trunk/leadboxer.class.php

    r1306257 r1838239  
    11<?php
    2 /**
    3 * The Main class of the  LeadBoxer Plug-in
    4 */
    5 
    62if ( ! defined( 'ABSPATH' ) ) {
    73    exit;
    84}
    95
    10 
     6//The Main class of the  LeadBoxer Plug-in
    117if (!class_exists('Leadboxer')) {
    128    class Leadboxer {
     
    1410        public function __construct() {
    1511
    16             add_action( 'plugins_loaded', array( $this, 'true_load_plugin_textdomain'));
    17             add_action('admin_menu',  array( $this, 'plugin_admin_add_page' ));
    18             add_action( 'wp_enqueue_scripts', array( 'Leadboxer', 'register_plugin_scripts' ) );
    1912        }
    2013
    21         public function register_plugin_scripts() {
     14        public static function register_plugin_scripts() {
    2215
    2316                $dataset = get_option('leadboxer_dataset');
     
    2518
    2619                if ( !is_admin() ) {
    27                     wp_register_script( 'leadboxerscript', '//script.leadboxer.com/?dataset=' . $dataset, array(), null, true);
    28                     wp_enqueue_script( 'leadboxerscript' );
     20                    wp_enqueue_script( 'leadboxerscript', '//script.leadboxer.com/?dataset=' . $dataset, array(), null, true );
    2921                }
    3022        }
     
    3931        public function add_settings() {
    4032
    41                 global $wpdb;
    4233                $option = 'leadboxer_dataset';
    4334                $save = isset($_GET['save']) ?  $_GET['save'] : '';
     
    7162
    7263                </form>
    73                 <p>You can verify a succesfull install by first visiting the homepage of this Wordpress site, then login at <a href="https://product.leadboxer.com?utm_source=wp-plugin">product.leadboxer.com</a><br>
     64                <p>You can verify a succesfull install by first visiting the homepage of this Wordpress site, then login at <a href="https://app.leadboxer.com?utm_source=wp-plugin">app.leadboxer.com</a><br>
    7465                You should see your visit there as a first lead.</p>
    7566
     
    8273        }
    8374
     75
     76       public function run() {
     77
     78            add_action( 'plugins_loaded', array( $this, 'true_load_plugin_textdomain'));
     79            add_action('admin_menu',  array( $this, 'plugin_admin_add_page' ));
     80            add_action( 'wp_enqueue_scripts', array( 'Leadboxer', 'register_plugin_scripts' ) );
     81       }
    8482    }
    8583}
    8684
    87 
    8885?>
  • leadboxer/trunk/leadboxer.php

    r1306239 r1838239  
    11<?php
    2 /**
     2/*
    33 * Plugin Name: LeadBoxer
    4  * Plugin URI: https://www.leadboxer.com?wordPressPlugin
     4 * Plugin URI: https://wordpress.org/plugins/leadboxer/
    55 * Description: LeadBoxer Plugin
     6 * Version: 1.2
    67 * Author: LeadBoxer
    7  * Author URI: https://www.leadboxer.com?wordPressPlugin
    8  * Version: 1.1
    9  *
    10  * Text Domain: leadboxer
    11  */
    12 
    13 /*  Copyright 2015  Elena Karaush  (email: [email protected])
     8 * Author URI:  https://wordpress.org/plugins/leadboxer/
     9 * Text Domain: leadboxer-en
     10 * Domain Path: /languages/
     11 * Copyright 2015  Elena Karaush
    1412
    1513    This program is free software; you can redistribute it and/or modify
     
    2826*/
    2927
     28if ( ! defined( 'WPINC' ) ) {
     29    die;
     30}
    3031/**
    3132defines
     
    3637main plug-in class
    3738*/
    38 require_once ('leadboxer.class.php');
     39require_once plugin_dir_path( __FILE__ ) . 'leadboxer.class.php';
    3940
    4041register_activation_hook( __FILE__, 'leadboxer_activate');
     
    4243register_uninstall_hook( __FILE__, 'leadboxer_uninstall');
    4344
    44 try {
    45     $otApplication = new LeadBoxer();
    46 } catch (Exception $e) {
    47     echo $e->getMessage();
    48 }
     45//Call the Main class of the  LeadBoxer Plug-in
     46$otApplication = new LeadBoxer();
     47$otApplication->run();
    4948
    5049/**
  • leadboxer/trunk/readme.txt

    r1485570 r1838239  
    11=== LeadBoxer  ===
    22Contributors: LeadBoxer
    3 Tags: leads, lead, generation, capture, sales, form tracking, tracker
     3Tags: leads, lead, generation, capture, sales, form tracking, tracker, customer data, identify, identification
    44Requires at least: 3.0.1
    5 Tested up to: 4.6
    6 Stable tag: 1.1
     5Tested up to: 4.9
     6Stable tag: 1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838== Changelog ==
    3939
     40= 1.2 =
     41* Fixed bugs and compatibility issues
     42
    4043= 1.1 =
    4144* fixed incorrect link to settings page
    4245
    4346= 1.0 =
    44 * Initial releaase
     47* Initial release
Note: See TracChangeset for help on using the changeset viewer.