View mkpdf.py
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
import img2pdf | |
import argparse | |
import os | |
def process_images(min_range, max_range, img_path, prefix, suffix, out_file): | |
images = [] | |
for i in range(min_range,max_range): | |
fname = img_path + prefix + '%0.3d' % i + '.' + suffix | |
print("adding img: " + fname) | |
images.append(fname) |
View search_all_w_meta.php
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 | |
add_action( 'pre_get_posts', array( $this, 'search_metadata' ), 9 ); | |
function search_metadata() { | |
if ( ! is_main_query() || ! is_search() ) { | |
return; | |
} | |
add_filter( 'posts_join', function( $join ) { | |
global $wpdb; |
View find_callback.php
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 // do not use this line. Add below to functions.php | |
add_action( 'wp_footer', 'list_hooked_filters_and_actions' ); | |
add_action( 'login_footer', 'list_hooked_filters_and_actions' ); | |
add_action( 'admin_footer', 'list_hooked_filters_and_actions' ); | |
function list_hooked_filters_and_actions() { | |
global $wp_filter; |
View woocommerce-settings-tab-demo.php
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 | |
/** | |
* Plugin Name: WooCommerce Settings Tab Demo | |
* Plugin URI: https://gist.github.com/BFTrick/b5e3afa6f4f83ba2e54a | |
* Description: A plugin demonstrating how to add a WooCommerce settings tab. | |
* Author: Patrick Rauland | |
* Author URI: http://speakinginbytes.com/ | |
* Version: 1.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
View wp_mail_bcc.php
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 // DO NOT include this line. Add below to your theme functions.php | |
/** | |
* Add bcc address to email based on contents | |
* of the email subject line. | |
* | |
* Set email address and content of the subject | |
* line for the email being filtered. | |
*/ | |
add_filter( 'wp_mail', 'custom_mails' ); |
View custom-queries.php
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 | |
/** | |
* @package Custom_queries | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Custom queries | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
View columns.css
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
/* Column Classes | |
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css | |
--------------------------------------------- */ | |
.five-sixths, | |
.four-sixths, | |
.one-fourth, | |
.one-half, | |
.one-sixth, | |
.one-third, |
View 0.php
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 | |
/** | |
* This gist is example code that goes with an article on how (and why/when) to use | |
* PHP anonymous functions. To view the entire post, go to: | |
* https://rocketgeek.com/basics/using-anonymous-functions-for-filters-and-actions/ | |
*/ |
View mc_put_req.php
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 | |
/** | |
* Utility function to subscribe a user to a MailChimp | |
* list using the MC API 3.0 | |
* | |
* @param array $args { | |
* Array of settings. | |
* | |
* @type string $api_key Your MailChimp API key. |
View header_overlap_fix.css
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
:target::before { | |
content: ""; | |
display: block; | |
height: 50px; /* fixed header height*/ | |
margin: -50px 0 0; /* negative fixed header height */ | |
} |
NewerOlder