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: WP Invite Codes | |
Plugin URI: http://pmg.co/ | |
Description: Makes wordpress an invite only community. | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
*/ |
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: Add Extra Comment Fields | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: An example of how to add, save and edit extra comment fields in WordPress | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: MIT | |
*/ |
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
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
jQuery('ul.tab-nav li').click(function(e){ | |
var tab_id = jQuery(this).attr('id'); | |
jQuery('ul.tab-nav li').removeClass('active'); | |
$(this).addClass('active'); | |
jQuery('.tab-container div.tab').hide(); | |
jQuery('.tab-container div#' + tab_id + '-tab').show(); | |
}); |
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: Reminder Emails | |
Plugin URI: http://www.christopherguitar.net/ | |
Description: Sends a reminder email if you haven't posted in seven days. | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://www.christopherguitar.net | |
License: GPL2, Creative Commons | |
*/ |
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 | |
// First, backup the default $postdata | |
$backup = $post; | |
// Now, override the default | |
$tags = wp_get_post_tags($post->ID); | |
// Now, open the if ( $tags ) statement | |
if ($tags) { | |
$tag_ids = array(); |
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
/* | |
Media Queries | |
Author: Misc | |
Source: Misc | |
Requires: https://github.com/scottjehl/Respond | |
*/ | |
/* Smart Phones */ | |
@media screen and (max-width: 480px){ | |
}/*/mediaquery*/ |
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: Gallery Members (for wpse32840) | |
Description: Only allow members to view one page | |
Author: Christopher Davis | |
Author URI: http://www.christopherguitar.net/ | |
*/ | |
register_activation_hook( __FILE__, 'wpse32840_activation' ); | |
function wpse32840_activation() |
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 | |
// Assuming we already have registered the taxonomy. | |
$usergroup_taxonomy = 'ef_usergroups'; | |
// Tell WordPress that we can make associations between users and the usergroups taxonomy. | |
register_taxonomy_for_object_type( $usergroup_taxonomy, 'user' ); | |
// Sample code | |
$user = WP_User( 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
<div id="map_container" style="width: 100%; height: 300px; margin-bottom: 10px;"></div> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=en"></script> | |
<script type="text/javascript"> | |
var Markers = [{"address":"ADRESSE","info":"","title":""}]; | |
var Marker = "/path/to/image/marker.png"; | |
(function($, markers, markerIcon) { | |
var map, geocoder, infowindow; |
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
update wp_posts set post_content = replace(post_content,'’','\''); | |
update wp_posts set post_title = replace(post_title,'’','\''); | |
update wp_comments set comment_content = replace(comment_content,'’','\''); | |
update wp_postmeta set meta_value = replace(meta_value,'’','\''); | |
update wp_posts set post_excerpt = replace(post_excerpt,'’','\''); | |
update wp_posts set post_content = replace(post_content,'…','...'); | |
update wp_posts set post_title = replace(post_title,'…','...'); | |
update wp_comments set comment_content = replace(comment_content,'…','...'); | |
update wp_postmeta set meta_value = replace(meta_value,'…','...'); |