Adding event for news edition with BBCodeGeShi
Posted: 17 Jun 2013, 23:56
Hi,
I have installed BBCodeGeShi (for me it's better than just BBCode), but I wanted support for news too.
I've seen news doesn't provides a EVENT, so I added. To do so, I have added the following lines to core/events_inc.php:
Now, you can invoke whatever you want, so I have added just after the textarea tags in news_edit_page.php and news_menu_page.php:
Finally, to get the plugin responding the event signal, I just added a new hook on the hooks array:
Could be this event included in future versions??
Thanks and enjoy!!
I have installed BBCodeGeShi (for me it's better than just BBCode), but I wanted support for news too.
I've seen news doesn't provides a EVENT, so I added. To do so, I have added the following lines to core/events_inc.php:
Code: Select all
# News events
'EVENT_NEWS_UPDATE' => EVENT_TYPE_EXECUTE,Code: Select all
<?php event_signal( 'EVENT_NEWS_UPDATE' ); ?> Finally, to get the plugin responding the event signal, I just added a new hook on the hooks array:
Code: Select all
'EVENT_NEWS_UPDATE' => 'add_bbcode_toolbars',Thanks and enjoy!!