Using a _GET gives me a debug error (over my head)

Just looking for some advice on something that is bugging me. Please bear in mind I am a PHP noob 🙂 I am passing a variable in the url to my WP index page like so: <a href=”https://wordpress.stackexchange.com/questions/23315/<?php bloginfo(“url’);?>/?do=thing”>Thing</a> I am the catching that variable, and using it to show content like so: <?php $do_that … Read more

Undefined index error when saving content on metabox

I am trying to debug ‘undefined index’ errors on the WP backend when debug is set to TRUE. The offending lines are: if ( !wp_verify_nonce( $_POST[‘pdwt_meta_noncename’], plugin_basename(__FILE__) )) { return $post->ID; } Which I have then changed to check whether the value has been set by adding: if ( isset( $_POST[‘pdwt_meta_noncename’]) || ! wp_verify_nonce( $_POST[‘pdwt_meta_noncename’], … Read more

Debugging PHP object during Ajax call in WordPress

I’m having real trouble working on a WP plugin because I can’t seem to access my PHP data to see what’s going on. The plugin makes an ajax call which hangs if I put anything it doesn’t like in my PHP function (below). Instead of the line do_action_ref_array( ‘bookly_validate_custom_field’, array( $field, &$this->errors, $fields[ $field->id ] … Read more

WordPress visual editor broke due to non standard port?

I recently installed WordPress on my own server, which uses non-port 80 Apache service. I could view posts but the tinymce editor constantly broke. More specifically, all menu items in visual editor did not appear and if there were any text, they were all invisible until I highlighted them. After numerous research, someone mentioned this … Read more

Using FirePHP with WordPress

I am trying to make it so that I can output to the console in PHP. I have already installed FireFox with the FireBug and FirePHP addons. I downloaded the ‘FirePHPCore Server Library’ from here and I uploaded it into ‘wp-content/themes/Jupiter/includes’ (my theme is called Jupiter). Then, from within the loop of a template page, … Read more

Dump contents of a variable inside a filter/hook callback that runs during save post

I just need to debug an array which comes into addfilter function like this: add_filter(‘pll_copy_post_metas’, ‘copy_post_metas’); function copy_post_metas($metas) { var_dump($metas); return $metas; } How can I do that to just check what is the value of $metas? This filter runs in admin when saving a post. 2 Answers 2 When you save a post, then … Read more

How to see list of plugins

Is there any tool out there for seeing a list of all the loaded plugins and how much time they took to load? Looking to analyze plugins effect on my site’s performance. 2 Answers 2 There are a lot of tools available Below are my personal favourites Pingdom http://tools.pingdom.com/fpt Google Pagespeed https://developers.google.com/speed/pagespeed/insights GTMetrix gtmetrix.com