This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCities() { | |
//get the value from the 'parent' field, sent via the AJAX post. | |
$choice = $_POST['parent_option']; | |
//Depending on the value of $choice, return a different array. | |
switch($choice) { | |
case "France": | |
$cities = [ | |
"Paris" =>"Paris", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Create new shortcode for quickly displaying user metadata. | |
*** NOTE: This only works if you have the Ultimate Member plugin installed. | |
*** Use like regular wordpress shortcodes. Enter [USERMETA user_id="*id*" meta="*field_name*"] (replace *id* and *field_name* with actual values) | |
*** If you use it on an Ultimate Member profile page/tab, it will use the user currently being viewed. | |
*** On other pages, you must include the "user_id" within the shortcode. | |
*/ | |
//Add the shortcode to WordPress | |
add_shortcode('USER_META', 'user_meta_shortcode_handler'); | |
//create the function referenced by the add_shortcode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################### | |
## This script will install all the packages listed in the renv.lock file. | |
## It is different to `renv::restore()`, because it will install the latest available versions of each package, rather than the versions that were used when the lockfile was created | |
## | |
## This is equivalent to a 'composer update' in php (while renv::restore() is equivalent to 'composer install'). | |
## | |
## Written because `renv::update()` only updates packages that are currently installed, so is not helpful when the versions specified in a lock file no longer install properly. | |
##################################### |