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.../classes/media
File: management.php
<?php
[0] Fix | Delete
// @use WPML_Media::menu_content
[1] Fix | Delete
$orphan_attachments_sql = "
[2] Fix | Delete
SELECT COUNT(*)
[3] Fix | Delete
FROM {$this->wpdb->posts}
[4] Fix | Delete
WHERE post_type = 'attachment'
[5] Fix | Delete
AND ID NOT IN (
[6] Fix | Delete
SELECT element_id
[7] Fix | Delete
FROM {$this->wpdb->prefix}icl_translations
[8] Fix | Delete
WHERE element_type='post_attachment'
[9] Fix | Delete
)
[10] Fix | Delete
";
[11] Fix | Delete
[12] Fix | Delete
$orphan_attachments = $this->wpdb->get_var( $orphan_attachments_sql );
[13] Fix | Delete
[14] Fix | Delete
?>
[15] Fix | Delete
<div class="wpml-section" id="<?php echo esc_attr( WPML_Media_Settings::ID ); ?>">
[16] Fix | Delete
[17] Fix | Delete
<div class="wpml-section-header">
[18] Fix | Delete
<h3><?php esc_html_e('Media Translation', 'sitepress'); ?></h3>
[19] Fix | Delete
</div>
[20] Fix | Delete
[21] Fix | Delete
<div class="wpml-section-content">
[22] Fix | Delete
<?php if ( $orphan_attachments ): ?>
[23] Fix | Delete
[24] Fix | Delete
<p><?php esc_html_e("The Media Translation plugin needs to add languages to your site's media. Without this language information, existing media files will not be displayed in the WordPress admin.", 'sitepress') ?></p>
[25] Fix | Delete
[26] Fix | Delete
<?php else: ?>
[27] Fix | Delete
[28] Fix | Delete
<p><?php esc_html_e('You can check if some attachments can be duplicated to translated content:', 'sitepress') ?></p>
[29] Fix | Delete
[30] Fix | Delete
<?php endif ?>
[31] Fix | Delete
[32] Fix | Delete
<form id="wpml_media_options_form">
[33] Fix | Delete
<input type="hidden" name="no_lang_attachments" value="<?php echo $orphan_attachments ?>"/>
[34] Fix | Delete
<input type="hidden" id="wpml_media_options_action"/>
[35] Fix | Delete
<table class="wpml-media-existing-content">
[36] Fix | Delete
[37] Fix | Delete
<tr>
[38] Fix | Delete
<td colspan="2">
[39] Fix | Delete
<ul class="wpml_media_options_language">
[40] Fix | Delete
<li><label><input type="checkbox" id="set_language_info" name="set_language_info" value="1" <?php if (!empty($orphan_attachments)): ?>checked="checked"<?php endif; ?>
[41] Fix | Delete
<?php if (empty($orphan_attachments)): ?>disabled="disabled"<?php endif ?> />&nbsp;<?php esc_html_e('Set language information for existing media', 'sitepress') ?></label></li>
[42] Fix | Delete
<li><label><input type="checkbox" id="translate_media" name="translate_media" value="1" checked="checked"/>&nbsp;<?php esc_html_e('Translate existing media in all languages', 'sitepress') ?></label></li>
[43] Fix | Delete
<li><label><input type="checkbox" id="duplicate_media" name="duplicate_media" value="1" checked="checked"/>&nbsp;<?php esc_html_e('Duplicate existing media for translated content', 'sitepress') ?></label></li>
[44] Fix | Delete
<li><label><input type="checkbox" id="duplicate_featured" name="duplicate_featured" value="1" checked="checked"/>&nbsp;<?php esc_html_e('Duplicate the featured images for translated content', 'sitepress') ?></label></li>
[45] Fix | Delete
</ul>
[46] Fix | Delete
</td>
[47] Fix | Delete
</tr>
[48] Fix | Delete
[49] Fix | Delete
<tr>
[50] Fix | Delete
<td><a href="https://wpml.org/documentation/getting-started-guide/media-translation/" target="_blank"><?php esc_html_e('Media Translation Documentation', 'sitepress') ?></a></td>
[51] Fix | Delete
<td align="right">
[52] Fix | Delete
<input class="button-primary" name="start" type="submit" value="<?php esc_attr_e('Start', 'sitepress'); ?> &raquo;"/>
[53] Fix | Delete
</td>
[54] Fix | Delete
[55] Fix | Delete
</tr>
[56] Fix | Delete
[57] Fix | Delete
<tr>
[58] Fix | Delete
<td colspan="2">
[59] Fix | Delete
<img class="progress" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" width="16" height="16" alt="loading" style="display: none;"/>
[60] Fix | Delete
&nbsp;<span class="status"> </span>
[61] Fix | Delete
</td>
[62] Fix | Delete
</tr>
[63] Fix | Delete
</table>
[64] Fix | Delete
[65] Fix | Delete
[66] Fix | Delete
<table class="wpml-media-new-content-settings">
[67] Fix | Delete
[68] Fix | Delete
<tr>
[69] Fix | Delete
<td colspan="2">
[70] Fix | Delete
<h4><?php esc_html_e('How to handle media for new content:', 'sitepress'); ?></h4>
[71] Fix | Delete
</td>
[72] Fix | Delete
</tr>
[73] Fix | Delete
<tr>
[74] Fix | Delete
<td colspan="2">
[75] Fix | Delete
<ul class="wpml_media_options_language">
[76] Fix | Delete
<?php
[77] Fix | Delete
$settings = get_option( '_wpml_media' );
[78] Fix | Delete
$content_defaults = $settings[ 'new_content_settings' ];
[79] Fix | Delete
[80] Fix | Delete
$always_translate_media_html_checked = $content_defaults['always_translate_media'] ? 'checked="checked"' : '';
[81] Fix | Delete
$duplicate_media_html_checked = $content_defaults['duplicate_media'] ? 'checked="checked"' : '';
[82] Fix | Delete
$duplicate_featured_html_checked = $content_defaults['duplicate_featured'] ? 'checked="checked"' : '';
[83] Fix | Delete
?>
[84] Fix | Delete
<li>
[85] Fix | Delete
<label><input type="checkbox" name="content_default_always_translate_media"
[86] Fix | Delete
value="1" <?php echo $always_translate_media_html_checked; ?> />&nbsp;<?php esc_html_e('When uploading media to the Media library, make it available in all languages', 'sitepress') ?></label>
[87] Fix | Delete
</li>
[88] Fix | Delete
<li>
[89] Fix | Delete
<label><input type="checkbox" name="content_default_duplicate_media"
[90] Fix | Delete
value="1" <?php echo $duplicate_media_html_checked; ?> />&nbsp;<?php esc_html_e('Duplicate media attachments for translations', 'sitepress') ?></label>
[91] Fix | Delete
</li>
[92] Fix | Delete
<li>
[93] Fix | Delete
<label><input type="checkbox" name="content_default_duplicate_featured"
[94] Fix | Delete
value="1" <?php echo $duplicate_featured_html_checked; ?> />&nbsp;<?php esc_html_e('Duplicate featured images for translations', 'sitepress') ?></label>
[95] Fix | Delete
</li>
[96] Fix | Delete
</ul>
[97] Fix | Delete
</td>
[98] Fix | Delete
</tr>
[99] Fix | Delete
[100] Fix | Delete
<tr>
[101] Fix | Delete
<td colspan="2" align="right">
[102] Fix | Delete
<input class="button-secondary" name="set_defaults" type="submit" value="<?php esc_attr_e('Apply', 'sitepress'); ?>"/>
[103] Fix | Delete
</td>
[104] Fix | Delete
</tr>
[105] Fix | Delete
[106] Fix | Delete
<tr>
[107] Fix | Delete
<td colspan="2">
[108] Fix | Delete
<img class="content_default_progress" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" width="16" height="16" alt="loading" style="display: none;"/>
[109] Fix | Delete
&nbsp;<span class="content_default_status"> </span>
[110] Fix | Delete
</td>
[111] Fix | Delete
</tr>
[112] Fix | Delete
[113] Fix | Delete
</table>
[114] Fix | Delete
[115] Fix | Delete
<div id="wpml_media_all_done" class="hidden updated">
[116] Fix | Delete
<p><?php esc_html_e("You're all done. From now on, all new media files that you upload to content will receive a language. You can automatically duplicate them to translations from the post-edit screen.", 'sitepress') ?></p>
[117] Fix | Delete
</div>
[118] Fix | Delete
[119] Fix | Delete
</form>
[120] Fix | Delete
</div>
[121] Fix | Delete
[122] Fix | Delete
</div>
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function