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
function fb_show_shortcodes( $atts, $content = NULL ) { | |
extract( shortcode_atts( | |
array('linebreak'=>''), | |
$atts | |
) ); | |
$brackets = array(); | |
$brackets[0] = "/\[/"; | |
$brackets[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
function html5_video( $atts, $content = NULL ) { | |
extract( shortcode_atts( array( | |
"src" => '', | |
"width" => '', | |
"height" => '' | |
), $atts ) ); | |
return '<video src="' . $src . '" width="' . $width . '" height="' . $height . '" controls autobuffer>'; | |
} | |
add_shortcode( 'video5', 'html5_video' ); | |
Now you can use the following shortcode in your post: |
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 | |
/** | |
* Callback for wp_list_comments() | |
* @param object $comment | |
* @param array $args | |
* @param int $depth | |
* @return void | |
*/ | |
function extra_comment_callback( $comment, $args, $depth ) | |
{ |
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: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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: AntiScript deamon | |
Plugin URI: https://github.com/franz-josef-kaiser | |
Description: Removes script-links to spam sites from your post content after your site got hacked. Please go to <a href="tools.php?page=script_deamon.php">Tools → Remove Hack</a>. Thank you. Proudly brought to you by <a href="http://example.com">Franz Josef Kaiser</a>. | |
Version: 0.1 | |
Author: Franz Josef Kaiser | |
Author URI: https://github.com/franz-josef-kaiser | |
License: GPL2 | |
WP-Version: Tested in 2.7.1, 2.9.2, 3.0 |
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
#!/bin/bash | |
# | |
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
# modified by [email protected] | |
# modified by aconway@[redacted] - handle diffs that introduce new files | |
# modified by [email protected] - fixes diffs that introduce new files | |
# modified by [email protected] - fix sed syntax issue in OS X | |
# | |
# Generate an SVN-compatible diff against the tip of the tracking branch |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
NewerOlder