diff --git src/wp-includes/theme.php src/wp-includes/theme.php
index cf1bb0f..29b7fd3 100644
|
|
|
function wp_update_custom_css_post( $css, $args = array() ) { |
| 1786 | 1786 | $r = wp_update_post( wp_slash( $post_data ), true ); |
| 1787 | 1787 | } else { |
| 1788 | 1788 | $r = wp_insert_post( wp_slash( $post_data ), true ); |
| | 1789 | |
| | 1790 | // Trigger creation of a revision. See #30854. |
| | 1791 | if ( ! is_wp_error( $r ) && 0 === count( wp_get_post_revisions( $r ) ) ) { |
| | 1792 | wp_save_post_revision( $r ); // Trigger creation of a revision. See #30854. |
| | 1793 | } |
| 1789 | 1794 | } |
| 1790 | 1795 | |
| 1791 | | if ( $r instanceof WP_Error ) { |
| | 1796 | if ( is_wp_error( $r ) ) { |
| 1792 | 1797 | return $r; |
| 1793 | 1798 | } |
| 1794 | 1799 | return get_post( $r ); |