File Editor
Directories:
.. (Back)
Files:
admin-filters.php
admin.php
ajax-actions.php
bookmark.php
class-automatic-upgrader-skin.php
class-bulk-plugin-upgrader-skin.php
class-bulk-theme-upgrader-skin.php
class-bulk-upgrader-skin.php
class-core-upgrader.php
class-custom-background.php
class-custom-image-header.php
class-file-upload-upgrader.php
class-ftp-pure.php
class-ftp-sockets.php
class-ftp.php
class-language-pack-upgrader-skin.php
class-language-pack-upgrader.php
class-pclzip.php
class-plugin-installer-skin.php
class-plugin-upgrader-skin.php
class-plugin-upgrader.php
class-theme-installer-skin.php
class-theme-upgrader-skin.php
class-theme-upgrader.php
class-walker-category-checklist.php
class-walker-nav-menu-checklist.php
class-walker-nav-menu-edit.php
class-wp-ajax-upgrader-skin.php
class-wp-application-passwords-list-table.php
class-wp-automatic-updater.php
class-wp-comments-list-table.php
class-wp-community-events.php
class-wp-debug-data.php
class-wp-filesystem-base.php
class-wp-filesystem-direct.php
class-wp-filesystem-ftpext.php
class-wp-filesystem-ftpsockets.php
class-wp-filesystem-ssh2.php
class-wp-importer.php
class-wp-internal-pointers.php
class-wp-links-list-table.php
class-wp-list-table-compat.php
class-wp-list-table.php
class-wp-media-list-table.php
class-wp-ms-sites-list-table.php
class-wp-ms-themes-list-table.php
class-wp-ms-users-list-table.php
class-wp-plugin-install-list-table.php
class-wp-plugins-list-table.php
class-wp-post-comments-list-table.php
class-wp-posts-list-table.php
class-wp-privacy-data-export-requests-list-table.php
class-wp-privacy-data-removal-requests-list-table.php
class-wp-privacy-policy-content.php
class-wp-privacy-requests-table.php
class-wp-screen.php
class-wp-site-health-auto-updates.php
class-wp-site-health.php
class-wp-site-icon.php
class-wp-terms-list-table.php
class-wp-theme-install-list-table.php
class-wp-themes-list-table.php
class-wp-upgrader-skin.php
class-wp-upgrader-skins.php
class-wp-upgrader.php
class-wp-users-list-table.php
comment.php
continents-cities.php
credits.php
dashboard.php
deprecated.php
edit-tag-messages.php
export.php
file.php
image-edit.php
image.php
import.php
list-table.php
media.php
menu.php
meta-boxes.php
misc.php
ms-admin-filters.php
ms-deprecated.php
ms.php
nav-menu.php
network.php
noop.php
options.php
plugin-install.php
plugin.php
post.php
privacy-tools.php
revision.php
schema.php
screen.php
taxonomy.php
template.php
theme-install.php
theme.php
translation-install.php
update-core.php
update.php
upgrade.php
user.php
widgets.php
Create New File
Create
Edit File: options.php
<?php /** * WordPress Options Administration API. * * @package WordPress * @subpackage Administration * @since 4.4.0 */ /** * Output JavaScript to toggle display of additional settings if avatars are disabled. * * @since 4.2.0 */ function options_discussion_add_js() { ?> <script> (function($){ var parent = $( '#show_avatars' ), children = $( '.avatar-settings' ); parent.on( 'change', function(){ children.toggleClass( 'hide-if-js', ! this.checked ); }); })(jQuery); </script> <?php } /** * Display JavaScript on the page. * * @since 3.5.0 */ function options_general_add_js() { ?> <script type="text/javascript"> jQuery( function($) { var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(), $siteIconPreview = $('#site-icon-preview-site-title'), homeURL = ( <?php echo wp_json_encode( get_home_url() ); ?> || '' ).replace( /^(https?:\/\/)?(www\.)?/, '' ); $( '#blogname' ).on( 'input', function() { var title = $.trim( $( this ).val() ) || homeURL; // Truncate to 40 characters. if ( 40 < title.length ) { title = title.substring( 0, 40 ) + '\u2026'; } $siteName.text( title ); $siteIconPreview.text( title ); }); $( 'input[name="date_format"]' ).on( 'click', function() { if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); $( 'input[name="date_format_custom"]' ).on( 'click input', function() { $( '#date_format_custom_radio' ).prop( 'checked', true ); }); $( 'input[name="time_format"]' ).on( 'click', function() { if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); $( 'input[name="time_format_custom"]' ).on( 'click input', function() { $( '#time_format_custom_radio' ).prop( 'checked', true ); }); $( 'input[name="date_format_custom"], input[name="time_format_custom"]' ).on( 'input', function() { var format = $( this ), fieldset = format.closest( 'fieldset' ), example = fieldset.find( '.example' ), spinner = fieldset.find( '.spinner' ); // Debounce the event callback while users are typing. clearTimeout( $.data( this, 'timer' ) ); $( this ).data( 'timer', setTimeout( function() { // If custom date is not empty. if ( format.val() ) { spinner.addClass( 'is-active' ); $.post( ajaxurl, { action: 'date_format_custom' === format.attr( 'name' ) ? 'date_format' : 'time_format', date : format.val() }, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } ); } }, 500 ) ); } ); var languageSelect = $( '#WPLANG' ); $( 'form' ).on( 'submit', function() { /* * Don't show a spinner for English and installed languages, * as there is nothing to download. */ if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) { $( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' ); } }); } ); </script> <?php } /** * Display JavaScript on the page. * * @since 3.5.0 */ function options_reading_add_js() { ?> <script type="text/javascript"> jQuery( function($) { var section = $('#front-static-pages'), staticPage = section.find('input:radio[value="page"]'), selects = section.find('select'), check_disabled = function(){ selects.prop( 'disabled', ! staticPage.prop('checked') ); }; check_disabled(); section.find( 'input:radio' ).on( 'change', check_disabled ); } ); </script> <?php } /** * Render the site charset setting. * * @since 3.5.0 */ function options_reading_blog_charset() { echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />'; echo '<p class="description">' . __( 'The <a href="https://wordpress.org/documentation/article/wordpress-glossary/#character-set">character encoding</a> of your site (UTF-8 is recommended)' ) . '</p>'; }
Save Changes
Rename File
Rename