Donate', 'cubecolour on Twitter' ) ); } return $links; } // ============================================== // Register and Enqueue script // ============================================== function cc_popup_script() { wp_register_script( 'popup', plugins_url() . "/" . basename(dirname(__FILE__)) . '/js/popup.js', array('jquery'), '1.0.0', false ); wp_enqueue_script( 'popup' ); } add_action('wp_enqueue_scripts', 'cc_popup_script'); // ============================================== // shortcode to add 'popup' class to a link & add data attributes for height & width // ============================================== function cc_popup_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'url' => '#', 'width' => '400', 'height' => '400', ), $atts ) ); return '' . $content . ''; } add_shortcode( 'popup', 'cc_popup_shortcode' );