Plugin Directory

Changeset 2977874


Ignore:
Timestamp:
10/12/2023 01:53:28 AM (2 years ago)
Author:
mediajel
Message:

refactor code and update information of plugin mj tracker

Location:
mediajel-tracker/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • mediajel-tracker/trunk/README.txt

    r2959739 r2977874  
    1 === Campaign KPI tracker ===
     1=== MJ Tracker ===
    22Contributors: Performance Advertising Company
    33Tags: universal tracker, mvp, header script
     
    55Tested up to: 6.2
    66Requires PHP: 7.0
    7 Stable tag: 1.2.2
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313== Description ==
     14
     15This plugin is using our services (https://www.mediajel.com/) to provide unique solutions Human+Data approach to tough digital marketing categories.
     16
    1417This plugin will provide a section in WP Admin dashboard where Performance Advertising Company clients can save some specific details that are needed for identifying, tracking or monitoring performance of their websites.
    1518
     
    1821The plugin adds a specified script in the head section of each page which includes the details provided by the client on the settings, like the APP ID. The script will be used for specific analytics and tracking performace of their websites.
    1922
     23Services: https://www.mediajel.com/
     24Privacy Policy: https://mediajel.io/privacy-policy
     25Terms of Use: https://www.mediajel.com/terms/
     26
    2027== Installation ==
    21 Install Campaign KPI tracker like you would install any other WordPress plugin.
     28Install MJ Tracker like you would install any other WordPress plugin.
    2229
    2330Dashboard Method:
    2431
    25321. Login to your Wordpress Admin dashboard, and select Plugins -> Add New from the dashboard menu.
    26 2. Input \"Campaign KPI tracker\" in the search bar and select Campaign KPI tracker from the list of plugins.
     332. Input \"MJ Tracker\" in the search bar and select MJ Tracker from the list of plugins.
    27343. Click \"Install\", and then click on \"Activate Plugin\".
    2835
    2936Upload Method:
    3037
    31 1. Unzip the plugin and upload the \"campaign-kpi-tracker\" folder to your \'wp-content/plugins\' directory.
     381. Unzip the plugin and upload the \"mj-tracker\" folder to your \'wp-content/plugins\' directory.
    32392. Login to your Wordpress Admin dashboard, and go to Plugins page.
    33 3. Look for the Campaign KPI tracker from the list of plugins, the click on Activate.
     403. Look for the MJ Tracker from the list of plugins, the click on Activate.
    3441
    3542After plugin is activated:
    36 1. Once the plugin is activated, you should see the \\\'Campaign KPI tracker\\\' menu just below the \\\'Dashboard\\\' menu. Click that menu, and should be taken to a page for the Campaign KPI tracker.
     431. Once the plugin is activated, you should see the \\\'MJ Tracker\\\' menu just below the \\\'Dashboard\\\' menu. Click that menu, and should be taken to a page for the MJ Tracker.
    37442. Under the Universal Tracker (MVP) section, input the APP ID that will be provided to you by Performance Advertising Company. Then also tick the option if your site is on testing mode, if not, then just leave it unselected.
    38453. Click on \\\'Save Changes\\\' button, and you\\\'re all set.
     
    4552The APP ID for the Universal Tracker will be provided to you by Performance Advertising Company. You can contact us or reach-out to us if you don\'t have your APP ID yet.
    4653
    47 = I don\'t have an APP ID yet, can I already install the Campaign KPI tracker plugin? =
     54= I don\'t have an APP ID yet, can I already install the MJ Tracker plugin? =
    4855Even if you don\'t have your APP ID yet, you can already install the plugin already on the website and add your details later on.
    4956
     
    5562
    5663== Screenshots ==
    57 1. The Campaign KPI tracker menu being added on the WP Dashboard menu after plugin is activated
     641. The MJ Tracker menu being added on the WP Dashboard menu after plugin is activated
    58652. The Universal Tracker settings section
    5966
    6067== Changelog ==
     68
     69= 1.3.0 =
     70
     71*Release Date - 12 Oct 2023*
     72
     73*Refactor code and information
    6174
    6275= 1.2.2 =
     
    6679*Update information
    6780
    68 = 1.2.2 =
     81= 1.2.1 =
    6982
    7083*Release Date - 02 Aug 2023*
     
    8598*Release Date - 06 January 2022*
    8699
    87 *The name of the plugin has been changed to Campaign KPI tracker, and all references to files and code has also been updated.to use campaign-kpi-tracker.
     100*The name of the plugin has been changed to MJ Tracker, and all references to files and code has also been updated.to use mj-tracker.
    88101
    89102= 1.1.1 =
    90103*Release Date - 06 January 2022*
    91104
    92 *Changed the name of the plugin to Campaign KPI tracker
     105*Changed the name of the plugin to MJ Tracker
    93106
    94107= 1.1.0 =
  • mediajel-tracker/trunk/admin/class-mj-tracker-admin.php

    r2959739 r2977874  
    77 * enqueue the admin-specific stylesheet and JavaScript.
    88 *
    9  * @package    Campaign KPI tracker
    10  * @subpackage campaign-kpi-tracker/admin
     9 * @package    MJ Tracker
     10 * @subpackage mj-tracker/admin
    1111 * @author     Performance Advertising Company
    1212 */
    13 class MJ_Tracker_Admin {
     13class MJ_Tracker_Admin
     14{
    1415
    1516    /**
    1617     * The ID of this plugin.
    1718     *
    18      * @since    1.2.2
     19     * @since    1.3.0
    1920     * @access   private
    2021     * @var      string    $MJ_Tracker    The ID of this plugin.
     
    2526     * The version of this plugin.
    2627     *
    27      * @since    1.2.2
     28     * @since    1.3.0
    2829     * @access   private
    2930     * @var      string    $version    The current version of this plugin.
     
    3435     * All options for the Performance Advertising Company scripts.
    3536     *
    36      * @since    1.2.2
     37     * @since    1.3.0
    3738     * @access   private
    38      * @var      array    $campaign_kpi_tracker_options    An array of options for the Performance Advertising Company Scripts.
    39      */
    40     private $campaign_kpi_tracker_options;
     39     * @var      array    $mj_tracker_options    An array of options for the Performance Advertising Company Scripts.
     40     */
     41    private $mj_tracker_options;
    4142
    4243    /**
    4344     * Initialize the class and set its properties.
    4445     *
    45      * @since    1.2.2
     46     * @since    1.3.0
    4647     * @param      string    $MJ_Tracker       The name of this plugin.
    4748     * @param      string    $version    The version of this plugin.
    4849     */
    49     public function __construct( $MJ_Tracker, $version ) {
     50    public function __construct($MJ_Tracker, $version)
     51    {
    5052
    5153        $this->MJ_Tracker = $MJ_Tracker;
     
    5759     * Register the stylesheets for the admin area.
    5860     *
    59      * @since    1.2.2
    60      */
    61     public function enqueue_styles() {
     61     * @since    1.3.0
     62     */
     63    public function enqueue_styles()
     64    {
    6265
    6366        /**
     
    7376         */
    7477
    75         wp_enqueue_style( $this->MJ_Tracker, plugin_dir_url( __FILE__ ) . 'css/campaign-kpi-tracker-admin.css', array(), $this->version, 'all' );
     78        wp_enqueue_style($this->MJ_Tracker, plugin_dir_url(__FILE__) . 'css/mj-tracker-admin.css', array(), $this->version, 'all');
    7679
    7780    }
     
    8083     * Register the JavaScript for the admin area.
    8184     *
    82      * @since    1.2.2
    83      */
    84     public function enqueue_scripts() {
     85     * @since    1.3.0
     86     */
     87    public function enqueue_scripts()
     88    {
    8589
    8690        /**
     
    96100         */
    97101
    98         wp_enqueue_script( $this->MJ_Tracker, plugin_dir_url( __FILE__ ) . 'js/campaign-kpi-tracker-admin.js', array( 'jquery' ), $this->version, false );
    99 
    100     }
    101 
    102     /**
    103      * Add the Campaign KPI tracker page
    104      *
    105      * @since    1.2.2
    106      */
    107 
    108    
    109 
    110     public function jpb_add_kpi_page() {
    111        
     102        wp_enqueue_script($this->MJ_Tracker, plugin_dir_url(__FILE__) . 'js/mj-tracker-admin.js', array('jquery'), $this->version, false);
     103
     104    }
     105
     106    /**
     107     * Add the MJ Tracker page
     108     *
     109     * @since    1.3.0
     110     */
     111
     112
     113
     114    public function pixel_add_kpi_page()
     115    {
     116
    112117        add_menu_page(
    113             'Campaign KPI tracker', // page_title
    114             'Campaign KPI tracker', // menu_title
    115             'manage_options', // capability
    116             'campaign-kpi-tracker', // menu_slug
    117             array( $this, 'jpb_campaign_kpi_tracker_create_admin_page' ), // function
    118             'dashicons-admin-generic', // icon_url
     118            'MJ Tracker',
     119            // page_title
     120            'MJ Tracker',
     121            // menu_title
     122            'manage_options',
     123            // capability
     124            'mj-tracker',
     125            // menu_slug
     126            array($this, 'pixel_mj_tracker_create_admin_page'),
     127            // function
     128            'dashicons-admin-generic',
     129            // icon_url
    119130            2 // position
    120131        );
    121        
    122     }
    123 
    124     public function jpb_campaign_kpi_tracker_create_admin_page() {
    125         $this->campaign_kpi_tracker_options = get_option( 'campaign_kpi_tracker_option_name' ); ?>
     132
     133    }
     134
     135    public function pixel_mj_tracker_create_admin_page()
     136    {
     137        $this->mj_tracker_options = get_option('mj_tracker_option_name'); ?>
    126138
    127139        <div class="wrap">
    128             <h2>Campaign KPI tracker</h2>
     140            <h2>MJ Tracker</h2>
    129141            <p></p>
    130142            <?php settings_errors(); ?>
     
    132144            <form method="post" action="options.php">
    133145                <?php
    134                     settings_fields( 'campaign_kpi_tracker_option_group' );
    135                     do_settings_sections( 'campaign-kpi-tracker-admin' );
    136                     submit_button();
     146                settings_fields('mj_tracker_option_group');
     147                do_settings_sections('mj-tracker-admin');
     148                submit_button();
    137149                ?>
    138150            </form>
     
    143155     * Add the setting sections and fields
    144156     *
    145      * @since    1.2.2
    146      */
    147 
    148 
    149     public function jpb_register_settings() {
    150        
     157     * @since    1.3.0
     158     */
     159
     160
     161    public function pixel_register_settings()
     162    {
     163
    151164        register_setting(
    152             'campaign_kpi_tracker_option_group', // option_group
    153             'campaign_kpi_tracker_option_name', // option_name
    154             array( $this, 'jpb_campaign_kpi_tracker_sanitize' ) // sanitize_callback
     165            'mj_tracker_option_group',
     166            // option_group
     167            'mj_tracker_option_name',
     168            // option_name
     169            array($this, 'pixel_mj_tracker_sanitize') // sanitize_callback
    155170        );
    156171
    157172        add_settings_section(
    158             'Tracker_setting_section', // id
    159             'Universal Tracker (MVP)', // title
    160             array( $this, 'jpb_Tracker_section_info' ), // callback
    161             'campaign-kpi-tracker-admin' // page
     173            'Tracker_setting_section',
     174            // id
     175            'Universal Tracker (MVP)',
     176            // title
     177            array($this, 'pixel_Tracker_section_info'),
     178            // callback
     179            'mj-tracker-admin' // page
    162180        );
    163181
    164182        add_settings_field(
    165             'jpb_Tracker_app_id', // id
    166             'APP ID', // title
    167             array( $this, 'jpb_Tracker_app_id_callback' ), // callback
    168             'campaign-kpi-tracker-admin', // page
     183            'pixel_Tracker_app_id',
     184            // id
     185            'APP ID',
     186            // title
     187            array($this, 'pixel_Tracker_app_id_callback'),
     188            // callback
     189            'mj-tracker-admin',
     190            // page
    169191            'Tracker_setting_section' // section
    170192        );
    171193
    172194        add_settings_field(
    173             'jpb_Tracker_cart', // id
    174             'Cart', // title
    175             array( $this, 'jpb_Tracker_cart_callback' ), // callback
    176             'campaign-kpi-tracker-admin', // page
     195            'pixel_Tracker_cart',
     196            // id
     197            'Cart',
     198            // title
     199            array($this, 'pixel_Tracker_cart_callback'),
     200            // callback
     201            'mj-tracker-admin',
     202            // page
    177203            'Tracker_setting_section' // section
    178204        );
     
    180206    }
    181207
    182     public function jpb_campaign_kpi_tracker_sanitize($input) {
     208    public function pixel_mj_tracker_sanitize($input)
     209    {
    183210        $sanitary_values = array();
    184         if ( isset( $input['jpb_Tracker_app_id'] ) ) {
    185             $sanitary_values['jpb_Tracker_app_id'] = sanitize_text_field( $input['jpb_Tracker_app_id'] );
    186         }
    187 
    188         if ( isset( $input['jpb_Tracker_cart'] ) ) {
    189             $sanitary_values['jpb_Tracker_cart'] =  $input['jpb_Tracker_cart'];
    190         }
    191 
    192         if ( isset( $input['jpb_Tracker_testing'] ) ) {
    193             $sanitary_values['jpb_Tracker_testing'] = $input['jpb_Tracker_testing'];
     211        if (isset($input['pixel_Tracker_app_id'])) {
     212            $sanitary_values['pixel_Tracker_app_id'] = sanitize_text_field($input['pixel_Tracker_app_id']);
     213        }
     214
     215        if (isset($input['pixel_Tracker_cart'])) {
     216            $sanitary_values['pixel_Tracker_cart'] = $input['pixel_Tracker_cart'];
     217        }
     218
     219        if (isset($input['pixel_Tracker_testing'])) {
     220            $sanitary_values['pixel_Tracker_testing'] = $input['pixel_Tracker_testing'];
    194221        }
    195222
     
    197224    }
    198225
    199     public function jpb_Tracker_section_info() {
    200        
    201     }
    202 
    203     public function jpb_Tracker_app_id_callback() {
     226    public function pixel_Tracker_section_info()
     227    {
     228
     229    }
     230
     231    public function pixel_Tracker_app_id_callback()
     232    {
    204233        printf(
    205             '<input class="regular-text" type="text" name="campaign_kpi_tracker_option_name[jpb_Tracker_app_id]" id="jpb_Tracker_app_id" value="%s">',
    206             isset( $this->campaign_kpi_tracker_options['jpb_Tracker_app_id'] ) ? esc_attr( $this->campaign_kpi_tracker_options['jpb_Tracker_app_id']) : ''
    207         );
    208     }
    209 
    210     public function jpb_Tracker_cart_callback() {
    211 
    212         $selected_0 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "none" ? "selected" : "" ;
    213 
    214         $selected_1 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "jane" ? "selected" : "" ;
    215        
    216         $selected_2 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "dutchie-subdomain" ? "selected" : ""  ;
    217        
    218         $selected_3 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "dutchie-iframe" ? "selected" : "" ;
    219        
    220         $selected_4 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "meadow" ? "selected" : "" ;
    221        
    222         $selected_5 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "tymber" ? "selected" : "" ;
    223        
    224         $selected_6 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "woocommerce" ? "selected" : ""    ;
    225        
    226         $selected_7 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "greenrush" ? "selected" : "" ;
    227        
    228         $selected_8 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "buddi" ? "selected" : "";
    229 
    230         $selected_9 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "shopify" ? "selected" : ""    ;
    231        
    232         $selected_10 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "lightspeed" ? "selected" : "" ;
    233        
    234         $selected_11 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "olla" ? "selected" : "";
    235 
    236         $selected_12 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "grassdoor" ? "selected" : "";
    237 
    238         $selected_13 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "wefunder" ? "selected" : "";
    239 
    240         $selected_14 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "ecwid" ? "selected" : "";
    241 
    242         $selected_15 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "square" ? "selected" : "";
    243 
    244         $selected_16 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "dutchieplus" ? "selected" : "";
    245 
    246         $selected_17 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "webjoint" ? "selected" : "";
    247 
    248         $selected_18 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "sticky-leaf" ? "selected" : "";
    249 
    250         $selected_19 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "dispense" ? "selected" : "";
    251 
    252         $selected_20 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "bigcommerce" ? "selected" : "";
    253 
    254         $selected_21 = isset( $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] ) && $this->campaign_kpi_tracker_options["jpb_Tracker_cart"] == "yotpo" ? "selected" : "";
    255 
    256 
    257         echo '<select name="campaign_kpi_tracker_option_name[jpb_Tracker_cart]" id="jpb_Tracker_cart">
    258         <option value="none" '. $selected_0 .'>none</option>
    259         <option value="jane" '. $selected_1 .'>jane</option>
    260         <option value="dutchie-subdomain" '. $selected_2 .'>dutchie-subdomain</option>
    261         <option value="dutchie-iframe" '. $selected_3 .'>dutchie-iframe</option>
    262         <option value="meadow" '. $selected_4 .'>meadow</option>
    263         <option value="tymber" '. $selected_5 .'>tymber</option>
    264         <option value="woocommerce" '. $selected_6 .'>woocommerce</option>
    265         <option value="greenrush" '. $selected_7 .'>greenrush</option>
    266         <option value="buddi" '. $selected_8 .'>buddi</option>
    267         <option value="shopify" '. $selected_9 .'>shopify</option>
    268         <option value="lightspeed" '. $selected_10 .'>lightspeed</option>
    269         <option value="olla" '. $selected_11 .'>olla</option>
    270         <option value="grassdoor" '. $selected_12 .'>grassdoor</option>
    271         <option value="wefunder" '. $selected_13 .'>wefunder</option>
    272         <option value="ecwid" '. $selected_14 .'>ecwid</option>
    273         <option value="square" '. $selected_15 .'>square</option>
    274         <option value="dutchieplus" '. $selected_16 .'>dutchieplus</option>
    275         <option value="webjoint" '. $selected_17 .'>webjoint</option>
    276         <option value="sticky-leaf" '. $selected_18 .'>sticky-leaf</option>
    277         <option value="dispense" '. $selected_19 .'>dispense</option>
    278         <option value="bigcommerce" '. $selected_20 .'>bigcommerce</option>
    279         <option value="yotpo" '. $selected_21 .'>yotpo</option></select>';
    280            
     234            '<input class="regular-text" type="text" name="mj_tracker_option_name[pixel_Tracker_app_id]" id="pixel_Tracker_app_id" value="%s">',
     235            isset($this->mj_tracker_options['pixel_Tracker_app_id']) ? esc_attr($this->mj_tracker_options['pixel_Tracker_app_id']) : ''
     236        );
     237    }
     238
     239    public function pixel_Tracker_cart_callback()
     240    {
     241
     242        $options = array(
     243            "none" => "none",
     244            "jane" => "jane",
     245            "dutchie-subdomain" => "dutchie-subdomain",
     246            "dutchie-iframe" => "dutchie-iframe",
     247            "meadow" => "meadow",
     248            "tymber" => "tymber",
     249            "woocommerce" => "woocommerce",
     250            "greenrush" => "greenrush",
     251            "buddi" => "buddi",
     252            "shopify" => "shopify",
     253            "lightspeed" => "lightspeed",
     254            "olla" => "olla",
     255            "grassdoor" => "grassdoor",
     256            "wefunder" => "wefunder",
     257            "ecwid" => "ecwid",
     258            "square" => "square",
     259            "dutchieplus" => "dutchieplus",
     260            "webjoint" => "webjoint",
     261            "sticky-leaf" => "sticky-leaf",
     262            "dispense" => "dispense",
     263            "bigcommerce" => "bigcommerce",
     264            "yotpo" => "yotpo"
     265        );
     266   
     267        $selected = isset($this->mj_tracker_options["pixel_Tracker_cart"]) ? $this->mj_tracker_options["pixel_Tracker_cart"] : "none";
     268   
     269        echo '<select name="mj_tracker_option_name[pixel_Tracker_cart]" id="pixel_Tracker_cart">';
     270        foreach ($options as $value => $label) {
     271            $selected_attr = selected($selected, $value, false);
     272            echo '<option value="' . esc_attr($value) . '" ' . $selected_attr . '>' . esc_html($label) . '</option>';
     273        }
     274        echo '</select>';
     275
    281276    }
    282277
  • mediajel-tracker/trunk/admin/partials/campaign-kpi-tracker-admin-display.php

    r2959739 r2977874  
    77 *
    88 * @link       http://www.google.com
    9  * @since      1.2.2
     9 * @since      1.3.0
    1010 *
    11  * @package    Campaign KPI tracker
    12  * @subpackage campaign-kpi-tracker/admin/partials
     11 * @package    MJ Tracker
     12 * @subpackage mj-tracker/admin/partials
    1313 */
    1414?>
  • mediajel-tracker/trunk/campaign-kpi-tracker.php

    r2959739 r2977874  
    22
    33/**
    4  * @package          Campaign KPI tracker
     4 * @package          MJ Tracker
    55 *
    6  * Plugin Name:       Campaign KPI tracker
    7  * Plugin URI:        https://wordpress.org/plugins/campaign-kpi-tracker
    8  * Description:       Custom settings page for Campaign KPI tracker
    9  * Version:           1.2.2
     6 * Plugin Name:       MJ Tracker
     7 * Plugin URI:        https://wordpress.org/plugins/campaign-performance-tracker
     8 * Description:       Custom settings page for MJ Tracker
     9 * Version:           1.3.0
    1010 * Author:            Performance Advertising Company
    11  * Author URI:        https://wordpress.org/plugins/campaign-kpi-tracker
     11 * Author URI:        https://google.com
    1212 * License:           GPLv2 or later
    1313 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    2525 *
    2626 */
    27 define( 'MJ_Tracker_VERSION', '1.2.2' );
     27define( 'MJ_Tracker_VERSION', '1.3.0' );
    2828
    2929/**
     
    3131 * This action is documented in includes/class-mj-tracker-activator.php
    3232 */
    33 function activate_mj_tracker() {
     33function mj_on_tracker() {
    3434    require_once plugin_dir_path( __FILE__ ) . 'includes/class-mj-tracker-activator.php';
    3535    MJ_Tracker_Activator::activate();
     
    4040 * This action is documented in includes/class-plugin-name-deactivator.php
    4141 */
    42 function deactivate_mj_tracker() {
     42function mj_off_tracker() {
    4343    require_once plugin_dir_path( __FILE__ ) . 'includes/class-mj-tracker-deactivator.php';
    4444    MJ_Tracker_Deactivator::deactivate();
    4545}
    4646
    47 register_activation_hook( __FILE__, 'activate_mj_tracker' );
    48 register_deactivation_hook( __FILE__, 'deactivate_mj_tracker' );
     47register_activation_hook( __FILE__, 'mj_on_tracker' );
     48register_deactivation_hook( __FILE__, 'mj_off_tracker' );
    4949
    5050/**
     
    6161 * not affect the page life cycle.
    6262 *
    63  * @since  1.2.2
     63 * @since  1.3.0
    6464 */
    65 function run_mj_tracker() {
     65function mj_pixel_tracker() {
    6666
    6767    $plugin = new mj_tracker();
     
    6969
    7070}
    71 run_mj_tracker();
     71mj_pixel_tracker();
  • mediajel-tracker/trunk/includes/class-mj-tracker-activator.php

    r2959739 r2977874  
    77 *
    88 * @since      1.1.2
    9  * @package    Campaign KPI tracker
    10  * @subpackage campaign-kpi-tracker/includes
     9 * @package    MJ Tracker
     10 * @subpackage mj-tracker/includes
    1111 * @author     Performance Advertising Company
    1212 */
  • mediajel-tracker/trunk/includes/class-mj-tracker-deactivator.php

    r2959739 r2977874  
    66 * This class defines all code necessary to run during the plugin's deactivation.
    77 *
    8  * @since      1.2.2
     8 * @since      1.3.0
    99 *
    10  * @package    Campaign KPI tracker
    11  * @subpackage campaign-kpi-tracker/includes
     10 * @package    MJ Tracker
     11 * @subpackage mj-tracker/includes
    1212 * @author     Performance Advertising Company
    1313 */
     
    1919     * Long Description.
    2020     *
    21      * @since    1.2.2
     21     * @since    1.3.0
    2222     */
    2323    public static function deactivate() {
  • mediajel-tracker/trunk/includes/class-mj-tracker-i18n.php

    r2959739 r2977874  
    88 *
    99 * @link       https://www.google.com
    10  * @since      1.2.2
     10 * @since      1.3.0
    1111 *
    1212 * @package    MJ_Settings
     
    2020 * so that it is ready for translation.
    2121 *
    22  * @since      1.2.2
    23  * @package    Campaign KPI tracker
    24  * @subpackage campaign-kpi-tracker/includes
     22 * @since      1.3.0
     23 * @package    MJ Tracker
     24 * @subpackage mj-tracker/includes
    2525 * @author     Performance Advertising Company
    2626 */
     
    3131     * Load the plugin text domain for translation.
    3232     *
    33      * @since    1.2.2
     33     * @since    1.3.0
    3434     */
    3535    public function load_plugin_textdomain() {
     
    3838            'mj-tracker',
    3939            false,
    40             dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
     40            plugin_dir_path(__FILE__) . 'languages/'
    4141        );
    4242
  • mediajel-tracker/trunk/includes/class-mj-tracker-loader.php

    r2959739 r2977874  
    88 * run function to execute the list of actions and filters.
    99 *
    10  * @package    Campaign KPI tracker
    11  * @subpackage campaign-kpi-tracker/includes
     10 * @package    MJ Tracker
     11 * @subpackage mj-tracker/includes
    1212 * @author     Performance Advertising Company
    1313 */
  • mediajel-tracker/trunk/includes/class-mj-tracker.php

    r2959739 r2977874  
    1111 *
    1212 * @since      1.1.2
    13  * @package    Campaign KPI tracker
    14  * @subpackage campaign-kpi-tracker/includes
     13 * @package    MJ Tracker
     14 * @subpackage mj-tracker/includes
    1515 * @author     Performance Advertising Company
    1616 */
     
    145145        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    146146
    147         $this->loader->add_action( 'admin_init', $plugin_admin, 'jpb_register_settings' );
    148         $this->loader->add_action( 'admin_menu', $plugin_admin, 'jpb_add_kpi_page' );
     147        $this->loader->add_action( 'admin_init', $plugin_admin, 'pixel_register_settings' );
     148        $this->loader->add_action( 'admin_menu', $plugin_admin, 'pixel_add_kpi_page' );
    149149       
    150150       
     
    166166        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    167167
    168         $this->loader->add_action( 'wp_head', $plugin_public, 'jpb_display_Settings', -1000 );
     168        $this->loader->add_action( 'wp_head', $plugin_public, 'pixel_display_Settings', -1000 );
    169169
    170170    }
  • mediajel-tracker/trunk/public/class-mj-tracker-public.php

    r2959739 r2977874  
    77 * enqueue the public-facing stylesheet and JavaScript.
    88 *
    9  * @package    Campaign KPI tracker
    10  * @subpackage campaign-kpi-tracker/public
     9 * @package    MJ Tracker
     10 * @subpackage mj-tracker/public
    1111 * @author     Performance Advertising Company
    1212 */
     
    1616     * The ID of this plugin.
    1717     *
    18      * @since    1.2.2
     18     * @since    1.3.0
    1919     * @access   private
    2020     * @var      string    $MJ_Tracker    The ID of this plugin.
     
    2525     * The version of this plugin.
    2626     *
    27      * @since    1.2.2
     27     * @since    1.3.0
    2828     * @access   private
    2929     * @var      string    $version    The current version of this plugin.
     
    3434     * Initialize the class and set its properties.
    3535     *
    36      * @since    1.2.2
     36     * @since    1.3.0
    3737     * @param      string    $MJ_Tracker       The name of the plugin.
    3838     * @param      string    $version    The version of this plugin.
     
    4848     * Register the stylesheets for the public-facing side of the site.
    4949     *
    50      * @since    1.2.2
     50     * @since    1.3.0
    5151     */
    5252    public function enqueue_styles() {
     
    7171     * Register the JavaScript for the public-facing side of the site.
    7272     *
    73      * @since    1.2.2
     73     * @since    1.3.0
    7474     */
    7575    public function enqueue_scripts() {
     
    9494     * Add the script on the header.
    9595     *
    96      * @since    1.2.2
     96     * @since    1.3.0
    9797     */
    98     public function jpb_display_Settings() {
     98    public function pixel_display_Settings() {
    9999
    100100        /**
     
    102102         */
    103103
    104         function custom_head_script() {
     104        function mj_head_script() {
    105105            $environment = '';
    106             $mj_scripts_options = get_option('campaign_kpi_tracker_option_name');
     106            $mj_scripts_options = get_option('mj_tracker_option_name');
    107107
    108             $hs_app_id = $mj_scripts_options['jpb_Tracker_app_id'];
    109             $hs_cart = $mj_scripts_options['jpb_Tracker_cart'];
     108            $hs_app_id = $mj_scripts_options['pixel_Tracker_app_id'];
     109            $hs_cart = $mj_scripts_options['pixel_Tracker_cart'];
    110110
    111111            if ($hs_cart != 'none') {
     
    118118        }
    119119
    120         function woocommerce_tracker()
     120        function mj_pixel_tracker()
    121121        {
    122122            $product = array();
    123123            global $wp_query;
    124             $mj_scripts_options = get_option('campaign_kpi_tracker_option_name');
    125             $hs_cart = $mj_scripts_options['jpb_Tracker_cart'];
     124            $mj_scripts_options = get_option('mj_tracker_option_name');
     125            $hs_cart = $mj_scripts_options['pixel_Tracker_cart'];
    126126
    127127                if ($hs_cart === 'woocommerce') {
     
    154154        }
    155155
    156         add_action('wp_enqueue_scripts', 'custom_head_script');
    157         add_action('wp_head', 'woocommerce_tracker');
     156        add_action('wp_enqueue_scripts', 'mj_pixel_head_script');
     157        add_action('wp_head', 'mj_pixel_tracker');
    158158
    159159    }
  • mediajel-tracker/trunk/public/partials/mj-tracker.php

    r2959739 r2977874  
    99 * @since      1.1.2
    1010 *
    11  * @package    Campaign KPI tracker
    12  * @subpackage campaign-kpi-tracker/public/partials
     11 * @package    MJ Tracker
     12 * @subpackage mj-tracker/public/partials
    1313 */
    1414?>
  • mediajel-tracker/trunk/uninstall.php

    r2959739 r2977874  
    2323 * @since      1.1.2
    2424 *
    25  * @package    Campaign KPI tracker
     25 * @package    MJ Tracker
    2626 */
    2727
Note: See TracChangeset for help on using the changeset viewer.