Skip to content
Browse files

clean up: from spaces to tabs

  • Loading branch information...
1 parent 0798a99 commit b819902b6234d28a519a6850ad967cf3efc883c6 franz-josef-kaiser committed
Showing with 363 additions and 345 deletions.
  1. +282 −269 inc/admin.php
  2. +73 −69 inc/core.php
  3. +8 −7 plugin-dirs.php
View
551 inc/admin.php
@@ -1,275 +1,288 @@
<?php
+! defined( 'ABSPATH' ) && exit();
+
+
class CD_APD_Admin
{
-
- /**
- * The container for all of our custom plugins
- */
- protected $plugins = array();
-
- /**
- * What custom actions are we allowed to handle here?
- */
- protected $actions = array();
-
- /**
- * The original count of the plugins
- */
- protected $all_count = 0;
-
- /**
- * constructor
- *
- * @since 0.1
- */
- function __construct()
- {
- add_action( 'load-plugins.php', array( &$this, 'init' ) );
- add_action( 'plugins_loaded', array( &$this, 'setup_actions' ), 1 );
-
- }
-
- /**
- * Sets up which actions we can handle with this plugin. We'll use this
- * to catch activations and deactivations as the normal way won't work
- *
- * @since 0.1
- */
- function setup_actions()
- {
- $tmp = array(
- 'custom_activate',
- 'custom_deactivate'
- );
- $this->actions = apply_filters( 'custom_plugin_actions', $tmp );
- }
-
- /**
- * Makes the magic happen. Loads all the other hooks to modify the
- * plugin list table
- *
- * @since 0.1
- */
- function init()
- {
- global $wp_plugin_directories;
-
- $screen = get_current_screen();
-
- $this->get_plugins();
-
- $this->handle_actions();
-
- add_filter( 'views_' . $screen->id, array( &$this, 'views' ) );
-
- // check to see if we're using one of our custom directories
- if( $this->get_plugin_status() )
- {
- add_filter( 'views_' . $screen->id, array( &$this, 'views_again' ) );
- add_filter( 'all_plugins', array( &$this, 'filter_plugins' ) );
- // TODO: support bulk actions
- add_filter( 'bulk_actions-' . $screen->id, '__return_empty_array' );
- add_filter( 'plugin_action_links', array( &$this, 'action_links' ), 10, 2 );
- add_action( 'admin_enqueue_scripts', array( &$this, 'scripts' ) );
- }
- }
-
- /**
- * Adds our custom plugin directories to the list of plugin types
- *
- * @since 0.1
- */
- function views( $views )
- {
- global $wp_plugin_directories;
-
- // bail if we don't have any extra dirs
- if( empty( $wp_plugin_directories ) ) return $views;
-
- // Add our directories to the action links
- foreach( $wp_plugin_directories as $key => $info )
- {
- if( ! count( $this->plugins[$key] ) ) continue;
- $class = $this->get_plugin_status() == $key ? ' class="current" ' : '';
- $views[$key] = sprintf(
- '<a href="%s"' . $class . '>%s <span class="count">(%d)</span></a>',
- add_query_arg( 'plugin_status', $key, 'plugins.php' ),
- esc_html( $info['label'] ),
- count( $this->plugins[$key] )
- );
- }
- return $views;
- }
-
- /**
- * Unset inactive plugin link as it doesn't really work for this view
- */
- function views_again( $views )
- {
- if( isset( $views['inactive'] ) ) unset( $views['inactive'] );
- return $views;
- }
-
- /**
- * Filters the plugins list to include all the plugins in our custom directory
- */
- function filter_plugins( $plugins )
- {
- if( $key = $this->get_plugin_status() )
- {
- $this->all_count = count( $plugins );
- $plugins = $this->plugins[$key];
- }
- return $plugins;
- }
-
- /**
- * Correct some action links so we can actually "activate" plugins
- */
- function action_links( $links, $plugin_file )
- {
- $context = $this->get_plugin_status();
-
- // let's just start over
- $links = array();
- $links['activate'] = sprintf(
- '<a href="%s" title="Activate this plugin">%s</a>',
- wp_nonce_url( 'plugins.php?action=custom_activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . esc_attr( $context ), 'custom_activate-' . $plugin_file ),
- __( 'Activate' )
- );
-
- $active = get_option( 'active_plugins_' . $context, array() );
- if( in_array( $plugin_file, $active ) )
- {
- $links['deactivate'] = sprintf(
- '<a href="%s" title="Deactivate this plugin" class="cd-apd-deactivate">%s</a>',
- wp_nonce_url( 'plugins.php?action=custom_deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . esc_attr( $context ), 'custom_deactivate-' . $plugin_file ),
- __( 'Deactivate' )
- );
- }
- return $links;
- }
-
- /**
- * Enqueues on JS file for fun hacks
- *
- * @since 0.1
- * @uses wp_enqueue_script
- */
- function scripts()
- {
- wp_enqueue_script(
- 'cd-apd-js',
- CD_APD_URL . 'js/apd.js',
- array( 'jquery' ),
- null
- );
- wp_localize_script(
- 'cd-apd-js',
- 'cd_apd',
- array(
- 'count' => esc_js( $this->all_count )
- )
- );
- }
-
- /**
- * Fetch all the custom plugins we have!
- *
- * @since 0.1
- * @uses cd_adp_get_plugins To fetch all the custom plugins
- */
- function get_plugins()
- {
- global $wp_plugin_directories;
- if( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
- foreach( array_keys( $wp_plugin_directories ) as $key )
- {
- $this->plugins[$key] = cd_apd_get_plugins( $key );
- }
- }
-
- /**
- * Handle activations and deactivations as the standard way will
- * fail with "plugin file does not exist
- *
- * @since 0.1
- */
- function handle_actions()
- {
- $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
-
- // not allowed to handle this action? bail.
- if( ! in_array( $action, $this->actions ) ) return;
-
- // Get the plugin we're going to activate
- $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : false;
- if( ! $plugin ) return;
-
- $context = $this->get_plugin_status();
-
- switch( $action )
- {
- case 'custom_activate':
- if( ! current_user_can('activate_plugins') )
- wp_die( __('You do not have sufficient permissions to manage plugins for this site.') );
-
- check_admin_referer( 'custom_activate-' . $plugin );
-
- $result = cd_apd_activate_plugin( $plugin, $context );
- if ( is_wp_error( $result ) )
- {
- if ( 'unexpected_output' == $result->get_error_code() )
- {
- $redirect = add_query_arg( 'plugin_status', $context, self_admin_url( 'plugins.php' ) );
- wp_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) ) ;
- exit();
- }
- else
- {
- wp_die( $result );
- }
- }
-
- wp_redirect( add_query_arg( array( 'plugin_status' => $context, 'activate' => 'true' ), self_admin_url( 'plugins.php' ) ) );
- exit();
- break;
- case 'custom_deactivate':
- if ( ! current_user_can( 'activate_plugins' ) )
- wp_die( __('You do not have sufficient permissions to deactivate plugins for this site.') );
-
- check_admin_referer('custom_deactivate-' . $plugin);
- cd_apd_deactivate_plugins( $plugin, $context );
- if ( headers_sent() )
- echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />";
- else
- wp_redirect( self_admin_url("plugins.php?deactivate=true&plugin_status=$context") );
- exit();
- break;
- default:
- do_action( 'custom_plugin_dir_' . $action );
- break;
- }
-
- }
-
- /**
- * Utility function to get the current `plugin_status` key returns
- * false if our key isn't in the the custom directories
- *
- * @since 0.1
- * @return bool|string False on failure, the `$wp_plugin_directories` key on success
- */
- function get_plugin_status()
- {
- global $wp_plugin_directories;
- $rv = false;
- if( isset( $_GET['plugin_status'] ) && in_array( $_GET['plugin_status'], array_keys( $wp_plugin_directories ) ) )
- {
- $rv = $_GET['plugin_status'];
- }
- return $rv;
- }
+ /**
+ * The container for all of our custom plugins
+ */
+ protected $plugins = array();
+
+ /**
+ * What custom actions are we allowed to handle here?
+ */
+ protected $actions = array();
+
+ /**
+ * The original count of the plugins
+ */
+ protected $all_count = 0;
+
+ /**
+ * constructor
+ *
+ * @since 0.1
+ */
+ public function __construct()
+ {
+ add_action( 'load-plugins.php', array( $this, 'init' ) );
+ add_action( 'plugins_loaded', array( $this, 'setup_actions' ), 1 );
+ }
+
+
+ /**
+ * Sets up which actions we can handle with this plugin. We'll use this
+ * to catch activations and deactivations as the normal way won't work
+ *
+ * @since 0.1
+ */
+ public function setup_actions()
+ {
+ $tmp = array(
+ 'custom_activate',
+ 'custom_deactivate'
+ );
+ $this->actions = apply_filters( 'custom_plugin_actions', $tmp );
+ }
+
+
+ /**
+ * Makes the magic happen. Loads all the other hooks to modify the
+ * plugin list table
+ *
+ * @since 0.1
+ */
+ public function init()
+ {
+ global $wp_plugin_directories;
+
+ $screen = get_current_screen();
+
+ $this->get_plugins();
+
+ $this->handle_actions();
+
+ add_filter( 'views_' . $screen->id, array( &$this, 'views' ) );
+
+ // check to see if we're using one of our custom directories
+ if ( $this->get_plugin_status() )
+ {
+ add_filter( 'views_' . $screen->id, array( &$this, 'views_again' ) );
+ add_filter( 'all_plugins', array( &$this, 'filter_plugins' ) );
+ // TODO: support bulk actions
+ add_filter( 'bulk_actions-' . $screen->id, '__return_empty_array' );
+ add_filter( 'plugin_action_links', array( &$this, 'action_links' ), 10, 2 );
+ add_action( 'admin_enqueue_scripts', array( &$this, 'scripts' ) );
+ }
+ }
+
+
+ /**
+ * Adds our custom plugin directories to the list of plugin types
+ *
+ * @since 0.1
+ */
+ public function views( $views )
+ {
+ global $wp_plugin_directories;
+
+ // bail if we don't have any extra dirs
+ if ( empty( $wp_plugin_directories ) ) return $views;
+
+ // Add our directories to the action links
+ foreach ( $wp_plugin_directories as $key => $info )
+ {
+ if ( ! count( $this->plugins[$key] ) ) continue;
+ $class = $this->get_plugin_status() == $key ? ' class="current" ' : '';
+ $views[$key] = sprintf(
+ '<a href="%s"' . $class . '>%s <span class="count">(%d)</span></a>',
+ add_query_arg( 'plugin_status', $key, 'plugins.php' ),
+ esc_html( $info['label'] ),
+ count( $this->plugins[$key] )
+ );
+ }
+ return $views;
+ }
+
+
+ /**
+ * Unset inactive plugin link as it doesn't really work for this view
+ */
+ public function views_again( $views )
+ {
+ if ( isset( $views['inactive'] ) ) unset( $views['inactive'] );
+ return $views;
+ }
+
+
+ /**
+ * Filters the plugins list to include all the plugins in our custom directory
+ */
+ public function filter_plugins( $plugins )
+ {
+ if ( $key = $this->get_plugin_status() )
+ {
+ $this->all_count = count( $plugins );
+ $plugins = $this->plugins[$key];
+ }
+ return $plugins;
+ }
+
+
+ /**
+ * Correct some action links so we can actually "activate" plugins
+ */
+ public function action_links( $links, $plugin_file )
+ {
+ $context = $this->get_plugin_status();
+
+ // let's just start over
+ $links = array();
+ $links['activate'] = sprintf(
+ '<a href="%s" title="Activate this plugin">%s</a>',
+ wp_nonce_url( 'plugins.php?action=custom_activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . esc_attr( $context ), 'custom_activate-' . $plugin_file ),
+ __( 'Activate' )
+ );
+
+ $active = get_option( 'active_plugins_' . $context, array() );
+ if ( in_array( $plugin_file, $active ) )
+ {
+ $links['deactivate'] = sprintf(
+ '<a href="%s" title="Deactivate this plugin" class="cd-apd-deactivate">%s</a>',
+ wp_nonce_url( 'plugins.php?action=custom_deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . esc_attr( $context ), 'custom_deactivate-' . $plugin_file ),
+ __( 'Deactivate' )
+ );
+ }
+ return $links;
+ }
+
+
+ /**
+ * Enqueues on JS file for fun hacks
+ *
+ * @since 0.1
+ * @uses wp_enqueue_script
+ */
+ public function scripts()
+ {
+ wp_enqueue_script(
+ 'cd-apd-js',
+ CD_APD_URL . 'js/apd.js',
+ array( 'jquery' ),
+ null
+ );
+ wp_localize_script(
+ 'cd-apd-js',
+ 'cd_apd',
+ array(
+ 'count' => esc_js( $this->all_count )
+ )
+ );
+ }
+
+
+ /**
+ * Fetch all the custom plugins we have!
+ *
+ * @since 0.1
+ * @uses cd_adp_get_plugins To fetch all the custom plugins
+ */
+ public function get_plugins()
+ {
+ global $wp_plugin_directories;
+ if ( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
+ foreach ( array_keys( $wp_plugin_directories ) as $key )
+ {
+ $this->plugins[$key] = cd_apd_get_plugins( $key );
+ }
+ }
+
+
+ /**
+ * Handle activations and deactivations as the standard way will
+ * fail with "plugin file does not exist
+ *
+ * @since 0.1
+ */
+ public function handle_actions()
+ {
+ $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
+
+ // not allowed to handle this action? bail.
+ if ( ! in_array( $action, $this->actions ) ) return;
+
+ // Get the plugin we're going to activate
+ $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : false;
+ if ( ! $plugin ) return;
+
+ $context = $this->get_plugin_status();
+
+ switch( $action )
+ {
+ case 'custom_activate':
+ if ( ! current_user_can('activate_plugins') )
+ wp_die( __('You do not have sufficient permissions to manage plugins for this site.') );
+
+ check_admin_referer( 'custom_activate-' . $plugin );
+
+ $result = cd_apd_activate_plugin( $plugin, $context );
+ if ( is_wp_error( $result ) )
+ {
+ if ( 'unexpected_output' == $result->get_error_code() )
+ {
+ $redirect = add_query_arg( 'plugin_status', $context, self_admin_url( 'plugins.php' ) );
+ wp_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) ) ;
+ exit();
+ }
+ else
+ {
+ wp_die( $result );
+ }
+ }
+
+ wp_redirect( add_query_arg( array( 'plugin_status' => $context, 'activate' => 'true' ), self_admin_url( 'plugins.php' ) ) );
+ exit();
+ break;
+
+ case 'custom_deactivate':
+ if ( ! current_user_can( 'activate_plugins' ) )
+ wp_die( __('You do not have sufficient permissions to deactivate plugins for this site.') );
+
+ check_admin_referer('custom_deactivate-' . $plugin);
+ cd_apd_deactivate_plugins( $plugin, $context );
+ if ( headers_sent() )
+ echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />";
+ else
+ wp_redirect( self_admin_url("plugins.php?deactivate=true&plugin_status=$context") );
+ exit();
+ break;
+
+ default:
+ do_action( 'custom_plugin_dir_' . $action );
+ break;
+ }
+
+ }
+
+
+ /**
+ * Utility function to get the current `plugin_status` key returns
+ * false if our key isn't in the the custom directories
+ *
+ * @since 0.1
+ * @return bool|string False on failure, the `$wp_plugin_directories` key on success
+ */
+ public function get_plugin_status()
+ {
+ global $wp_plugin_directories;
+ $rv = false;
+ if ( isset( $_GET['plugin_status'] ) && in_array( $_GET['plugin_status'], array_keys( $wp_plugin_directories ) ) )
+ {
+ $rv = $_GET['plugin_status'];
+ }
+ return $rv;
+ }
} // end class
new CD_APD_Admin();
View
142 inc/core.php
@@ -1,4 +1,7 @@
<?php
+! defined( 'ABSPATH' ) && exit();
+
+
/**
* The central API: registers a new plugin directory
*
@@ -9,18 +12,18 @@
*/
function register_plugin_directory( $key, $dir, $label )
{
- global $wp_plugin_directories;
- if( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
-
- if( ! file_exists( $dir ) && file_exists( trailingslashit( WP_CONTENT_DIR ) . $dir ) )
- {
- $dir = trailingslashit( WP_CONTENT_DIR ) . $dir;
- }
-
- $wp_plugin_directories[$key] = array(
- 'label' => $label,
- 'dir' => $dir
- );
+ global $wp_plugin_directories;
+ if ( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
+
+ if ( ! file_exists( $dir ) && file_exists( trailingslashit( WP_CONTENT_DIR ) . $dir ) )
+ {
+ $dir = trailingslashit( WP_CONTENT_DIR ) . $dir;
+ }
+
+ $wp_plugin_directories[$key] = array(
+ 'label' => $label,
+ 'dir' => $dir
+ );
}
add_action( 'plugins_loaded', 'cd_apd_load_more', 99 );
@@ -31,21 +34,22 @@ function register_plugin_directory( $key, $dir, $label )
*/
function cd_apd_load_more()
{
- global $wp_plugin_directories;
- if( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
- foreach( array_keys( $wp_plugin_directories) as $key )
- {
- $active = get_option( 'active_plugins_' . $key, array() );
- foreach( $active as $a )
- {
- if( file_exists( $wp_plugin_directories[$key]['dir'] . '/' . $a ) )
- {
- include_once( $wp_plugin_directories[$key]['dir'] . '/' . $a );
- }
- }
- }
+ global $wp_plugin_directories;
+ if ( empty( $wp_plugin_directories ) ) $wp_plugin_directories = array();
+ foreach ( array_keys( $wp_plugin_directories) as $key )
+ {
+ $active = get_option( 'active_plugins_' . $key, array() );
+ foreach( $active as $a )
+ {
+ if( file_exists( $wp_plugin_directories[$key]['dir'] . '/' . $a ) )
+ {
+ include_once( $wp_plugin_directories[$key]['dir'] . '/' . $a );
+ }
+ }
+ }
}
+
/**
* Get the valid plugins from the custom directory
*
@@ -55,18 +59,18 @@ function cd_apd_load_more()
*/
function cd_apd_get_plugins( $dir_key )
{
- global $wp_plugin_directories;
-
- // invalid dir key? bail
- if( ! isset( $wp_plugin_directories[$dir_key] ) )
- {
- return array();
- }
- else
- {
- $plugin_root = $wp_plugin_directories[$dir_key]['dir'];
- }
-
+ global $wp_plugin_directories;
+
+ // invalid dir key? bail
+ if ( ! isset( $wp_plugin_directories[$dir_key] ) )
+ {
+ return array();
+ }
+ else
+ {
+ $plugin_root = $wp_plugin_directories[$dir_key]['dir'];
+ }
+
if ( ! $cache_plugins = wp_cache_get( 'plugins', 'plugins') )
$cache_plugins = array();
@@ -129,11 +133,11 @@ function cd_apd_get_plugins( $dir_key )
function cd_apd_activate_plugin( $plugin, $context, $silent = false )
{
$plugin = trim( $plugin );
-
- $redirect = add_query_arg( 'plugin_status', $context, admin_url( 'plugins.php' ) );
- $redirect = apply_filters( 'custom_plugin_redirect', $redirect );
- $current = get_option( 'active_plugins_' . $context, array() );
+ $redirect = add_query_arg( 'plugin_status', $context, admin_url( 'plugins.php' ) );
+ $redirect = apply_filters( 'custom_plugin_redirect', $redirect );
+
+ $current = get_option( 'active_plugins_' . $context, array() );
$valid = cd_apd_validate_plugin( $plugin, $context );
if ( is_wp_error( $valid ) )
@@ -150,9 +154,9 @@ function cd_apd_activate_plugin( $plugin, $context, $silent = false )
do_action( 'custom_activate_' . $plugin, $context );
}
- $current[] = $plugin;
- sort( $current );
- update_option( 'active_plugins_' . $context, $current );
+ $current[] = $plugin;
+ sort( $current );
+ update_option( 'active_plugins_' . $context, $current );
if ( ! $silent ) {
do_action( 'custom_activated_plugin', $plugin, $context );
@@ -176,17 +180,17 @@ function cd_apd_deactivate_plugins( $plugins, $context, $silent = false ) {
$current = get_option( 'active_plugins_' . $context, array() );
foreach ( (array) $plugins as $plugin )
- {
+ {
$plugin = trim( $plugin );
if ( ! in_array( $plugin, $current ) ) continue;
if ( ! $silent )
do_action( 'custom_deactivate_plugin', $plugin, $context );
- $key = array_search( $plugin, $current );
- if ( false !== $key ) {
- array_splice( $current, $key, 1 );
- }
+ $key = array_search( $plugin, $current );
+ if ( false !== $key ) {
+ array_splice( $current, $key, 1 );
+ }
if ( ! $silent ) {
do_action( 'custom_deactivate_' . $plugin, $context );
@@ -194,7 +198,7 @@ function cd_apd_deactivate_plugins( $plugins, $context, $silent = false ) {
}
}
- update_option( 'active_plugins_' . $context, $current );
+ update_option( 'active_plugins_' . $context, $current );
}
@@ -206,30 +210,30 @@ function cd_apd_deactivate_plugins( $plugins, $context, $silent = false ) {
*/
function cd_apd_validate_plugin( $plugin, $context )
{
- $rv = true;
+ $rv = true;
if ( validate_file( $plugin ) )
- {
+ {
$rv = new WP_Error('plugin_invalid', __('Invalid plugin path.'));
- }
-
- global $wp_plugin_directories;
- if( ! isset( $wp_plugin_directories[$context] ) )
- {
- $rv = new WP_Error( 'invalid_context', __( 'The context for this plugin does not exist' ) );
- }
-
- $dir = $wp_plugin_directories[$context]['dir'];
- if( ! file_exists( $dir . '/' . $plugin) )
- {
+ }
+
+ global $wp_plugin_directories;
+ if ( ! isset( $wp_plugin_directories[$context] ) )
+ {
+ $rv = new WP_Error( 'invalid_context', __( 'The context for this plugin does not exist' ) );
+ }
+
+ $dir = $wp_plugin_directories[$context]['dir'];
+ if ( ! file_exists( $dir . '/' . $plugin) )
+ {
$rv = new WP_Error( 'plugin_not_found', __( 'Plugin file does not exist.' ) );
- }
+ }
$installed_plugins = cd_apd_get_plugins( $context );
if ( ! isset($installed_plugins[$plugin]) )
- {
+ {
$rv = new WP_Error( 'no_plugin_header', __('The plugin does not have a valid header.') );
- }
-
- $rv = $dir . '/' . $plugin;
+ }
+
+ $rv = $dir . '/' . $plugin;
return $rv;
-}
+}
View
15 plugin-dirs.php
@@ -1,14 +1,15 @@
<?php
+! defined( 'ABSPATH' ) && exit();
/*
Plugin Name: Additional Plugin Directories
-Plugin URI: http://github.com/chrisguitarugy
+Plugin URI: http://github.com/chrisguitarugy
Description: A framework for adding additional plugin directories to WordPress
-Version: 0.1
-Author: Christopher Davis
-Author URI: http://christopherdavis.me
-License: GPL2
+Version: 0.1
+Author: Christopher Davis
+Author URI: http://christopherdavis.me
+License: GPL2
*/
-! defined( 'ABSPATH' ) && exit();
+
define( 'CD_APD_PATH', plugin_dir_path( __FILE__ ) );
define( 'CD_APD_URL', plugin_dir_url( __FILE__ ) );
@@ -17,5 +18,5 @@
if( is_admin() )
{
- require_once( CD_APD_PATH . 'inc/admin.php' );
+ require_once( CD_APD_PATH . 'inc/admin.php' );
}

0 comments on commit b819902

Please sign in to comment.
Something went wrong with that request. Please try again.