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/sitepres.../menu
File: network.php
<?php
[0] Fix | Delete
[1] Fix | Delete
$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
[2] Fix | Delete
$pagenum = $wp_list_table->get_pagenum();
[3] Fix | Delete
$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
[4] Fix | Delete
$wp_list_table->prepare_items();
[5] Fix | Delete
[6] Fix | Delete
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
[7] Fix | Delete
if ( $pagenum > $total_pages && $total_pages > 0 ) {
[8] Fix | Delete
wp_redirect( add_query_arg( 'paged', $total_pages ) );
[9] Fix | Delete
exit;
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
[13] Fix | Delete
$msg = '';
[14] Fix | Delete
if ( isset( $_REQUEST['updated'] ) && 'true' === $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
[15] Fix | Delete
switch ( $_REQUEST['action'] ) {
[16] Fix | Delete
case 'resetwpml':
[17] Fix | Delete
$msg = esc_html__( 'WPML has been reset for the selected site.', 'sitepress' );
[18] Fix | Delete
break;
[19] Fix | Delete
case 'deactivatewpml':
[20] Fix | Delete
$msg = esc_html__( 'WPML has been deactivated for the selected site.', 'sitepress' );
[21] Fix | Delete
break;
[22] Fix | Delete
case 'activatewpml':
[23] Fix | Delete
$msg = esc_html__( 'WPML has been activated for the selected site.', 'sitepress' );
[24] Fix | Delete
break;
[25] Fix | Delete
default:
[26] Fix | Delete
$msg = false;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
if ( $msg ) {
[30] Fix | Delete
$msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
$text = isset( $text ) ? $text : '';
[35] Fix | Delete
[36] Fix | Delete
?>
[37] Fix | Delete
[38] Fix | Delete
<div class="wrap">
[39] Fix | Delete
<h2><?php echo esc_html__( 'WPML Network Setup', 'sitepress' ) ?>
[40] Fix | Delete
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
[41] Fix | Delete
printf( '<span class="subtitle">' . esc_html__( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
[42] Fix | Delete
} ?>
[43] Fix | Delete
</h2>
[44] Fix | Delete
[45] Fix | Delete
<form action="" method="get" id="ms-search">
[46] Fix | Delete
<p class="search-box">
[47] Fix | Delete
<label class="screen-reader-text" for="icl_ss"><?php echo esc_html( $text ); ?>:</label>
[48] Fix | Delete
<input type="hidden" name="page" value="<?php echo esc_attr( $_GET['page'] ); ?>"/>
[49] Fix | Delete
<input type="text" id="icl_ss" name="s" value="<?php _admin_search_query(); ?>"/>
[50] Fix | Delete
<?php submit_button( __( 'Search', 'sitepress' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
[51] Fix | Delete
[52] Fix | Delete
</p>
[53] Fix | Delete
</form>
[54] Fix | Delete
[55] Fix | Delete
<?php echo $msg; ?>
[56] Fix | Delete
[57] Fix | Delete
<br/>
[58] Fix | Delete
[59] Fix | Delete
<?php if ( empty( $wp_list_table->items ) ) : ?>
[60] Fix | Delete
<?php $wp_list_table->no_items(); ?>
[61] Fix | Delete
<?php else : ?>
[62] Fix | Delete
[63] Fix | Delete
<div class="tablenav top">
[64] Fix | Delete
<?php $wp_list_table->pagination( 'bottom' ); ?>
[65] Fix | Delete
</div>
[66] Fix | Delete
[67] Fix | Delete
<table class="wp-list-table widefat">
[68] Fix | Delete
<thead>
[69] Fix | Delete
<tr>
[70] Fix | Delete
<th><?php esc_html_e( 'Site', 'sitepress' ); ?></th>
[71] Fix | Delete
<th><?php esc_html_e( 'Status', 'sitepress' ); ?></th>
[72] Fix | Delete
<th>&nbsp;</th>
[73] Fix | Delete
</tr>
[74] Fix | Delete
</thead>
[75] Fix | Delete
<tfoot>
[76] Fix | Delete
<tr>
[77] Fix | Delete
<th><?php esc_html_e( 'Site', 'sitepress' ); ?></th>
[78] Fix | Delete
<th><?php esc_html_e( 'Status', 'sitepress' ); ?></th>
[79] Fix | Delete
<th>&nbsp;</th>
[80] Fix | Delete
</tr>
[81] Fix | Delete
</tfoot>
[82] Fix | Delete
<tbody>
[83] Fix | Delete
<?php
[84] Fix | Delete
$status_list = array(
[85] Fix | Delete
'archived' => array( 'site-archived', esc_html__( 'Archived' ) ),
[86] Fix | Delete
'spam' => array( 'site-spammed', esc_html_x( 'Spam', 'site' ) ),
[87] Fix | Delete
'deleted' => array( 'site-deleted', esc_html__( 'Deleted' ) ),
[88] Fix | Delete
'mature' => array( 'site-mature', esc_html__( 'Mature' ) ),
[89] Fix | Delete
);
[90] Fix | Delete
$class = '';
[91] Fix | Delete
[92] Fix | Delete
foreach ( $wp_list_table->items as $blog ) :
[93] Fix | Delete
[94] Fix | Delete
if ( class_exists( 'WP_Site' ) && $blog instanceof WP_Site ) {
[95] Fix | Delete
$blog = object_to_array( $blog );
[96] Fix | Delete
}
[97] Fix | Delete
[98] Fix | Delete
$class = ( 'alternate' == $class ) ? '' : 'alternate';
[99] Fix | Delete
[100] Fix | Delete
$blog_states = array();
[101] Fix | Delete
foreach ( $status_list as $status => $col ) {
[102] Fix | Delete
if ( 1 === get_blog_status( $blog['blog_id'], $status ) ) {
[103] Fix | Delete
$class = $col[0];
[104] Fix | Delete
$blog_states[] = $col[1];
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
$blog_state = '';
[108] Fix | Delete
if ( ! empty( $blog_states ) ) {
[109] Fix | Delete
$state_count = count( $blog_states );
[110] Fix | Delete
$i = 0;
[111] Fix | Delete
$blog_state .= ' - ';
[112] Fix | Delete
foreach ( $blog_states as $state ) {
[113] Fix | Delete
++ $i;
[114] Fix | Delete
( $i == $state_count ) ? $sep = '' : $sep = ', ';
[115] Fix | Delete
$blog_state .= "<span class='post-state'>" . esc_html( $state . $sep ) . "</span>";
[116] Fix | Delete
}
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
?>
[120] Fix | Delete
<tr class="<?php echo esc_attr( $class ); ?>">
[121] Fix | Delete
<td class='column-blogname blogname'>
[122] Fix | Delete
<?php $blogname = ( is_subdomain_install() ) ? str_replace( '.' . $current_site->domain, '', $blog['domain'] ) : $blog['path']; ?>
[123] Fix | Delete
<a href="<?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?>"
[124] Fix | Delete
class="edit"><?php echo esc_html( $blogname ) . $blog_state; ?></a>
[125] Fix | Delete
<?php
[126] Fix | Delete
// Preordered.
[127] Fix | Delete
$actions = array(
[128] Fix | Delete
'edit' => '',
[129] Fix | Delete
'backend' => '',
[130] Fix | Delete
'activate' => '',
[131] Fix | Delete
'deactivate' => '',
[132] Fix | Delete
'archive' => '',
[133] Fix | Delete
'unarchive' => '',
[134] Fix | Delete
'spam' => '',
[135] Fix | Delete
'unspam' => '',
[136] Fix | Delete
'delete' => '',
[137] Fix | Delete
'visit' => '',
[138] Fix | Delete
);
[139] Fix | Delete
[140] Fix | Delete
$actions['edit'] = '<span class="edit"><a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . esc_html__( 'Edit', 'sitepress' ) . '</a></span>';
[141] Fix | Delete
$actions['backend'] = "<span class='backend'><a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . esc_html__( 'Dashboard', 'sitepress' ) . '</a></span>';
[142] Fix | Delete
$actions['visit'] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . esc_html__( 'Visit', 'sitepress' ) . '</a></span>';
[143] Fix | Delete
[144] Fix | Delete
$actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );
[145] Fix | Delete
echo $wp_list_table->row_actions( $actions );
[146] Fix | Delete
?>
[147] Fix | Delete
</td>
[148] Fix | Delete
<td>
[149] Fix | Delete
<?php switch_to_blog( $blog['blog_id'] ); ?>
[150] Fix | Delete
<?php if ( get_option( '_wpml_inactive', false, false ) ) : ?>
[151] Fix | Delete
<?php esc_html_e( 'Inactive', 'sitepress' ); ?>
[152] Fix | Delete
<div class="row-actions">
[153] Fix | Delete
<a href="<?php echo esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=activatewpml&amp;id=' . (int) $blog['blog_id'] ), 'activatewpml' ) ) ?>"><?php esc_html_e( 'Activate', 'sitepress' ) ?></a>
[154] Fix | Delete
</div>
[155] Fix | Delete
<?php else : ?>
[156] Fix | Delete
<?php esc_html_e( 'Active', 'sitepress' ); ?>
[157] Fix | Delete
<div class="row-actions">
[158] Fix | Delete
<?php if ( $blog['blog_id'] != $current_blog->blog_id ) : ?>
[159] Fix | Delete
<a href="<?php echo esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=deactivatewpml&amp;id=' . (int) $blog['blog_id'] ), 'deactivatewpml' ) ) ?>"><?php esc_html_e( 'Deactivate', 'sitepress' ) ?></a>
[160] Fix | Delete
<?php endif; ?>
[161] Fix | Delete
</div>
[162] Fix | Delete
<?php endif; ?>
[163] Fix | Delete
<?php restore_current_blog(); ?>
[164] Fix | Delete
</td>
[165] Fix | Delete
<td><a onclick="WPML_core.network.reset_wpml(this)" href="#"
[166] Fix | Delete
data-link="<?php echo esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=resetwpml&amp;id=' . (int) $blog['blog_id'] ), 'resetwpml' ) ); ?>"
[167] Fix | Delete
data-msg="<?php echo
[168] Fix | Delete
sprintf( esc_html__( 'You are about to reset WPML for this site: %s.', 'sitepress' ), esc_html( $blogname ) ) .
[169] Fix | Delete
" " . esc_html__( "All translation data will be lost if you reset WPML's data. They cannot be recovered later.", 'sitepress' )
[170] Fix | Delete
?>"><?php esc_html_e( 'Reset', 'sitepress' ) ?></a></td>
[171] Fix | Delete
</tr>
[172] Fix | Delete
<?php endforeach; ?>
[173] Fix | Delete
</tbody>
[174] Fix | Delete
</table>
[175] Fix | Delete
[176] Fix | Delete
<div class="tablenav bottom">
[177] Fix | Delete
<?php $wp_list_table->pagination( 'bottom' ); ?>
[178] Fix | Delete
</div>
[179] Fix | Delete
[180] Fix | Delete
<?php endif ?>
[181] Fix | Delete
[182] Fix | Delete
</div>
[183] Fix | Delete
[184] Fix | Delete
<script type="text/javascript">
[185] Fix | Delete
var WPML_core = WPML_core || {};
[186] Fix | Delete
WPML_core.network = {};
[187] Fix | Delete
WPML_core.network.reset_wpml = function (link) {
[188] Fix | Delete
link = jQuery(link);
[189] Fix | Delete
if (confirm(link.data('msg'))) {
[190] Fix | Delete
window.location = link.data('link');
[191] Fix | Delete
}
[192] Fix | Delete
}
[193] Fix | Delete
</script>
[194] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function