0
votes
1answer
36 views

jQuery .change() Event Bubbling in WP Admin

Experiencing some very odd behaviour in WP Admin, specifically on widgets.php. I'm creating a custom widget, and am writing some simple JS. This is the hook I'm using to enqueue my JS: /** * Enqeue ...
0
votes
1answer
36 views

Override default options in plugin metaboxes

Imagine you are on a post-new page to add a post, and a metabox added by a plugin has a lot of checkboxes that always need to be checked manually. Here is one of them: <div class="form_item ...
0
votes
2answers
136 views

wp_dequeue_script not working for my plugin. I want to remove the themes JS from the dashboard

There is a theme my client is using. It enqueues many scripts in the admin area of wordpress. I'd like to dequeue these so that my plugin works properly. Commenting out this code wp_enqueue_script( ...
0
votes
1answer
44 views

Customize wp-admin form custom fields

I would like to customize some form elements in my WP admin area: starting from this example (http://api.jquery.com/val/ the one with the select) what I would liko to do, is to update a via a select ...
0
votes
1answer
96 views

JQuery multiple toggle values

I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template. The below code displays ...
0
votes
2answers
108 views

Hide metabox dependant on page template chosen

I'm using the following JQuery script from this answer to toggle the display of metaboxes dependant on the Page Template selected. The example below shows the featured image metabox when the default ...
-1
votes
2answers
136 views

Hook with jquery script is not working in wp-admin [closed]

This is the hook and script Im using, the jquery script itself is working as you can see in this fiddle: function my_custom_admin_footer(){ echo ' <script ...
1
vote
1answer
76 views

Can't load a class into WordPress post editor's content field

Following to THIS WordPress QUESTION we tried some tweaks and got some nice solutions, hope we can public them after some good active codes-snippets. According to our procedures, we correctly ...
1
vote
0answers
67 views

Bypass nonce value while trashing a post

I want to move a post in trash but the condition is that simultaneously I need to delete some more posts. Sample Code: jQuery(function($) { $('#delete-action a').unbind(); $('#delete-action ...
0
votes
1answer
40 views

Screen Options JavaScript Code

I want to know, what script drives the "screen options" animation toggle in WordPress. I'm referring to the options menu that slides out when the admin clicks the "Screen Options" link near the ...
0
votes
2answers
198 views

jQuery UI inside widget on admin page

I have created a widget that has quite a few settings, and so I am trying to create a tabbed menu (using jQuery UI) inside the widget settings of the admin page. The problem is basically that tabs ...
-1
votes
1answer
67 views

jQuery “on” handler does not fire on newly inserted widgets [closed]

I have a jQuery script attached to the widget.php page via an add_action('admin_footer') call. The jQuery executes fine on widget items that were in place when the page loaded. However, on newly ...
0
votes
3answers
197 views

How to isolate code to the post edit screen

I've got some jQuery that interacts with items on the post and page editor screens. However, the script is also loading on other admin screens that are driven by post.php Is there a way to target the ...
-4
votes
2answers
451 views

Adding jquery using php function

I was turned down with this question because I get a php error and my question revolves around jquery, but when I take out the JQUERY everything works fine. * Again I'm creating a wordpress plugin. I ...
0
votes
2answers
13k views

How do I Upload/Import Form (Input) Files via. Ajax function?

I keep running into an issue getting the file(s) added/switched to ajax so that the server ajax handler can deal with the rest. How can I get the $_FILES to be passed the same as with the default ...
0
votes
1answer
305 views

Admin menu success message

I have created a simple admin menu that allows users to enter in some basic information that is stored in the footer. When they click save the url appends &settings-updated=true Is there a way, ...
3
votes
2answers
2k views

Add a jQuery function to admin pages

I need to add a bit of document ready jQuery to post/page editors in admin. I'm hacking an old plugin that adds a text box to the editor page and handles inserting that text in a template file, but ...
2
votes
1answer
2k views

Hook the Keydown Event in the TinyMCE Post Editor

I would like to hook the keydown event in the TinyMCE Editor on the edit post admin page. I managed to hook the HTML content editor using the following code: jQuery('#content').keydown(function(){ ...
0
votes
1answer
193 views

I am not able to enable jQuery in theme settings

I have tried to - enable Use jQuery & then save changes. But after saving changes, checkmark Use jQuery automatically unchecks itself. I am not sure whats going on. Please help me here.
3
votes
1answer
4k views

How to make ajax call in wordpress in right way?

I am trying to using jquery ui tabs with ajax calls to run a function. Here is the code i am using: function ajax_load_user_feed(){ if(isset($_GET['type'])) $type = $_GET['type']; ...
0
votes
2answers
306 views

jQuery UI & Admin (Calendar)

Am I smoking crack or why wouldn't this work? :/ This all seems pretty straightforward: function admin_head() { ?> <link type="text/css" rel="stylesheet" href="<?php ...
1
vote
3answers
2k views

jquery UI in wordpress admin

Does anyone have experience with using the jQuery UI plugins in the Wordpress admin area? I´ve been trying to use the datepicker functionality in jQuery UI, but its conflicting with the built- in ...
0
votes
2answers
2k views

Admin panel: Javascript not loading properly. Cannot edit pages/posts

I am using the latest Wordpress.org install. None of my back-end javascript is working, none of my navigation drop downs, admin panel areas are not loading as well. I have not edited any core files. ...
0
votes
1answer
509 views

Get cat parameter from admin-ajax

I have a plugin that restricts the categories users can view/edit in the admin. All works fine in WordPress 3.0.1, but as I started testing 3.1 I noticed that the category filter, which is AJAX, ...
2
votes
1answer
461 views

Registering jQuery kills admin functions

I recently added the following into my theme's functions.php, in order to load jQuery from the CDN: function my_init_method() { wp_deregister_script('jquery'); wp_register_script('jquery', ...