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/string-l.../views
File: search.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace StringLocator;
[2] Fix | Delete
[3] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[4] Fix | Delete
die();
[5] Fix | Delete
}
[6] Fix | Delete
[7] Fix | Delete
$this_url = admin_url( ( is_multisite() ? 'network/admin.php' : 'tools.php' ) . '?page=string-locator' );
[8] Fix | Delete
[9] Fix | Delete
$search_string = '';
[10] Fix | Delete
$search_location = '';
[11] Fix | Delete
$search_regex = false;
[12] Fix | Delete
[13] Fix | Delete
if ( isset( $_POST['string-locator-string'] ) ) {
[14] Fix | Delete
$search_string = $_POST['string-locator-string'];
[15] Fix | Delete
}
[16] Fix | Delete
if ( isset( $_POST['string-locator-search'] ) ) {
[17] Fix | Delete
$search_location = $_POST['string-locator-search'];
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
if ( isset( $_GET['restore'] ) ) {
[21] Fix | Delete
$restore = get_transient( 'string-locator-search-overview' );
[22] Fix | Delete
[23] Fix | Delete
if ( false !== $restore ) {
[24] Fix | Delete
$search_string = $restore->search;
[25] Fix | Delete
$search_location = $restore->directory;
[26] Fix | Delete
$search_regex = String_Locator::absbool( $restore->regex );
[27] Fix | Delete
} else {
[28] Fix | Delete
?>
[29] Fix | Delete
<div class="notice notice-large notice-warning"><?php esc_html_e( 'No previous searches could be restored.', 'string-locator' ); ?></div>
[30] Fix | Delete
<?php
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
?>
[34] Fix | Delete
<div class="wrap">
[35] Fix | Delete
<h1>
[36] Fix | Delete
<?php esc_html_e( 'String Locator', 'string-locator' ); ?>
[37] Fix | Delete
</h1>
[38] Fix | Delete
[39] Fix | Delete
<?php do_action( 'string_locator_view_search_pre_form' ); ?>
[40] Fix | Delete
[41] Fix | Delete
<?php if ( ! current_user_can( String_Locator::$default_capability ) ) : ?>
[42] Fix | Delete
<div class="notice notice-warning inline">
[43] Fix | Delete
<p>
[44] Fix | Delete
<strong>
[45] Fix | Delete
<?php esc_html_e( 'String Locator is limited to search mode only.', 'string-locator' ); ?>
[46] Fix | Delete
</strong>
[47] Fix | Delete
</p>
[48] Fix | Delete
<p>
[49] Fix | Delete
<?php esc_html_e( 'Because this site is configured to not allow direct file editing, the String Locator plugin has limited functionality and may noy allow you to directly edit files with your string in them.', 'string-locator' ); ?>
[50] Fix | Delete
</p>
[51] Fix | Delete
<p>
[52] Fix | Delete
<?php
[53] Fix | Delete
echo sprintf(
[54] Fix | Delete
// translators: 1: The capability needed for this feature.
[55] Fix | Delete
esc_html__( 'To edit files, you need to have the `%s` capability.', 'string-locator' ),
[56] Fix | Delete
String_Locator::$default_capability
[57] Fix | Delete
);
[58] Fix | Delete
?>
[59] Fix | Delete
</p>
[60] Fix | Delete
</div>
[61] Fix | Delete
<?php endif; ?>
[62] Fix | Delete
[63] Fix | Delete
<?php if ( ! current_user_can( String_Locator::$search_capability ) ) : ?>
[64] Fix | Delete
<div class="notice notice-warning inline">
[65] Fix | Delete
<p>
[66] Fix | Delete
<strong>
[67] Fix | Delete
<?php esc_html_e( 'String Locator is restricted.', 'string-locator' ); ?>
[68] Fix | Delete
</strong>
[69] Fix | Delete
</p>
[70] Fix | Delete
<p>
[71] Fix | Delete
<?php esc_html_e( 'Your user does not have the needed capabilities to edit, or search through files on this site.', 'string-locator' ); ?>
[72] Fix | Delete
</p>
[73] Fix | Delete
[74] Fix | Delete
<p>
[75] Fix | Delete
<?php
[76] Fix | Delete
echo sprintf(
[77] Fix | Delete
// translators: 1: The capability needed for this feature.
[78] Fix | Delete
esc_html__( 'To use the search feature, you need to have the `%s` capability.', 'string-locator' ),
[79] Fix | Delete
String_Locator::$search_capability
[80] Fix | Delete
);
[81] Fix | Delete
?>
[82] Fix | Delete
</p>
[83] Fix | Delete
</div>
[84] Fix | Delete
<?php endif; ?>
[85] Fix | Delete
[86] Fix | Delete
<form action="<?php echo esc_url( $this_url ); ?>" method="post" id="string-locator-search-form">
[87] Fix | Delete
<label for="string-locator-search"><?php esc_html_e( 'Search through', 'string-locator' ); ?></label>
[88] Fix | Delete
<select name="string-locator-search" id="string-locator-search">
[89] Fix | Delete
<?php
[90] Fix | Delete
$searchers = apply_filters( 'string_locator_search_sources_markup', '', $search_location );
[91] Fix | Delete
[92] Fix | Delete
echo $searchers;
[93] Fix | Delete
?>
[94] Fix | Delete
</select>
[95] Fix | Delete
[96] Fix | Delete
<label for="string-locator-string"><?php esc_html_e( 'Search string', 'string-locator' ); ?></label>
[97] Fix | Delete
<input type="text" name="string-locator-string" id="string-locator-string" value="<?php echo esc_attr( $search_string ); ?>" />
[98] Fix | Delete
[99] Fix | Delete
<label><input type="checkbox" name="string-locator-regex" id="string-locator-regex"<?php echo ( $search_regex ? ' checked="checked"' : '' ); ?>> <?php esc_html_e( 'RegEx search', 'string-locator' ); ?></label>
[100] Fix | Delete
[101] Fix | Delete
<p>
[102] Fix | Delete
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_html_e( 'Search', 'string-locator' ); ?>">
[103] Fix | Delete
<a href="<?php echo esc_url( $this_url . '&restore=true' ); ?>" class="button button-primary"><?php esc_html_e( 'Restore last search', 'string-locator' ); ?></a>
[104] Fix | Delete
[105] Fix | Delete
<?php
[106] Fix | Delete
/**
[107] Fix | Delete
* Provides an area for outputting additional markup or controls
[108] Fix | Delete
* immediately following the button controllers for the String Locator
[109] Fix | Delete
* search form, but within the same paragraph for easier styling where needed.
[110] Fix | Delete
*/
[111] Fix | Delete
do_action( 'string_locator_after_search_buttons' );
[112] Fix | Delete
?>
[113] Fix | Delete
</p>
[114] Fix | Delete
</form>
[115] Fix | Delete
[116] Fix | Delete
<div class="notices" id="string-locator-search-notices"></div>
[117] Fix | Delete
[118] Fix | Delete
<div class="string-locator-feedback hide" id="string-locator-progress-wrapper">
[119] Fix | Delete
<progress id="string-locator-search-progress" max="100"></progress>
[120] Fix | Delete
<span id="string-locator-feedback-text"><?php esc_html_e( 'Preparing search&hellip;', 'string-locator' ); ?></span>
[121] Fix | Delete
</div>
[122] Fix | Delete
[123] Fix | Delete
<?php
[124] Fix | Delete
/**
[125] Fix | Delete
* Provides an action for outputting additional markup or controls
[126] Fix | Delete
* immediately preceding the table displaying search results.
[127] Fix | Delete
*/
[128] Fix | Delete
do_action( 'string_locator_before_search_results_table' );
[129] Fix | Delete
[130] Fix | Delete
$wrapper_classes = array(
[131] Fix | Delete
'table-wrapper',
[132] Fix | Delete
);
[133] Fix | Delete
[134] Fix | Delete
if ( isset( $_GET['restore'] ) ) {
[135] Fix | Delete
$wrapper_classes[] = 'restore';
[136] Fix | Delete
}
[137] Fix | Delete
?>
[138] Fix | Delete
[139] Fix | Delete
<div id="string-locator-search-results-table-wrapper" class="<?php echo esc_attr( implode( ' ', $wrapper_classes ) ); ?>">
[140] Fix | Delete
<div class="tablenav top">
[141] Fix | Delete
<div class="replacement-control-main-wrapper">
[142] Fix | Delete
<div class="replacement-control-left-details">
[143] Fix | Delete
<?php
[144] Fix | Delete
/**
[145] Fix | Delete
* An action to output controls in the tablenav region, which only
[146] Fix | Delete
* become visible when there are search results available.
[147] Fix | Delete
*/
[148] Fix | Delete
do_action( 'string_locator_search_results_tablenav_controls' );
[149] Fix | Delete
?>
[150] Fix | Delete
</div>
[151] Fix | Delete
<br class="clear" />
[152] Fix | Delete
<div class="replacement-control-instawp-btn">
[153] Fix | Delete
<?php
[154] Fix | Delete
/**
[155] Fix | Delete
* An action to output controls in the tablenav region, which only
[156] Fix | Delete
* become visible when there are search results available.
[157] Fix | Delete
*/
[158] Fix | Delete
do_action( 'string_locator_instawp_tablenav_controls' );
[159] Fix | Delete
?>
[160] Fix | Delete
</div>
[161] Fix | Delete
</div>
[162] Fix | Delete
</div>
[163] Fix | Delete
<?php
[164] Fix | Delete
if ( isset( $_GET['restore'] ) ) {
[165] Fix | Delete
$items = get_option( 'string-locator-search-history', array() );
[166] Fix | Delete
$items = maybe_unserialize( $items );
[167] Fix | Delete
[168] Fix | Delete
echo String_Locator::prepare_full_table( $items, array( 'restore' ) );
[169] Fix | Delete
} else {
[170] Fix | Delete
echo String_Locator::prepare_full_table( array() );
[171] Fix | Delete
}
[172] Fix | Delete
?>
[173] Fix | Delete
</div>
[174] Fix | Delete
[175] Fix | Delete
<?php
[176] Fix | Delete
/**
[177] Fix | Delete
* Provides an action for outputting additional markup or controls
[178] Fix | Delete
* immediately following the table displaying search results.
[179] Fix | Delete
*/
[180] Fix | Delete
do_action( 'string_locator_after_search_results_table' );
[181] Fix | Delete
?>
[182] Fix | Delete
</div>
[183] Fix | Delete
[184] Fix | Delete
<?php do_action( 'string_locator_search_templates' ); ?>
[185] Fix | Delete
[186] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function