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