Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
<?php
/*
Plugin Name: User Meta Upload
Plugin URI: http://trepmal.com
Description: Add a file-upload form to the user edit profile page
Version: 0.1
Author: Kailey Lampert
Author URI: http://kaileylampert.com
Copyright (C) 2012 Kailey Lampert
<?php
//in register post type args array set rewrite to:
'rewrite' => array(
'slug' => 'mycpt',
'with_front' => false,
'feeds' => false,
'pages' => true
)
//then add this to functions.php
<?php
/**
* Walker for integration of WordPress custom menu with Bootstrap navbar.
*/
class Walker_Navbar_Menu extends Walker_Nav_Menu {
public $dropdown_enqueued;
/**
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{
<?php
/**
* restrict_admin is a simple function to restrict access to WordPress backend based on capabilities
* Form more capabilities read http://goo.gl/HlHr4
* Usage, capability per role:
*
* Administrator => activate_plugins
* Editor => moderate_comments
* Author => edit_published_posts
* Contributor => edit_posts
<?php
/**
* Image shortcode callback
*
* Enables the [kovshenin_image] shortcode, pseudo-TimThumb but creates resized and cropped image files
* from existing media library entries. Usage:
* [kovshenin_image src="http://example.org/wp-content/uploads/2012/03/image.png" width="100" height="100"]
*
* @uses image_make_intermediate_size
*/
<?php
/*
Plugin Name: The Combiner
Plugin URI: http://dd32.id.au/wordpress-plugins/?plugin=combine-css-js
Description: Combine CSS & JS into one large monolithic file
Author: DD32
Version: 1.0
Author URI: http://dd32.id.au/
*/
<?php
add_action('new_to_pending','notify_admin_on_pending');
function notify_admin_on_pending($post){
add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
$message = '
<p>
You have a new post pending a review:<br />
'.$post->post_title.' <br />
<a href="'.get_edit_post_link( $post->ID).'">Edit the Post</a>
</p>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#content').lyte_video();
});
</script>