Skip to content

Instantly share code, notes, and snippets.

View kjohnson's full-sized avatar

Kyle B. Johnson kjohnson

View GitHub Profile
@kjohnson
kjohnson / disable-new-user-registration-email.php
Created December 16, 2015 21:45
Disable New User Registration Email in WordPress 4.3
// Fix New User Email Send
if ( !function_exists('wp_new_user_notification') ) :
function wp_new_user_notification( $user_id, $notify = '' ) { }
endif;
@kjohnson
kjohnson / wp.sh
Created December 17, 2015 17:10
Bash download, configure, and install WordPress using the WP-CLI
#!/bin/bash
read -p "Site Name: " siteName
echo "Creating the '$siteName' folder..."
cd public
mkdir $siteName
cd $siteName
echo "Downloading WordPress..."
Verifying that +kjohnson is my blockchain ID. https://onename.com/kjohnson
/*
* Settings
*/
$this->_settings = array(
'label' => array(
'name' => 'label',
'type' => 'textbox',
'label' => __( 'Label', 'ninja-forms'),
'width' => 'one-half',
'group' => 'primary',
<script id='nf-tmpl-field-input' type='text/template'>
<input id="nf-field-<%= id %>" name="nf-field-<%= id %>" class="<%= classes %> nf-element" type="text" value="<%= value %>" placeholder="<%= placeholder %>">
</script>
/**
* This will log all errors notices and warnings to a file called debug.log in
* wp-content (if Apache does not have write permission, you may need to create
* the file first and set the appropriate permissions (i.e. use 666) )
*/
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
{
"100": "1f4af",
"1234": "1f522",
"interrobang": "2049",
"tm": "2122",
"information_source": "2139",
"left_right_arrow": "2194",
"arrow_up_down": "2195",
"arrow_upper_left": "2196",
"arrow_upper_right": "2197",
@kjohnson
kjohnson / dynamic_method.php
Last active August 5, 2016 03:49
Dynamic method call.
<?php
class Foo
{
function bar()
{
$baz = 'qux';
$this->{ $baz }( 'qux' );
}
@kjohnson
kjohnson / separate-your-time-from-your-money.md
Last active August 15, 2016 15:59
WordCamp Nashville 2016 Speaker Submission

Separate your time from your money

Most freelancers sell WordPress as a service: installing WordPress, customizing WordPress, and extending WordPress. These freelancers, and the services that they offer, share one thing in common: income is directly related to time spent. If you want to make more money, you have to find more clients and put in more hours. It just doesn’t scale.

What if I told you that you that the opportunity for a product business goes beyond plugins and themes. You can productize your services and scale your work so that your hours don’t increase at the same rate as your profits. Using personal examples and identifying use cases scattered throughout the WordPress ecosystem, I will show how to separate your time from your income with a product approach to selling WordPress.

var myCustomController = Marionette.Object.extend({
initialize: function() {
// ...
Backbone.Radio.channel( 'form-' + formID ).reply( 'maybe:submit', this.beforeSubmit, this, formID );
},
beforeSubmit: function( formID ) {
var formModel = nfRadio.channel( 'app' ).request( 'get:form', formID );