How can I allow the user to press enter without creating a new element in the editor?
Turns out you have to have a <p> tag in the div to prevent that.
Turns out you have to have a <p> tag in the div to prevent that.
Have you updated to the latest version of the WCK – Custom Fields and Custom Post Types Creator plugin? The issue is with the WCK – Custom Fields and Custom Post Types Creator plugin and you should probably seek direct assistance from them. https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/ When I checked the plugins code (vers. 1.1.5) I can see … Read more
Have you ever tried the functions described here? It seems to be exactly what you’re looking after. Here’s a slightly variation of the function for reference: // Run only when editing a page // For new pages load-page-new.php should be used // See: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/admin.php#L217 add_action( ‘load-page.php’, ‘hide_tinyeditor_wp’ ); function hide_tinyeditor_wp() { // Not really necessary, … Read more
You should simply not use <div>-elements to seperate paragraphs from each other. It´s wrong in the semantical context, I think. When you press “Enter” you make, from a historical point of view, a “carriage return” and then a “line feed”. You start a new line, maybe a new paragraph but nothing completely new. If you … Read more
You could do this with custom shortcodes or in some plugins with saved layouts. Many pagebuilder give the option to save predefined layouts. Try out this plugin if you want to create the predefined layouts programmatically. https://github.com/WebDevStudios/WDS-Simple-Page-Builder
Your code is working exactly as it should. The style_formats filter allows you to add additional styles via class names. It is perfectly valid for an element to have multiple classes (and is not limited to only two). I’ve been working with the tinymce editor for years; and I can honestly say I have no … Read more
All you need to know about the sanitization and escaping function is within the codex: https://codex.wordpress.org/Data_Validation In anycase, you should find usefull wp_kses_* functions, particular wp_kses_post What function to use depend by what you want to filter and sanitize.
Duh! It was a permissions issue: a folder inside the theme folder (containing all the files triggering the 404 errors) was set to 700 instead of 755.
If you mean the link dialog, then we can modify the permalinks with the wp_link_query filter: add_filter( ‘wp_link_query’, function( $results ) { foreach( $results as &$result ) $result[‘permalink’] = wp_get_shortlink( $result[‘ID’] ); return $results; } ); where we use wp_get_shortlink() to get the short links.
The hook admin_init is to early for dequeuing, use wp_print_scripts, see examples in the Codex. define( ‘SCRIPT_DEBUG’, true ); will prevent combining dashboard scripts, so if that works for you on IE8, then do it for users with IE8: /** * True if user browser is IE8. */ $is_IE8 = preg_match( ‘/(?i)msie 8/’, $_SERVER[‘HTTP_USER_AGENT’] ); … Read more