Skip to content

Commit

Permalink
Determine basename from BLUEHOST_PLUGIN_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Feb 29, 2024
1 parent 3c88bf3 commit 7d8868f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public function __construct() {
/* Load i18 files */
\add_action( 'init', array( __CLASS__, 'load_text_domain' ), 100 );
/* Add Links to WordPress Plugins list item. */
\add_filter( 'plugin_action_links_bluehost-wordpress-plugin/bluehost-wordpress-plugin.php', array( __CLASS__, 'actions' ) );
$plugin_basename = defined( 'BLUEHOST_PLUGIN_FILE' )
? plugin_basename( constant( 'BLUEHOST_PLUGIN_FILE' ) )
: 'bluehost-wordpress-plugin/bluehost-wordpress-plugin.php';
\add_filter( "plugin_action_links_{$plugin_basename}", array( __CLASS__, 'actions' ) );
/* Add inline style to hide subnav link */
\add_action( 'admin_head', array( __CLASS__, 'admin_nav_style' ) );

Expand Down

0 comments on commit 7d8868f

Please sign in to comment.