Tag Info

Hot answers tagged

5

First of all this is what I use and for me and it works. I'm not saying that my code is 100% correct but Pingdom as well GTmetrix show a positive effect and WP is satisfied also, so it can't be that wrong as I do. The versions showing (?ver=x.x.x) can be debet when those files need to be cached so stripping(filter) that is already a first step. The code ...


3

One way to do it (which is probably evil) is to select the control by adding a block of javascript using the tr field of $form_fields: function set_image_data( $form_fields, $post ) { $form_fields['text_color'] = array( 'label' => 'Text Color', 'input' => 'text', 'value' => get_post_meta( $post->ID, '_text_color', ...


2

So, far the problem was with the initial loading of the JS file. As i couldn't find any solution using the JS. The problem was not about the script loading rather then the execution timing. Anyways, The theme customizer looks into the global variable for which Panel/Section/Control it will show as active when it loads. How to Make ...


1

Well after a bit of better searching i found the answer, function my_enqueue($hook) { if ( 'settings_page_data-layer-management' != $hook ) { return; } wp_enqueue_script( 'my_custom_script', plugins_url( 'js/dlm-window.js', __FILE__ )); } add_action( 'admin_enqueue_scripts', 'my_enqueue' ); to explain just incase anyone has this ...


1

You should run updatepage() function after loading the google jsapi script. try jquery ready inside updatepage like this: function updatepage(){ // this line added by me jQuery(document).ready(function ($) { // Load the Visualization API and the piechart package. .... .... chart.draw(data, options); } } ...



Only top voted, non community-wiki answers of a minimum length are eligible