Problem after upgrade to 3.6.1

You should make a backup of your site before any change, including the updates of the WP core, so you can restore if anything goes wrong. That is a gold rule that every webmaster should know. It is possible that you have learnt this lesson just now. Also, it is a good practice to have … Read more

Unable to remove meta box from custom post for all non admin users

Why are you adding metaboxes to non-admin users in the first page? Try this: function PreparePostPageOptions() { if( !current_user_can(‘administrator’) ) // add meta boxes only for admin return; global $WishListMemberInstance; $post_types = array(‘post’, ‘page’, ‘attachment’) + get_post_types(array(‘_builtin’ => false)); foreach ($post_types AS $post_type) { if ($post_type == ‘attachment’) add_meta_box(‘wlm_attachment_metabox’, __(‘WishList Member’, ‘wishlist-member’), array(&$WishListMemberInstance, ‘AttachmentOptions’), $post_type); … Read more

Post title not saving

I think the problem lies here, $(‘.inside input’).on(‘click’, function() { if ($(this).is(‘:checked’)) { $(‘#title’).val(‘overview’); } else { $(‘#title’).val(title); } }); “.inside input” in your javascript code is checkbox? If yes then, it will also apply to publish button. So when you click publish button,above js will be called and will change the title. Use some … Read more

Absolutely print script in footer

Cannot be overwritten Cannot be removed/filtered This will be done by a plugin. These are mutually exclusive. Such a thing can’t be done by a plugin or by any other code from within WordPress. You would need to hook code in elsewhere, at the webserver or PHP level. You could use the PHP.INI directives of … Read more

Notification when left menu bar is closed?

How to get a notification via Javascript when the left menu bar has been collapsed ? If you are taking about the admin menu bar and you want to get a notification when the that is closed and expanded, then watch thoroughly that, when admin menu bar is collapsed, a folded class is added to … Read more

WordPress opens js files as a catalog. Path is right [closed]

You should solve your problem while moving toward a best practice while you’re at it by using wp_enqueue_script(). This will likely solve your issues because it’s domain agnostic. Start by moving your JS file(s) to a /js/ folder in your [child] theme or custom plugin. Then load your script like this… (snippets copied and adpated … Read more

TinyMCE Javascript URL Question

I think the best way is to use the before_wp_tiny_mce() hook. Then, you can define the url in PHP; and pass it to the page so it is available to TinyMCE. function sgp_before_wp_tiny_mce() { ?> <script type=”text/javscript”> var sgp_plugin_url = “<?php echo plugins_url(‘shortcode_generator_popup.php’, __FILE__); ?>”; </script> <?php } add_action(‘before_wp_tiny_mce’, ‘sgp_before_wp_tiny_mce’); You may need to change … Read more