bh_az_listing_widgets()

Automatically registers this plugin’s widgets.


Description


Source

File: a-z-listing.php

function bh_az_listing_widgets() {
	$dir = dirname( __FILE__ ) . '/';

	foreach ( glob( $dir . 'widgets/*.php' ) as $filename ) {
		/** @noinspection PhpIncludeInspection */
		require_once( $filename );

		$filename = substr( $filename, 0, strlen( $filename ) - strlen( '.php' ) );
		$filename = substr( $filename, strrpos( $filename, '/' ) + 1 );
		$filename = str_replace( '-', '_', $filename );
		register_widget( $filename );
	}
}

Changelog

Changelog
Version Description
0.1 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.