Say you have a file: “wp-content/themes/my_theme_name/include/my_things.php” You can use include(), include_once(), require() or require_once() depending on your preference.
All posts by
.Shortcodes General
Using the WordPress shortcode feature on a page Yes you need to include the square brackets! Calling a function from post or page content Just add [my_special_shortcode] within any post or page and the function will be called Passing arguments with a shortcode In the wordpress content (N.B. keep attributes lowercase, they will get converted […]
WordPress Database
Good resources https://deliciousbrains.com/tour-wordpress-database/
Creating Custom Tables
Resources https://deliciousbrains.com/creating-custom-table-php-wordpress/ Create / Update A Table While not a requirement to use the wordpress dbDelta function, it is recommended when making changes to the database as it examines the current table structure, compares it to the desired table structure, and either adds or modifies the table as necessary. dbDelta IS VERY PICKY!!!! Important rules […]
Access User Info
Get User ID Get username Get Avatar HTML ready code to display it Avatar URL
Useful hooks – High level
Page load In Header area Just after body tag In Footer area
.Plugin API General
https://codex.wordpress.org/Plugin_API/Action_Reference– List of all the action hooks available in WordPress
$_SESSION security
$_SESSION[] in PHP is secure, but of course if is only as secure as your application makes it. The session variables / parameters are stored at the server level, with the user given a pseudorandom string (“session ID”) for them to identify themselves with. The weakness is if that string is intercepted by an attacker, […]
Disabling the reCAPTCHA badge in the bottom right of every screen
You can disable it with this css BUT, to remain compliant with the google terms of service you must include this with your forms using it (in the users flow), so under the form submit button would be a good place):
Using Free Google Maps
Lat/Long Link To Open Google Map