Plugin Directory

Changeset 3150142


Ignore:
Timestamp:
09/11/2024 01:56:11 PM (19 months ago)
Author:
leadinfo
Message:

Plugin release

Location:
leadinfo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • leadinfo/trunk/leadinfo.php

    r3073251 r3150142  
    3232register_uninstall_hook(__FILE__, 'leadinfo_uninstall');
    3333
     34add_action('rest_api_init', function () {
     35    register_rest_route('/leadinfo/v1', '/tracker_code', array(
     36        'methods' => 'POST',
     37        'callback' => 'add_leadinfo_tracker_code',
     38    ));
     39});
     40
     41function add_leadinfo_tracker_code($data) {
     42    if(empty($data['tracker_code'])){
     43        return;
     44    }
     45
     46    update_option('leadinfo_id', $data['tracker_code']);
     47}
     48
    3449$leadinfo = new Leadinfo();
    3550$leadinfo->run();
  • leadinfo/trunk/readme.txt

    r3125350 r3150142  
    33Tags: leadinfo, lead, leads, b2b
    44Requires at least: 3.0.1
    5 Tested up to: 6.6.1
    6 Stable tag: 1.1
     5Tested up to: 6.4.3
     6Stable tag: 1.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.