Skip to content

Commit

Permalink
Made format menu optional. Updated version to 0.2.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse A Janowiak committed Aug 31, 2018
1 parent a3d786b commit 4ebc561
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Release-Notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Release Notes for NewCity Shortcodes plugin

## 0.2.0-dev -- Aug. 31, 2018
Breaking change: "Format" menu now only appears if `newcity_wysiwyg_toolbar_format_dropdown` option exists and is truthy

## 0.1.1-dev -- Nov. 1, 2017
Moved code from functions.php into this plugin
39 changes: 21 additions & 18 deletions class-newcity-toolbars.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,27 @@ public function modify_tiny_mce( $settings ) {
// {Display Name}={html tag}
$settings['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;';


$style_formats = array(
array(
'title' => 'Intro Paragraph',
'block' => 'p',
'classes' => 'intro',
'wrapper' => false
),
array(
'title' => 'Featured Link',
'inline' => 'a',
'classes' => 'large-arrow',
'wrapper' => true,
'attributes' => array( 'href' => '#' ),
),
);

$settings['style_formats'] = json_encode( $style_formats );
if (get_option('newcity_wysiwyg_toolbar_format_dropdown')) {

$style_formats = array(
array(
'title' => 'Intro Paragraph',
'block' => 'p',
'classes' => 'intro',
'wrapper' => false
),
array(
'title' => 'Featured Link',
'inline' => 'a',
'classes' => 'large-arrow',
'wrapper' => true,
'attributes' => array( 'href' => '#' ),
),

);

$settings['style_formats'] = json_encode( $style_formats );
}

return $settings;
}
Expand Down
2 changes: 1 addition & 1 deletion newcity-wysiwyg.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: NewCity Custom WYSIWYG tools
* * Plugin URI: https://github.com/newcity/newcity-wp-wysiwyg
* Description: Custom toolbars and modifications to TinyMCE
* Version: 0.1.2-dev
* Version: 0.2.0-dev
* Author: NewCity <[email protected]>
* Author URI: http://insidenewcity.com
* License: NONE
Expand Down

0 comments on commit 4ebc561

Please sign in to comment.