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
$error_login = ''; | |
$error_pass = ''; | |
$remember = false; | |
if (!is_user_logged_in()) { | |
if (isset($_POST['field-email']) || isset($_POST['field-password'])) { | |
$creds = array( | |
'user_login' => $_POST['field-email'], | |
'user_password' => $_POST['field-password'], | |
'remember' => !empty($_POST['field-remember-me']) ? true : 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
$user = wp_signon($creds, false); | |
if (!is_wp_error($user)) { | |
$userID = $user->ID; | |
$user_login = $user->user_login; | |
wp_set_current_user( $userID, $user_login ); | |
wp_set_auth_cookie( $userID, true ); | |
do_action('wp_login', $user->user_login); | |
else { | |
....... |
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
$(window).load(function() { | |
if ($('.slider').length){ | |
slider(); | |
$('.slider').animate({ | |
'opacity': 1 | |
}); | |
} | |
// Quote rotator | |
if ( $('#quote-rotator').length ) { |
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
$('.btn-book').on('click', function() { | |
var linkHref = $(this).attr('href'); | |
var popuId = linkHref.replace('#', ''); | |
$('.btn-book').magnificPopup({ | |
items: { | |
src: '.booking-form', | |
}, | |
type: 'inline' |
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
$apiHttpResponse = dsSearchAgent_ApiRequest::FetchData("AccountOptions"); | |
if (!empty($apiHttpResponse["errors"]) || $apiHttpResponse["response"]["code"] != "200"){ | |
switch ($apiHttpResponse["response"]["code"]) { | |
case 403: | |
wp_die( | |
"We're sorry, but there’s nothing to display here; MLS data service is not activated for this account."); | |
break; | |
default: | |
wp_die("We're sorry, but we ran into a temporary problem while trying to load the account data. Please check back soon.", "Account data load error"); | |
} |
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
Carbon_Container::factory('theme_options', __('Theme Options', 'crb')); | |
foreach (crb_style_fields() as $name => $fields) { | |
->add_tab($fields); | |
} |
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 | |
global $_SESSION; | |
if (empty($_SESSION['rand'])) { | |
?> | |
<div class="preloader-holder">><div class="preloader"><span></span></div></div> | |
<?php | |
$_SESSION['rand'] = rand(); | |
} |
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
<p> | |
mileage <span>435,100</span><br> | |
Horsepower <span>550</span><br> | |
Wheel base <span>230IN</span> | |
</p> | |
--- | |
example for WP: | |
<div class="/some-class/"> |
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
1st: | |
<p> | |
Lorem ipsum dolor sit amet,<br> | |
onsectetur adipisicing elit, sed do<br> | |
eiusmod tempor incididunt ut<br> | |
labore et dolore magna aliqua. Ut<br> | |
enim ad minim veniam. | |
</p> |
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
// add_action('admin_init', 'crb_import_testimonials'); | |
function crb_import_testimonials() { | |
return; | |
if (!isset($_GET['import_testimonials'])) { | |
} | |
$testimonials_json = file_get_contents(CRB_THEME_DIR . 'testimonials.json'); | |
$testimonials = json_decode($testimonials_json, true); |