Checking success for a function that can return wp_error
All posts by
Tabbed admin page
To separate your admin page into separate tabs you can use the following for your page Pre HTML Output HTML Output
Plugin update database
Using a database version to trigger update See https://codex.wordpress.org/Creating_Tables_with_Plugins
Sharing values between shortcodes
You can output a shortcode from a shortcode and within that create an attribute value dynamically of course, but sharing a value from one shortcode triggered function call to another later in a page is presumably not possible. Use javascript .innerHTML Use javascript .innerHTML to cause the content of something on the page to be […]
Query Monitor
Plugin name: “Query Monitor”
Blank shortcode output
You may want to add a shortcode to your page content on a line on its own. Even if you SHIFT+RETURN to cause a <br> after it instead of it placed in a new paragraph, if you return(”) from your shortcode you’ll still have a blank line output on the page. Return a zero height […]
WordPress user email addresses
Get site admin email address
If function exists
Call only if function exists
For each
Foreach result Getting Key and Value Working through a json array
Assign value in an if statement
If result is not false Note – make sure you surround the assignment and function call in brackets or it doesn’t work!