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 | |
/** | |
* Shortcode to go along with my Option Tree | |
* helper functions. See those here: | |
* https://gist.github.com/2627998 | |
* | |
* <samp>[theme_option name="home_text"]</samp> | |
* | |
* @param array Array of attributes passed from the shortcode. | |
* @return string|null |
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 | |
/* | |
* Allows manual override on a per page/post basis | |
* for the display of the Roots Sidebar | |
* | |
* Allows for filtering the post types that show the metabox | |
* | |
*/ |
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
# xampp/apache/conf/extra/httpd-vhosts.conf | |
# You can replace the contents or append this | |
NameVirtualHost *:80 | |
UseCanonicalName Off | |
# | |
# My {sites-directory} is C:\xampp\htdocs\domains\ (full path) | |
# In the domains dir, I create a new dir for a new site |
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: Advanced Export | |
Plugin URI: http://wpmututorials.com/plugins/advanced-export/ | |
Description: Adds an Advanced Export to the Tools menu which allows selective exporting of pages, posts, specific categories and/or post statuses by date. | |
Version: 2.9 | |
Author: Ron Rennick | |
Author URI: http://ronandandrea.com/ | |
*/ |
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
/* jshint esnext: true */ | |
import Ember from 'ember'; | |
// When mixed into an Ember.Component class, actions can be explicitly or implicitly delegated to the parent. | |
// In general this makes the most sense for an app-level component, where actions are not mututated as they bubble | |
// up to higher levels. | |
export default Ember.Mixin.create({ | |
// When true, all actions will be implicitly passed on to the parent |
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
# Add this to /config/bash_profile | |
function wpd { | |
export XDEBUG_CONFIG="idekey=VVVDEBUG remote_connect_back=1" | |
wp "$@" | |
unset XDEBUG_CONFIG | |
}; | |
# Run these commands: | |
# vagrant ssh | |
# sudo cp /srv/config/bash_profile /home/vagrant/.bash_profile | |
# source ~/.bash_profile |
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 () { | |
define('redesign/ninemsn/portal/news/stickyElementController',['jquery', 'redesign/ninemsn/portal/news/helper'], function ($, helper) { | |
var bufferY = 56; // Offset for fixed positioning | |
var windowTop, | |
startY, | |
blockY, | |
stopY, | |
offset; |
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
vagrant ssh | |
cd /srv/www/ | |
mkdir site-name && cd site-name && mkdir htdocs && cd htdocs | |
wp core download | |
wp core config --dbname=site-name --dbuser=root --dbpass=root | |
# Before you install the site, you'll need to create the DB. I just pull up phpMyAdmin and create it there. | |
wp core install --url=site-name.dev --title=Site --admin_user=admin --admin_pass=password [email protected] | |
# Create the files "vvv-hosts" and "vvv-nginx.conf" |
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
vagrant ssh | |
cd /srv/www/ | |
mkdir site-name && cd site-name && mkdir htdocs && cd htdocs | |
wp core download | |
wp core config --dbname=site-name --dbuser=root --dbpass=root | |
wp db create | |
wp core install --url=site-name.dev --title=Site --admin_user=admin --admin_pass=password [email protected] |
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 | |
$posts_per_page = 100; | |
$page = 1; | |
do { | |
$posts = get_posts( [ | |
'posts_per_page' => $posts_per_page, | |
'paged' => $page, | |
] ); |
OlderNewer