Plugin Directory

Changeset 2501563


Ignore:
Timestamp:
03/23/2021 09:01:25 AM (5 years ago)
Author:
homanp
Message:

Initiate background process on plugin load.

Location:
request-io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • request-io/tags/1.0/request-io.php

    r2500947 r2501563  
    99 **/
    1010
    11 require_once "vendor/autoload.php";
     11require_once plugin_dir_path( __FILE__ ) . "vendor/autoload.php";
    1212
    1313class Request_IO_Background_Process extends WP_Async_Request {
     
    2727    {
    2828        // Setup background request
    29         add_action('init', array($this, 'create_background_request'));
     29        add_action('plugins_loaded', array($this, 'create_background_request'));
    3030        // Hook into the admin menu
    3131        add_action('admin_menu', array($this, 'create_plugin_settings_page'));
  • request-io/trunk/request-io.php

    r2500947 r2501563  
    99 **/
    1010
    11 require_once "vendor/autoload.php";
     11require_once plugin_dir_path( __FILE__ ) . "vendor/autoload.php";
    1212
    1313class Request_IO_Background_Process extends WP_Async_Request {
     
    2727    {
    2828        // Setup background request
    29         add_action('init', array($this, 'create_background_request'));
     29        add_action('plugins_loaded', array($this, 'create_background_request'));
    3030        // Hook into the admin menu
    3131        add_action('admin_menu', array($this, 'create_plugin_settings_page'));
Note: See TracChangeset for help on using the changeset viewer.