Fix indentation & space usage
This commit is contained in:
parent
cf15b3eb76
commit
c8274df833
|
@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
||||||
add_action( 'admin_init', 'understrap_wpdocs_theme_add_editor_styles' );
|
add_action( 'admin_init', 'understrap_wpdocs_theme_add_editor_styles' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_wpdocs_theme_add_editor_styles' ) ) {
|
if ( ! function_exists( 'understrap_wpdocs_theme_add_editor_styles' ) ) {
|
||||||
function understrap_wpdocs_theme_add_editor_styles() {
|
function understrap_wpdocs_theme_add_editor_styles() {
|
||||||
add_editor_style( 'css/custom-editor-style.min.css' );
|
add_editor_style( 'css/custom-editor-style.min.css' );
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ if ( ! function_exists ( 'understrap_wpdocs_theme_add_editor_styles' ) ) {
|
||||||
// Add TinyMCE style formats.
|
// Add TinyMCE style formats.
|
||||||
add_filter( 'mce_buttons_2', 'understrap_tiny_mce_style_formats' );
|
add_filter( 'mce_buttons_2', 'understrap_tiny_mce_style_formats' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_tiny_mce_style_formats' ) ) {
|
if ( ! function_exists( 'understrap_tiny_mce_style_formats' ) ) {
|
||||||
function understrap_tiny_mce_style_formats( $styles ) {
|
function understrap_tiny_mce_style_formats( $styles ) {
|
||||||
|
|
||||||
array_unshift( $styles, 'styleselect' );
|
array_unshift( $styles, 'styleselect' );
|
||||||
|
@ -35,7 +35,7 @@ if ( ! function_exists ( 'understrap_tiny_mce_style_formats' ) ) {
|
||||||
|
|
||||||
add_filter( 'tiny_mce_before_init', 'understrap_tiny_mce_before_init' );
|
add_filter( 'tiny_mce_before_init', 'understrap_tiny_mce_before_init' );
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_tiny_mce_before_init' ) ) {
|
if ( ! function_exists( 'understrap_tiny_mce_before_init' ) ) {
|
||||||
function understrap_tiny_mce_before_init( $settings ) {
|
function understrap_tiny_mce_before_init( $settings ) {
|
||||||
|
|
||||||
$style_formats = array(
|
$style_formats = array(
|
||||||
|
@ -43,33 +43,33 @@ if ( ! function_exists ( 'understrap_tiny_mce_before_init' ) ) {
|
||||||
'title' => 'Lead Paragraph',
|
'title' => 'Lead Paragraph',
|
||||||
'selector' => 'p',
|
'selector' => 'p',
|
||||||
'classes' => 'lead',
|
'classes' => 'lead',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Small',
|
'title' => 'Small',
|
||||||
'inline' => 'small'
|
'inline' => 'small',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Blockquote',
|
'title' => 'Blockquote',
|
||||||
'block' => 'blockquote',
|
'block' => 'blockquote',
|
||||||
'classes' => 'blockquote',
|
'classes' => 'blockquote',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Blockquote Footer',
|
'title' => 'Blockquote Footer',
|
||||||
'block' => 'footer',
|
'block' => 'footer',
|
||||||
'classes' => 'blockquote-footer',
|
'classes' => 'blockquote-footer',
|
||||||
'wrapper' => true
|
'wrapper' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Cite',
|
'title' => 'Cite',
|
||||||
'inline' => 'cite'
|
'inline' => 'cite',
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( isset( $settings['style_formats'] ) ) {
|
if ( isset( $settings['style_formats'] ) ) {
|
||||||
$orig_style_formats = json_decode($settings['style_formats'],true);
|
$orig_style_formats = json_decode( $settings['style_formats'], true );
|
||||||
$style_formats = array_merge($orig_style_formats,$style_formats);
|
$style_formats = array_merge( $orig_style_formats, $style_formats );
|
||||||
}
|
}
|
||||||
|
|
||||||
$settings['style_formats'] = json_encode( $style_formats );
|
$settings['style_formats'] = json_encode( $style_formats );
|
||||||
|
|
Reference in New Issue