Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** START Custom Modules || Add Related Post to Widget List */
- function custom_modules_config( $module_list ) {
- foreach ( $module_list as $key => $value ) {
- if ( $value['name'] === 'JNews_Post_Related' ) {
- $module_list[ $key ]['widget'] = true;
- break;
- }
- }
- return $module_list;
- }
- add_filter( 'jnews_module_list', 'custom_modules_config' );
- function custom_module_widget() {
- class JNews_Post_Related_Widget extends \JNews\Widget\Module\WidgetModuleAbstract {
- }
- }
- add_action( 'jnews_module_widget', 'custom_module_widget' );
- /** NB: Just for Child Theme Only, if use Parent Theme, add Hooks Filter and Action before JNews/Init */
- /** END Custom Modules || Add Related Post to Widget List */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement