How to retrieve the postID in a “image_send_to_editor” hook function?
This should work within your function: get_post_field( ‘post_parent’, $id )
This should work within your function: get_post_field( ‘post_parent’, $id )
Since this was posted, the wp_editor() function has been created. This is the correct way to include TinyMCE in a theme or plugin. Better yet, its Codex page (linked above) is much better and there are some pretty good tutorials out there.
from wordpress.org/forums: WordPress 2.8 includes a concatenation of scripts and CSS. This puts the quality of these scripts at a higher level than before. The temporary solution is to place it in the wp-config.php one of these two values define(‘CONCATENATE_SCRIPTS’, false ); or define(‘SCRIPT_DEBUG’, true); Now this is from over a year ago, worth a … Read more
This code will do the job… <?php add_action(‘pre_get_posts’, ‘filter_posts_list’); function filter_posts_list($query) { //$pagenow holds the name of the current page being viewed, we want to run our code only on edit.php (posts list) global $pagenow; //If the ‘Editor’ is logged in, exclude ‘Admin’s posts if(current_user_can(‘editor’) && (‘edit.php’ == $pagenow)) { //global $query’s set() method for … Read more
Short answer – no. Long answer – WordPress retrieves and stores info in the database. To pull and push that data live to multiple locations simultaneously would tax the vast majority of users’ servers beyond their capabilities (especially shared hosting). It does let you know when someone else is editing a page or post, but … Read more
The Admin and Super Admin roles are the only ones with access to edit themes. If you’re wanting to give other people all other “Admin” capabilities but not access to edit themes, it’d probably be easiest to add the User Role Editor plugin, duplicate the Admin user with a new title and then just un-check … Read more
Yes, It is possible … there is a good article on DigWP – which points out one warning that MarkDown is not reversible (ie articles written in Markdown get saved in Markdown so if you ever turn off MarkDown, then you’re left with goo on your screen). There is a MarkitUp plugin on the WordPress.org … Read more
luke reports that this issue has been resolved in the comments of the original question: Thanks guys. Updating to 3.8.1 solved the problem. There were some problems with “dead zones” in buttons.
I’ve been stuggeling with a similar issue. (button not appearing in mce editor toolbar). This pattern worked for me in WP 3.9 / tinymce 4.0: tinymce.PluginManager.add( ‘thing’ , function( editor ){ editor.addButton(‘thing’, { type: ‘listbox’, text: ‘My listbox’, onselect: function(e) { // do things… }, values: [ {text: ‘Menu item 1’, value: ‘Some text 1’}, … Read more
Delete DreamWeaver right now and do the following instead so that you can edit everything locally and see changes in real-time: 1) Install MAMP so you can run a server locally on your computer and then install WordPress as you normally would but in a local computer folder 2) Download SublimeText as your code editor. … Read more