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 scl_pullquote_mce_button() { | |
// check if WYSIWYG is enabled | |
if ( 'true' == get_user_option( 'rich_editing' ) ) { | |
add_filter( 'mce_external_plugins', 'scl_pullquote_add_tinymce_plugin' ); | |
add_filter( 'mce_buttons', 'scl_pullquote_register_mce_button' ); | |
// enforce Dashicon font | |
echo '<style> | |
.dashicons-testimonial::before { |
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
(function() { | |
tinymce.PluginManager.add('blockquote_cite', function( editor, url ) { | |
editor.addButton( 'blockquote_cite', { | |
title: 'Blockquote & Cite', | |
icon: "icon dashicons-testimonial", | |
onclick: function() { | |
editor.windowManager.open( { | |
title: 'Insert Blockquote and Citation', | |
body: [ | |
{ |
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 | |
add_filter( 'default_hidden_meta_boxes', 'scl_toggle_meta_boxes', 10, 2 ); | |
function scl_toggle_meta_boxes( $hidden, $screen ) { | |
$hide_these = array( | |
'people_typediv', | |
'facility_typediv', | |
'genesis-theme-settings-version', | |
'genesis-theme-settings-feeds', |
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 | |
/* | |
Plugin Name: Texas A&M Multisite Network Administration | |
Version: 0.4.2 | |
Plugin URI: https://github.tamu.edu/COE-wordpress/coe-network-admin | |
Description: Adds columns to the Network Sites list screen; subsite user login redirects. | |
Author: Stephanie Leary | |
Author URI: http://stephanieleary.com | |
GitHub Plugin URI: https://github.tamu.edu/COE-wordpress/coe-network-admin | |
GitHub Enterprise: https://github.tamu.edu |
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 tees_add_network_default_roles( $user_id ) { | |
if ( is_main_site() && !is_user_member_of_blog( $user_id ) ) | |
add_user_to_blog( get_current_blog_id(), $user_id, 'subscriber' ); | |
} | |
add_action( 'wpmu_activate_user', 'tees_add_network_default_roles', 10, 1 ); | |
add_action( 'wpmu_new_user', 'tees_add_network_default_roles', 10, 1 ); | |
add_action( 'user_register', 'tees_add_network_default_roles', 10, 1 ); |
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 | |
add_filter( 'login_redirect', 'tees_subsite_login_redirect', 100, 3 ); | |
function tees_subsite_login_redirect( $redirect_to, $request_redirect_to, $user ) { | |
if ( !is_user_member_of_blog() || ( is_main_site() && !is_super_admin() ) ) { | |
$redirect_to = get_admin_url( get_userdata( $user->ID )->primary_blog ); | |
} | |
return $redirect_to; | |
} |