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
VersionDescription
0.1Introduced.

More Information

You are currently logged out. To view tickets you must first login.

I have read and understood the Terms of Service


User Contributed Notes

Leave a Reply

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