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/wp-smush.../app/modals
File: onboarding.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Onboarding modal.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 3.1
[4] Fix | Delete
* @package WP_Smush
[5] Fix | Delete
*
[6] Fix | Delete
* @var $cta_url string CTA URL.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
use Smush\Core\Helper;
[10] Fix | Delete
[11] Fix | Delete
if ( ! defined( 'WPINC' ) ) {
[12] Fix | Delete
die;
[13] Fix | Delete
}
[14] Fix | Delete
$should_show_tracking_confirmation = ! is_multisite();
[15] Fix | Delete
$is_pro = WP_Smush::is_pro();
[16] Fix | Delete
$lossy_title = $is_pro ? __( 'Ultra Smush', 'wp-smushit' ) : __( 'Super Smush', 'wp-smushit' );
[17] Fix | Delete
$lossy_description = $is_pro ? esc_html__( 'Optimize images up to 5x more than Super Smush with our professional grade multi-pass lossy compression.', 'wp-smushit' )
[18] Fix | Delete
: esc_html__( 'Optimize images up to 2x more than regular smush with our multi-pass lossy compression.', 'wp-smushit' );
[19] Fix | Delete
$lossy_action_label = $is_pro ? __( 'Enable Ultra Smush', 'wp-smushit' ) : __( 'Enable Super Smush', 'wp-smushit' );
[20] Fix | Delete
?>
[21] Fix | Delete
[22] Fix | Delete
<script type="text/template" id="smush-onboarding" data-cta-url="<?php echo esc_js( $cta_url ); ?>" data-type="<?php echo WP_Smush::is_pro() ? 'pro' : 'free'; ?>">
[23] Fix | Delete
<div class="sui-box-header sui-flatten sui-content-center sui-spacing-sides--90">
[24] Fix | Delete
<?php if ( ! apply_filters( 'wpmudev_branding_hide_branding', false ) ) : ?>
[25] Fix | Delete
<figure class="sui-box-banner" aria-hidden="true">
[26] Fix | Delete
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}.png"
[27] Fix | Delete
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}.png 1x, <?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}@2x.png 2x"
[28] Fix | Delete
alt="<?php esc_attr_e( 'Smush Onboarding Modal', 'wp-smushit' ); ?>" class="sui-image sui-image-center"
[29] Fix | Delete
>
[30] Fix | Delete
</figure>
[31] Fix | Delete
<?php endif; ?>
[32] Fix | Delete
[33] Fix | Delete
<h3 class="sui-box-title sui-lg" id="smush-title-onboarding-dialog">
[34] Fix | Delete
<# if ( data.first_slide === data.slide ) { #>
[35] Fix | Delete
<?php
[36] Fix | Delete
[37] Fix | Delete
/* translators: %s: current user name */
[38] Fix | Delete
printf( esc_html__( 'Hey, %s!', 'wp-smushit' ), esc_html( Helper::get_user_name() ) );
[39] Fix | Delete
?>
[40] Fix | Delete
<# } else if ( 'auto' === data.slide ) { #>
[41] Fix | Delete
<?php esc_html_e( 'Automatic Compression', 'wp-smushit' ); ?>
[42] Fix | Delete
<# } else if ( 'lossy' === data.slide ) { #>
[43] Fix | Delete
<?php echo esc_html( $lossy_title ); ?>
[44] Fix | Delete
<# } else if ( 'strip_exif' === data.slide ) { #>
[45] Fix | Delete
<?php esc_html_e( 'EXIF Metadata', 'wp-smushit' ); ?>
[46] Fix | Delete
<# } else if ( 'original' === data.slide ) { #>
[47] Fix | Delete
<?php esc_html_e( 'Full Size Images', 'wp-smushit' ); ?>
[48] Fix | Delete
<# } else if ( 'lazy_load' === data.slide ) { #>
[49] Fix | Delete
<?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
[50] Fix | Delete
<# } #>
[51] Fix | Delete
</h3>
[52] Fix | Delete
[53] Fix | Delete
<p class="sui-description" id="smush-description-onboarding-dialog">
[54] Fix | Delete
<# if ( data.first_slide === data.slide ) { #>
[55] Fix | Delete
<?php esc_html_e( "Nice work installing Smush! Let's get started by choosing how you want this plugin to work, and then let Smush do all the heavy lifting for you.", 'wp-smushit' ); ?>
[56] Fix | Delete
<# } else if ( 'auto' === data.slide ) { #>
[57] Fix | Delete
<?php esc_html_e( 'When you upload images to your site, Smush can automatically optimize and compress them for you saving you having to do this manually.', 'wp-smushit' ); ?>
[58] Fix | Delete
<# } else if ( 'lossy' === data.slide ) { #>
[59] Fix | Delete
<?php echo esc_html( $lossy_description ); ?>
[60] Fix | Delete
<# } else if ( 'strip_exif' === data.slide ) { #>
[61] Fix | Delete
<?php esc_html_e( 'Photos often store camera settings in the file, i.e., focal length, date, time and location. Removing EXIF data reduces the file size. Note: it does not strip SEO metadata.', 'wp-smushit' ); ?>
[62] Fix | Delete
<# } else if ( 'original' === data.slide ) { #>
[63] Fix | Delete
<?php esc_html_e( 'You can also have Smush compress your original images - this is helpful if your theme serves full size images.', 'wp-smushit' ); ?>
[64] Fix | Delete
<# } else if ( 'lazy_load' === data.slide ) { #>
[65] Fix | Delete
<?php esc_html_e( 'This feature stops offscreen images from loading until a visitor scrolls to them. Make your page load faster, use less bandwidth and fix the “defer offscreen images” recommendation from a Google PageSpeed test.', 'wp-smushit' ); ?>
[66] Fix | Delete
<# } #>
[67] Fix | Delete
</p>
[68] Fix | Delete
[69] Fix | Delete
</div>
[70] Fix | Delete
[71] Fix | Delete
<div class="sui-box-body sui-content-center sui-spacing-sides--0">
[72] Fix | Delete
<# if ( data.first_slide === data.slide ) { #>
[73] Fix | Delete
<?php if ( $should_show_tracking_confirmation ) : ?>
[74] Fix | Delete
<div class="smush-onboarding-tracking-box">
[75] Fix | Delete
<label for="{{{ data.slide }}}" class="sui-checkbox">
[76] Fix | Delete
<input
[77] Fix | Delete
type="checkbox"
[78] Fix | Delete
id="{{{ data.slide }}}"
[79] Fix | Delete
aria-labelledby="{{{ data.slide }}}-label"
[80] Fix | Delete
<# if ( data.value ) { #>checked<# } #>/>
[81] Fix | Delete
[82] Fix | Delete
<span aria-hidden="true"></span>
[83] Fix | Delete
[84] Fix | Delete
<span id="{{{ data.slide }}}-label">
[85] Fix | Delete
<?php
[86] Fix | Delete
/* translators: %1$: start bold tag %2$: end of the bold tag */
[87] Fix | Delete
echo sprintf( esc_html__( 'Share %1$sanonymous%2$s usage data to help us improve your Smush experience (recommended).', 'wp-smushit' ), '<strong>', '</strong>' );
[88] Fix | Delete
?>
[89] Fix | Delete
</span>
[90] Fix | Delete
</label>
[91] Fix | Delete
</div>
[92] Fix | Delete
<?php endif; ?>
[93] Fix | Delete
<a class="sui-button sui-button-blue sui-button-icon-right next" onclick="WP_Smush.onboarding.next(this)">
[94] Fix | Delete
<?php esc_html_e( 'Begin setup', 'wp-smushit' ); ?>
[95] Fix | Delete
<i class="sui-icon-chevron-right" aria-hidden="true"> </i>
[96] Fix | Delete
</a>
[97] Fix | Delete
<# } else { #>
[98] Fix | Delete
<div class="sui-box-selectors">
[99] Fix | Delete
<label for="{{{ data.slide }}}" class="sui-toggle">
[100] Fix | Delete
<input type="checkbox" id="{{{ data.slide }}}" aria-labelledby="{{{ data.slide }}}-label" <# if ( data.value ) { #>checked<# } #>>
[101] Fix | Delete
<span class="sui-toggle-slider" aria-hidden="true"> </span>
[102] Fix | Delete
<span id="{{{ data.slide }}}-label" class="sui-toggle-label">
[103] Fix | Delete
<# if ( 'auto' === data.slide ) { #>
[104] Fix | Delete
<?php esc_html_e( 'Automatically optimize new uploads', 'wp-smushit' ); ?>
[105] Fix | Delete
<# } else if ( 'lossy' === data.slide ) { #>
[106] Fix | Delete
<?php echo esc_html( $lossy_action_label ); ?>
[107] Fix | Delete
<# } else if ( 'strip_exif' === data.slide ) { #>
[108] Fix | Delete
<?php esc_html_e( 'Strip my image metadata', 'wp-smushit' ); ?>
[109] Fix | Delete
<# } else if ( 'original' === data.slide ) { #>
[110] Fix | Delete
<?php esc_html_e( 'Compress my full size images', 'wp-smushit' ); ?>
[111] Fix | Delete
<# } else if ( 'lazy_load' === data.slide ) { #>
[112] Fix | Delete
<?php esc_html_e( 'Enable Lazy Loading', 'wp-smushit' ); ?>
[113] Fix | Delete
<# } #>
[114] Fix | Delete
</span>
[115] Fix | Delete
</label>
[116] Fix | Delete
</div>
[117] Fix | Delete
<# } #>
[118] Fix | Delete
[119] Fix | Delete
<# if ( 'original' === data.slide ) { #>
[120] Fix | Delete
<p class="sui-description" style="padding: 0 90px">
[121] Fix | Delete
<?php esc_html_e( 'Note: By default we will store a copy of your original uploads just in case you want to revert in the future - you can turn this off at any time.', 'wp-smushit' ); ?>
[122] Fix | Delete
</p>
[123] Fix | Delete
<# } else if ( data.last ) { #>
[124] Fix | Delete
<button type="submit" class="sui-button sui-button-blue sui-button-icon-left" data-modal-close="">
[125] Fix | Delete
<i class="sui-icon-check" aria-hidden="true"> </i>
[126] Fix | Delete
<?php esc_html_e( 'Finish setup wizard', 'wp-smushit' ); ?>
[127] Fix | Delete
</button>
[128] Fix | Delete
<# } #>
[129] Fix | Delete
[130] Fix | Delete
<# if ( data.first_slide !== data.slide && ! data.last ) { #>
[131] Fix | Delete
<a class="sui-button sui-button-gray next" onclick="WP_Smush.onboarding.next(this)">
[132] Fix | Delete
<?php esc_html_e( 'Next', 'wp-smushit' ); ?>
[133] Fix | Delete
</a>
[134] Fix | Delete
<# } #>
[135] Fix | Delete
[136] Fix | Delete
<div class="smush-onboarding-arrows">
[137] Fix | Delete
<a href="#" class="previous <# if ( data.first ) { #>sui-hidden<# } #>" onclick="WP_Smush.onboarding.next(this)">
[138] Fix | Delete
<i class="sui-icon-chevron-left" aria-hidden="true"> </i>
[139] Fix | Delete
</a>
[140] Fix | Delete
<a href="#" class="next <# if ( data.last ) { #>sui-hidden<# } #>" onclick="WP_Smush.onboarding.next(this)">
[141] Fix | Delete
<i class="sui-icon-chevron-right" aria-hidden="true"> </i>
[142] Fix | Delete
</a>
[143] Fix | Delete
</div>
[144] Fix | Delete
</div>
[145] Fix | Delete
[146] Fix | Delete
<div class="sui-box-footer sui-flatten sui-content-center">
[147] Fix | Delete
<div class="sui-box-steps sui-sm">
[148] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo(data.first_slide)" class="<# if ( data.first_slide === data.slide ) { #>sui-current<# } #>" <# if ( data.first_slide === data.slide ) { #>disabled<# } #>>
[149] Fix | Delete
<?php esc_html_e( 'First step', 'wp-smushit' ); ?>
[150] Fix | Delete
</button>
[151] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo('auto')" class="<# if ( 'auto' === data.slide ) { #>sui-current<# } #>" <# if ( 'auto' === data.slide ) { #>disabled<# } #>>
[152] Fix | Delete
<?php esc_html_e( 'Automatic Compression', 'wp-smushit' ); ?>
[153] Fix | Delete
</button>
[154] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo('lossy')" class="<# if ( 'lossy' === data.slide ) { #>sui-current<# } #>" <# if ( 'lossy' === data.slide ) { #>disabled<# } #>>
[155] Fix | Delete
<?php echo esc_html( $lossy_title ); ?>
[156] Fix | Delete
</button>
[157] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo('strip_exif')" class="<# if ( 'strip_exif' === data.slide ) { #>sui-current<# } #>" <# if ( 'strip_exif' === data.slide ) { #>disabled<# } #>>
[158] Fix | Delete
<?php esc_html_e( 'EXIF Metadata', 'wp-smushit' ); ?>
[159] Fix | Delete
</button>
[160] Fix | Delete
<?php if ( WP_Smush::is_pro() ) : ?>
[161] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo('original')" class="<# if ( 'original' === data.slide ) { #>sui-current<# } #>" <# if ( 'original' === data.slide ) { #>disabled<# } #>>
[162] Fix | Delete
<?php esc_html_e( 'Full Size Images', 'wp-smushit' ); ?>
[163] Fix | Delete
</button>
[164] Fix | Delete
<?php endif; ?>
[165] Fix | Delete
<button onclick="WP_Smush.onboarding.goTo('lazy_load')" class="<# if ( 'lazy_load' === data.slide ) { #>sui-current<# } #>" <# if ( 'lazy_load' === data.slide ) { #>disabled<# } #>>
[166] Fix | Delete
<?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
[167] Fix | Delete
</button>
[168] Fix | Delete
</div>
[169] Fix | Delete
</div>
[170] Fix | Delete
</script>
[171] Fix | Delete
[172] Fix | Delete
<div class="sui-modal sui-modal-md">
[173] Fix | Delete
<div
[174] Fix | Delete
role="dialog"
[175] Fix | Delete
id="smush-onboarding-dialog"
[176] Fix | Delete
class="sui-modal-content smush-onboarding-dialog"
[177] Fix | Delete
aria-modal="true"
[178] Fix | Delete
aria-labelledby="smush-title-onboarding-dialog"
[179] Fix | Delete
aria-describedby="smush-description-onboarding-dialog"
[180] Fix | Delete
>
[181] Fix | Delete
<div class="sui-box">
[182] Fix | Delete
<div id="smush-onboarding-content" aria-live="polite"></div>
[183] Fix | Delete
<input type="hidden" id="smush_quick_setup_nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'smush_quick_setup' ) ); ?>">
[184] Fix | Delete
</div>
[185] Fix | Delete
<button class="sui-modal-skip smush-onboarding-skip-link">
[186] Fix | Delete
<?php esc_html_e( 'Skip this, I’ll set it up later', 'wp-smushit' ); ?>
[187] Fix | Delete
</button>
[188] Fix | Delete
</div>
[189] Fix | Delete
</div>
[190] Fix | Delete
[191] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function