Add javascript when post is published

To enqueue scripts on the admin side, you should use the admin_enqueue_scripts hook. In this callback I check that are on the appropriate page (i.e. the page where you edit posts / post types), using the passed $hook argument. Optionally you can check if the post is of a specific type (in case this is … Read more

How to develop a community feature in the dashboard for multiauthor site

What I do for almost every site with multiple authors: Create a separate blog for meta discussions, for example meta.example.com. Use P2 as theme. Install Authenticator to allow access for members only. Install something like Inform about Content, so the members get an email whenever something new was posted. I probably wouldn’t do that for … Read more

Admin pages have no content

Try going to Tools then Export and export your WordPress site into an XML file. Then delete your WordPress site off your web server and reinstall it. Go Tools > Import and click on import and select the XML file. Reinstalling WordPress should fix your problem.

Gallery Settings Change available Columns

Short answer Simple as things sometimes are: No this is not possible. The whole part is hard coded. Long answer (not recommended to do so) You could maybe jump into the esc_html and attribute_escape filters and just return empty there *), but as those are pretty generic names and would possibly also interfere with other … Read more

Move admin menu at the end

The global variable $menu can be manipulated. Here, we are moving the Pages menu item to the end: Maybe there’s a simpler method to do the recursive array search, I’ve grabbed an example from PHP Manual. The value to be searched has to be inspected inside the $menu var, enable the debug lines to brute … Read more