This file contains hidden or 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 | |
/** | |
* Disable debug mode for the local WP installation created by "Local by Flywheel" application. | |
**/ | |
ini_set('display_errors','Off'); | |
ini_set('error_reporting', E_ALL ); | |
define('WP_DEBUG', false); | |
define('WP_DEBUG_DISPLAY', false); |
This file contains hidden or 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
var add_to_favorite_options = { | |
type : 'post', | |
url : ajaxurl, // This is how we can use the 'ajaxurl' variable for the WordPress ajax URL. | |
data : { | |
action: 'add_to_favorite', | |
property_id : propertyID, | |
}, | |
success: function(response) { | |
if('false' !== response) { | |
$(favorite_link).addClass('hide'); |
This file contains hidden or 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 | |
class A { | |
public function __construct() { | |
echo "Hello from first class file."; | |
} | |
} |
This file contains hidden or 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 inspiry_add_user_additional_fields() { | |
$form_fields = array( | |
array( | |
'name' => esc_html__( 'Postal Code', 'framework' ), | |
'id' => 'postal_code', | |
'type' => 'select', | |
'options' => array( |
This file contains hidden or 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 | |
$address = 'Visalia, CA, USA'; // any address you want latitude and longitude of | |
$address_encoded = urlencode($address); | |
$url = "https://maps.googleapis.com/maps/api/geocode/json?address=". $address_encoded ."&key=YOUR_API_KEY"; | |
$result = file_get_contents($url); | |
$geocode = json_decode($result, true); // returing json of all information about given address | |
$location = $geocode['results'][0]['geometry']['location']; |
This file contains hidden or 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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains hidden or 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
//== Media queries breakpoints | |
// Extra small screen / phone | |
$screen-xs: 480px; | |
$screen-xs-min: $screen-xs; | |
// Small screen / tablet | |
$screen-sm: 768px; | |
$screen-sm-min: $screen-sm; |
This file contains hidden or 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 PREFIX_change_title_text( $title ){ | |
$screen = get_current_screen(); | |
if ( 'events' == $screen->post_type ) { // Replace 'events' with key of your custom post type | |
$title = 'Enter event name with date'; | |
} | |
return $title; |
This file contains hidden or 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
/*----------------------------------------------------------------------------------*/ | |
/* Contact Form AJAX validation and submission | |
/* Validation Plugin : http://bassistance.de/jquery-plugins/jquery-plugin-validation/ | |
/* Form Ajax Plugin : http://www.malsup.com/jquery/form/ | |
/*---------------------------------------------------------------------------------- */ | |
if (jQuery().validate && jQuery().ajaxSubmit) { | |
var submitButton = $('#submit-button'), | |
ajaxLoader = $('#ajax-loader'), | |
messageContainer = $('#message-container'), |
This file contains hidden or 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 | |
$countries = array ( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', | |
'AO' => 'Angola', |
NewerOlder