Permalink
Browse files

Merge branch 'release/1.0'

  • Loading branch information...
2 parents b163e9b + 4ec5e9a commit 3fc692bf47de80a25de557951885d6f640ed8737 @alexkingorg committed Sep 4, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 redacted.php
View
@@ -0,0 +1,19 @@
+<?php
+/*
+Plugin Name: [REDACTED] Shortcode
+Version: 1.0
+Description: Replace content with [REDACTED].
+*/
+
+function akv3_shortcode_redacted($atts, $content) {
+// allows for styling as desired in the single post view
+ if (is_single()) {
+ $output = '<span class="redacted">'.__('REDACTED', 'ak-redacted').'</span>';
+ }
+// handles situations where tags are stripped (feeds, excerpts, etc.)
+ else {
+ $output = __('[REDACTED]', 'ak-redacted');
+ }
+ return $output;
+}
+add_shortcode('redacted', 'akv3_shortcode_redacted');

0 comments on commit 3fc692b

Please sign in to comment.