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
html { | |
background: url(images/bg.jpg) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
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
//Code retrieved at brianjohnsondesign.com | |
//http://blog.brianjohnsondesign.com/use-ftp-to-create-new-admin-user-in-wordpress/ | |
function add_admin_acct(){ | |
$login = 'myacct1'; | |
$passw = 'mypass1'; | |
$email = '[email protected]'; | |
if ( ! username_exists( $login ) && ! email_exists( $email ) ) { | |
$user_id = wp_create_user( $login, $passw, $email ); | |
$user = new WP_User( $user_id ); |
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
$pc(document).ready(function(){ | |
if($pc('#modalSignup').length){ | |
$pc('.account-info').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 | |
$current_user = wp_get_current_user(); | |
/** | |
* @example Safe usage: $current_user = wp_get_current_user(); | |
* if ( !($current_user instanceof WP_User) ) | |
* return; | |
*/ | |
echo 'Username: ' . $current_user->user_login . '<br />'; | |
echo 'User email: ' . $current_user->user_email . '<br />'; | |
echo 'User first name: ' . $current_user->user_firstname . '<br />'; |
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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS responsive images</title> | |
<style> | |
/* Doesn't stop original source image being | |
downloaded too */ | |
@media (min-device-width:600px) { |
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
/** | |
* add a custom AJAX request handler | |
*/ | |
function theme_wpsc_cart_update() { | |
$data = array( | |
'cart_count' => wpsc_cart_item_count(), | |
'cart_total' => wpsc_cart_total_widget(), | |
); | |
echo json_encode($data); | |
exit; |
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
$(function() { | |
var header = $(".clearHeader"); | |
$(window).scroll(function() { | |
var scroll = $(window).scrollTop(); | |
if (scroll >= 500) { | |
header.removeClass('clearHeader').addClass("darkHeader"); | |
} else { | |
header.removeClass("darkHeader").addClass('clearHeader'); | |
} |
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
add this to the htaccess file | |
<IfModule mod_php5.c> | |
php_value max_input_vars 5000 | |
</IfModule> |
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
$('.btnName').click(function() { | |
top.$('#panel').toggle(function() { | |
$(this).animate({ | |
// style change | |
}, 500); | |
}, | |
function() { | |
$(this).animate({ | |
// style change back | |
}, 500); |
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
border-style: solid; | |
border-width: 27px; | |
-moz-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; | |
-webkit-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; | |
-o-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; | |
border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 fill repeat; |