Created
March 20, 2015 12:44
-
-
Save tfnab/78484884d62846871a44 to your computer and use it in GitHub Desktop.
WP Plugin für Frank
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: Frank | |
*/ | |
function frank_init() | |
{ | |
add_shortcode( 'frank', 'frank_shortcode_frank' ); | |
} | |
add_action( 'init', 'frank_init' ); | |
function frank_shortcode_frank( $a, $c ) | |
{ | |
$a = shortcode_atts( array( | |
'faktor' => '', | |
), $a ); | |
if ( empty( $c ) ) $c = 'Frank'; | |
return $a['faktor'].' cooler typ, dieser '.$c; | |
} | |
// Usage: [frank] or [frank faktor=sehr]Martin[/frank] ;-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment