careyestes10
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: TinyMCE Formats drop down not merging parent & child theme formatsI meant to append this to the last post. Here is the resource I used:
https://www.venutip.com/content/right-way-override-theme-functions
The only tweak I really made was to remove the priority parameter. Priority is 10 by default, and I could not get the override unless the remove_action() was set to 10. There is probably a more elegant way of stacking the priority.
Forum: Plugins
In reply to: TinyMCE Formats drop down not merging parent & child theme formatsThis is the workaround I used:
// Remove the dropdown function from the parent add_action('init','remove_parent_mce_dropdown'); function remove_parent_mce_dropdown() { remove_action('tiny_mce_before_init','tuts_mce_before_init'); // The first parameter is the phase, second is the function you want to override } // Now write your new function, and re-instatiate it through add_filter() function new_mce_dropdowns( $settings ) { $style_formats = array( array( 'title' => 'Button', 'selector' => 'a', 'classes' => 'button' ), array( 'title' => 'Image Frame', 'selector' => 'img', 'classes' => 'frame', ), array( 'title' => 'Map Link', 'selector' => 'a', 'classes' => 'view_map', ), ); // Merge old & new styles $settings['style_formats_merge'] = true; $settings['style_formats'] = json_encode( $style_formats ); return $settings; } add_filter( 'tiny_mce_before_init', 'new_mce_dropdowns' );
@lilianev, that should work totally random stranger…:)
Forum: Plugins
In reply to: TinyMCE Formats drop down not merging parent & child theme formatsI am also having this issue. I cannot merge the child dropdown styles with the parent, OR overwrite the function from the parent.
Viewing 3 replies - 1 through 3 (of 3 total)