The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
180 views

Serving wp-includes (front-end) javascript from a different domain?

The WordPress Codex points to an extremely simple way to change the URL of the wp-content directory, which is, adding this in wp-config.php: define( 'WP_CONTENT_URL', ...
0
votes
2answers
168 views

Add script into front from my plugin

I have a WordPress plugin, and I must load scripts from my plugin to the front of the site. class My_Plugin { function __construct() { add_action('admin_menu', array(&$this, ...
3
votes
1answer
2k views

How do I get the $handle for all enqueued scripts?

Is there some way to get the $handle for each script that has been enqueued? Is there some array that holds all the handles so that I can loop through it and do something using each $handle?
0
votes
1answer
194 views

Removing admin javascript

I'm having some trouble adding jquery-week-calendar to WordPress' admin interface using add_menu_page and other API methods. What I found out is that the default jquery-ui and other JavaScript ...
3
votes
2answers
328 views

What are the benefits of using wp_enqueue_script?

Is there any real benefit to using wp_enqueue_script on small self-managed sites? For instance, Modernizr, why enqueue it through a function rather than call it directly inside the document head? I ...
12
votes
2answers
625 views

Conditionally enqueue a widget's script/stylesheet in HEAD (only when present on page!)

I've been trying to load scripts and styles for a WordPress widget with the following conditions... The scripts MUST load in the HEAD (else they break). The scripts must ONLY load when the widget ...
0
votes
1answer
542 views

Wordpress Stats Plugin: Display Post Views

i'am currently using latest version of jetpack. So the stats plugin is also included in this plugin. But now i want to display the number of views the single post get on the single.php file using the ...
1
vote
1answer
1k views

Add stylesheets and js to template files when shortcode is used

After looking for days throught the net and no avail - i'd like to ask all of you guys. PROBLEM: i need to add custom code to the head of the file as part of shortcode use for my plugin. The same ...
0
votes
1answer
57 views

Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

I'm working on a settings API class which I'd like to be able to drop into a plugin, wpmu plugin, theme, or child theme directory, and have it just work. My issue is that I'm having trouble figuring ...
0
votes
1answer
113 views

Insert data through a script directly in the db

is it possible to insert data through a script or HTML site into the wpdb and this will show up as normal article in the, the same as when I use the 'create new post' page? Which tables are affected ...
1
vote
1answer
267 views

Help with enqueing scripts in footer after init action

In my functions.php, I have set a register_scripts() and load_scripts(), and hooked them to the 'init' action. I have registered all the scripts to be loaded in the footer, in order to optimize page ...
2
votes
1answer
208 views

How do you load WordPress from an external script when using MultiSite? [duplicate]

Possible Duplicate: Using WordPress functions on other sites I have an external script that needs to load up WordPress in order to have access to WordPress functionality. In the past I ...
1
vote
1answer
367 views

Question about the way that wp_register_script works

Ok so I'm using the Roots Theme for WordPress (https://github.com/retlehs/roots), which, is sort of a starter theme or theme framework. I'm confused about the way that it deregisters the WordPress ...
2
votes
2answers
296 views

Odd Script File Trying to be Loaded

This is an odd query I have and wondered if anybody can shed some light on it? We have a number WordPress multi-site (formally Mu) install, but on nearly all the sites on multiple installs we are ...
0
votes
1answer
1k views

wp_enqueue_script() not working

I'm trying to add this social-network button: <a href="http://svejo.net/submit/?url=[your url]" data-url="[your url]" data-type="compact" id="svejo-button">Add in Svejo</a> ...
1
vote
1answer
770 views

Is there a way to list all the JavaScript scripts that are actually loaded by WordPress? Do we care?

This page on the Codex gives us a list of all the default scripts that ship with WP. But how do we know which ones are actually being used so we don't have to manually enqueue them? Or do we care, and ...
0
votes
3answers
265 views

Display a consistent Google Plus icon on ALL pages of my site

My website is http://tablified.com and I have managed to setup the Google Plus script. The issue is that every page of the site displays a different Google Plus count. For example, if you go on my ...
0
votes
1answer
176 views

Enqueuing a script before anything else

I wondered if it was possible to change the order in which a script is enqueued. I ask this because I wish to include the HTML5 enabling script but it needs to be included before any styles. Is ...
0
votes
1answer
34 views

What's the default setting for including a <script> in a post

As we're evaluating whether we should build a Wordpress plugin and in that context I'm trying to figure out how Wordpress handles script tags in a post? What's the default setting? Thanks!
3
votes
3answers
1k views

Editing Source Code in Wordpress

I am a senior in a college computer science program, and therefore have a decent knowledge of code and several languages. However, I am doing a summer internship type program, and the company I am ...
1
vote
2answers
307 views

WXR slicing script

I have a massive WXR file im trying to import into wordpress. I run out of memory when i try to import as one file, so I'm thinking of how i can split the big file into smaller files programatically ...
2
votes
1answer
74 views

Is there any free (or cheap) software that can be used for testing WordPress functionality?

Is there any free (or cheap) software that can be used for testing WordPress functionality? I would like to create some test scripts and then them against my self-hosted WordPress installation.
7
votes
3answers
2k views

How can I create a bash install script for my Wordpress sites setup (WP+plugins+theme)?

I build a lot of websites with Wordpress, and my initial setup is basically always the same : Latest version of WP Latest versions of about 5 plugins My naked development theme Instead of ...
5
votes
4answers
2k views

dynamically add scripts to WP_Widget widget() method

I have a wordpress widget that has the standard outline like: class my_widget extends WP_Widget{ function my_widget(){ //do setup stuff } function form(){ //do form stuff } function ...
0
votes
1answer
1k views

How can I selectively print scripts to the footer of certain admin pages?

I'm using admin_footer-{$hook_suffix} to selectively print scripts on the new post page and comments page. This hook is depreciated in 3.1. I see there's an admin_print_scripts-{$hook_suffix} but ...
0
votes
2answers
96 views

Scripts at the end of the page

If I wanted to put the scripts that all my plugins use at the end of the page, where would I do this? Using YSlow/Firebug it recommends this tactic.
0
votes
1answer
337 views

What's a good way to unenqueue all scripts for a single template page?

I've found that my attachment templates are inheriting the enqueued scripts for single posts. My first instinct was to unenqueue these scripts one-by-one or to do an is_attachment() check before ...
1
vote
1answer
550 views

Invision + Wordpress integration

I'm trying to integrate Invision Power Board into our website, Wordpress by using IPB Website Integration (IPBWI). I have used the script sometime before on a static website, but I'm having trouble ...
3
votes
1answer
434 views

Outputting Canonical Resource URLs Across a Multisite Network?

Say a theme "foo" is used on across a network of sites. In each site, all the theme resources (.css, .js, etc.) will have distinct URLs: http://network/siteA/wp-content/themes/foo/style.css ...
4
votes
2answers
1k views

Is it possible to change the attributes of a registered style or script before it fires?

I'd like to modify the properties of a registered style(or script - same applies) before it's been loaded. Right now i'm trying to modify a registered style just before it gets enqueued, so i can ...