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/wp-smush.../app/views/lazyload
File: meta-box.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Lazy loading meta box.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 3.2.0
[4] Fix | Delete
* @package WP_Smush
[5] Fix | Delete
*
[6] Fix | Delete
* @var array $conflicts Conflicting plugins.
[7] Fix | Delete
* @var array $cpts Custom post types.
[8] Fix | Delete
* @var array $settings Lazy loading settings.
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
if ( ! defined( 'WPINC' ) ) {
[12] Fix | Delete
die;
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
// We need this for uploader to work properly.
[16] Fix | Delete
wp_enqueue_media();
[17] Fix | Delete
wp_enqueue_style( 'wp-color-picker' );
[18] Fix | Delete
[19] Fix | Delete
?>
[20] Fix | Delete
[21] Fix | Delete
<p>
[22] Fix | Delete
<?php
[23] Fix | Delete
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' );
[24] Fix | Delete
?>
[25] Fix | Delete
</p>
[26] Fix | Delete
[27] Fix | Delete
<?php if ( ! $conflicts || ! is_array( $conflicts ) || empty( $conflicts ) ) : ?>
[28] Fix | Delete
<div class="sui-notice sui-notice-success">
[29] Fix | Delete
<div class="sui-notice-content">
[30] Fix | Delete
<div class="sui-notice-message">
[31] Fix | Delete
<i class="sui-notice-icon sui-icon-check-tick sui-md" aria-hidden="true"></i>
[32] Fix | Delete
<p><?php esc_html_e( 'Lazy loading is active.', 'wp-smushit' ); ?></p>
[33] Fix | Delete
</div>
[34] Fix | Delete
</div>
[35] Fix | Delete
</div>
[36] Fix | Delete
<?php else : ?>
[37] Fix | Delete
<div class="sui-notice sui-notice-warning">
[38] Fix | Delete
<div class="sui-notice-content">
[39] Fix | Delete
<div class="sui-notice-message">
[40] Fix | Delete
<i class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></i>
[41] Fix | Delete
<p>
[42] Fix | Delete
<?php
[43] Fix | Delete
printf( /* translators: %s - list of plugins */
[44] Fix | Delete
esc_html__( "We've detected another active plugin that offers Lazy Load: %s. Smush may not work as expected if Lazy Load is enabled in multiple plugins. For best results, activate Lazy Load in only one plugin at a time.", 'wp-smushit' ),
[45] Fix | Delete
'<strong>' . esc_html( join( ', ', $conflicts ) ) . '</strong>'
[46] Fix | Delete
);
[47] Fix | Delete
?>
[48] Fix | Delete
</p>
[49] Fix | Delete
</div>
[50] Fix | Delete
</div>
[51] Fix | Delete
</div>
[52] Fix | Delete
<?php endif; ?>
[53] Fix | Delete
[54] Fix | Delete
<div class="sui-box-settings-row">
[55] Fix | Delete
<div class="sui-box-settings-col-1">
[56] Fix | Delete
<span class="sui-settings-label">
[57] Fix | Delete
<?php esc_html_e( 'Media Types', 'wp-smushit' ); ?>
[58] Fix | Delete
</span>
[59] Fix | Delete
<span class="sui-description">
[60] Fix | Delete
<?php esc_html_e( 'Choose which media types you want to lazy load.', 'wp-smushit' ); ?>
[61] Fix | Delete
</span>
[62] Fix | Delete
</div>
[63] Fix | Delete
<div class="sui-box-settings-col-2">
[64] Fix | Delete
<label for="format-jpeg" class="sui-checkbox sui-checkbox-stacked">
[65] Fix | Delete
<input type='hidden' value='0' name='format[jpeg]' />
[66] Fix | Delete
<input type="checkbox" name="format[jpeg]" id="format-jpeg" <?php checked( $settings['format']['jpeg'] ); ?> />
[67] Fix | Delete
<span aria-hidden="true"></span>
[68] Fix | Delete
<span><?php esc_html_e( '.jpeg', 'wp-smushit' ); ?></span>
[69] Fix | Delete
</label>
[70] Fix | Delete
<label for="format-png" class="sui-checkbox sui-checkbox-stacked">
[71] Fix | Delete
<input type='hidden' value='0' name='format[png]' />
[72] Fix | Delete
<input type="checkbox" name="format[png]" id="format-png" <?php checked( $settings['format']['png'] ); ?> />
[73] Fix | Delete
<span aria-hidden="true"></span>
[74] Fix | Delete
<span><?php esc_html_e( '.png', 'wp-smushit' ); ?></span>
[75] Fix | Delete
</label>
[76] Fix | Delete
<label for="format-webp" class="sui-checkbox sui-checkbox-stacked">
[77] Fix | Delete
<input type='hidden' value='0' name='format[webp]' />
[78] Fix | Delete
<input type="checkbox" name="format[webp]" id="format-webp" <?php checked( ! isset( $settings['format']['webp'] ) || $settings['format']['webp'] ); ?> />
[79] Fix | Delete
<span aria-hidden="true"></span>
[80] Fix | Delete
<span><?php esc_html_e( '.webp', 'wp-smushit' ); ?></span>
[81] Fix | Delete
</label>
[82] Fix | Delete
<label for="format-gif" class="sui-checkbox sui-checkbox-stacked">
[83] Fix | Delete
<input type='hidden' value='0' name='format[gif]' />
[84] Fix | Delete
<input type="checkbox" name="format[gif]" id="format-gif" <?php checked( $settings['format']['gif'] ); ?> />
[85] Fix | Delete
<span aria-hidden="true"></span>
[86] Fix | Delete
<span><?php esc_html_e( '.gif', 'wp-smushit' ); ?></span>
[87] Fix | Delete
</label>
[88] Fix | Delete
<label for="format-svg" class="sui-checkbox sui-checkbox-stacked">
[89] Fix | Delete
<input type='hidden' value='0' name='format[svg]' />
[90] Fix | Delete
<input type="checkbox" name="format[svg]" id="format-svg" <?php checked( $settings['format']['svg'] ); ?> />
[91] Fix | Delete
<span aria-hidden="true"></span>
[92] Fix | Delete
<span><?php esc_html_e( '.svg', 'wp-smushit' ); ?></span>
[93] Fix | Delete
</label>
[94] Fix | Delete
<label for="format-iframe" class="sui-checkbox sui-checkbox-stacked">
[95] Fix | Delete
<input type='hidden' value='0' name='format[iframe]' />
[96] Fix | Delete
<input type="checkbox" name="format[iframe]" id="format-iframe" <?php checked( ! isset( $settings['format']['iframe'] ) || $settings['format']['iframe'] ); ?> />
[97] Fix | Delete
<span aria-hidden="true"></span>
[98] Fix | Delete
<span><?php esc_html_e( 'iframe', 'wp-smushit' ); ?></span>
[99] Fix | Delete
</label>
[100] Fix | Delete
</div>
[101] Fix | Delete
</div>
[102] Fix | Delete
[103] Fix | Delete
<div class="sui-box-settings-row">
[104] Fix | Delete
<div class="sui-box-settings-col-1">
[105] Fix | Delete
<span class="sui-settings-label">
[106] Fix | Delete
<?php esc_html_e( 'Output Locations', 'wp-smushit' ); ?>
[107] Fix | Delete
</span>
[108] Fix | Delete
<span class="sui-description">
[109] Fix | Delete
<?php esc_html_e( 'By default we will lazy load all images, but you can refine this to specific media outputs too.', 'wp-smushit' ); ?>
[110] Fix | Delete
</span>
[111] Fix | Delete
</div>
[112] Fix | Delete
<div class="sui-box-settings-col-2">
[113] Fix | Delete
<label for="output-content" class="sui-checkbox sui-checkbox-stacked">
[114] Fix | Delete
<input type='hidden' value='0' name='output[content]' />
[115] Fix | Delete
<input type="checkbox" name="output[content]" id="output-content" <?php checked( $settings['output']['content'] ); ?> />
[116] Fix | Delete
<span aria-hidden="true"></span>
[117] Fix | Delete
<span><?php esc_html_e( 'Content', 'wp-smushit' ); ?></span>
[118] Fix | Delete
</label>
[119] Fix | Delete
<label for="output-widgets" class="sui-checkbox sui-checkbox-stacked">
[120] Fix | Delete
<input type='hidden' value='0' name='output[widgets]' />
[121] Fix | Delete
<input type="checkbox" name="output[widgets]" id="output-widgets" <?php checked( $settings['output']['widgets'] ); ?> />
[122] Fix | Delete
<span aria-hidden="true"></span>
[123] Fix | Delete
<span><?php esc_html_e( 'Widgets', 'wp-smushit' ); ?></span>
[124] Fix | Delete
</label>
[125] Fix | Delete
<label for="output-thumbnails" class="sui-checkbox sui-checkbox-stacked">
[126] Fix | Delete
<input type='hidden' value='0' name='output[thumbnails]' />
[127] Fix | Delete
<input type="checkbox" name="output[thumbnails]" id="output-thumbnails" <?php checked( $settings['output']['thumbnails'] ); ?> />
[128] Fix | Delete
<span aria-hidden="true"></span>
[129] Fix | Delete
<span><?php esc_html_e( 'Post Thumbnail', 'wp-smushit' ); ?></span>
[130] Fix | Delete
</label>
[131] Fix | Delete
<label for="output-gravatars" class="sui-checkbox sui-checkbox-stacked">
[132] Fix | Delete
<input type='hidden' value='0' name='output[gravatars]' />
[133] Fix | Delete
<input type="checkbox" name="output[gravatars]" id="output-gravatars" <?php checked( $settings['output']['gravatars'] ); ?> />
[134] Fix | Delete
<span aria-hidden="true"></span>
[135] Fix | Delete
<span><?php esc_html_e( 'Gravatars', 'wp-smushit' ); ?></span>
[136] Fix | Delete
</label>
[137] Fix | Delete
</div>
[138] Fix | Delete
</div>
[139] Fix | Delete
[140] Fix | Delete
<div class="sui-box-settings-row">
[141] Fix | Delete
<div class="sui-box-settings-col-1">
[142] Fix | Delete
<span class="sui-settings-label">
[143] Fix | Delete
<?php esc_html_e( 'Display & Animation', 'wp-smushit' ); ?>
[144] Fix | Delete
</span>
[145] Fix | Delete
<span class="sui-description">
[146] Fix | Delete
<?php esc_html_e( 'Choose how you want preloading images to be displayed, as well as how they animate into view.', 'wp-smushit' ); ?>
[147] Fix | Delete
</span>
[148] Fix | Delete
</div>
[149] Fix | Delete
<div class="sui-box-settings-col-2">
[150] Fix | Delete
<strong><?php esc_html_e( 'Display', 'wp-smushit' ); ?></strong>
[151] Fix | Delete
<div class="sui-description">
[152] Fix | Delete
<?php esc_html_e( 'Choose how you want the non-loaded image to look.', 'wp-smushit' ); ?>
[153] Fix | Delete
</div>
[154] Fix | Delete
[155] Fix | Delete
<div class="sui-side-tabs sui-tabs">
[156] Fix | Delete
<div data-tabs>
[157] Fix | Delete
<label for="animation-fadein" class="sui-tab-item <?php echo 'fadein' === $settings['animation']['selected'] ? 'active' : ''; ?>">
[158] Fix | Delete
<input type="radio" name="animation[selected]" value="fadein" id="animation-fadein" <?php checked( $settings['animation']['selected'], 'fadein' ); ?> />
[159] Fix | Delete
<?php esc_html_e( 'Fade In', 'wp-smushit' ); ?>
[160] Fix | Delete
</label>
[161] Fix | Delete
<label for="animation-spinner" class="sui-tab-item <?php echo 'spinner' === $settings['animation']['selected'] ? 'active' : ''; ?>">
[162] Fix | Delete
<input type="radio" name="animation[selected]" value="spinner" id="animation-spinner" <?php checked( $settings['animation']['selected'], 'spinner' ); ?> />
[163] Fix | Delete
<?php esc_html_e( 'Spinner', 'wp-smushit' ); ?>
[164] Fix | Delete
</label>
[165] Fix | Delete
<label for="animation-placeholder" class="sui-tab-item <?php echo 'placeholder' === $settings['animation']['selected'] ? 'active' : ''; ?>">
[166] Fix | Delete
<input type="radio" name="animation[selected]" value="placeholder" id="animation-placeholder" <?php checked( $settings['animation']['selected'], 'placeholder' ); ?> />
[167] Fix | Delete
<?php esc_html_e( 'Placeholder', 'wp-smushit' ); ?>
[168] Fix | Delete
</label>
[169] Fix | Delete
<label for="animation-disabled" class="sui-tab-item <?php echo 'none' === $settings['animation']['selected'] ? 'active' : ''; ?>">
[170] Fix | Delete
<input type="radio" name="animation[selected]" value="none" id="animation-disabled" <?php checked( $settings['animation']['selected'], 'none' ); ?> />
[171] Fix | Delete
<?php esc_html_e( 'None', 'wp-smushit' ); ?>
[172] Fix | Delete
</label>
[173] Fix | Delete
</div><!-- end data-tabs -->
[174] Fix | Delete
<div data-panes>
[175] Fix | Delete
<div class="sui-tab-boxed <?php echo 'fadein' === $settings['animation']['selected'] ? 'active' : ''; ?>">
[176] Fix | Delete
<strong><?php esc_html_e( 'Animation', 'wp-smushit' ); ?></strong>
[177] Fix | Delete
<span class="sui-description">
[178] Fix | Delete
<?php esc_html_e( 'Once the image has loaded, choose how you want the image to display when it comes into view.', 'wp-smushit' ); ?>
[179] Fix | Delete
</span>
[180] Fix | Delete
<div class="sui-form-field-inline">
[181] Fix | Delete
<div class="sui-form-field">
[182] Fix | Delete
<label for="fadein-duration" class="sui-label"><?php esc_html_e( 'Duration', 'wp-smushit' ); ?></label>
[183] Fix | Delete
<input type='hidden' value='0' name='animation[duration]' />
[184] Fix | Delete
<input type="number" name="animation[duration]" placeholder="400" value="<?php echo absint( $settings['animation']['fadein']['duration'] ); ?>" id="fadein-duration" class="sui-form-control sui-input-sm sui-field-has-suffix">
[185] Fix | Delete
<span class="sui-field-suffix"><?php esc_html_e( 'ms', 'wp-smushit' ); ?></span>
[186] Fix | Delete
</div>
[187] Fix | Delete
<div class="sui-form-field">
[188] Fix | Delete
<label for="fadein-delay" class="sui-label"><?php esc_html_e( 'Delay', 'wp-smushit' ); ?></label>
[189] Fix | Delete
<input type='hidden' value='0' name='animation[delay]' />
[190] Fix | Delete
<input type="number" name="animation[delay]" placeholder="0" value="<?php echo absint( $settings['animation']['fadein']['delay'] ); ?>" id="fadein-delay" class="sui-form-control sui-input-sm sui-field-has-suffix">
[191] Fix | Delete
<span class="sui-field-suffix"><?php esc_html_e( 'ms', 'wp-smushit' ); ?></span>
[192] Fix | Delete
</div>
[193] Fix | Delete
</div>
[194] Fix | Delete
</div>
[195] Fix | Delete
[196] Fix | Delete
<div class="sui-tab-boxed <?php echo 'spinner' === $settings['animation']['selected'] ? 'active' : ''; ?>" id="smush-lazy-load-spinners">
[197] Fix | Delete
<span class="sui-description">
[198] Fix | Delete
<?php esc_html_e( 'Display a spinner where the image will be during lazy loading. You can choose a predefined spinner, or upload your own GIF.', 'wp-smushit' ); ?>
[199] Fix | Delete
</span>
[200] Fix | Delete
<label class="sui-label"><?php esc_html_e( 'Spinner', 'wp-smushit' ); ?></label>
[201] Fix | Delete
<div class="sui-box-selectors">
[202] Fix | Delete
<ul>
[203] Fix | Delete
<?php for ( $i = 1; $i <= 5; $i++ ) : ?>
[204] Fix | Delete
<li><label for="spinner-<?php echo absint( $i ); ?>" class="sui-box-selector">
[205] Fix | Delete
<input type="radio" name="animation[spinner-icon]" id="spinner-<?php echo absint( $i ); ?>" value="<?php echo absint( $i ); ?>" <?php checked( (int) $settings['animation']['spinner']['selected'] === $i ); ?> />
[206] Fix | Delete
<span>
[207] Fix | Delete
<img alt="<?php esc_attr_e( 'Spinner image', 'wp-smushit' ); ?>&nbsp;<?php echo absint( $i ); ?>" src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-lazyloader-' . $i . '.gif' ); ?>" />
[208] Fix | Delete
</span>
[209] Fix | Delete
</label></li>
[210] Fix | Delete
<?php endfor; ?>
[211] Fix | Delete
[212] Fix | Delete
<?php foreach ( $settings['animation']['spinner']['custom'] as $image ) : ?>
[213] Fix | Delete
<?php $custom_link = wp_get_attachment_image_src( $image, 'full' ); ?>
[214] Fix | Delete
<li><label for="spinner-<?php echo absint( $image ); ?>" class="sui-box-selector">
[215] Fix | Delete
<input type="radio" name="animation[spinner-icon]" id="spinner-<?php echo absint( $image ); ?>" value="<?php echo absint( $image ); ?>" <?php checked( $image === $settings['animation']['spinner']['selected'] ); ?> />
[216] Fix | Delete
<span>
[217] Fix | Delete
<button class="remove-selector sui-button-icon sui-tooltip smush-ll-remove" data-id="<?php echo absint( $image ); ?>" data-tooltip="<?php esc_attr_e( 'Remove', 'wp-smushit' ); ?>">
[218] Fix | Delete
<i class="sui-icon-close" aria-hidden="true" data-id="<?php echo absint( $image ); ?>" data-type="spinner"></i>
[219] Fix | Delete
</button>
[220] Fix | Delete
[221] Fix | Delete
<img alt="<?php esc_attr_e( 'Spinner image', 'wp-smushit' ); ?>&nbsp;<?php echo absint( $image ); ?>" src="<?php echo esc_url( $custom_link[0] ); ?>" />
[222] Fix | Delete
</span>
[223] Fix | Delete
</label></li>
[224] Fix | Delete
<?php endforeach; ?>
[225] Fix | Delete
</ul>
[226] Fix | Delete
[227] Fix | Delete
<div class="sui-upload">
[228] Fix | Delete
<input type="hidden" name="animation[custom-spinner]" id="smush-spinner-icon-file" value="">
[229] Fix | Delete
[230] Fix | Delete
<div class="sui-upload-image" aria-hidden="true">
[231] Fix | Delete
<div class="sui-image-mask"></div>
[232] Fix | Delete
<div role="button" class="sui-image-preview" id="smush-spinner-icon-preview" onclick="WP_Smush.Lazyload.addLoaderIcon()"></div>
[233] Fix | Delete
</div>
[234] Fix | Delete
[235] Fix | Delete
<a class="sui-upload-button" id="smush-upload-spinner" onclick="WP_Smush.Lazyload.addLoaderIcon()">
[236] Fix | Delete
<i class="sui-icon-upload-cloud" aria-hidden="true"></i> <?php esc_html_e( 'Upload file', 'wp-smushit' ); ?>
[237] Fix | Delete
</a>
[238] Fix | Delete
[239] Fix | Delete
<div class="sui-upload-file" id="smush-remove-spinner">
[240] Fix | Delete
<span></span>
[241] Fix | Delete
<button aria-label="<?php esc_attr_e( 'Remove file', 'wp-smushit' ); ?>">
[242] Fix | Delete
<i class="sui-icon-close" aria-hidden="true"></i>
[243] Fix | Delete
</button>
[244] Fix | Delete
</div>
[245] Fix | Delete
</div>
[246] Fix | Delete
</div>
[247] Fix | Delete
</div>
[248] Fix | Delete
[249] Fix | Delete
<div class="sui-tab-boxed <?php echo 'placeholder' === $settings['animation']['selected'] ? 'active' : ''; ?>" id="smush-lazy-load-placeholder">
[250] Fix | Delete
<span class="sui-description">
[251] Fix | Delete
<?php esc_html_e( 'Display a placeholder to display instead of the actual image during lazy loading. You can choose a predefined image, or upload your own.', 'wp-smushit' ); ?>
[252] Fix | Delete
</span>
[253] Fix | Delete
<label class="sui-label"><?php esc_html_e( 'Image', 'wp-smushit' ); ?></label>
[254] Fix | Delete
<div class="sui-box-selectors">
[255] Fix | Delete
<ul>
[256] Fix | Delete
<?php for ( $i = 1; $i <= 2; $i++ ) : ?>
[257] Fix | Delete
<li><label for="placeholder-icon-<?php echo absint( $i ); ?>" class="sui-box-selector">
[258] Fix | Delete
<input type="radio" name="animation[placeholder-icon]" id="placeholder-icon-<?php echo absint( $i ); ?>" value="<?php echo absint( $i ); ?>" <?php checked( (int) $settings['animation']['placeholder']['selected'] === $i ); ?> />
[259] Fix | Delete
<span>
[260] Fix | Delete
<img alt="<?php esc_attr_e( 'Placeholder image', 'wp-smushit' ); ?>&nbsp;<?php echo absint( $i ); ?>" src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-placeholder.png' ); ?>" />
[261] Fix | Delete
</span>
[262] Fix | Delete
</label></li>
[263] Fix | Delete
<?php endfor; ?>
[264] Fix | Delete
[265] Fix | Delete
<?php foreach ( $settings['animation']['placeholder']['custom'] as $image ) : ?>
[266] Fix | Delete
<?php $custom_link = wp_get_attachment_image_src( $image, 'full' ); ?>
[267] Fix | Delete
<li><label for="placeholder-icon-<?php echo absint( $image ); ?>" class="sui-box-selector">
[268] Fix | Delete
<input type="radio" name="animation[placeholder-icon]" id="placeholder-icon-<?php echo absint( $image ); ?>" value="<?php echo absint( $image ); ?>" <?php checked( $image === $settings['animation']['placeholder']['selected'] ); ?> />
[269] Fix | Delete
<span>
[270] Fix | Delete
<button class="remove-selector sui-button-icon sui-tooltip smush-ll-remove" data-tooltip="<?php esc_attr_e( 'Remove', 'wp-smushit' ); ?>">
[271] Fix | Delete
<i class="sui-icon-close" aria-hidden="true" data-id="<?php echo absint( $image ); ?>" data-type="placeholder"></i>
[272] Fix | Delete
</button>
[273] Fix | Delete
<img alt="<?php esc_attr_e( 'Placeholder image', 'wp-smushit' ); ?>&nbsp;<?php echo absint( $image ); ?>" src="<?php echo esc_url( $custom_link[0] ); ?>" />
[274] Fix | Delete
</span>
[275] Fix | Delete
</label></li>
[276] Fix | Delete
<?php endforeach; ?>
[277] Fix | Delete
</ul>
[278] Fix | Delete
[279] Fix | Delete
<div class="sui-upload">
[280] Fix | Delete
<input type="hidden" name="animation[custom-placeholder]" id="smush-placeholder-icon-file" value="" />
[281] Fix | Delete
[282] Fix | Delete
<div class="sui-upload-image" aria-hidden="true">
[283] Fix | Delete
<div class="sui-image-mask"></div>
[284] Fix | Delete
<div role="button" class="sui-image-preview" id="smush-placeholder-icon-preview" onclick="WP_Smush.Lazyload.addLoaderIcon('placeholder')"></div>
[285] Fix | Delete
</div>
[286] Fix | Delete
[287] Fix | Delete
<a class="sui-upload-button" id="smush-upload-placeholder" onclick="WP_Smush.Lazyload.addLoaderIcon('placeholder')">
[288] Fix | Delete
<i class="sui-icon-upload-cloud" aria-hidden="true"></i> <?php esc_html_e( 'Upload file', 'wp-smushit' ); ?>
[289] Fix | Delete
</a>
[290] Fix | Delete
[291] Fix | Delete
<div class="sui-upload-file" id="smush-remove-placeholder">
[292] Fix | Delete
<span></span>
[293] Fix | Delete
<button aria-label="<?php esc_attr_e( 'Remove file', 'wp-smushit' ); ?>">
[294] Fix | Delete
<i class="sui-icon-close" aria-hidden="true"></i>
[295] Fix | Delete
</button>
[296] Fix | Delete
</div>
[297] Fix | Delete
</div>
[298] Fix | Delete
</div>
[299] Fix | Delete
[300] Fix | Delete
<?php $color = isset( $settings['animation']['placeholder']['color'] ) ? $settings['animation']['placeholder']['color'] : '#F3F3F3'; ?>
[301] Fix | Delete
<label class="sui-label" for="smush-color-picker"><?php esc_html_e( 'Background color', 'wp-smushit' ); ?></label>
[302] Fix | Delete
<div class="sui-colorpicker-wrap">
[303] Fix | Delete
<div class="sui-colorpicker sui-colorpicker-hex" aria-hidden="true">
[304] Fix | Delete
<div class="sui-colorpicker-value">
[305] Fix | Delete
<span role="button">
[306] Fix | Delete
<span style="background-color: <?php echo esc_attr( $color ); ?>"></span>
[307] Fix | Delete
</span>
[308] Fix | Delete
<input type="text" value="<?php echo esc_attr( $color ); ?>" readonly="readonly" />
[309] Fix | Delete
<button><i class="sui-icon-close" aria-hidden="true"></i></button>
[310] Fix | Delete
</div>
[311] Fix | Delete
<button class="sui-button"><?php esc_html_e( 'Select', 'wp-smushit' ); ?></button>
[312] Fix | Delete
</div>
[313] Fix | Delete
<input type="text" name="animation[color]" value="<?php echo esc_attr( $color ); ?>" id="smush-color-picker" class="sui-colorpicker-input" data-attribute="<?php echo esc_attr( $color ); ?>" />
[314] Fix | Delete
</div>
[315] Fix | Delete
</div>
[316] Fix | Delete
[317] Fix | Delete
<div class="sui-notice <?php echo ! $settings['animation']['selected'] ? 'active' : ''; ?>">
[318] Fix | Delete
<div class="sui-notice-content">
[319] Fix | Delete
<div class="sui-notice-message">
[320] Fix | Delete
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
[321] Fix | Delete
<p><?php esc_html_e( 'Images will flash into view as soon as they are ready to display.', 'wp-smushit' ); ?></p>
[322] Fix | Delete
</div>
[323] Fix | Delete
</div>
[324] Fix | Delete
</div>
[325] Fix | Delete
</div><!-- end data-panes -->
[326] Fix | Delete
</div><!-- end .sui-tabs -->
[327] Fix | Delete
</div><!-- end .sui-box-settings-col-2 -->
[328] Fix | Delete
<script>
[329] Fix | Delete
jQuery(document).ready(function($){
[330] Fix | Delete
var $suiPickerInputs = $('#smush-color-picker');
[331] Fix | Delete
[332] Fix | Delete
$suiPickerInputs.wpColorPicker({
[333] Fix | Delete
width: 300,
[334] Fix | Delete
change: function(event, ui) {
[335] Fix | Delete
$(this).val( ui.color.toCSS() ).trigger('change');
[336] Fix | Delete
}
[337] Fix | Delete
});
[338] Fix | Delete
[339] Fix | Delete
if ( $suiPickerInputs.hasClass('wp-color-picker') ) {
[340] Fix | Delete
$suiPickerInputs.each( function() {
[341] Fix | Delete
var $suiPickerInput = $(this),
[342] Fix | Delete
$suiPicker = $suiPickerInput.closest('.sui-colorpicker-wrap'),
[343] Fix | Delete
$suiPickerColor = $suiPicker.find('.sui-colorpicker-value span[role=button]'),
[344] Fix | Delete
$suiPickerValue = $suiPicker.find('.sui-colorpicker-value'),
[345] Fix | Delete
$wpPicker = $suiPickerInput.closest('.wp-picker-container'),
[346] Fix | Delete
$wpPickerButton = $wpPicker.find('.wp-color-result');
[347] Fix | Delete
[348] Fix | Delete
// Listen to color change
[349] Fix | Delete
$suiPickerInput.on('change', function() {
[350] Fix | Delete
// Change color preview
[351] Fix | Delete
$suiPickerColor.find('span').css({
[352] Fix | Delete
'background-color': $wpPickerButton.css('background-color')
[353] Fix | Delete
});
[354] Fix | Delete
[355] Fix | Delete
// Change color value
[356] Fix | Delete
$suiPickerValue.find('input').val( $suiPickerInput.val() );
[357] Fix | Delete
});
[358] Fix | Delete
[359] Fix | Delete
// Open iris picker
[360] Fix | Delete
$suiPicker.find('.sui-button, span[role=button]').on('click', function(e) {
[361] Fix | Delete
$wpPickerButton.trigger('click');
[362] Fix | Delete
[363] Fix | Delete
e.preventDefault();
[364] Fix | Delete
e.stopPropagation();
[365] Fix | Delete
});
[366] Fix | Delete
[367] Fix | Delete
// Clear color value
[368] Fix | Delete
$suiPickerValue.find('button').on( 'click', function(e) {
[369] Fix | Delete
e.preventDefault();
[370] Fix | Delete
[371] Fix | Delete
$wpPicker.find('.wp-picker-clear').trigger('click');
[372] Fix | Delete
$suiPickerValue.find('input').val('');
[373] Fix | Delete
$suiPickerInput.val('').trigger('change');
[374] Fix | Delete
$suiPickerColor.find('span').css({
[375] Fix | Delete
'background-color': ''
[376] Fix | Delete
});
[377] Fix | Delete
[378] Fix | Delete
e.preventDefault();
[379] Fix | Delete
e.stopPropagation();
[380] Fix | Delete
});
[381] Fix | Delete
[382] Fix | Delete
});
[383] Fix | Delete
}
[384] Fix | Delete
});
[385] Fix | Delete
</script>
[386] Fix | Delete
<style>
[387] Fix | Delete
#smush-lazy-load-placeholder .sui-box-selector input + span,
[388] Fix | Delete
#smush-lazy-load-placeholder .sui-box-selector input:checked + span {
[389] Fix | Delete
background-color: <?php echo esc_attr( $color ); ?>;
[390] Fix | Delete
}
[391] Fix | Delete
</style>
[392] Fix | Delete
</div><!-- end .sui-box-settings-row -->
[393] Fix | Delete
[394] Fix | Delete
<div class="sui-box-settings-row">
[395] Fix | Delete
<div class="sui-box-settings-col-1">
[396] Fix | Delete
<span class="sui-settings-label">
[397] Fix | Delete
<?php esc_html_e( 'Include/Exclude', 'wp-smushit' ); ?>
[398] Fix | Delete
</span>
[399] Fix | Delete
<span class="sui-description">
[400] Fix | Delete
<?php esc_html_e( 'Disable lazy loading for specific pages, posts or image classes that you wish to prevent lazyloading on.', 'wp-smushit' ); ?>
[401] Fix | Delete
</span>
[402] Fix | Delete
</div>
[403] Fix | Delete
<div class="sui-box-settings-col-2">
[404] Fix | Delete
<div class="sui-form-field">
[405] Fix | Delete
<strong><?php esc_html_e( 'Post Types', 'wp-smushit' ); ?></strong>
[406] Fix | Delete
<div class="sui-description">
[407] Fix | Delete
<?php esc_html_e( 'Choose the post types you want to lazy load.', 'wp-smushit' ); ?>
[408] Fix | Delete
</div>
[409] Fix | Delete
<table class="sui-table">
[410] Fix | Delete
<thead>
[411] Fix | Delete
<tr>
[412] Fix | Delete
<th><?php esc_html_e( 'Name', 'wp-smushit' ); ?></th>
[413] Fix | Delete
<th><?php esc_html_e( 'Type', 'wp-smushit' ); ?></th>
[414] Fix | Delete
<th>&nbsp;</th>
[415] Fix | Delete
</tr>
[416] Fix | Delete
</thead>
[417] Fix | Delete
<tbody>
[418] Fix | Delete
<tr>
[419] Fix | Delete
<td><strong><?php esc_html_e( 'Frontpage', 'wp-smushit' ); ?></strong></td>
[420] Fix | Delete
<td>frontpage</td>
[421] Fix | Delete
<td>
[422] Fix | Delete
<label class="sui-toggle" for="include-frontpage">
[423] Fix | Delete
<input type='hidden' value='0' name='include[frontpage]' />
[424] Fix | Delete
<input type="checkbox" name="include[frontpage]" id="include-frontpage" <?php checked( $settings['include']['frontpage'] ); ?>>
[425] Fix | Delete
<span class="sui-toggle-slider"></span>
[426] Fix | Delete
</label>
[427] Fix | Delete
</td>
[428] Fix | Delete
</tr>
[429] Fix | Delete
<tr>
[430] Fix | Delete
<td><strong><?php esc_html_e( 'Blog', 'wp-smushit' ); ?></strong></td>
[431] Fix | Delete
<td>home</td>
[432] Fix | Delete
<td>
[433] Fix | Delete
<label class="sui-toggle" for="include-home">
[434] Fix | Delete
<input type='hidden' value='0' name='include[home]' />
[435] Fix | Delete
<input type="checkbox" name="include[home]" id="include-home" <?php checked( $settings['include']['home'] ); ?>>
[436] Fix | Delete
<span class="sui-toggle-slider"></span>
[437] Fix | Delete
</label>
[438] Fix | Delete
</td>
[439] Fix | Delete
</tr>
[440] Fix | Delete
<tr>
[441] Fix | Delete
<td><strong><?php esc_html_e( 'Pages', 'wp-smushit' ); ?></strong></td>
[442] Fix | Delete
<td>page</td>
[443] Fix | Delete
<td>
[444] Fix | Delete
<label class="sui-toggle" for="include-page">
[445] Fix | Delete
<input type='hidden' value='0' name='include[page]' />
[446] Fix | Delete
<input type="checkbox" name="include[page]" id="include-page" <?php checked( $settings['include']['page'] ); ?>>
[447] Fix | Delete
<span class="sui-toggle-slider"></span>
[448] Fix | Delete
</label>
[449] Fix | Delete
</td>
[450] Fix | Delete
</tr>
[451] Fix | Delete
<tr>
[452] Fix | Delete
<td><strong><?php esc_html_e( 'Posts', 'wp-smushit' ); ?></strong></td>
[453] Fix | Delete
<td>single</td>
[454] Fix | Delete
<td>
[455] Fix | Delete
<label class="sui-toggle" for="include-single">
[456] Fix | Delete
<input type='hidden' value='0' name='include[single]' />
[457] Fix | Delete
<input type="checkbox" name="include[single]" id="include-single" <?php checked( $settings['include']['single'] ); ?>>
[458] Fix | Delete
<span class="sui-toggle-slider"></span>
[459] Fix | Delete
</label>
[460] Fix | Delete
</td>
[461] Fix | Delete
</tr>
[462] Fix | Delete
<tr>
[463] Fix | Delete
<td><strong><?php esc_html_e( 'Archives', 'wp-smushit' ); ?></strong></td>
[464] Fix | Delete
<td>archive</td>
[465] Fix | Delete
<td>
[466] Fix | Delete
<label class="sui-toggle" for="include-archive">
[467] Fix | Delete
<input type='hidden' value='0' name='include[archive]' />
[468] Fix | Delete
<input type="checkbox" name="include[archive]" id="include-archive" <?php checked( $settings['include']['archive'] ); ?>>
[469] Fix | Delete
<span class="sui-toggle-slider"></span>
[470] Fix | Delete
</label>
[471] Fix | Delete
</td>
[472] Fix | Delete
</tr>
[473] Fix | Delete
<tr>
[474] Fix | Delete
<td><strong><?php esc_html_e( 'Categories', 'wp-smushit' ); ?></strong></td>
[475] Fix | Delete
<td>category</td>
[476] Fix | Delete
<td>
[477] Fix | Delete
<label class="sui-toggle" for="include-category">
[478] Fix | Delete
<input type='hidden' value='0' name='include[category]' />
[479] Fix | Delete
<input type="checkbox" name="include[category]" id="include-category" <?php checked( $settings['include']['category'] ); ?>>
[480] Fix | Delete
<span class="sui-toggle-slider"></span>
[481] Fix | Delete
</label>
[482] Fix | Delete
</td>
[483] Fix | Delete
</tr>
[484] Fix | Delete
<tr>
[485] Fix | Delete
<td><strong><?php esc_html_e( 'Tags', 'wp-smushit' ); ?></strong></td>
[486] Fix | Delete
<td>tag</td>
[487] Fix | Delete
<td>
[488] Fix | Delete
<label class="sui-toggle" for="include-tag">
[489] Fix | Delete
<input type='hidden' value='0' name='include[tag]' />
[490] Fix | Delete
<input type="checkbox" name="include[tag]" id="include-tag" <?php checked( $settings['include']['tag'] ); ?>>
[491] Fix | Delete
<span class="sui-toggle-slider"></span>
[492] Fix | Delete
</label>
[493] Fix | Delete
</td>
[494] Fix | Delete
</tr>
[495] Fix | Delete
<?php foreach ( $cpts as $custom_post_type ) : ?>
[496] Fix | Delete
<tr>
[497] Fix | Delete
<td><strong><?php echo esc_html( $custom_post_type->label ); ?></strong></td>
[498] Fix | Delete
<td><?php echo esc_html( $custom_post_type->name ); ?></td>
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function