mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
Support PHP 5.2.x by dropping dir __DIR__
As per https://github.com/nextgenthemes/advanced-responsive-video-embedder/issues/7 I was informed that this would make my plugin work with PHP 5.2.x. I personally have not tested this code yet but I assume @andrejpavlovic did so I thought if this is the only thing that makes the Boilerplate require PHP 5.3 this might be a good change since WordPress itself only requires PHP 5.2.4.
This commit is contained in:
parent
db289e2284
commit
b744549d3b
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class Plugin_Name_Admin {
|
||||||
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
||||||
|
|
||||||
// Add an action link pointing to the options page.
|
// Add an action link pointing to the options page.
|
||||||
$plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_slug . '.php' );
|
$plugin_basename = plugin_basename( plugin_dir_path( realpath( dirname( __FILE__ ) ) ) . $this->plugin_slug . '.php' );
|
||||||
add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
|
add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue