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
// polyfill webpack require.ensure | |
if (typeof require.ensure !== 'function') require.ensure = (d, c) => c(require) | |
export default <% if (addStore) { %>(store) => (<% } %>{ | |
path: '<%= camelEntityName %>', | |
getComponents (location, cb) { | |
require.ensure([ | |
'views/<%= pascalEntityName %>View/<%= pascalEntityName %>View' | |
], (require) => { | |
let view = require('views/<%= pascalEntityName %>View/<%= pascalEntityName %>View').default |
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
#! /bin/bash | |
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn | |
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo. | |
# main config | |
PLUGINSLUG="multisite-user-management" | |
CURRENTDIR=`pwd` | |
MAINFILE="ms-user-management.php" # this should be the name of your main php file in the wordpress plugin | |
# git config |
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
/* Multisite */ | |
define('WP_ALLOW_MULTISITE', true); | |
define('MULTISITE', true); | |
define('SUBDOMAIN_INSTALL', true); | |
define('DOMAIN_CURRENT_SITE', 'somesite.com'); | |
define('PATH_CURRENT_SITE', '/'); | |
define('SITE_ID_CURRENT_SITE', 1); | |
define('BLOG_ID_CURRENT_SITE', 1); | |
define('MAJ_DEV', true); |
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
// So, I'm debating whether user_role should be defined as primary_user_role, | |
// and changed from maj_student to something like journal_host|journal_guest? | |
// that would mess up though what links are displayed in the navigation | |
// though... but that's inconsequential. there are other ways of determining | |
// how those would be selected/displayed. | |
// my journals | |
// if not a teacher, display this | |
// family/friends | |
// get_users and filter by family/friend role | |
// teachers |
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
// Okie doke. Need to process how to handle reciprocal connections, as well | |
// as determining when to add a user to blog as a certain type. For | |
// example, lets talk about students adding family friends as students. | |
// A student will invite another student as a family friend. It'll check to | |
// see if that user exists, if so, record their user id and email an | |
// invitation to that user. The user will then accept the invitation. On | |
// invitation acceptance, when it goes to add the student to the journal | |
// hosts journal, it'll check to see if the current user ( journal guest ) | |
// is a student. If so, it'll also add the journal host to the journal | |
// guests' journal as well. |
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 | |
abstract class Cur_Abstract { | |
public static $instance; | |
public static function get_instance() { | |
// Instead of doing is_object( static::$instance ), we check to see if | |
// static::$instance is an instance of static::$class. Because we're | |
// extending the class, static::$instance wants to be shared across any | |
// classes that extend Cur_Abstract, muddling up this check. If it were |
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 | |
/** | |
* Get the date for the day navigation link | |
* | |
* @param string $date_description | |
* @return string | |
* @since 3.1.1 | |
* @throws OverflowException | |
*/ | |
function tribe_get_the_day_link_date( $date_description ) { |
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: WP Ultimate CSV Importer | |
*Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html | |
*Description: A plugin that helps to import the data's from a CSV file. | |
*Version: 3.2.3 | |
*Author: smackcoders.com | |
*Author URI: http://www.smackcoders.com | |
* | |
* Copyright (C) 2013 Smackcoders (www.smackcoders.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
/** | |
* Sale Products Up Front | |
*/ | |
add_action( 'woocommerce_product_query', 'cur_sale_products_up_front', 10, 2); | |
add_filter('posts_request', 'cur_modify_products_query', 10, 2); | |
add_filter('loop_start', 'cur_reorder_sale_items'); | |
//Utility function | |
function cur_replace_text($startPoint, $endPoint, $newText, $source) { |