Skip to content

Instantly share code, notes, and snippets.

$products = array();
// add new products to the array;
foreach ($new_products as $key => $product) {
// does this prodcut have a variation?
if ($product['variation']) {
// it this variation is already in the cart, add the qty to the previous and move on.
if ($products[$key][$product['variation']]) {
ini_set('error_reporting', E_ALL);
echo "hallo";
$username = 'EOJ2S-Z6OoN_le_KS1d75wsZ6y0SFdVsY9183IvxFyZp';
$password = 'EClusMEUk8e9ihI7ZdVLF5cZ6y0SFdVsY9183IvxFyZp';
$headers = array('Accept: application/json','Accept-Language: en_US');
$data = array('grant_type' => 'client_credentials');
$(function() {
$.stellar({
horizontalScrolling: false,
});
// slides
var swipe_brian = new Swipe(document.getElementById('swipe-brian'), {
speed: 600,
add_filter( 'rss2_item', 'mailchimp_attached_images' );
function mailchimp_attached_images() {
global $post;
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' );
if ( $thumbnail ) {
?>
<media:content url="<?php echo $thumbnail[0]; ?>" type="image/jpeg" medium="image" width="100%"></media:content>
var headerHeight = $('#primary-navigation').outerHeight();
var footerHeight = $('#main-footer').outerHeight();
var $jsheight = $('.js-height');
if ($jsheight.data('sub')) {
$jsheight.height($(window).height() - headerHeight - $($jsheight.data('sub')).outerHeight() * 2.2);
}else{
$jsheight.height($(window).height() - headerHeight);
# -FrontPage-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^cms/\?p=(.*)$ /\?p=$1
</IfModule>
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
<?php get_header(); ?>
<div id="projects">
<?php $thumbnailid = get_post_thumbnail_id($post->ID); ?>
<?php $images = get_children(
array(
'post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
global $wp_query;
$news = new wp_query(array('post_type' => 'news','nopaging' => true));
$psts = $wp_query->posts;
$nws = $news->posts;
$pstsnumber = count($psts);
$newsnumber = count($nws);
phrets_hourly is the WP_CRON hook
add_action('phrets_hourly', 'run_listings_update' );
function run_listings_update(){
$fetch = new Fetcher();
$fetch->fetch();
phrets_hourly is the WP_CRON hook
add_action('phrets_hourly', 'run_listings_update' );
function run_listings_update(){
$fetch = new Fetcher();
$fetch->fetch();