Domain mapping breaks some plugin scripts and css
The solution, adding this to my wp-config.php: define( ‘PLUGINDIR’, ‘wp-app-content/plugins’ ); https://wordpress.org/support/topic/domain-mapping-breaks-some-plugin-scripts-and-css
The solution, adding this to my wp-config.php: define( ‘PLUGINDIR’, ‘wp-app-content/plugins’ ); https://wordpress.org/support/topic/domain-mapping-breaks-some-plugin-scripts-and-css
its working now:- jQuery(function() { var $button = jQuery(‘#loginButton’); var $box = jQuery(‘#site-crhead’); var $form = jQuery(‘#loginForm’); $button.live(‘click’,function(login) { console.log($box); $box.toggle(); $button.toggleClass(‘active’); }); $form.live(‘click’,function() { return false; }); jQuery(this).live(‘click’,function(login) { if(!(jQuery(login.target).parent(‘#loginButton’).length > 0)) { $button.removeClass(‘active’); $box.hide(); } }); }); Just update your code according to you, even your mouseup function was not working, according to … Read more
Ok finally i find the solution using the bp_is_change_avatar add_action(‘wp_enqueue_scripts’, ‘cutting’,100); function cutting() { if(bp_is_change_avatar()){ wp_dequeue_script( ‘XXX ); } } Thank you everybody for your help
I was able to get a work around in place. Since I was deleting all blogs with no user interaction. I created two mysql queries and ran them. The first was to drop all tables associated with the given $blog_id the second was to remove that row from the wp_blogs table. $blogs = wp_get_sites( array(‘limit’ … Read more
I’ve found a solution to my problem by going over the documentation again and again, looking through source files and just generally running the same section of code over and over to scrutinize the output. This is the solution I came up with, which works just perfectly for my needs: // Get a list of … Read more
You could use a function like so: function construction_intro( $id = ”, $echo = true ){ $id = absint( $id ); switch ($id) { case 123 : $name = “Hillary’s”; $location = “Washington D.C.”; break; case 9999 : $name = “Bernie’s”; $location = “Burlington”; break; case 47679 : $name = “Donald’s”; $location = “New York”; … Read more
You have to make sure your script is registered with wp_register_script before your call to wp_localize_script. So in your functions.php file: add_action(‘init’,’my demo_function’); function my demo_function() { // Register the script wp_register_script( ‘myuserscript’, ‘path/to/myscript.js’ ); // Localize the script with your data $theid=get_current_user_id(); $params = array( ‘userid’ => $theid ); wp_localize_script( ‘myuserscript’, ‘MyUserParams’, $params ); … Read more
Don’t edit theme files. Your changes will be overwritten when your theme updates. Instead use a child theme and hook into the wp_head function. Add this to your child theme’s functions.php file. function add_js() { ?> <script> Your JavaScript goes here </script> <?php } add_action(‘wp_head’, ‘add_js’); BTW, as you have a commercial theme, you can … Read more
A simple google search can help you do this, well same question was answered before, you can see the answer here. Use WordPress methods in your functions.php to do this : function load_scripts() { global $post; wp_register_script( ‘home’, get_template_directory_uri() . ‘/js/home.js’, array(‘jquery’)); wp_register_script( ‘about’, get_template_directory_uri() . ‘/js/about.js’, array(‘jquery’)); wp_register_script( ‘somepost’, get_template_directory_uri() . ‘/js/somepost.js’, array(‘jquery’)); if( … Read more
Got it: wp_enqueue_style( ‘l7w-admin-js’, $this->pluginUrl . ‘assets/js/admin.min.js’); wp_enqueue_script( ‘l7w-admin-js’, $this->pluginUrl . ‘assets/js/admin.min.js’);