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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Silent Flush | |
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten. | |
* Version: 2013.05.04 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
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
function tcb_filter_search( $term ) { | |
if ( is_search() ) | |
$search = "(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; | |
return $search; | |
} | |
add_filter( 'posts_search', 'tcb_filter_search', null, 2 ); |
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: Future Core Login | |
* Plugin URI: http://unserkaiser.com | |
* Description: Replacing the current stylesheets loaded on wp-login.php until this ticket goes into core: <a href="http://core.trac.wordpress.org/ticket/12506">#12506</a> | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
* License: GPL2 | |
* |
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 | |
defined( 'ABSPATH' ) OR exit; | |
add_action( 'init', array( 'oxoImageSizesExtd', 'init' ), 0 ); | |
class oxoImageSizesExtd extends oxoImageSizes | |
{ | |
/** | |
* The Class Object | |
* @var |
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
// ==UserScript== | |
// @name Gitwebmarkdown | |
// @version 0.1 | |
// @description renders readme files in markdown | |
// @include http://yourserverhere.com/git/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js | |
// ==/UserScript== | |
var converter = new Showdown.converter(); |
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
angular.module('myApp', ['ngRoute']) | |
.provider('Weather', function() { | |
var apiKey = ""; | |
this.getUrl = function(type, ext) { | |
return "http://api.wunderground.com/api/" + | |
this.apiKey + "/" + type + "/q/" + | |
ext + '.json'; | |
}; |
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 | |
defined( 'ABSPATH' ) OR exit; | |
/** | |
* Plugin Name: SysBot | |
* Description: Creates and maintains the SysBot User (which has the role of "editor") | |
* Author: Franz Josef Kaiser | |
*/ | |
# PUBLIC API # | |
function get_bot() |
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
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { | |
?> | |
<tr> |
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 | |
/***** | |
All new versions will be posted at | |
https://github.com/rmccue/Rotor_WPPlugin | |
Please use that repository instead of this Gist. | |
******/ |
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: T5 Custom Log-out URL | |
* Description: Create a custom log-out URL. | |
* Plugin URI: http://wordpress.stackexchange.com/questions/76161/masking-logout-url | |
* Version: 2012.12.14 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* Licence: MIT | |
* License URI: http://opensource.org/licenses/MIT |