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
<?php | |
/* These are two points in New York City */ | |
$point1 = array('lat' => 40.770623, 'long' => -73.964367); | |
$point2 = array('lat' => 40.758224, 'long' => -73.917404); | |
$distance = getDistanceBetweenPoints($point1['lat'], $point1['long'], $point2['lat'], $point2['long']); | |
foreach ($distance as $unit => $value) { | |
echo $unit.': '.number_format($value,4).'<br />'; | |
} |
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
# Fonte: Wikipedia | |
# URL: https://it.wikipedia.org/wiki/Province_d%27Italia | |
# Aggiornato al: 2022 | |
Agrigento | |
Alessandria | |
Ancona | |
Aosta | |
Arezzo | |
Ascoli Piceno |
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
/* -------------------------------------------*/ | |
/* RESET | |
/* -------------------------------------------*/ | |
*, *::before, *::after { | |
box-sizing: border-box; | |
} | |
* { | |
margin: 0; | |
} |
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
<?php | |
/** | |
* Raise PHP memory limit. | |
*/ | |
define( 'WP_MEMORY_LIMIT', '256M' ); | |
/** | |
* Disable revisions, we don’t need them. | |
*/ | |
define( 'WP_POST_REVISIONS', false ); |
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
/* Copy this code in "Advanced Options" > "Callbacks > "onPreferenceExpressedOrNotNeeded" textarea */ | |
/* See full explanation on: https://www.iubenda.com/en/help/1235-google-tag-manager-blocking-cookies */ | |
function(preference){dataLayer.push({iubenda_ccpa_opted_out:_iub.cs.api.isCcpaOptedOut()});if(!preference){dataLayer.push({event:"iubenda_preference_not_needed"})}else{if(preference.consent===true){dataLayer.push({event:"iubenda_consent_given"})}else if(preference.consent===false){dataLayer.push({event:"iubenda_consent_rejected"})}else if(preference.purposes){for(var purposeId in preference.purposes){if(preference.purposes[purposeId]){dataLayer.push({event:"iubenda_consent_given_purpose_"+purposeId})}}}}} |
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
/* Sans Serif */ | |
html, body { | |
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; | |
} | |
/* Serif */ | |
html, body { | |
font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; | |
} |
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
<?php | |
/** | |
* Add custom image sizes. | |
* | |
* @hook after_setup_theme | |
* | |
* @return void | |
*/ | |
function my_theme_add_custom_image_sizes() : void |
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
<?php | |
/** | |
* Get data URI string from an image file. | |
* | |
* @param string $path_to_file | |
* @return string | |
*/ | |
function get_data_uri( string $path_to_file ) : string | |
{ |
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
<?php | |
function my_login_enqueue_scripts() { | |
wp_enqueue_style( 'my-login', get_stylesheet_directory_uri() . '/assets/css/style-login.css' ); | |
} | |
add_action( 'login_enqueue_scripts', 'my_login_enqueue_scripts', 10 ); |
NewerOlder