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
<form method="POST" name="wishlist" > | |
<input type="number" min="0" name="wl_quantity" value="1" /> | |
<input type="hidden" name="wl_product" value="<?php echo $post->ID; ?>" /> | |
<input type="submit" value="<?php printf( __( 'add product') ); ?>" /> | |
</form> | |
<?php | |
// If user is logged in and has capability 'read' | |
if( current_user_can( 'read' ) ) { | |
// Create the wishlist array |
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
#!/bin/sh | |
# FuelPHP Install Script | |
# | |
# @author Kenji Suzuki https://github.com/kenjis | |
# @copyright 2011 Kenji Suzuki | |
# @license MIT License http://www.opensource.org/licenses/mit-license.php | |
if [ $# -lt 2 ]; then | |
echo "Install FuelPHP and Create Application Repository" |
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
#!/bin/sh | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. | |
# Test for an interactive shell. There is no need to set anything | |
# past this point for scp and rcp, and it's important to refrain from | |
# outputting anything in those cases. | |
if [[ $- != *i* ]]; then |
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 | |
/** | |
* Device Theme Switcher - Load the plugin theme switching functionality | |
* | |
* The theme switching utilizes the MobileESP library to detect | |
* the browser User Agent and determine if it's a 'handheld' or 'tablet'. | |
* This plugin then taps into the WordPress template and stylesheet hooks | |
* to deliver the alternately set themes in Appearance > Device Themes. | |
* |
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 | |
$twitter = new Twitter; | |
$twitter->perform_search("from:UserName OR @UserName OR @UserName", 6); | |
//We only want to show the social block if there are tweets to show | |
if (!empty($twitter->search->statuses)) : | |
?> | |
<div class="twitter-tweets"><?php foreach ($twitter->search->statuses as $tweet) : //print_r($tweet) ?> | |
<div class="tweet"> | |
<img class="tweet-profile-image" src="<?php echo $tweet->user->profile_image_url ?>" alt="<?php echo $tweet->user->screen_name ?>" /> |
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
//The slideshow container is positioned below all other content to display like a background image | |
section.backgrounds { | |
position: absolute ; | |
z-index: 0 ; | |
top: 0 ; left: 0 ; | |
width: 100% ; height: 100% ; | |
overflow: hidden !important ; //This keeps the 200% dimensions used below in check and not showing scroll bars | |
figure.background { | |
//The following trick is used to display the slideshow slides at the full-width of the screen |
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
#!/bin/bash | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
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 | |
// Import the YouTube video thumbnail as the post's featured image | |
// Only proceed if there is a youtube video thumbnail | |
/* | |
Example $youtube_video_data: | |
array( | |
'id' => 'gvk6TwmF0cw', | |
'title' => 'Tyler Posey talks to Variety about being honored at Variety Power of Youth', | |
'link' => 'http://www.youtube.com/watch?v=gvk6TwmF0cw', | |
'thumbnail' => 'http://i.ytimg.com/vi/gvk6TwmF0cw/hqdefault.jpg', |
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
/* BEFORE */ | |
.site-title { | |
background: url('images/logo.png') no-repeat; | |
height: 49px; | |
margin: 0; | |
padding: 0; | |
text-indent: -999em; | |
width: 268px; | |
} |
OlderNewer