wp-liveticker/includes/scripts.php
Stefan Kalscheuer 79ded75db4 CSS loading moved from init to enqueue_scripts
Stylesheet compressed, obsolete scripts removed
2017-07-18 11:00:52 +02:00

19 lines
485 B
PHP

<?php
/**
* @package Scripts
*/
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
/**
* Enqueue scripts and styles if shortcode present
* @return bool
*/
function wplt_enqueue_scripts() {
global $post;
// Register frontend CSS
if ( has_shortcode( $post->post_content, 'liveticker') )
wp_enqueue_style( 'wplt-css', WPLT_PLUGIN_URL . 'includes/css/wp-liveticker2.min.css', '', WPLT_VERSION, 'all' );
}
add_action( 'wp_enqueue_scripts', 'wplt_enqueue_scripts' );