Plugin Directory

Changeset 2184033


Ignore:
Timestamp:
10/31/2019 05:25:48 PM (6 years ago)
Author:
wpdashboard
Message:

Updating to handle custom wp-content routes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-dashboard/trunk/webhooks/lib/class-wpdashboard-plugins.php

    r2183313 r2184033  
    8484     */
    8585    public function plugin_activated($p, $network_activation) {
    86         $plugin = get_plugin_data(ABSPATH . 'wp-content/plugins/' . $p);
     86        $plugin = get_plugin_data(WP_DASHBOARD_PLUGIN_DIRECTORY . $p);
    8787        $body = [
    8888            'plugin' => $p,
     
    110110            if(isset($value->response)) {
    111111                foreach ($value->response AS $plugin => $update) {
    112                     $p = get_plugin_data(ABSPATH . 'wp-content/plugins/' . $plugin);
     112                    $p = get_plugin_data(WP_DASHBOARD_PLUGIN_DIRECTORY . $plugin);
    113113                    $body = [
    114114                        'plugin' => $plugin,
     
    140140        if($hook['type'] == 'plugin' && $hook['action'] != 'install') {
    141141            if(!isset($hook['plugins'])) {
    142                 $plugin = get_plugin_data(ABSPATH . 'wp-content/plugins/' . $hook['plugin']);
     142                $plugin = get_plugin_data(WP_DASHBOARD_PLUGIN_DIRECTORY . $hook['plugin']);
    143143                $body = [
    144144                    'action' => $hook['action'],
     
    151151            } else {
    152152                foreach ($hook['plugins'] AS $p) {
    153                     $plugin = get_plugin_data(ABSPATH . 'wp-content/plugins/' . $p);
     153                    $plugin = get_plugin_data(WP_DASHBOARD_PLUGIN_DIRECTORY . $p);
    154154                    $body = [
    155155                        'action' => $hook['action'],
     
    176176     */
    177177    public function plugin_deactivated($p, $network_deactivation) {
    178         $plugin = get_plugin_data(ABSPATH . 'wp-content/plugins/' . $p);
     178        $plugin = get_plugin_data(WP_DASHBOARD_PLUGIN_DIRECTORY . $p);
    179179        $body = [
    180180            'plugin' => $p,
Note: See TracChangeset for help on using the changeset viewer.