a_z_listing_add_styling()

Register default A-Z stylesheet and add our enqueue function to the wp_enqueue_scripts action.


Description


Source

File: functions/a-z-styling.php

function a_z_listing_add_styling() {
	wp_register_style( 'a-z-listing', plugins_url( 'css/a-z-listing-default.css', dirname( __FILE__ ) ) );
	/**
	 * Determine whether to add default listing styling
	 *
	 * @param bool True to add default styling, False to disable
	 */
	$add_styles = apply_filters( 'a_z_listing_add_styling', get_option( 'a-z-listing-add-styling', true ) );
	if ( AZLISTINGLOG ) {
		do_action( 'log', 'A-Z Listing: Add Styles', $add_styles );
	}
	if ( true === $add_styles && ! has_action( 'wp_enqueue_scripts', 'a_z_listing_enqueue_styles' ) ) {
		add_action( 'wp_enqueue_scripts', 'a_z_listing_enqueue_styles' );
	}
}

Changelog

Changelog
Version Description
0.7 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.

This site uses Akismet to reduce spam. Learn how your comment data is processed.