A well designed vanilla JS resource:
☝️ Can search via method name or the task you want to accomplish.
A great list of commonly used native JS methods and API's:
<?php | |
/** | |
* ACF compatible genesis page template | |
* | |
* @author StudioPress | |
* @package Altitude | |
* @subpackage Customizations | |
*/ | |
/* |
#!/bin/bash | |
PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r'); | |
wp plugin update-all; | |
for plugin in $PLUGINS; do | |
git add -A "wp-content/plugins/$plugin"; | |
git commit -m "Update plugin: $plugin"; | |
done; |
/* | |
This is taken directly from here and modified to fit our needs: https://developer.wordpress.org/themes/basics/including-css-javascript/ | |
*/ | |
function add_that_css_and_js() { | |
wp_enqueue_style( 'enqueue-that-css', get_template_directory_uri() . '/css/main.css', array(), '1.0', 'all'); | |
wp_enqueue_script( 'enqueue-that-js', get_template_directory_uri() . '/js/min/main.min.js', array ( 'jquery' ), 1.0, true); |
function getLocation() { | |
if (!navigator.geolocation) { | |
alert("Sorry, but Geolocation is not supported by this browser."); | |
} | |
navigator.geolocation.getCurrentPosition(showPosition); | |
} | |
function showPosition(position) { | |
var lat = position.coords.latitude; | |
var long = position.coords.longitude; |
<?php | |
/** | |
* Filter for GravityForms to group select field choices by a special "optgroup" choice. | |
* | |
* Simply add a new choice with a value of 'optgroup' to the dropdown to start a group of options. | |
* All following choices will be grouped under it using its label for the group. | |
* Any number of groups can be created, as each optgroup choice will start a new group. | |
* Supports field placeholder & ungrouped options, but must be before the first group. | |
* | |
* This snippet can be added to your theme's functions.php, or a custom plugin. |
A well designed vanilla JS resource:
☝️ Can search via method name or the task you want to accomplish.
A great list of commonly used native JS methods and API's: