!addcom !keyword New text here
!editcom !keyword Edited version of the text here
!delcom !keyword
$(user)
<?php | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
<?php | |
// filter the Gravity Forms button type | |
add_filter("gform_submit_button", "form_submit_button", 10, 2); | |
function form_submit_button($button, $form){ | |
// The following line is from the Gravity Forms documentation - it doesn't include your custom button text | |
// return "<button class='button' id='gform_submit_button_{$form["id"]}'>'Submit'</button>"; | |
// This includes your custom button text: | |
return "<button class='button' id='gform_submit_button_{$form["id"]}'>{$form['button']['text']}</button>"; | |
} | |
// Oops this strips important stuff |
<?php | |
$args = array( | |
// Normal query goes here // | |
'no_found_rows' => true, // counts posts, remove if pagination required | |
'update_post_term_cache' => false, // grabs terms, remove if terms required (category, tag...) | |
'update_post_meta_cache' => false, // grabs post meta, remove if post meta required | |
); |
<?php | |
/* | |
Plugin Name: WDS Hello World | |
Plugin URI: https://webdevstudios.com/ | |
Description: Teaching the basics of WP-CLI | |
Author: Web Dev Studios | |
Version: 1.0.0 | |
Author URI: https://webdevstudios.com/ | |
*/ | |
class WDS_CLI { |
upstream phpfpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
upstream hhvm { | |
server unix:/var/run/hhvm/hhvm.sock; | |
} | |
# SSL | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
<?php | |
/** | |
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor | |
* | |
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/ | |
*/ | |
add_action( 'after_wp_tiny_mce', function(){ | |
?> | |
<script> |
This is a list of users Nightbot should be subscribed to on Twitch. Keep in mind this list is (probably) incomplete, but can also become invalid at any time.
Keep in mind if you wish to have a specific channel subscribed to Nightbot, the channel owner has to email Twitch support to request this. This is currently only possible for Twitch partners and not affiliates.
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
<?php | |
/** | |
* ACF Layout | |
* @version 1.0 | November 12th 2013 | |
* @author Beau Charman | http://twitter.com/beaucharman | |
* @link https://gist.github.com/beaucharman/7181406 | |
* @license MIT license | |
* | |
* Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on. |