Edit File by line
/home/zeestwma/redstone.../wp-admin
File: options-media.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Media settings administration panel.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/** WordPress Administration Bootstrap */
[8] Fix | Delete
require_once __DIR__ . '/admin.php';
[9] Fix | Delete
[10] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[11] Fix | Delete
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
// Used in the HTML title tag.
[15] Fix | Delete
$title = __( 'Media Settings' );
[16] Fix | Delete
$parent_file = 'options-general.php';
[17] Fix | Delete
[18] Fix | Delete
$media_options_help = '<p>' . __( 'You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.' ) . '</p>';
[19] Fix | Delete
[20] Fix | Delete
if ( ! is_multisite()
[21] Fix | Delete
&& ( get_option( 'upload_url_path' )
[22] Fix | Delete
|| get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) )
[23] Fix | Delete
) {
[24] Fix | Delete
$media_options_help .= '<p>' . __( 'Uploading Files allows you to choose the folder and path for storing your uploaded files.' ) . '</p>';
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
$media_options_help .= '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
[28] Fix | Delete
[29] Fix | Delete
get_current_screen()->add_help_tab(
[30] Fix | Delete
array(
[31] Fix | Delete
'id' => 'overview',
[32] Fix | Delete
'title' => __( 'Overview' ),
[33] Fix | Delete
'content' => $media_options_help,
[34] Fix | Delete
)
[35] Fix | Delete
);
[36] Fix | Delete
[37] Fix | Delete
get_current_screen()->set_help_sidebar(
[38] Fix | Delete
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
[39] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/documentation/article/settings-media-screen/">Documentation on Media Settings</a>' ) . '</p>' .
[40] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
[41] Fix | Delete
);
[42] Fix | Delete
[43] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-header.php';
[44] Fix | Delete
[45] Fix | Delete
?>
[46] Fix | Delete
[47] Fix | Delete
<div class="wrap">
[48] Fix | Delete
<h1><?php echo esc_html( $title ); ?></h1>
[49] Fix | Delete
[50] Fix | Delete
<form action="options.php" method="post">
[51] Fix | Delete
<?php settings_fields( 'media' ); ?>
[52] Fix | Delete
[53] Fix | Delete
<h2 class="title"><?php _e( 'Image sizes' ); ?></h2>
[54] Fix | Delete
<p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
[55] Fix | Delete
[56] Fix | Delete
<table class="form-table" role="presentation">
[57] Fix | Delete
<?php $thumbnail_size_title = __( 'Thumbnail size' ); ?>
[58] Fix | Delete
<tr>
[59] Fix | Delete
<th scope="row"><?php echo $thumbnail_size_title; ?></th>
[60] Fix | Delete
<td><fieldset><legend class="screen-reader-text"><span><?php echo $thumbnail_size_title; ?></span></legend>
[61] Fix | Delete
<label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label>
[62] Fix | Delete
<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" />
[63] Fix | Delete
<br />
[64] Fix | Delete
<label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label>
[65] Fix | Delete
<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" />
[66] Fix | Delete
</fieldset>
[67] Fix | Delete
<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1"<?php checked( '1', get_option( 'thumbnail_crop' ) ); ?> />
[68] Fix | Delete
<label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label>
[69] Fix | Delete
</td>
[70] Fix | Delete
</tr>
[71] Fix | Delete
[72] Fix | Delete
<?php $medium_size_title = __( 'Medium size' ); ?>
[73] Fix | Delete
<tr>
[74] Fix | Delete
<th scope="row"><?php echo $medium_size_title; ?></th>
[75] Fix | Delete
<td><fieldset><legend class="screen-reader-text"><span><?php echo $medium_size_title; ?></span></legend>
[76] Fix | Delete
<label for="medium_size_w"><?php _e( 'Max Width' ); ?></label>
[77] Fix | Delete
<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option( 'medium_size_w' ); ?>" class="small-text" />
[78] Fix | Delete
<br />
[79] Fix | Delete
<label for="medium_size_h"><?php _e( 'Max Height' ); ?></label>
[80] Fix | Delete
<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option( 'medium_size_h' ); ?>" class="small-text" />
[81] Fix | Delete
</fieldset></td>
[82] Fix | Delete
</tr>
[83] Fix | Delete
[84] Fix | Delete
<?php $large_size_title = __( 'Large size' ); ?>
[85] Fix | Delete
<tr>
[86] Fix | Delete
<th scope="row"><?php echo $large_size_title; ?></th>
[87] Fix | Delete
<td><fieldset><legend class="screen-reader-text"><span><?php echo $large_size_title; ?></span></legend>
[88] Fix | Delete
<label for="large_size_w"><?php _e( 'Max Width' ); ?></label>
[89] Fix | Delete
<input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option( 'large_size_w' ); ?>" class="small-text" />
[90] Fix | Delete
<br />
[91] Fix | Delete
<label for="large_size_h"><?php _e( 'Max Height' ); ?></label>
[92] Fix | Delete
<input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option( 'large_size_h' ); ?>" class="small-text" />
[93] Fix | Delete
</fieldset></td>
[94] Fix | Delete
</tr>
[95] Fix | Delete
[96] Fix | Delete
<?php do_settings_fields( 'media', 'default' ); ?>
[97] Fix | Delete
</table>
[98] Fix | Delete
[99] Fix | Delete
<?php
[100] Fix | Delete
/**
[101] Fix | Delete
* @global array $wp_settings
[102] Fix | Delete
*/
[103] Fix | Delete
if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
[104] Fix | Delete
?>
[105] Fix | Delete
<h2 class="title"><?php _e( 'Embeds' ); ?></h2>
[106] Fix | Delete
<table class="form-table" role="presentation">
[107] Fix | Delete
<?php do_settings_fields( 'media', 'embeds' ); ?>
[108] Fix | Delete
</table>
[109] Fix | Delete
<?php endif; ?>
[110] Fix | Delete
[111] Fix | Delete
<?php if ( ! is_multisite() ) : ?>
[112] Fix | Delete
<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
[113] Fix | Delete
<table class="form-table" role="presentation">
[114] Fix | Delete
<?php
[115] Fix | Delete
/*
[116] Fix | Delete
* If upload_url_path is not the default (empty),
[117] Fix | Delete
* or upload_path is not the default ('wp-content/uploads' or empty),
[118] Fix | Delete
* they can be edited, otherwise they're locked.
[119] Fix | Delete
*/
[120] Fix | Delete
if ( get_option( 'upload_url_path' )
[121] Fix | Delete
|| get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) ) :
[122] Fix | Delete
?>
[123] Fix | Delete
<tr>
[124] Fix | Delete
<th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
[125] Fix | Delete
<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
[126] Fix | Delete
<p class="description">
[127] Fix | Delete
<?php
[128] Fix | Delete
/* translators: %s: wp-content/uploads */
[129] Fix | Delete
printf( __( 'Default is %s' ), '<code>wp-content/uploads</code>' );
[130] Fix | Delete
?>
[131] Fix | Delete
</p>
[132] Fix | Delete
</td>
[133] Fix | Delete
</tr>
[134] Fix | Delete
[135] Fix | Delete
<tr>
[136] Fix | Delete
<th scope="row"><label for="upload_url_path"><?php _e( 'Full URL path to files' ); ?></label></th>
[137] Fix | Delete
<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option( 'upload_url_path' ) ); ?>" class="regular-text code" />
[138] Fix | Delete
<p class="description"><?php _e( 'Configuring this is optional. By default, it should be blank.' ); ?></p>
[139] Fix | Delete
</td>
[140] Fix | Delete
</tr>
[141] Fix | Delete
<tr>
[142] Fix | Delete
<td colspan="2" class="td-full">
[143] Fix | Delete
<?php else : ?>
[144] Fix | Delete
<tr>
[145] Fix | Delete
<td class="td-full">
[146] Fix | Delete
<?php endif; ?>
[147] Fix | Delete
<label for="uploads_use_yearmonth_folders">
[148] Fix | Delete
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked( '1', get_option( 'uploads_use_yearmonth_folders' ) ); ?> />
[149] Fix | Delete
<?php _e( 'Organize my uploads into month- and year-based folders' ); ?>
[150] Fix | Delete
</label>
[151] Fix | Delete
</td>
[152] Fix | Delete
</tr>
[153] Fix | Delete
[154] Fix | Delete
<?php do_settings_fields( 'media', 'uploads' ); ?>
[155] Fix | Delete
</table>
[156] Fix | Delete
<?php endif; ?>
[157] Fix | Delete
[158] Fix | Delete
<?php do_settings_sections( 'media' ); ?>
[159] Fix | Delete
[160] Fix | Delete
<?php submit_button(); ?>
[161] Fix | Delete
[162] Fix | Delete
</form>
[163] Fix | Delete
[164] Fix | Delete
</div>
[165] Fix | Delete
[166] Fix | Delete
<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
[167] Fix | Delete
[168] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function