redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Hide demo mode link

Open alvisir opened this issue 13 years ago • 5 comments

Hi, thanks a lot for this amazing plugin! I've a question. Is it possible to hide the demo mode link in the plugin description with a function in my theme?

alvisir avatar Nov 02 '13 17:11 alvisir

Try commenting from line 317 till line 324 in file class-redux-plugin.php.

tirnovanuaurel avatar Nov 03 '13 07:11 tirnovanuaurel

@tirnovanuaurel thanks for reply. Right, you can do so simply but when you update the plugin this fix will be removed. Using a filter, is there any chance?

Example:

function extendRedux($content) {
    $redux = new ReduxFrameworkPlugin();
    $linksRedux = $redux->ts_plugin_meta_links();
    $content.= $linksRedux . "Some content";
}
add_filter('the_content', array('ReduxFrameworkPlugin', 'extendRedux'));

This sample function should add "Some content" string to the output of ts_plugin_meta_links() but not works.... Based on it, I could filter the output content by removing the demo link.

Someone will ask: why you have to remove that link? If my customer accidentally clicks on the demo link, conflicts could be generated between the default sample-cofing.php of plugin and mine (included in functions.php of my theme).

alvisir avatar Nov 03 '13 16:11 alvisir

@alvisir, as long as the `opt_name is unique, the user can enable demo mode to their heart's content without it affecting your panel.

However, to make your lives easier I've added the following code to the bottom of sample-config.php to do all of which you requested.

https://github.com/ReduxFramework/ReduxFramework/blob/master/sample/sample-config.php#L1286-L1305

Thank should solve your issues.

dovy avatar Nov 03 '13 21:11 dovy

@dovy Perfect! Thank very much!!! :+1: I've just noticed a problem: if I install the plugin with Wordpress Plugins directory I can enable/disable the demo mode. Instead if I use the version from github I can't disable it (By default it's enabled!)

alvisir avatar Nov 03 '13 22:11 alvisir

Problem fixed: https://github.com/ReduxFramework/ReduxFramework/pull/165

alvisir avatar Nov 03 '13 23:11 alvisir