Archive

Posts Tagged ‘wordpress’

Prevent WordPress MailmanWidget widget to hide after registering your address

December 11, 2014 Leave a comment

If you use the Mailman Widget as an important design element, you might be annoyed by the fact it disappears once you registered your e-mail. A quick hack to this behaviour is to modify ns_widget_mailman.class.php (see comments):

 public function widget ($args, $instance) {
     extract($args);
     // Patch to continue showing block even if registered in this session
     //if ((isset($_COOKIE[$this->id_base . '-' . $this->number]) && $this->hash_mailing_list_id($this->number) == $_COOKIE[$this->id_base . '-' . $this->number]) || false == $this->ns_mm_plugin->get_mailman()) {
     if (false == $this->ns_mm_plugin->get_mailman()) {
         return 0;
     } else {
         $widget = $before_widget . $before_title . $instance['title'] . $after_title;

Categories: English, php Tags: ,