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 editorial comments to the Edit Comments list view | |
*/ | |
add_filter( 'comments_clauses', 'efx_add_editorial_comments' ); | |
function efx_add_editorial_comments( $clauses ) { | |
global $pagenow; | |
if ( 'edit-comments.php' != $pagenow ) { | |
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 | |
/** | |
* Permit anyone to post HTML in the comments | |
* Because ThunderP2 is only accessible by qualified users, | |
* this is just fine. | |
*/ | |
add_action( 'init', function() { | |
remove_filter( 'pre_comment_content', 'wp_filter_kses' ); | |
add_filter( 'pre_comment_content', 'wp_filter_post_kses' ); |
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 | |
/** | |
* 'special-term' is a unique butterfly | |
*/ | |
function dbx_get_special_terms() { | |
return array( 'special-term' ); | |
} | |
/** |
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 | |
/* | |
* Hack to restore the post_name that get_default_post_to_edit() noops | |
* Our assigned post_name via wp_insert_post_data can get fubar on post-new.php | |
* | |
* @see https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php#L588 | |
*/ | |
add_filter( 'post_updated_messages', function( $messages ) { | |
global $pagenow, $post; |
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
this.setupMaxLengthCountdown(); | |
$('.fm-item').on('fm_added_element', $.proxy( this.setupMaxLengthCountdown, this ) ); | |
/** | |
* Set up max length countdown | |
*/ | |
setupMaxLengthCountdown: function() { | |
$('.fm-element[data-fusion-enable-max-length-countdown]').each( function(){ | |
var el = $(this); |
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
CREATE DATABASE databasename; | |
GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED BY "password"; | |
FLUSH PRIVILEGES; | |
EXIT; |
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 $images = get_post_meta($post->ID, 'image'); | |
if ($images) { | |
foreach ($images as $image) { | |
$image = explode('{}', $image); | |
echo '<div class="image"><img src="/media' . $image[0] . '" />'; | |
if ($image[1]) { | |
echo '<p class="credit">' . $image[1] . '</p>'; | |
} | |
echo '</div>'; | |
} |
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 | |
// Handy method to remove the hook for email notifications of custom post status changes | |
function ef_remove_post_status_notifications() { | |
global $edit_flow; | |
// Edit Flow originally hooks into 'transition_post_status' to know when to send custom post status notifications | |
remove_action( 'transition_post_status', array( &$edit_flow->notifications, 'notification_status_change' ), 10, 3 ); | |
} | |
// Hook this action into init so Edit Flow is already loaded | |
add_action( 'init', 'ef_remove_post_status_notifications' ); | |
?> |
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
REPLACE THIS WITH ANY ASSIGNMENT INTRODUCTION TEXT YOU WANT | |
<div class="assignment-headlines"></div> | |
<script type="text/javascript" src="http://static.journalism.cuny.edu/useful_js/load_site_headlines.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
// Load all of the websites in an array | |
var websites = new Array(); | |
websites[0] = 'http://ernest.entrepreneurial.2011.journalism.cuny.edu/'; | |
websites[1] = 'http://hong.entrepreneurial.2011.journalism.cuny.edu/'; |
OlderNewer