Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <?php
  2. /*
  3. * Plugin Name: Kaipo iframe
  4. * Plugin URI: http://www.kaipochat.com
  5. * Description: Chat By Interest
  6. * Version: 1.0
  7. * Author: JSL
  8. * Author URI: http://www.kaipochat.com
  9. * License: GPL2
  10. */
  11. function registerStyle(){
  12. wp_register_style( 'custom-style', plugins_url( 'kaipostyle.css', __FILE__ ), array(), '20120208', 'all' );
  13. wp_enqueue_style( 'custom-style' );
  14. }
  15.  
  16. function registerScript(){
  17. wp_register_script('custom-script', plugins_url('jquery.js',__FILE__ ));
  18. wp_enqueue_script('custom-script');
  19. }
  20.  
  21. add_shortcode( 'kaipo_iframe', 'kaipochat_iframe' );
  22.  
  23. function kaipochat_iframe($atts) {
  24. extract( shortcode_atts( array(
  25. 'id' => ''
  26. ), $atts ) );
  27.  
  28. $output = '<iframe id="kaipoid" width="300" height="415"
  29. src="'. $id .'"></iframe>';
  30.  
  31. return $output;
  32. }
  33.  
  34. add_action( 'wp_enqueue_scripts', 'registerStyle' );
  35. add_action( 'wp_enqueue_scripts', 'registerScript' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement