Make WordPress Core

Changeset 32455


Ignore:
Timestamp:
05/08/2015 11:58:22 AM (9 years ago)
Author:
pento
Message:

When saving Writing Options, check that the UI is enabled for use_smilies and use_balanceTags before trying to update them.

Fixes #5161.
Fixes #32298.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options.php

    r32116 r32455  
    7777    'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
    7878    'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ),
    79     'writing' => array( 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' )
     79    'writing' => array( 'default_category', 'default_email_category', 'default_link_category', 'default_post_format' )
    8080);
    8181$whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array();
     
    8585if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
    8686    $whitelist_options['reading'][] = 'blog_charset';
     87
     88if ( get_site_option( 'initial_db_version' ) < 32453 ) {
     89    $whitelist_options['writing'][] = 'use_smilies';
     90    $whitelist_options['writing'][] = 'use_balanceTags';
     91}
    8792
    8893if ( !is_multisite() ) {
Note: See TracChangeset for help on using the changeset viewer.