This file contains hidden or 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
// ## Globals | |
var argv = require('minimist')(process.argv.slice(2)); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var browserSync = require('browser-sync').create(); | |
var changed = require('gulp-changed'); | |
var concat = require('gulp-concat'); | |
var flatten = require('gulp-flatten'); | |
var gulp = require('gulp'); | |
var gulpif = require('gulp-if'); | |
var imagemin = require('gulp-imagemin'); |
This file contains hidden or 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
Disable the WordPress Admin Bar for all Users and Visitors | |
Turn off the toolbar with one simple line. | |
view plain | |
/* | |
* Disable the WordPress Admin Bar for all Users and Visitors | |
*/ | |
remove_action( 'init', '_wp_admin_bar_init' ); | |
^ top | |
Enable the WordPress Admin Bar for admins only |
This file contains hidden or 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
// This function uses AJAX to run a query. | |
// It assumes that there are no posts on the page, and they will be loaded by the user on demand. | |
// // There are no animations added here. For a smoother experience, it is a good idea to add animations to the button (ex. a loading icon during the request), or making the new posts animate in (ex, using Animate.css to fade them into the page) | |
$(function() { | |
// Grab the load button, since I only want to run the code if the button is on the page | |
var ajaxButton = $('#ajax-button'); | |
if (ajaxButton) { | |
// The AJAX request | |
var getPosts = function() { |
This file contains hidden or 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
// This function implements a "Load More" button. | |
// It assumes that there is already a matching query that has executed on the page, so this AJAX call is just a continuation of that query to grab additional posts. | |
// There are no animations added here. For a smoother experience, it is a good idea to add animations to the button (ex. a loading icon during the request), or making the new posts animate in (ex, using Animate.css to fade them into the page) | |
$(function() { | |
// Grab the load more button, since I only want to run the code if the button is on the page | |
var loadMoreButton = $('#load-more'); | |
if (loadMoreButton) { | |
// Because there are already posts on the page, we need to manually tell this query what page of results to grab so that is doesn't load duplicate posts | |
var loadPosts = function(page) { |
This file contains hidden or 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 | |
function change_welcome_mail_loginlink( $welcome_email, $user_id, $password, $meta ) { | |
$welcome_email = str_replace( 'LOGINLINK', 'http://www.mysite.com/my/custom/login/url', $welcome_email ); | |
return $welcome_email; | |
} | |
add_filter( 'update_welcome_user_email', 'change_welcome_mail_loginlink', 10, 4 ); |
This file contains hidden or 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 | |
/** | |
* WorpPress post query result | |
* @since 1.0.0 | |
* @author Razon Komar Pal | |
* @return string - like: Showing 1–12 Of 29 Results | |
*/ | |
if (get_query_var('paged')) { |
This file contains hidden or 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 | |
/* | |
* Custom Post Pagination | |
* @since 1.0.0 | |
* return | |
*/ | |
if (!function_exists('ic_custom_posts_pagination')) : | |
function ic_custom_posts_pagination($the_query=NULL, $paged=1){ | |
global $wp_query; |
This file contains hidden or 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 | |
WP_CLI::add_command( 'podcast', 'JS_Podcast_Import' ); | |
/** | |
* Wired Core CLI Functions | |
*/ | |
class JS_Podcast_Import extends WP_CLI_Command { | |
This file contains hidden or 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 | |
WP_CLI::add_command( 'podcast', 'Podcast_Importer' ); | |
/** | |
* Podcast Importer | |
*/ | |
class Podcast_Importer extends WP_CLI_Command { | |
This file contains hidden or 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 | |
/** | |
* Allow nested folder paths in WordPress Multisite with subdirectories | |
* Updated from http://maisonbisson.com/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/ to account for latest WordPress code | |
* .htaccess rules also need to be changed to: | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] |
NewerOlder