[wp-hackers] extended Genesis Featured Widget Amplified new $instance array elements not making it to and saving in update()

Remkus de Vries | Forsite Media remkus at forsite.nu
Sun Jul 6 19:01:30 UTC 2014


Nick’s plugin hasn’t been updated for more than two years, so for starters you’re probably better off extending Travis' https://github.com/wpsmith/genesis-sandbox-featured-content-widget

On Sunday, 6 July, 2014 at 20:47 , Adam LaBarge wrote:

>  
> Hello -
> In a nutshell: I'm extending a plugin widget class, adding new elements to defaults array and $instance, making a check box, and trying to save check box settings. But no saving is happening.
> Extended: I'm working on extending the Genesis Featured Widget Amplified (gfwa) plugin. Currently, at least with version 0.8.1, the widget will not ignore sticky post and if there are sticky post, it will blow out the user defined post limit. (ie, 4 sticky post, user limit set to 4, so 8 post show up in the widget output, not 4 - this kind of defeats the purpose of a limit).
> So far I have, i think, everything set up correctly. But something is wrong because when I var_dump the inputs of update($instance, $old_instance), neither have the new defaults array elements.
> I have extended the original class, updated widget() to account for ignore sticky and set a real limit on the while loop, added my check box to the form(), but no luck in saving.
> The code for this is rather long, so I've put it up on github:https://github.com/adamplabarge/apl_gfwa_extended/blob/master/apl_gfwa_extended.php
> Thanks any help and or suggestions. And open to code critique.-adam  
>  
>  
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>  
>  




More information about the wp-hackers mailing list