0
votes
0answers
29 views

Enqueue script throws error in console

WP version 3.9 I am editing the customizer. I have an upload field for uploading a logo. When I try to upload I receive an error. TypeError: wp.media.model.settings.post is undefined I tracked ...
0
votes
2answers
104 views

How do I add some javascript validation to the admin interface form's onsubmit?

I have a plugin that adds meta boxes to the admin interface and I need to do some validation when the user presses the "update" button before the form is submitted. Is there a WordPress action or ...
0
votes
1answer
41 views

Scripts are not called until I login from wordpress backend

I am enqueuing custom scripts for slider in header.php but it is not working until I login from backend. I am working on localhost. The code is <head> <meta http-equiv="Content-Type" ...
0
votes
2answers
89 views

Clear custom field when new tag is added

When adding a new tag in the admin interface, WordPress doesn't reload the page. It appears to send the data with an ajax call, clear the fields and add the tag to the list on the right. I am working ...
0
votes
1answer
313 views

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Ok so here's the question how do i stop js from running twice on the widget.php page? I am creating a ajax loaded custom image selector from a domain on the same server as the current site. I want ...
2
votes
3answers
753 views

How do I only load a plugin js on it's settings pages?

I have a plugin that is conflicting with some default wordpress functions. In the post and page creating/edit areas. I only need my functions on my settings pages. I have the js file loading in admin, ...
1
vote
1answer
603 views

wp-admin post.php JavaScript Links Not Working

I just recently noticed in my backend admin panel none of the dynamic JavaScript links will open or work at all. This includes the 'Edit' links next to Status, Visibility, and Scheduled. Also the slug ...
0
votes
1answer
208 views

Add JavaScript in admin in custom plugin [duplicate]

Possible Duplicate: What is the preferred way to add custom javascript files to the site? I was reading few posts here about this, but all answers are about wp_enqueue_script or something. ...
3
votes
3answers
1k views

Set Featured Image programmatically (in admin) with JavaScript?

I'm trying to set the post thumbnail (featured image) with javascript from an existing image in the media gallery. I would consider a php-based option too I suppose (one that would require clicking ...
1
vote
2answers
2k views

How can I include JavaScript that use jQuery on admin side

I try this: add_action('admin_print_scripts', 'custom_admin_scripts' ); function custom_admin_scripts() { echo '<script type="text/javascript" src="' . get_bloginfo('stylesheet_directory') ...
2
votes
3answers
730 views

Add javascript when post is published

I am trying to add javascript when a post has been published so that it's more noticable for my user but I can't figure out what to use. I tryed with publish_post and save_post, but it doesn't work ...
0
votes
1answer
448 views

admin_enqueue_scripts not rending JS file correctly

I'll keep this short and sweet, I want to load a JS file in the admin panel as part of my plugin, and through tons of research I have a few different options that have all ended with the same problem ...
1
vote
4answers
5k views

Javascript not working in admin

It seems that none of the javascript is working when I log into the admin section of my site. I cannot do anything that requires javascript or AJAX : Nextgen thumbnails, Widget organisation, even the ...
1
vote
1answer
519 views

Plugin admin panel JavaScript Broken

I'm trying to implement this plugin on my live wordpress instilation: http://wordpress.org/extend/plugins/frontpage-slideshow/ I wouldn't usually ask a question about a plugin directly but this ...