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 | |
// Add our action | |
add_action( 'wp_enqueue_scripts', 'joelworsham_add_shortcode_styles' ); | |
/** | |
* Dynamically calls scripts and styles based on the presence | |
* of shortcodes in the post content. | |
*/ | |
function joelworsham_add_shortcode_styles() { |
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
IT |
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 | |
... | |
if ( version_compare( '5.3', phpversion(), '>' ) ) { | |
add_action( 'admin_notices', '_myplugin_php_notice' ); | |
// Do what you need to stop your plugin from loading | |
} | |
/** | |
* Displays an admin error about needing to update the server's PHP version. |
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 node:true */ | |
module.exports = function(grunt) { | |
var path = require('path'), | |
SOURCE_DIR = 'src/', | |
BUILD_DIR = 'build/', | |
mediaConfig = {}, | |
mediaBuilds = ['audiovideo', 'grid', 'models', 'views']; | |
// Load tasks. | |
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks ); |
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: DZS Roles | |
* Description: Provides custom roles for the Detroit Zoo website. | |
* Author: Joel Worsham | |
* Author URI: http://realbigmarketing.com | |
* Version: 1.0.1 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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 | |
add_filter( 'wlmapi_the_members', function ( $members ) { | |
if ( $members && isset( $members['members'] ) && isset( $members['members']['member'] ) ) { | |
foreach ( $members['members']['member'] as &$member ) { | |
$member['agent_ambassadors'] = get_user_meta( $member['id'], 'agent_ambassadors', true ); | |
$member['lender_ambassadors'] = get_user_meta( $member['id'], 'lender_ambassadors', true ); | |
$member['agent_ambassador_default'] = get_user_meta( $member['id'], 'agent_ambassador_default', 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
<?php | |
function my_modify_gradebook_type_posts( $wp_query ) { | |
// Make sure it's the proper query | |
if ( $wp_query->is_main_query() || | |
$wp_query->get('post_type') != array( 'sfwd-assignment', 'sfwd-quiz' ) || | |
! $wp_query->get('tax_query') | |
) { | |
return; |
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 | |
function my_modify_gradebook_type_components( $components ) { | |
if ( ! $components ) { | |
return $components; | |
} | |
foreach ( $components as $type_id => &$component ) { | |
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
// Foundation for Sites Settings | |
// ----------------------------- | |
// | |
// Table of Contents: | |
// | |
// 1. Global | |
// 2. Breakpoints | |
// 3. The Grid | |
// 4. Base Typography | |
// 5. Typography Helpers |
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 | |
/** | |
* Modifies WP Pro Quiz so I can get the dang answers in the results. | |
* | |
* @since 0.1.0 | |
* @package ME10 | |
*/ | |
// Don't load directly | |
if ( ! defined( 'ABSPATH' ) ) { |