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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/content-.../inc/freemius/template...
File: debug.php
<?php endforeach ?>
[500] Fix | Delete
<?php endforeach ?>
[501] Fix | Delete
</tbody>
[502] Fix | Delete
</table>
[503] Fix | Delete
<?php endif ?>
[504] Fix | Delete
<?php endforeach ?>
[505] Fix | Delete
<?php
[506] Fix | Delete
$addons = $VARS['addons'];
[507] Fix | Delete
?>
[508] Fix | Delete
<?php foreach ( $addons as $plugin_id => $plugin_addons ) : ?>
[509] Fix | Delete
<h2><?php echo esc_html( sprintf( fs_text_inline( 'Add Ons of module %s', 'addons-of-x' ), $plugin_id ) ) ?></h2>
[510] Fix | Delete
<table id="fs_addons" class="widefat">
[511] Fix | Delete
<thead>
[512] Fix | Delete
<tr>
[513] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'ID', 'id' ) ?></th>
[514] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Title' ) ?></th>
[515] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Slug' ) ?></th>
[516] Fix | Delete
<th><?php fs_esc_html_echo_x_inline( 'Version', 'product version' ) ?></th>
[517] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Public Key' ) ?></th>
[518] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Secret Key' ) ?></th>
[519] Fix | Delete
</tr>
[520] Fix | Delete
</thead>
[521] Fix | Delete
<tbody>
[522] Fix | Delete
<?php
[523] Fix | Delete
/**
[524] Fix | Delete
* @var FS_Plugin[] $plugin_addons
[525] Fix | Delete
*/
[526] Fix | Delete
foreach ( $plugin_addons as $addon ) : ?>
[527] Fix | Delete
<tr>
[528] Fix | Delete
<td><?php echo $addon->id ?></td>
[529] Fix | Delete
<td><?php echo $addon->title ?></td>
[530] Fix | Delete
<td><?php echo $addon->slug ?></td>
[531] Fix | Delete
<td><?php echo $addon->version ?></td>
[532] Fix | Delete
<td><?php echo $addon->public_key ?></td>
[533] Fix | Delete
<td><?php echo esc_html( $addon->secret_key ) ?></td>
[534] Fix | Delete
</tr>
[535] Fix | Delete
<?php endforeach ?>
[536] Fix | Delete
</tbody>
[537] Fix | Delete
</table>
[538] Fix | Delete
<?php endforeach ?>
[539] Fix | Delete
<?php
[540] Fix | Delete
/**
[541] Fix | Delete
* @var FS_User[] $users
[542] Fix | Delete
*/
[543] Fix | Delete
$users = $VARS['users'];
[544] Fix | Delete
$user_ids_map = array();
[545] Fix | Delete
$users_with_developer_license_by_id = array();
[546] Fix | Delete
[547] Fix | Delete
if ( is_array( $users ) && ! empty( $users ) ) {
[548] Fix | Delete
foreach ( $users as $user ) {
[549] Fix | Delete
$user_ids_map[ $user->id ] = true;
[550] Fix | Delete
}
[551] Fix | Delete
}
[552] Fix | Delete
[553] Fix | Delete
foreach ( $module_types as $module_type ) {
[554] Fix | Delete
/**
[555] Fix | Delete
* @var FS_Plugin_License[] $licenses
[556] Fix | Delete
*/
[557] Fix | Delete
$licenses = $VARS[ $module_type . '_licenses' ];
[558] Fix | Delete
[559] Fix | Delete
foreach ( $licenses as $license ) {
[560] Fix | Delete
if ( $license->is_whitelabeled ) {
[561] Fix | Delete
$users_with_developer_license_by_id[ $license->user_id ] = true;
[562] Fix | Delete
}
[563] Fix | Delete
}
[564] Fix | Delete
}
[565] Fix | Delete
[566] Fix | Delete
?>
[567] Fix | Delete
<?php if ( is_array( $users ) && 0 < count( $users ) ) : ?>
[568] Fix | Delete
<h2><?php fs_esc_html_echo_inline( 'Users' ) ?></h2>
[569] Fix | Delete
<table id="fs_users" class="widefat">
[570] Fix | Delete
<thead>
[571] Fix | Delete
<tr>
[572] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'ID', 'id' ) ?></th>
[573] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Name' ) ?></th>
[574] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Email' ) ?></th>
[575] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Verified' ) ?></th>
[576] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Public Key' ) ?></th>
[577] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Secret Key' ) ?></th>
[578] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Actions' ) ?></th>
[579] Fix | Delete
</tr>
[580] Fix | Delete
</thead>
[581] Fix | Delete
<tbody>
[582] Fix | Delete
<?php foreach ( $users as $user_id => $user ) : ?>
[583] Fix | Delete
<?php $has_developer_license = isset( $users_with_developer_license_by_id[ $user_id ] ) ?>
[584] Fix | Delete
<tr>
[585] Fix | Delete
<td><?php echo $user->id ?></td>
[586] Fix | Delete
<td><?php echo $has_developer_license ? '' : $user->get_name() ?></td>
[587] Fix | Delete
<td>
[588] Fix | Delete
<?php if ( ! $has_developer_license ) : ?>
[589] Fix | Delete
<a href="mailto:<?php echo esc_attr( $user->email ) ?>"><?php echo $user->email ?></a>
[590] Fix | Delete
<?php endif ?>
[591] Fix | Delete
</td>
[592] Fix | Delete
<td><?php echo $has_developer_license ? '' : json_encode( $user->is_verified ) ?></td>
[593] Fix | Delete
<td><?php echo $user->public_key ?></td>
[594] Fix | Delete
<td><?php echo $has_developer_license ? FS_Plugin_License::mask_secret_key_for_html($user->secret_key) : esc_html( $user->secret_key ) ?></td>
[595] Fix | Delete
<td>
[596] Fix | Delete
<?php if ( ! $has_developer_license ) : ?>
[597] Fix | Delete
<form action="" method="POST">
[598] Fix | Delete
<input type="hidden" name="fs_action" value="delete_user">
[599] Fix | Delete
<?php wp_nonce_field( 'delete_user' ) ?>
[600] Fix | Delete
<input type="hidden" name="user_id" value="<?php echo $user->id ?>">
[601] Fix | Delete
<button type="submit" class="button"><?php fs_esc_html_echo_x_inline( 'Delete', 'verb', 'delete' ) ?></button>
[602] Fix | Delete
</form>
[603] Fix | Delete
<?php endif ?>
[604] Fix | Delete
</td>
[605] Fix | Delete
</tr>
[606] Fix | Delete
<?php endforeach ?>
[607] Fix | Delete
</tbody>
[608] Fix | Delete
</table>
[609] Fix | Delete
<?php endif ?>
[610] Fix | Delete
<?php foreach ( $module_types as $module_type ) : ?>
[611] Fix | Delete
<?php
[612] Fix | Delete
/**
[613] Fix | Delete
* @var FS_Plugin_License[] $licenses
[614] Fix | Delete
*/
[615] Fix | Delete
$licenses = $VARS[ $module_type . '_licenses' ] ?>
[616] Fix | Delete
<?php if ( is_array( $licenses ) && count( $licenses ) > 0 ) : ?>
[617] Fix | Delete
<h2><?php echo esc_html( sprintf( fs_text_inline( '%s Licenses', 'module-licenses' ), ( WP_FS__MODULE_TYPE_PLUGIN === $module_type ? fs_text_inline( 'Plugin', 'plugin' ) : fs_text_inline( 'Theme', 'theme' ) ) ) ) ?></h2>
[618] Fix | Delete
<table id="fs_<?php echo $module_type ?>_licenses" class="widefat">
[619] Fix | Delete
<thead>
[620] Fix | Delete
<tr>
[621] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'ID', 'id' ) ?></th>
[622] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Plugin ID' ) ?></th>
[623] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'User ID' ) ?></th>
[624] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Plan ID' ) ?></th>
[625] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Quota' ) ?></th>
[626] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Activated' ) ?></th>
[627] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Blocking' ) ?></th>
[628] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Type' ) ?></th>
[629] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'License Key' ) ?></th>
[630] Fix | Delete
<th><?php fs_esc_html_echo_x_inline( 'Expiration', 'as expiration date' ) ?></th>
[631] Fix | Delete
</tr>
[632] Fix | Delete
</thead>
[633] Fix | Delete
<tbody>
[634] Fix | Delete
<?php foreach ( $licenses as $license ) : ?>
[635] Fix | Delete
<tr>
[636] Fix | Delete
<td><?php echo $license->id ?></td>
[637] Fix | Delete
<td><?php echo $license->plugin_id ?></td>
[638] Fix | Delete
<td><?php echo $license->user_id ?></td>
[639] Fix | Delete
<td><?php echo $license->plan_id ?></td>
[640] Fix | Delete
<td><?php echo $license->is_unlimited() ? 'Unlimited' : ( $license->is_single_site() ? 'Single Site' : $license->quota ) ?></td>
[641] Fix | Delete
<td><?php echo $license->activated ?></td>
[642] Fix | Delete
<td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
[643] Fix | Delete
<td><?php echo $license->is_whitelabeled ? 'Whitelabeled' : 'Normal' ?></td>
[644] Fix | Delete
<td><?php
[645] Fix | Delete
echo ( $license->is_whitelabeled || ! isset( $user_ids_map[ $license->user_id ] ) ) ?
[646] Fix | Delete
$license->get_html_escaped_masked_secret_key() :
[647] Fix | Delete
esc_html( $license->secret_key );
[648] Fix | Delete
?></td>
[649] Fix | Delete
<td><?php echo $license->expiration ?></td>
[650] Fix | Delete
</tr>
[651] Fix | Delete
<?php endforeach ?>
[652] Fix | Delete
</tbody>
[653] Fix | Delete
</table>
[654] Fix | Delete
<?php endif ?>
[655] Fix | Delete
<?php endforeach ?>
[656] Fix | Delete
<?php if ( FS_Logger::is_storage_logging_on() ) : ?>
[657] Fix | Delete
[658] Fix | Delete
<h2><?php fs_esc_html_echo_inline( 'Debug Log', 'debug-log' ) ?></h2>
[659] Fix | Delete
[660] Fix | Delete
<div id="fs_debug_filters">
[661] Fix | Delete
<select name="type">
[662] Fix | Delete
<option value="" selected="selected"><?php fs_esc_html_echo_inline( 'All Types', 'all-types' ) ?></option>
[663] Fix | Delete
<option value="warn_error">Warnings & Errors</option>
[664] Fix | Delete
<option value="error">Errors</option>
[665] Fix | Delete
<option value="warn">Warnings</option>
[666] Fix | Delete
<option value="info">Info</option>
[667] Fix | Delete
</select>
[668] Fix | Delete
<select name="request_type">
[669] Fix | Delete
<option value="" selected="selected"><?php fs_esc_html_echo_inline( 'All Requests', 'all-requests' ) ?></option>
[670] Fix | Delete
<option value="call">Sync</option>
[671] Fix | Delete
<option value="ajax">AJAX</option>
[672] Fix | Delete
<option value="cron">WP Cron</option>
[673] Fix | Delete
</select>
[674] Fix | Delete
<input name="file" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'File' ) ?>"/>
[675] Fix | Delete
<input name="function" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'Function' ) ?>"/>
[676] Fix | Delete
<input name="process_id" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'Process ID' ) ?>"/>
[677] Fix | Delete
<input name="logger" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'Logger' ) ?>"/>
[678] Fix | Delete
<input name="message" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'Message' ) ?>"/>
[679] Fix | Delete
<div style="margin: 10px 0">
[680] Fix | Delete
<button id="fs_filter" class="button" style="float: left"><i class="dashicons dashicons-filter"></i> <?php fs_esc_html_echo_inline( 'Filter', 'filter' ) ?>
[681] Fix | Delete
</button>
[682] Fix | Delete
[683] Fix | Delete
<form action="" method="POST" style="float: left; margin-left: 10px;">
[684] Fix | Delete
<input type="hidden" name="fs_action" value="download_logs">
[685] Fix | Delete
<?php wp_nonce_field( 'download_logs' ) ?>
[686] Fix | Delete
<div class="fs-filters"></div>
[687] Fix | Delete
<button id="fs_download" class="button" type="submit"><i
[688] Fix | Delete
class="dashicons dashicons-download"></i> <?php fs_esc_html_echo_inline( 'Download' ) ?></button>
[689] Fix | Delete
</form>
[690] Fix | Delete
<div style="clear: both"></div>
[691] Fix | Delete
</div>
[692] Fix | Delete
</div>
[693] Fix | Delete
[694] Fix | Delete
<div id="fs_log_book" style="height: 300px; overflow: auto;">
[695] Fix | Delete
<table class="widefat">
[696] Fix | Delete
<thead>
[697] Fix | Delete
<tr>
[698] Fix | Delete
<th>#</th>
[699] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Type' ) ?></th>
[700] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'ID', 'id' ) ?></th>
[701] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Function' ) ?></th>
[702] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Message' ) ?></th>
[703] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'File' ) ?></th>
[704] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'Timestamp' ) ?></th>
[705] Fix | Delete
</tr>
[706] Fix | Delete
</thead>
[707] Fix | Delete
<tbody>
[708] Fix | Delete
<tr style="display: none">
[709] Fix | Delete
<td>{$log.log_order}.</td>
[710] Fix | Delete
<td class="fs-col--type">{$log.type}</td>
[711] Fix | Delete
<td class="fs-col--logger">{$log.logger}</td>
[712] Fix | Delete
<td class="fs-col--function">{$log.function}</td>
[713] Fix | Delete
<td class="fs-col--message">
[714] Fix | Delete
<a href="#" onclick="jQuery(this).parent().find('div').toggle(); return false;">
[715] Fix | Delete
<nobr>{$log.message_short}</nobr>
[716] Fix | Delete
</a>
[717] Fix | Delete
<div style="display: none;">{$log.message}</div>
[718] Fix | Delete
</td>
[719] Fix | Delete
<td class="fs-col--file">{$log.file}:{$log.line}</td>
[720] Fix | Delete
<td class="fs-col--timestamp">{$log.created}</td>
[721] Fix | Delete
</tr>
[722] Fix | Delete
[723] Fix | Delete
</tbody>
[724] Fix | Delete
</table>
[725] Fix | Delete
</div>
[726] Fix | Delete
<script type="text/javascript">
[727] Fix | Delete
jQuery(document).ready(function ($) {
[728] Fix | Delete
var filtersChanged = false,
[729] Fix | Delete
offset = 0,
[730] Fix | Delete
limit = 200,
[731] Fix | Delete
prevFiltersSignature = null;
[732] Fix | Delete
[733] Fix | Delete
var getFilters = function () {
[734] Fix | Delete
var filters = {},
[735] Fix | Delete
signature = '';
[736] Fix | Delete
[737] Fix | Delete
$('#fs_debug_filters').find('select, input').each(function (i, e) {
[738] Fix | Delete
var $element = $(e);
[739] Fix | Delete
[740] Fix | Delete
if ('hidden' === $element.attr('type'))
[741] Fix | Delete
return;
[742] Fix | Delete
[743] Fix | Delete
var val = $element.val();
[744] Fix | Delete
if ('' !== val.trim()) {
[745] Fix | Delete
var name = $(e).attr('name');
[746] Fix | Delete
filters[name] = val;
[747] Fix | Delete
signature += name + '=' + val + '~';
[748] Fix | Delete
}
[749] Fix | Delete
});
[750] Fix | Delete
[751] Fix | Delete
if (signature != prevFiltersSignature) {
[752] Fix | Delete
filtersChanged = true;
[753] Fix | Delete
prevFiltersSignature = signature;
[754] Fix | Delete
} else {
[755] Fix | Delete
filtersChanged = false;
[756] Fix | Delete
}
[757] Fix | Delete
[758] Fix | Delete
return filters;
[759] Fix | Delete
};
[760] Fix | Delete
[761] Fix | Delete
$('#fs_download').parent().submit(function () {
[762] Fix | Delete
var filters = getFilters(),
[763] Fix | Delete
hiddenFields = '';
[764] Fix | Delete
[765] Fix | Delete
for (var f in filters) {
[766] Fix | Delete
if (filters.hasOwnProperty(f)) {
[767] Fix | Delete
hiddenFields += '<input type="hidden" name="filters[' + f + ']" value="' + filters[f] + '" />';
[768] Fix | Delete
}
[769] Fix | Delete
}
[770] Fix | Delete
[771] Fix | Delete
$(this).find('.fs-filters').html(hiddenFields);
[772] Fix | Delete
});
[773] Fix | Delete
[774] Fix | Delete
var loadLogs = function () {
[775] Fix | Delete
var $tbody = $('#fs_log_book tbody'),
[776] Fix | Delete
template = $tbody.find('tr:first-child').html(),
[777] Fix | Delete
filters = getFilters();
[778] Fix | Delete
[779] Fix | Delete
if (!filtersChanged) {
[780] Fix | Delete
offset += limit;
[781] Fix | Delete
} else {
[782] Fix | Delete
// Cleanup table for new filter (only keep template row).
[783] Fix | Delete
$tbody.find('tr').each(function (i, e) {
[784] Fix | Delete
if (0 == i)
[785] Fix | Delete
return;
[786] Fix | Delete
[787] Fix | Delete
$(e).remove();
[788] Fix | Delete
});
[789] Fix | Delete
[790] Fix | Delete
offset = 0;
[791] Fix | Delete
}
[792] Fix | Delete
[793] Fix | Delete
$.post(<?php echo Freemius::ajax_url() ?>, {
[794] Fix | Delete
action : 'fs_get_debug_log',
[795] Fix | Delete
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
[796] Fix | Delete
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_debug_log' ) ); ?>,
[797] Fix | Delete
filters: filters,
[798] Fix | Delete
offset : offset,
[799] Fix | Delete
limit : limit
[800] Fix | Delete
}, function (response) {
[801] Fix | Delete
[802] Fix | Delete
for (var i = 0; i < response.data.length; i++) {
[803] Fix | Delete
var templateCopy = template;
[804] Fix | Delete
[805] Fix | Delete
response.data[i].message_short = (response.data[i].message.length > 32) ?
[806] Fix | Delete
response.data[i].message.substr(0, 32) + '...' :
[807] Fix | Delete
response.data[i].message;
[808] Fix | Delete
[809] Fix | Delete
for (var p in response.data[i]) {
[810] Fix | Delete
if (response.data[i].hasOwnProperty(p)) {
[811] Fix | Delete
templateCopy = templateCopy.replace('{$log.' + p + '}', response.data[i][p]);
[812] Fix | Delete
}
[813] Fix | Delete
}
[814] Fix | Delete
[815] Fix | Delete
$tbody.append('<tr' + (i % 2 ? ' class="alternate"' : '') + '>' + templateCopy + '</tr>');
[816] Fix | Delete
}
[817] Fix | Delete
});
[818] Fix | Delete
};
[819] Fix | Delete
[820] Fix | Delete
$('#fs_filter').click(function () {
[821] Fix | Delete
loadLogs();
[822] Fix | Delete
[823] Fix | Delete
return false;
[824] Fix | Delete
});
[825] Fix | Delete
[826] Fix | Delete
loadLogs();
[827] Fix | Delete
});
[828] Fix | Delete
</script>
[829] Fix | Delete
<?php endif ?>
[830] Fix | Delete
[831] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function