Edit File by line
/home/barbar84/public_h.../wp-admin/includes
File: options.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WordPress Options Administration API.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
* @since 4.4.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Output JavaScript to toggle display of additional settings if avatars are disabled.
[10] Fix | Delete
*
[11] Fix | Delete
* @since 4.2.0
[12] Fix | Delete
*/
[13] Fix | Delete
function options_discussion_add_js() {
[14] Fix | Delete
?>
[15] Fix | Delete
<script>
[16] Fix | Delete
(function($){
[17] Fix | Delete
var parent = $( '#show_avatars' ),
[18] Fix | Delete
children = $( '.avatar-settings' );
[19] Fix | Delete
parent.on( 'change', function(){
[20] Fix | Delete
children.toggleClass( 'hide-if-js', ! this.checked );
[21] Fix | Delete
});
[22] Fix | Delete
})(jQuery);
[23] Fix | Delete
</script>
[24] Fix | Delete
<?php
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Display JavaScript on the page.
[29] Fix | Delete
*
[30] Fix | Delete
* @since 3.5.0
[31] Fix | Delete
*/
[32] Fix | Delete
function options_general_add_js() {
[33] Fix | Delete
?>
[34] Fix | Delete
<script type="text/javascript">
[35] Fix | Delete
jQuery(document).ready(function($){
[36] Fix | Delete
var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
[37] Fix | Delete
homeURL = ( <?php echo wp_json_encode( get_home_url() ); ?> || '' ).replace( /^(https?:\/\/)?(www\.)?/, '' );
[38] Fix | Delete
[39] Fix | Delete
$( '#blogname' ).on( 'input', function() {
[40] Fix | Delete
var title = $.trim( $( this ).val() ) || homeURL;
[41] Fix | Delete
[42] Fix | Delete
// Truncate to 40 characters.
[43] Fix | Delete
if ( 40 < title.length ) {
[44] Fix | Delete
title = title.substring( 0, 40 ) + '\u2026';
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
$siteName.text( title );
[48] Fix | Delete
});
[49] Fix | Delete
[50] Fix | Delete
$( 'input[name="date_format"]' ).on( 'click', function() {
[51] Fix | Delete
if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) )
[52] Fix | Delete
$( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
[53] Fix | Delete
});
[54] Fix | Delete
[55] Fix | Delete
$( 'input[name="date_format_custom"]' ).on( 'click input', function() {
[56] Fix | Delete
$( '#date_format_custom_radio' ).prop( 'checked', true );
[57] Fix | Delete
});
[58] Fix | Delete
[59] Fix | Delete
$( 'input[name="time_format"]' ).on( 'click', function() {
[60] Fix | Delete
if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) )
[61] Fix | Delete
$( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
[62] Fix | Delete
});
[63] Fix | Delete
[64] Fix | Delete
$( 'input[name="time_format_custom"]' ).on( 'click input', function() {
[65] Fix | Delete
$( '#time_format_custom_radio' ).prop( 'checked', true );
[66] Fix | Delete
});
[67] Fix | Delete
[68] Fix | Delete
$( 'input[name="date_format_custom"], input[name="time_format_custom"]' ).on( 'input', function() {
[69] Fix | Delete
var format = $( this ),
[70] Fix | Delete
fieldset = format.closest( 'fieldset' ),
[71] Fix | Delete
example = fieldset.find( '.example' ),
[72] Fix | Delete
spinner = fieldset.find( '.spinner' );
[73] Fix | Delete
[74] Fix | Delete
// Debounce the event callback while users are typing.
[75] Fix | Delete
clearTimeout( $.data( this, 'timer' ) );
[76] Fix | Delete
$( this ).data( 'timer', setTimeout( function() {
[77] Fix | Delete
// If custom date is not empty.
[78] Fix | Delete
if ( format.val() ) {
[79] Fix | Delete
spinner.addClass( 'is-active' );
[80] Fix | Delete
[81] Fix | Delete
$.post( ajaxurl, {
[82] Fix | Delete
action: 'date_format_custom' === format.attr( 'name' ) ? 'date_format' : 'time_format',
[83] Fix | Delete
date : format.val()
[84] Fix | Delete
}, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } );
[85] Fix | Delete
}
[86] Fix | Delete
}, 500 ) );
[87] Fix | Delete
} );
[88] Fix | Delete
[89] Fix | Delete
var languageSelect = $( '#WPLANG' );
[90] Fix | Delete
$( 'form' ).on( 'submit', function() {
[91] Fix | Delete
// Don't show a spinner for English and installed languages,
[92] Fix | Delete
// as there is nothing to download.
[93] Fix | Delete
if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
[94] Fix | Delete
$( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' );
[95] Fix | Delete
}
[96] Fix | Delete
});
[97] Fix | Delete
});
[98] Fix | Delete
</script>
[99] Fix | Delete
<?php
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
/**
[103] Fix | Delete
* Display JavaScript on the page.
[104] Fix | Delete
*
[105] Fix | Delete
* @since 3.5.0
[106] Fix | Delete
*/
[107] Fix | Delete
function options_reading_add_js() {
[108] Fix | Delete
?>
[109] Fix | Delete
<script type="text/javascript">
[110] Fix | Delete
jQuery(document).ready(function($){
[111] Fix | Delete
var section = $('#front-static-pages'),
[112] Fix | Delete
staticPage = section.find('input:radio[value="page"]'),
[113] Fix | Delete
selects = section.find('select'),
[114] Fix | Delete
check_disabled = function(){
[115] Fix | Delete
selects.prop( 'disabled', ! staticPage.prop('checked') );
[116] Fix | Delete
};
[117] Fix | Delete
check_disabled();
[118] Fix | Delete
section.find( 'input:radio' ).on( 'change', check_disabled );
[119] Fix | Delete
});
[120] Fix | Delete
</script>
[121] Fix | Delete
<?php
[122] Fix | Delete
}
[123] Fix | Delete
[124] Fix | Delete
/**
[125] Fix | Delete
* Render the site charset setting.
[126] Fix | Delete
*
[127] Fix | Delete
* @since 3.5.0
[128] Fix | Delete
*/
[129] Fix | Delete
function options_reading_blog_charset() {
[130] Fix | Delete
echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
[131] Fix | Delete
echo '<p class="description">' . __( 'The <a href="https://wordpress.org/support/article/glossary/#character-set">character encoding</a> of your site (UTF-8 is recommended)' ) . '</p>';
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function