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 | |
/** | |
* Recent_Comments_EF widget class | |
* | |
* Patched for Edit Flow | |
* | |
* @since 2.8.0 | |
*/ | |
class WP_Widget_Recent_Comments_EF extends WP_Widget { |
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
/// <summary> | |
/// Cleans up a given string into a slug-friendly form. | |
/// Strips special characters and replaces spaces with hyphens. | |
/// | |
/// Given something like "The Quick Fox Don't Like No Guff!" return "The-Quick-Fox-Dont-Like-No-Guff" | |
/// | |
/// Borrowed from WordPress. | |
/// </summary> | |
/// <param name="str">The string to be sanitized</param> | |
/// <returns>A sanitized string</returns> |
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
jQuery(document).ajaxSuccess(function(e, xhr, settings) { | |
var widget_id_base = 'mywidget'; | |
if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1) { | |
alert('yay!'); | |
// do other stuff | |
} | |
}); |
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
// Redefines jQuery.fn.html() to add custom events that are triggered before and after a DOM element's innerHtml is changed | |
// html-change-pre is triggered before the innerHtml is changed | |
// html-change-post is triggered after the innerHtml is changed | |
; | |
(function($) { | |
var eventName = 'html-change'; | |
// Save a reference to the original html function | |
jQuery.fn.originalHtml = jQuery.fn.html; | |
// Let's redefine the html function to include a custom event | |
jQuery.fn.html = function() { |
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_action( 'admin_init', 'ef_usergroups_cap_fix' ); | |
function ef_usergroups_cap_fix() { | |
global $wp_roles; | |
if ( ! isset( $wp_roles ) ) | |
$wp_roles = new WP_Roles(); | |
// Add necessary capabilities to allow management of usergroups and post subscriptions | |
// edit_post_subscriptions - administrator + editor |
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
* { | |
-webkit-transition: 1s; | |
-moz-transition: 1s; /* Firefox 4+ */ | |
-ms-transition: 1s; /* IE doesn't actually support transitions, but we'll humour Microsoft */ | |
-o-transition: 1s; /* Opera 10.5 */ | |
transition: 1s; | |
} |
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: Edit Flow - Reviewer Add-on | |
Plugin URI: http://editflow.wordpress.com | |
Description: An add-on for Edit Flow that allows you to assign review groups for users that will be notified any time a user updates a post. | |
Author: Mohammad Jangda | |
Version: 0.1 | |
Author URI: http://www.digitalize.ca | |
Copyright 2009-2010 Mohammad Jangda |
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
<h3>Upcoming Posts</h3> | |
<ul> | |
<?php | |
global $post; | |
$myposts = get_posts( array( 'post_status' => 'queued' ) ); | |
foreach($myposts as $post) : setup_postdata($post); ?> | |
<li><?php the_title(); ?></li> | |
<?php endforeach; ?> | |
</ul> |
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: Public Preview | |
Plugin URI: http://digitalize.ca | |
Description: Enables unauthenticated users to preview posts with a secret link! | |
Author: Mohammad Jangda | |
Version: 0.1 | |
Author URI: http://digitalize.ca/ | |
*/ |
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: Confirm On Publish | |
Description: Prompts you to confirm if you want to publish or update a post | |
*/ | |
add_action( 'load-post.php', 'x_confirm_before_publish' ); | |
function x_confirm_before_publish() { | |
?> |