Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. <?php
  2.  
  3. define('FILTERPRIORITY', 10);
  4. add_filter('the_content', 'do_shortcode', FILTERPRIORITY);
  5. add_filter('widget_text', 'do_shortcode', FILTERPRIORITY);
  6.  
  7. add_action ('wp_head', 'printstyle' );
  8. function printstyle() {
  9.     echo "<link rel='stylesheet' id='graphene-stylesheet-css'  href='http://blog.kjodle.net/wp-content/themes/graphene-stonesinwater/print.css' type='text/css' media='print' />";
  10. }
  11.  
  12. add_shortcode( 'small', 'smalltext_shortcode_handler' );
  13. function smalltext_shortcode_handler( $atts, $content=null, $code="" ) {
  14.     return '<span class="smalltext">' . $content . '</span>';
  15. }
  16.  
  17. add_shortcode( 'code', 'codetext_shortcode_handler' );
  18. function codetext_shortcode_handler( $atts, $content=null, $code="" ) {
  19.     return '<span class="codetext">' . $content . '</span>';
  20. }
  21.  
  22. add_shortcode( 'quotation', 'quotation_shortcode_handler' );
  23. function quotation_shortcode_handler( $atts, $content=null, $code="" ) {
  24.     return '<div class="quotation">' . $content . '</div>';
  25. }
  26.  
  27. add_shortcode( 'qtext', 'qtext_shortcode_handler' );
  28. function qtext_shortcode_handler( $atts, $content=null, $code="" ) {
  29.     return '<p class="quote_text">' . $content . '</p>';
  30. }
  31.  
  32. add_shortcode( 'qauthor', 'qauthor_shortcode_handler' );
  33. function qauthor_shortcode_handler( $atts, $content=null, $code="" ) {
  34.     return '<p class="quote_author">' . $content . '</p>';
  35. }
  36.  
  37. add_action('graphene_after_commentform', 'comment_moderation');
  38. function comment_moderation() {
  39.  echo "<div class=\"commentmoderation\"><p />Comment moderation is in use. Your comment will appear shortly.</div>";
  40. }
  41.  
  42. add_filter('comment_form_defaults','comment_reform');
  43. function comment_reform ($arg) {
  44. $arg['title_reply'] = __('If you\'ve read this far, you have to leave a comment. That\'s the rule.');
  45. return $arg;
  46. }
  47.  
  48. add_post_type_support( 'page', 'excerpt' );
  49. // Adds excerpts to Pages
  50.  
  51.  
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement