wingman007

WordPressPlugin_coolcsn-hello-world.php

Jun 18th, 2015
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Coolcsn-Hello-World
  4. Plugin URI: http://coolcs.com/
  5. Description: Simple Hello World Plugin
  6. Version: 1.0.0
  7. Author: Stoyan Cheresharov
  8. Author URI: http://coolcsn.com/
  9. License: MIT
  10. */
  11.  
  12. // echo 'Hello World!'; Event handler
  13. function hello_world($content)
  14. {
  15.     if (is_single()) {
  16.         $content .= '<h1>Hello World from my plugin!</h1>';
  17.     }
  18.     return $content;
  19. }
  20.  
  21. // hoocking
  22. add_filter('the_content', 'hello_world');
Advertisement
Add Comment
Please, Sign In to add comment