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/advanced.../modules/gadsense/admin/views
File: external-ads-list.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* AdSense ad units table.
[2] Fix | Delete
*
[3] Fix | Delete
* @var bool $closeable
[4] Fix | Delete
* @var bool $use_dashicons
[5] Fix | Delete
* @var Advanced_Ads_Network_Adsense $network
[6] Fix | Delete
* @var array $ad_units
[7] Fix | Delete
* @var bool $display_slot_id
[8] Fix | Delete
* @var string $pub_id
[9] Fix | Delete
*
[10] Fix | Delete
* @package AdvancedAds
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
global $external_ad_unit_id, $closeable, $display_slot_id;
[14] Fix | Delete
[15] Fix | Delete
if ( ! isset( $hide_idle_ads ) ) {
[16] Fix | Delete
$hide_idle_ads = true;
[17] Fix | Delete
}
[18] Fix | Delete
if ( ! isset( $ad_units ) ) {
[19] Fix | Delete
$ad_units = [];
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
?>
[23] Fix | Delete
<div id="mapi-wrap" class="aa-select-list">
[24] Fix | Delete
<?php if ($closeable): ?>
[25] Fix | Delete
<button type="button" id="mapi-close-selector" class="notice-dismiss"></button>
[26] Fix | Delete
<?php endif;?>
[27] Fix | Delete
<i id="mapi-archived-ads" title="<?php esc_attr_e( 'Hide archived ads', 'advanced-ads' ); ?>" data-alt-title="<?php esc_attr_e( 'Show archived ads', 'advanced-ads' ); ?>" class="dashicons dashicons-hidden"></i>
[28] Fix | Delete
<i class="aa-select-list-update dashicons dashicons-update mapiaction" data-mapiaction="updateList" style="color:#0085ba;cursor:pointer;font-size:20px;" title="<?php esc_attr_e( 'Update the ad units list', 'advanced-ads' ); ?>"></i>
[29] Fix | Delete
<div id="mapi-loading-overlay" class="aa-select-list-loading-overlay">
[30] Fix | Delete
<img alt="..." src="<?php echo ADVADS_BASE_URL . 'admin/assets/img/loader.gif'; ?>" style="margin-top:8em;" />
[31] Fix | Delete
</div>
[32] Fix | Delete
<div id="mapi-table-wrap" class="aa-select-list-table-wrap">
[33] Fix | Delete
<table class="widefat striped">
[34] Fix | Delete
<thead>
[35] Fix | Delete
<tr>
[36] Fix | Delete
<th><?php esc_html_e( 'Name', 'advanced-ads' ); ?></th>
[37] Fix | Delete
<?php if ($display_slot_id):?><th><?php echo esc_html_x( 'Slot ID', 'AdSense ad', 'advanced-ads' ); ?></th><?php endif;?>
[38] Fix | Delete
<th><?php echo esc_html_x( 'Type', 'AdSense ad', 'advanced-ads' ); ?></th>
[39] Fix | Delete
<th><?php esc_html_e( 'Size', 'advanced-ads' ); ?></th>
[40] Fix | Delete
</tr>
[41] Fix | Delete
</thead>
[42] Fix | Delete
<tbody>
[43] Fix | Delete
<?php if ( empty( $ad_units ) ) : ?>
[44] Fix | Delete
<tr id="mapi-notice-noads">
[45] Fix | Delete
<td colspan="5" style="text-align:center;">
[46] Fix | Delete
<?php esc_attr_e( 'No ad units found', 'advanced-ads' ); ?>
[47] Fix | Delete
<button type="button" class="mapiaction icon-button" data-mapiaction="updateList">
[48] Fix | Delete
<?php esc_attr_e( 'Update the ad units list', 'advanced-ads' ); ?>
[49] Fix | Delete
<i class="dashicons dashicons-update" style="color:#0085ba;font-size:20px;"></i>
[50] Fix | Delete
</button>
[51] Fix | Delete
</td>
[52] Fix | Delete
</tr>
[53] Fix | Delete
<?php else :
[54] Fix | Delete
// Force a refresh the first time the ad list is opened after an update.
[55] Fix | Delete
echo ! isset( $ad_units[0]->raw['nameV2'] ) ? '<input type="hidden" id="mapi-force-v2-list-update" value="" />' : '';
[56] Fix | Delete
foreach ( $ad_units as $ad_unit ) {
[57] Fix | Delete
$ad_unit->is_supported = $network->is_supported( $ad_unit );
[58] Fix | Delete
}
[59] Fix | Delete
$sorted_adunits = Advanced_Ads_Ad_Network_Ad_Unit::sort_ad_units( $ad_units, $external_ad_unit_id );
[60] Fix | Delete
?>
[61] Fix | Delete
<?php foreach ( $sorted_adunits as $unit ) : ?>
[62] Fix | Delete
<tr <?php echo $unit->raw['status'] === 'ARCHIVED' ? 'data-archived="1"' : ''; ?> class="advads-clickable-row mapiaction" data-mapiaction="getCode" data-slotid="<?php echo esc_attr( $unit->id ); ?>" data-active="<?php echo esc_attr( $unit->active ); ?>">
[63] Fix | Delete
<td><?php echo esc_html( $unit->name ); ?></td>
[64] Fix | Delete
<?php if ( $display_slot_id ) : ?>
[65] Fix | Delete
<td class="unitcode">
[66] Fix | Delete
<?php
[67] Fix | Delete
echo '<span>' . esc_html( $unit->slot_id ) . '</span>';
[68] Fix | Delete
echo $unit->raw['status'] === 'ARCHIVED' ? '&nbsp;<code>' . esc_html__( 'Archived', 'advanced-ads' ) . '</code>' : '';
[69] Fix | Delete
?>
[70] Fix | Delete
</td>
[71] Fix | Delete
<?php endif; ?>
[72] Fix | Delete
<td class="unittype">
[73] Fix | Delete
<?php if ( $unit->is_supported ) : ?>
[74] Fix | Delete
<?php if ( ! empty( $unit->code ) ) : ?>
[75] Fix | Delete
<?php echo esc_attr( Advanced_Ads_AdSense_MAPI::format_ad_data( $unit, 'type' ) ); ?>
[76] Fix | Delete
<?php else : ?>
[77] Fix | Delete
<button type="button" class="button-secondary button-small" title="<?php esc_attr_e( 'Get the code for this ad', 'advanced-ads' ); ?>">
[78] Fix | Delete
<span style="line-height: 26px;" class="dashicons dashicons-update"></span> <?php esc_html_e( 'Load', 'advanced-ads' ); ?>
[79] Fix | Delete
</button>
[80] Fix | Delete
<?php endif; ?>
[81] Fix | Delete
<?php elseif ( empty( $unit->code ) ) : ?>
[82] Fix | Delete
<span class="dashicons dashicons-warning" title="<?php esc_attr_e( 'Ad can\'t be imported, click for details', 'advanced-ads' ); ?>"></span>
[83] Fix | Delete
<?php endif; ?>
[84] Fix | Delete
</td>
[85] Fix | Delete
<td class="unitsize">
[86] Fix | Delete
<?php echo esc_attr( Advanced_Ads_AdSense_MAPI::format_ad_data( $unit, 'size' ) ); ?>
[87] Fix | Delete
</td>
[88] Fix | Delete
</tr>
[89] Fix | Delete
<?php endforeach; ?>
[90] Fix | Delete
<?php endif; ?>
[91] Fix | Delete
</tbody>
[92] Fix | Delete
</table>
[93] Fix | Delete
</div>
[94] Fix | Delete
<p class="advads-notice-inline advads-error" id="remote-ad-code-error" style="display:none;"><strong><?php esc_attr_e( 'Unrecognized ad code', 'advanced-ads' ); ?></strong></p>
[95] Fix | Delete
<p class="advads-error-message" id="remote-ad-code-msg"></p>
[96] Fix | Delete
</div>
[97] Fix | Delete
[98] Fix | Delete
<div style="display:none;" id="remote-ad-unsupported-ad-type">
[99] Fix | Delete
<h3 class="advads-notice-inline advads-error">
[100] Fix | Delete
<?php esc_html_e( 'This ad type can currently not be imported from AdSense.', 'advanced-ads' ); ?>
[101] Fix | Delete
</h3>
[102] Fix | Delete
<p>
[103] Fix | Delete
<?php esc_html_e( 'You can proceed with one of the following solutions', 'advanced-ads' ); ?>:
[104] Fix | Delete
</p>
[105] Fix | Delete
<ul>
[106] Fix | Delete
<li>
[107] Fix | Delete
<?php
[108] Fix | Delete
/* Translators: 1: opening tag for AdSense account link 2: opening tag for a link to insert ad code 3: closing a tag */
[109] Fix | Delete
printf( esc_html__( '%1$sCopy the code from your AdSense account%3$s and %2$sinsert a new AdSense code here%3$s.', 'advanced-ads' ), '<a href="https://www.google.com/adsense/new/u/0/' . esc_attr( $pub_id ) . '/myads/units" target="_blank">', '<a href="#" class="mapi-insert-code prevent-default">', '</a>' );
[110] Fix | Delete
?>
[111] Fix | Delete
</li>
[112] Fix | Delete
<li>
[113] Fix | Delete
<?php
[114] Fix | Delete
/* Translators: 1: opening tag for a link to create an ad manually 2: closing a tag */
[115] Fix | Delete
printf( wp_kses( __( '%1$sCreate an AdSense code manually%2$s: Select the <em>Normal</em> or <em>Responsive</em> type and the size.', 'advanced-ads' ), [
[116] Fix | Delete
'em' => [],
[117] Fix | Delete
'strong' => [],
[118] Fix | Delete
] ), '<a href="#" class="mapi-close-selector-link prevent-default">', '</a>' );
[119] Fix | Delete
?>
[120] Fix | Delete
</li>
[121] Fix | Delete
<li>
[122] Fix | Delete
<?php esc_html_e( 'Choose a different ad from your AdSense account above.', 'advanced-ads' ); ?>
[123] Fix | Delete
</li>
[124] Fix | Delete
</ul>
[125] Fix | Delete
</div>
[126] Fix | Delete
[127] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function