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: Custom Field Shortcodes | |
Version: 0.0.1 | |
Plugin URI: https://gist.github.com/joshcanhelp/87e1bb70f97475bccc9eb123e3fe2f1c | |
Description: Lets you add custom fields to a WordPress post or page via shortcodes. | |
Author: Josh Can Help | |
Author URI: http://www.joshcanhelp.com/ | |
License: GPL v3 | |
*/ |
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 | |
/** | |
* Adds first and last name to the registration field | |
*/ | |
function proper_add_user_reg_fields () { | |
?> | |
<p class="reg-email-validation"> | |
<label for="confirm_email_address"> |
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
<script> | |
( function() { | |
"use strict"; | |
// Get headline link URLs | |
var wpdHeadlines = document.getElementsByClassName('headline-link'); | |
// Combine and win | |
var wpdTrackThese = Array.prototype.slice.call(wpdHeadlines); |
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
<div class="home-tweet"> | |
<h6>Latest Tweet</h6> | |
<a class="twitter-timeline" data-dnt="true" href="[[DIRECT TWITTER PROFILE URL]]" data-widget-id="[[TWITTER WIDGET ID]]" | |
data-link-color="#ce2029" data-chrome="nofooter noheader noscrollbar noborders transparent" data-tweet-limit="1"> | |
<script>!function (d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; | |
if (!d.getElementById(id)) { | |
js = d.createElement(s); | |
js.id = id; | |
js.src = p + "://platform.twitter.com/widgets.js"; |
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
function otm_sc_column_wrap ( $atts = array(), $content ) { | |
return '<div class="column-wrap">' . do_shortcode( $content ) . '</div>'; | |
} | |
add_shortcode( 'column_wrap', 'otm_sc_column_wrap' ); | |
function otm_sc_column_3 ( $atts = array(), $content ) { | |
return '<div class="column-3">' . do_shortcode( $content ) . '</div>'; | |
} |
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
/** | |
* Completely nuke comments support | |
* Need to also also turn off comments/pingbacks at wp-admin > Settings > Discussion | |
* Need to also turn off comments for posts individually (Bulk Edit or DB find/replace) | |
* | |
* Adapted from: https://www.dfactory.eu/wordpress-how-to/turn-off-disable-comments/ | |
*/ | |
/** |
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 | |
/** | |
* Class EjunkieWpCli | |
* | |
* This class adds an 'ejunkie' command to wp-cli with a 'migrate' action | |
* This works for simple products, variations, and the Woocommerce API Manager | |
* TODO: Look for lines marked as "TODO" to change this script for your use case | |
*/ | |
final class EjunkieWpCli extends WP_CLI_Command { |
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
{ | |
ID: 1787, | |
comment_count: "0", | |
comment_status: "open", | |
filter: "raw", | |
guid: "http://local.wordpress-trunk.dev/?post_type=uc_item&p=1787", | |
menu_order: 0, | |
ping_status: "open", | |
pinged: "", | |
post_author: "1", |
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
/** | |
* CSS and JavaScript for admin pages | |
*/ | |
function proper_admin_css_js() { | |
global $pagenow; | |
// CSS | |
wp_enqueue_style( |
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
// Module dependencies | |
var express = require('express'), | |
mysql = require('mysql'); | |
// Application initialization | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', |