Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/leadin/public/admin
File: class-pluginactionsmanager.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Leadin\admin;
[2] Fix | Delete
[3] Fix | Delete
use Leadin\data\Filters;
[4] Fix | Delete
use Leadin\admin\Links;
[5] Fix | Delete
use Leadin\admin\Connection;
[6] Fix | Delete
use Leadin\data\Portal_Options;
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Class responsible for the custom functionalities inside the plugins.php page.
[10] Fix | Delete
*/
[11] Fix | Delete
class PluginActionsManager {
[12] Fix | Delete
/**
[13] Fix | Delete
* Class constructor, adds the necessary hooks.
[14] Fix | Delete
*/
[15] Fix | Delete
public function __construct() {
[16] Fix | Delete
add_filter( 'plugin_action_links_leadin/leadin.php', array( $this, 'add_plugin_settings_link' ) );
[17] Fix | Delete
add_filter( 'plugin_action_links_leadin/leadin.php', array( $this, 'leadin_plugin_advanced_features_link' ) );
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Adds setting link for Leadin to plugins management page.
[22] Fix | Delete
*
[23] Fix | Delete
* @param array $links Return the links for the settings page.
[24] Fix | Delete
* @return array
[25] Fix | Delete
*/
[26] Fix | Delete
public function add_plugin_settings_link( $links ) {
[27] Fix | Delete
if ( Connection::is_connected() ) {
[28] Fix | Delete
$page = 'leadin_settings';
[29] Fix | Delete
} else {
[30] Fix | Delete
$page = 'leadin';
[31] Fix | Delete
}
[32] Fix | Delete
$url = get_admin_url( get_current_blog_id(), "admin.php?page=$page" );
[33] Fix | Delete
$settings_link = '<a href="' . $url . '">' . __( 'Settings', 'leadin' ) . '</a>';
[34] Fix | Delete
array_unshift( $links, $settings_link );
[35] Fix | Delete
return $links;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* Adds upgrade link for Leadin to plugins management page
[40] Fix | Delete
*
[41] Fix | Delete
* @param array $links Return the links for the upgrade page.
[42] Fix | Delete
* @return array
[43] Fix | Delete
*/
[44] Fix | Delete
public function leadin_plugin_advanced_features_link( $links ) {
[45] Fix | Delete
if ( Connection::is_connected() ) {
[46] Fix | Delete
$portal_id = Portal_Options::get_portal_id();
[47] Fix | Delete
$url = Filters::apply_base_url_filters() . '/pricing/' . $portal_id . '/marketing?' . Links::get_query_params();
[48] Fix | Delete
$advanced_features_link = '<a class="hubspot-menu-pricing" target="_blank" rel="noopener" href="' . esc_attr( $url ) . '">' . esc_html( __( 'Upgrade', 'leadin' ) ) . '</a>';
[49] Fix | Delete
array_push( $links, $advanced_features_link );
[50] Fix | Delete
}
[51] Fix | Delete
return $links;
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function