I hereby claim:
- I am vinsanity on github.
- I am vincentlistrani (https://keybase.io/vincentlistrani) on keybase.
- I have a public key ASCr5ZYNlPfsm401c0seT5afMRTb-37DBIPAOF_avxyfKwo
To claim this, I am signing this object:
for i in {1..10}; do bash -xc "curl http://loripsum.net/api/5 | wp --allow-root post create - --post_title='Post $i' --post_type=page --post_status=publish --post_category=$(wp --allow-root term list category --field=id --number=1 --offset=$(shuf -i 0-9 -n 1)) --tags_input='$(wp --allow-root term list post_tag --field=name --number=1 --offset=$(shuf -i 0-99 -n 1))'"; done |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* This is a simple script to invite users to your slack | |
* Replace the subdomain and token in the variables below. | |
* Upload a logo called "logo.png" to the same directory for your group | |
* Upload a logo called "slack.png" to the same directory for slack | |
*/ | |
define('SUBDOMAIN','{YOUR SUBDOMAIN HERE}'); | |
define('TOKEN','{YOUR API TOKEN HERE}'); | |
?> |
<?php | |
/** | |
* Code should be placed in your theme functions.php file. | |
*/ | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); | |
function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { | |
if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { | |
$html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">'; | |
$html .= woocommerce_quantity_input( array(), $product, false ); |
<template name="acfcb" value="$name_of_field = array( 	'key' => 'field_name_of_field', 	'label' => 'Name of Field', 	'name' => 'name_of_field', 	'type' => 'checkbox', 	'instructions' => '', 	'required' => 0, 	'conditional_logic' => 0, 	'wrapper' => array( 		'width' => '', 		'class' => '', 		'id' => '', 	), 	'default_value' => '', 	'choices' => array( 		'red'	=> 'Red' 	),	 	'layout' => 'vertical', );" description="ACF checkbox field" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="PHP" value="true" /> | |
</context> | |
</template> | |
<template name="acfem" value="$name_of_field = array( 	'key' => 'field_name_of_field', 	'label' => 'Name of Field', 	'name' => 'name_of_field', 	'type' => 'email', 	'instructions' => '', 	'required' => 0, 	'conditi |
<?php | |
/** | |
* Plugin Name: Epicureangram | |
* Plugin URI: http://3five.com/ | |
* Description: Epicurean Instragram shortcode plugin. | |
* Version: 1.0 | |
* Author: Vincent Listrani | |
* Author URI: http://3five.com/ | |
*/ |
<?php | |
function 3five_wpajax_url_script() { | |
$output = '<script type="text/javascript">'; | |
$output .= 'var ajaxurl = '. admin_url('admin-ajax.php'); | |
$output .= '</script>'; | |
echo $output; | |
} | |
// Enqueue and localize the ajax script for the staff page. | |
function 3five_ajax_load_scripts() { |
/** | |
* Adjust the rewrite rules for News & Events | |
* | |
* Adds a simple "status" query variable to the News post type archive | |
* to allow filtering the archive by a post meta field for event_date. | |
* Allowed statuses are: upcoming, past, and posts (for non-event entries). | |
* Also allows paging within the status filters. | |
* | |
* @since 1.0.0 | |
*/ |
function add_theme_caps() { | |
// gets the author role | |
$role = get_role( 'editor' ); | |
// add core gravity form capabilities | |
// adjust as required | |
$role->add_cap( 'gravityforms_edit_forms' ); | |
$role->add_cap( 'gravityforms_delete_forms' ); | |
$role->add_cap( 'gravityforms_create_form' ); | |
$role->add_cap( 'gravityforms_view_entries' ); |
class myWidget extends WP_Widget{ | |
function __construct() | |
{ | |
= array( | |
'description' => 'Description goes here', | |
'name' => 'Widget name goes here' | |
); | |
parent::__construct('myWidget', '', ); | |
} |