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/wp-conte.../plugins/flow-flo.../includes
File: FlowFlowAdmin.php
<?php namespace flow;
[0] Fix | Delete
[1] Fix | Delete
use flow\db\FFDBMigrationManager;
[2] Fix | Delete
use flow\tabs\FFAddonsTab;
[3] Fix | Delete
use flow\tabs\FFBackupTab;
[4] Fix | Delete
use flow\tabs\FFModerationTab;
[5] Fix | Delete
use flow\tabs\FFSourcesTab;
[6] Fix | Delete
use flow\tabs\FFStreamsTab;
[7] Fix | Delete
use la\core\LAAdminBase;
[8] Fix | Delete
use la\core\LAUtils;
[9] Fix | Delete
use la\core\tabs\LAAuthTab;
[10] Fix | Delete
use la\core\tabs\LAGeneralTab;
[11] Fix | Delete
use la\core\tabs\LALicenseTab;
[12] Fix | Delete
use ReflectionException;
[13] Fix | Delete
[14] Fix | Delete
if ( ! defined( 'WPINC' ) ) die;
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Flow-Flow.
[18] Fix | Delete
*
[19] Fix | Delete
* Plugin class. This class should ideally be used to work with the
[20] Fix | Delete
* administrative side of the WordPress site.
[21] Fix | Delete
*
[22] Fix | Delete
* If you're interested in introducing public-facing
[23] Fix | Delete
* functionality, then refer to `FlowFlow.php`
[24] Fix | Delete
*
[25] Fix | Delete
* @package FlowFlowAdmin
[26] Fix | Delete
* @author Looks Awesome <email@looks-awesome.com>
[27] Fix | Delete
* @link http://looks-awesome.com
[28] Fix | Delete
* @copyright Looks Awesome
[29] Fix | Delete
*/
[30] Fix | Delete
class FlowFlowAdmin extends LAAdminBase {
[31] Fix | Delete
protected function contextForAdminPage() {
[32] Fix | Delete
$context = parent::contextForAdminPage();
[33] Fix | Delete
$tab_prefix = 'ff';
[34] Fix | Delete
$context['form-action'] = '';
[35] Fix | Delete
$context['tabs'][] = new FFStreamsTab();
[36] Fix | Delete
$context['tabs'][] = new FFSourcesTab();
[37] Fix | Delete
[38] Fix | Delete
$context['tabs'][] = new FFModerationTab();
[39] Fix | Delete
$context['tabs'][] = new LAGeneralTab($tab_prefix);
[40] Fix | Delete
$context['tabs'][] = new LAAuthTab($tab_prefix);
[41] Fix | Delete
$context['tabs'][] = new FFBackupTab();
[42] Fix | Delete
if (FF_USE_WP){
[43] Fix | Delete
$context['tabs'][] = new LALicenseTab($tab_prefix, $context['activated']);
[44] Fix | Delete
$context['tabs'][] = new FFAddonsTab();
[45] Fix | Delete
}
[46] Fix | Delete
$context['license_subscription_description'] = '<h3>Here you can activate plugin with Envato purchase code. Purchase code can be obtained only through purchasing plugin on its <a href="http://go.social-streams.com/get-flow">CodeCanyon page</a>. Plugin activation unlocks easy updating via WP dashboard. Purchasing plugin license also grants access to <a href="http://go.social-streams.com/help">premium support</a>. You can subscribe to important notifications if you mark checkbox in the form below. These notifications will include announcements about major updates and Flow-Flow extension releases. (*) — Required fields</h3>';
[47] Fix | Delete
$context['boosts'] = $this->db->getOption('boosts_email') != false;
[48] Fix | Delete
[49] Fix | Delete
$context['buttons-after-tabs'] = '<li id="request-tab"><span>Save changes</span> <i class="flaticon-paperplane"></i></li>';
[50] Fix | Delete
$context = apply_filters('ff_change_context', $context);
[51] Fix | Delete
return $context;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* @throws ReflectionException
[56] Fix | Delete
*/
[57] Fix | Delete
protected function initPluginAdminPage(){
[58] Fix | Delete
$mm = new FFDBMigrationManager($this->context);
[59] Fix | Delete
$mm->migrate();
[60] Fix | Delete
unset($mm);
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
protected function enqueueAdminStylesAlways($plugin_directory){
[64] Fix | Delete
wp_enqueue_style($this->getPluginSlug() .'-admin-icon-styles', $plugin_directory . 'css/admin-icon.css', [], LAUtils::version($this->context) );
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
protected function enqueueAdminScriptsAlways($plugin_directory){
[68] Fix | Delete
//wp_enqueue_script($this->getPluginSlug() . '-global-admin-script', $plugin_directory . 'js/global_admin.js', [ 'jquery', 'backbone', 'underscore' ], LAUtils::version($this->context));
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
protected function enqueueAdminStylesOnlyAtPluginPage($plugin_directory){
[72] Fix | Delete
wp_enqueue_style($this->getPluginSlug() . '-admin-styles', $plugin_directory . 'css/admin.css', [], LAUtils::version($this->context));
[73] Fix | Delete
wp_enqueue_style($this->getPluginSlug() . '-colorpickersliders', $plugin_directory . 'css/jquery-colorpickersliders.css', [], LAUtils::version($this->context));
[74] Fix | Delete
[75] Fix | Delete
// Load web font
[76] Fix | Delete
wp_register_style('ff-admin-fonts', '//fonts.googleapis.com/css?family=Montserrat:400,600,700|Roboto+Slab|Lato:300,400', [], null, 'all');
[77] Fix | Delete
wp_enqueue_style('ff-admin-fonts');
[78] Fix | Delete
[79] Fix | Delete
//for preview
[80] Fix | Delete
//TODO move to filter
[81] Fix | Delete
FlowFlow::get_instance($this->context)->enqueue_styles();
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
protected function enqueueAdminScriptsOnlyAtPluginPage($plugin_directory){
[85] Fix | Delete
parent::enqueueAdminScriptsOnlyAtPluginPage($plugin_directory);
[86] Fix | Delete
/*
[87] Fix | Delete
if (file_exists(plugin_dir_path(__DIR__) . 'env.json')) {
[88] Fix | Delete
$env = json_decode( file_get_contents(plugin_dir_path( __DIR__ ) . 'env.json'), true);
[89] Fix | Delete
}
[90] Fix | Delete
*/
[91] Fix | Delete
[92] Fix | Delete
$data = array(
[93] Fix | Delete
'isWordpress' => (string)FF_USE_WP,
[94] Fix | Delete
'ajaxurl' => (string)$this->context['ajax_url'],
[95] Fix | Delete
'siteurl' => site_url(),
[96] Fix | Delete
'nonce' => wp_create_nonce('flow_flow_nonce'),
[97] Fix | Delete
'm' => /*isset ( $env ) ? $env['mode'] : 'l' */ 'p',
[98] Fix | Delete
'la_plugin_slug_down' => LAUtils::slug_down($this->context),
[99] Fix | Delete
'backUrl' => (string)$this->context['ajax_url'] . '?action=' . LAUtils::slug_down($this->context) . '_social_auth'
[100] Fix | Delete
);
[101] Fix | Delete
wp_localize_script($this->getPluginSlug() . '-admin-script', 'flow_flow_vars', $data );
[102] Fix | Delete
[103] Fix | Delete
//for preview
[104] Fix | Delete
//TODO move to filter
[105] Fix | Delete
FlowFlow::get_instance()->enqueue_scripts();
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
protected function addPluginAdminSubMenu($displayAdminPageFunction){
[109] Fix | Delete
add_submenu_page(
[110] Fix | Delete
'flow-flow',
[111] Fix | Delete
'Flow-Flow',
[112] Fix | Delete
'Flow-Flow',
[113] Fix | Delete
'manage_options',
[114] Fix | Delete
$this->getPluginSlug() . '-admin',
[115] Fix | Delete
$displayAdminPageFunction
[116] Fix | Delete
);
[117] Fix | Delete
}
[118] Fix | Delete
}
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function