Closed szakee closed 10 years ago
Hello,
Do you have the following fragment in the gk-nsp.php file:
class GK_NewsShowPro_Widget extends WP_Widget {
// variable used to store the object configuration
public $config = array(
'title' => '',
'widget_css_suffix' => '',
'use_css' => 'on',
Thank you Tomasz!
Yes, it does, but the message is still present.
Are you using the newest version of the plugin from the repository? Because as I see you have a different line numbers.
Yes, I downloaded today, that line number in the first comment is in an older version. Now the message is: Notice: Undefined index: use_css in .../wp-content/plugins/gk-nsp/gk-nsp.php on line 355 But this is fixed for me:
if( isset($instance["use_css"]) AND
$instance['use_css'] == 'on' &&
I'll analyze this case and as soon as fixed version will be available I'll inform you :)
This commit should solve your problems: https://github.com/GavickPro/GK-News-Show-Pro/commit/e54c6143daeef746c09330b914dded1f31cfeb8c
I checked. The php notice is gone now, but is look like load the default css anyway. About the default css switch. This is a great option, but if I have more NSP widget in same page then enough if just one is set default css on, that override the another NSP widgets css setting on the particular page. It's important to me, how my theme users use the theme css for the NSP widgets. Can I avoid this if I using a custom css suffix, and I add it this suffix to my custom css? Or maybe I can add a new custom option to the framework what is deregister the widget default css. I just wondering.
The easies way in your case will be opening the gk-nsp.php file and changing line:
'use_css' => 'on',
to:
'use_css' => 'off',
Then in all new instances after creating the using of default CSS will be defaultly disabled.
Oh, yes. That is much simplier :) Thanks
Hi! I set the "Use default css" to off in all widget.
If the define('WP_DEBUG', true); in the wp-config file I get this messege: Notice: Undefined index: use_css in .../plugins/gk-nsp/gk-nsp.php on line 342
This is that row:
So, I replaced for this: