Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Custom Settings [v0.6.2]
#50
GS Custom Settings v0.4 released

Awesome new features for theme & plugin devs
  • Instant PHP & other changes - v 0.4 adds a custom-settings-save hook, which allows you to act upon settings right after a user clicks the 'Save updates' button, but before they are saved to the files. Why is it awesome? Because it allows a plugin to make immediate changes to files multiple times, without requiring a page reload!
  • Return a batch of settings at once - v 0.4 adds a return_setting_group($tab, $group, $prop) function, which allows you to retrieve a batch of settings in one function call.  You make a setting group by prefixing settings with a common 'word', eg. to get both settings social_facebook & social_twitter, you would do $social = return_setting_group($tab, 'social') and get an array('facebook'=>'your_fb_link', 'twitter'=>'your_tw_link'). Because the prefix is stripped, you can now get the setting by doing $social['twitter']
  • Automatic version updates - Worried about complicated update instructions for your custom settings every time you release a new version? No longer: v0.4 compares a plugin's version with the version stored in the data, and updates 'old' settings to the newer version. The only requirement is adding a version property in your plugin's JSON file, in the tab object.
  • I18n-enabled settings - Yes, you can now even provide I18N-enabled text/ textarea settings with your own theme or plugin (useful for output). If the user doesn't have I18n (with I18n plugin by Martin Mvlcek) enabled, they will show as simple settings, else they will hold a value for each language on the installation. Use the new get_i18n_setting($tab, $setting, $echo=TRUE) function to echo the output, or return it (if $echo === FALSE).
  • Custom setting properties - Apart from the default setting properties, you can now include your own custom properties on each setting (not through the UI, only by editing the JSON files). This basically means extra storage room to associate keys and values, or other info, with a setting.
  • Limited support for non-ANSI chars (Cyrillic, Latin Extended; use at own risk for lookup properties)

UI Enhancements
  • Consistent keyboard shortcuts - All previously active keyboard shortcuts are replaced with a combination of Ctrl + Key:
    • Search - Ctrl + F
    • Edit mode > Add x settings - Ctrl + Enter (x = amount of selected settings)  
    • Edit mode > Delete selected settings - Ctrl + Delete
    • Edit mode > Move selected settings up - Ctrl + arrow up
    • Edit mode > Move selected settings down - Ctrl + arrow down
  • Tab lookups to be set manually from the tab toolbar
    An extra 'tag' icon is added to the tab toolbar which toggles the tab's label (default)/ lookup. The lookup is still automatically computed from the label when it is added, until the user manually changes the lookup. 
    Why? - Ease of use as well as flexibility.
  • Help button '?' with plugin links, new version download, & translator credits
Plugin changes
  • return_setting($tab, $setting) returns the value instead of full setting
    In < v0.3 return_setting($tab, $setting) returned the full setting, now it is shorthand for return_setting($tab, $setting, 'value'). Instead of omitting the third optional parameter $property, you should now do return_setting($tab, $setting, FALSE) to get the full setting (false => no property selected, so all properties returned).
    Why? - Because the primary use of this plugin atm is for theming and value checking, not full settings (mostly in plugins).  

NB: The docs still need to be updated
Reply


Messages In This Thread
GS Custom Settings [v0.6.2] - by Tyblitz - 2015-02-19, 02:53:15
RE: *New* Plugin KO Site Settings - by shawn_a - 2015-02-19, 03:36:17
RE: *New* Plugin KO Site Settings - by Tyblitz - 2015-02-19, 04:22:15
RE: *New* Plugin KO Site Settings - by Oleg06 - 2015-02-19, 03:45:25
RE: *New* Plugin KO Site Settings - by shawn_a - 2015-02-19, 04:43:21
RE: *New* Plugin KO Site Settings - by Tyblitz - 2015-02-19, 05:40:25
RE: *New* Plugin KO Site Settings - by Oleg06 - 2015-02-19, 05:18:15
RE: *New* Plugin KO Site Settings - by shawn_a - 2015-02-19, 06:30:07
RE: *New* Plugin KO Site Settings - by Tyblitz - 2015-02-19, 09:11:27
RE: *New* Plugin KO Site Settings - by shawn_a - 2015-02-19, 06:31:13
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-23, 23:50:13
RE: *New* Plugin GS Custom Settings v0.3 out - by Tyblitz - 2015-05-22, 21:44:50
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-23, 08:48:21
RE: GS Custom Settings [v0.4 out] - by Tyblitz - 2015-05-23, 09:11:49
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-23, 23:24:29
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-24, 09:57:41
RE: GS Custom Settings [v0.4 out] - by Tyblitz - 2015-05-24, 10:22:31
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-24, 11:09:58
RE: GS Custom Settings [v0.4 out] - by Tyblitz - 2015-05-24, 12:05:29
RE: GS Custom Settings [v0.4 out] - by shawn_a - 2015-05-24, 10:54:52
RE: GS Custom Settings [v0.4 out] - by datiswous - 2015-05-24, 12:19:58
RE: GS Custom Settings [v0.4 out] - by Tyblitz - 2015-05-24, 12:48:50
RE: GS Custom Settings [v0.4 out] - by shawn_a - 2015-05-24, 23:35:59
RE: GS Custom Settings [v0.4 out] - by Tyblitz - 2015-05-25, 04:15:11
RE: GS Custom Settings [v0.5 out] - by Oleg06 - 2015-05-25, 07:10:46
RE: GS Custom Settings [v0.5 out] - by Oleg06 - 2015-05-25, 08:04:05
RE: GS Custom Settings [v0.5 out] - by datiswous - 2015-06-09, 21:32:45
RE: GS Custom Settings [v0.5 out] - by Tyblitz - 2015-06-09, 22:03:33
RE: GS Custom Settings [v0.5 out] - by datiswous - 2015-06-10, 23:52:55
RE: GS Custom Settings [v0.5 out] - by shawn_a - 2015-06-11, 00:27:00
RE: GS Custom Settings [v0.5 out] - by Tyblitz - 2015-06-27, 10:06:20
RE: GS Custom Settings [v0.5 out] - by datiswous - 2015-06-29, 09:47:35
RE: GS Custom Settings [v0.5 out] - by Oleg06 - 2015-07-11, 20:34:20
RE: GS Custom Settings [v0.5 out] - by datiswous - 2015-07-13, 05:40:07
RE: GS Custom Settings [v0.5 out] - by mganko - 2015-07-23, 19:58:56
RE: GS Custom Settings [v0.5 out] - by Tyblitz - 2015-07-24, 07:28:01
RE: GS Custom Settings [v0.5 out] - by Oleg06 - 2015-09-06, 07:50:07
RE: GS Custom Settings [v0.5 out] - by Tyblitz - 2015-09-07, 02:37:41
RE: GS Custom Settings [v0.5 out] - by Oleg06 - 2015-09-07, 04:44:03
RE: GS Custom Settings [v0.5 out] - by Tyblitz - 2015-09-07, 19:29:55
RE: GS Custom Settings [v0.5.1 out] - by Tyblitz - 2015-10-05, 02:40:39
RE: GS Custom Settings [v0.6 out] - by Oleg06 - 2015-10-05, 02:53:16
RE: GS Custom Settings [v0.6 out] - by Tyblitz - 2015-10-05, 03:20:44
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-05, 04:27:39
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-05, 04:46:10
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-05, 08:22:14
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-05, 08:39:09
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-05, 10:02:20
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-05, 17:34:28
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-05, 22:13:31
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-06, 01:16:23
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-06, 03:55:14
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-06, 04:21:51
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-08, 07:22:58
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-09, 07:44:25
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-09, 09:58:30
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-09, 17:04:56
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-09, 20:15:17
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-09, 21:29:44
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-10, 03:40:28
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-10, 04:05:36
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-10, 19:32:22
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-10, 21:10:24
RE: GS Custom Settings [v0.6] - by 0zz - 2015-10-10, 23:38:04
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-11, 00:19:55
RE: GS Custom Settings [v0.6] - by 0zz - 2015-10-11, 00:52:57
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-11, 02:15:09
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-11, 04:55:56
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-11, 10:05:29
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-11, 16:52:28
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-11, 21:25:34
RE: GS Custom Settings [v0.6] - by gslexx - 2015-10-11, 21:45:09
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-11, 22:08:40
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-12, 10:12:26
RE: GS Custom Settings [v0.6] - by 0zz - 2015-10-13, 01:19:38
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-21, 22:09:59
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-22, 03:39:02
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-22, 07:03:35
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-22, 08:46:31
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-22, 09:15:37
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-27, 00:27:01
RE: GS Custom Settings [v0.6] - by datiswous - 2015-10-26, 22:51:49
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-27, 00:27:13
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-27, 09:38:36
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-30, 05:44:21
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-30, 08:56:20
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-27, 21:07:33
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-27, 22:19:48
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-28, 07:13:31
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-28, 08:02:34
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-28, 08:09:17
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-28, 09:35:25
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-28, 09:48:50
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-10-28, 10:01:25
RE: GS Custom Settings [v0.6] - by Oleg06 - 2015-10-28, 19:23:07
RE: GS Custom Settings [v0.6] - by Tyblitz - 2015-11-06, 09:10:06
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-06, 09:25:35
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2015-11-06, 19:07:33
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-07, 08:11:50
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2015-11-07, 09:47:28
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-07, 20:15:22
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2015-11-07, 20:38:24
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2015-11-18, 06:34:39
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-18, 09:53:37
RE: GS Custom Settings [v0.6.2] - by gslexx - 2015-11-18, 17:23:30
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-19, 08:34:34
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2015-11-19, 16:58:08
RE: GS Custom Settings [v0.6.2] - by gslexx - 2015-11-19, 17:07:39
RE: GS Custom Settings [v0.6.2] - by gslexx - 2015-11-24, 04:48:16
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-11-24, 06:09:28
RE: GS Custom Settings [v0.6.2] - by sbre - 2015-12-07, 16:25:38
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2015-12-08, 08:07:10
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2016-01-26, 09:46:23
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2016-01-28, 21:27:46
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2016-04-27, 19:21:52
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2016-05-06, 08:18:20
RE: GS Custom Settings [v0.6.2] - by gslexx - 2016-09-26, 07:41:18
RE: GS Custom Settings [v0.6.2] - by Timbow - 2016-09-27, 10:37:54
RE: GS Custom Settings [v0.6.2] - by datiswous - 2016-09-27, 22:01:36
RE: GS Custom Settings [v0.6.2] - by Oleg06 - 2016-09-27, 22:45:42
RE: GS Custom Settings [v0.6.2] - by Timbow - 2016-09-28, 04:39:36
RE: GS Custom Settings [v0.6.2] - by datiswous - 2016-09-28, 05:14:46
RE: GS Custom Settings [v0.6.2] - by Tyblitz - 2016-09-28, 08:13:38
RE: GS Custom Settings [v0.6.2] - by Timbow - 2016-09-28, 22:03:50



Users browsing this thread: 2 Guest(s)