Setting default for new config options in plugin

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

Setting default for new config options in plugin

Post by FishNiX »

@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:
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Setting default for new config options in plugin

Post by Timbalu »

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
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Setting default for new config options in plugin

Post by onli »

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