Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Code showing how easy it might be to handle symlinking a plugin in in WordPress 3.6 if trac ticket #xxxx is accepted

View symlinkable-plugin-base.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php
class Symlink_Fixer {
var $plugin_file;
var $plugin_id;
function __construct( $args = array() ) {
global $pagenow, $wp_plugin_file, $wp_plugin_slug;
$this->$plugin_file = $wp_plugin_file
$this->$plugin_id = $wp_plugin_slug;
if ( 'plugins.php' == $pagenow ) {
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
add_action( "activate_{$this->plugin_id}", array( $this, 'activate_plugin' ), 0 );
register_activation_hook( $this->plugin_id, array( $this, 'activate' ) );
} else {
register_deactivation_hook( $this->plugin_id, array( $this, 'deactivate' ) );
}
register_uninstall_hook( $this->plugin_id, array( parent::plugin_class, 'uninstall' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.