Setting default for new config options in plugin

Creating and modifying plugins.
Post Reply
FishNiX
Regular
Posts: 34
Joined: Sun Sep 02, 2007 6:32 pm

Setting default for new config options in plugin

Post by FishNiX » Sat Aug 30, 2014 12:23 am

@onli -

You mentioned I should specify the default here

Code: Select all

$this->get_config('display_helper', true)
I've made a change to the s9ymarkup plugin, can you tell me where I should do that?

https://github.com/fishnix/Serendipity/ ... kup_option

Thanks!
:mrgreen:

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Setting default for new config options in plugin

Post by Timbalu » Sat Aug 30, 2014 9:41 am

Sorry, I just drop in...
Don't forget to change to PLUGIN_EVENT_S9YMARKUP_* on line 73/73. Eliminating these messages by config option is a good idea. I think the place chosen down in 'frontend_comment' is right. And add a serendipity_db_bool() around it too.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
onli
Regular
Posts: 2264
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Setting default for new config options in plugin

Post by onli » Sat Aug 30, 2014 11:11 am

Timbalu wrote:And add a serendipity_db_bool() around it too.
That shouldn't be necessary here.
FishNiX wrote:can you tell me where I should do that?
Sure, I made a comment on the commit.

Post Reply