get_uri() . 'quicklinks.js', array( 'jquery' ), self::$version, true ); wp_register_style( 'bsf-quick-links-css', $this->get_uri() . 'quicklink.css', array(), self::$version, 'screen' ); } /** * Get URI * * @return mixed URL. */ public function get_uri() { $path = wp_normalize_path( dirname( __FILE__ ) ); $theme_dir = wp_normalize_path( get_template_directory() ); if ( strpos( $path, $theme_dir ) !== false ) { return trailingslashit( get_template_directory_uri() . str_replace( $theme_dir, '', $path ) ); } return plugin_dir_url( __FILE__ ); } /** * Generate Quick Links Markup. * * @param array $data links array. */ public function generate_quick_links_markup( $data ) { wp_enqueue_script( 'bsf-quick-links' ); wp_enqueue_style( 'bsf-quick-links-css' ); ?>
$item ) { $items_html .= sprintf( '