| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
|
| 5 |
?> |
| 6 |
|
| 7 |
<div class="wowp-snippets__header"> |
| 8 |
<h3 class="wowp-snippets__header-title">Media & Embeds</h3> |
| 9 |
<p class="wowp-snippets__header-description">Optimize and control how media and embeds are handled on your |
| 10 |
site.</p> |
| 11 |
</div> |
| 12 |
|
| 13 |
<?php |
| 14 |
|
| 15 |
$snippets = [ |
| 16 |
'enable_svg_upload' => [ |
| 17 |
'Enable Uploading SVG Files', |
| 18 |
'Allow uploading SVG files to the media library.', |
| 19 |
], |
| 20 |
|
| 21 |
'enable_lowercase_filenames_for_uploads' => [ |
| 22 |
'Enable Lowercase Filenames for Uploads', |
| 23 |
'Automatically convert uploaded filenames to lowercase.', |
| 24 |
], |
| 25 |
|
| 26 |
'enable_default_alt_to_avatar' => [ |
| 27 |
'Enable Default ALT to Avatar/Gravatar Images', |
| 28 |
'Automatically set user name as alt text for avatars.', |
| 29 |
], |
| 30 |
|
| 31 |
'disable_lazy_load' => [ |
| 32 |
'Disable Lazy Load', |
| 33 |
'Turn off lazy-loading on images and iframes.', |
| 34 |
], |
| 35 |
|
| 36 |
'disable_embeds' => [ |
| 37 |
'Disable Embeds', |
| 38 |
'Prevent embedding content from external sites.', |
| 39 |
], |
| 40 |
|
| 41 |
]; |
| 42 |
|
| 43 |
self::create_options( $snippets ); |
| 44 |
|
| 45 |
?> |
| 46 |
<div class="wowp-snippet__item"> |
| 47 |
<div class="wowp-snippet__item-header"> |
| 48 |
<label for="change_oEmbed_size">Change oEmbed Max Width and Height</label> |
| 49 |
<p class="wowp-snippet__item-description">Set max width and height for embedded content.</p> |
| 50 |
</div> |
| 51 |
<div class="wowp-field has-checkbox"> |
| 52 |
<label class="switch"> |
| 53 |
<?php self::field( 'checkbox', 'change_oEmbed_size' ); ?> |
| 54 |
<span class="slider"></span> |
| 55 |
</label> |
| 56 |
</div> |
| 57 |
<div class="wowp-snippet__item-expand is-hidden"> |
| 58 |
<div class="wowp-fields__group"> |
| 59 |
<div class="wowp-field"> |
| 60 |
<label><span class="label">Width</span> |
| 61 |
<?php self::field( 'number', 'change_oEmbed_size_width', '', '400' ); ?> |
| 62 |
</label> |
| 63 |
</div> |
| 64 |
<div class="wowp-field"> |
| 65 |
<label><span class="label">Height</span> |
| 66 |
<?php self::field( 'number', 'change_oEmbed_size_height', '', '280' ); ?> |
| 67 |
</label> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
|
| 73 |
<?php |
| 74 |
|