/** * Show a notice if the base addon is not available. * * @since 5.5 */ public function addon_missing_notice() { $campaign_args = array('utm_source' => 'wpadmin', 'utm_campaign' => 'BulkDelete', 'utm_medium' => 'header-notice', 'utm_content' => $this->addon_code); $addon_url = bd_get_addon_url($this->base_addon, $campaign_args); printf('<div class="error"><p>%s</p></div>', sprintf(__('"%s" addon requires "<a href="%s" target="_blank">%s</a>" addon to be installed and activated!', 'bulk-delete'), $this->addon_name, $addon_url, $this->base_addon)); }
/** * Display license information about addon in plugin list table. * * @since 5.5 * @param string $plugin_file Path to the plugin file, relative to the plugins directory. * @param array $plugin_data An array of plugin data. * @param string $status Status of the plugin. */ public function plugin_row($plugin_file, $plugin_data, $status) { if ($plugin_file != $this->plugin_basename) { return; } $campaign_args = array('utm_source' => 'wpadmin', 'utm_campaign' => 'BulkDelete', 'utm_medium' => 'plugin-page', 'utm_content' => strtolower($this->addon_code)); $addon_url = bd_get_addon_url($this->addon_name, $campaign_args); $license_code = BD_License::get_license_code($this->addon_code); if (false == $license_code) { $plugin_row_msg = sprintf(__('Addon is not activated. To activate the addon, please <a href="%1$s">enter your license key</a>. If you don\'t have a license key, then you can <a href="%2$s" target="_blank">purchase one</a>.', 'bulk-delete'), esc_url(get_bloginfo('wpurl') . '/wp-admin/admin.php?page=' . Bulk_Delete::ADDON_PAGE_SLUG), esc_url($addon_url)); ?> <tr class="plugin-update-tr"> <td colspan="3" class="plugin-update"> <div class="update-message"><span class="bd-licence-activate-notice"><?php echo $plugin_row_msg; ?> </span></div> </td> </tr> <?php } else { if (!BD_License::has_valid_license($this->addon_name, $this->addon_code)) { $plugin_row_msg = sprintf(__('The license for this addon is either invalid or has expired. Please <a href="%1$s" target="_blank">renew the license</a> or <a href="%2$s">enter a new license key</a> to receive updates and support.', 'bulk-delete'), esc_url($addon_url), esc_url(get_bloginfo('wpurl') . '/wp-admin/admin.php?page=' . Bulk_Delete::ADDON_PAGE_SLUG)); ?> <tr class="plugin-update-tr"> <td colspan="3" class="plugin-update"> <div class="update-message"><span class="bd-licence-activate-notice"><?php echo $plugin_row_msg; ?> </span></div> </td> </tr> <?php } } }