Beispiel #1
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     $options = get_post_meta($instance['PL_ID'], '_w4pl', true);
     $options['id'] = $instance['PL_ID'];
     $options = apply_filters('w4pl/pre_get_options', $options);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo W4PL_Core::the_list($options);
     echo $after_widget;
 }
Beispiel #2
0
 public static function get_shortcode_hint_html()
 {
     $shortcodes = W4PL_Core::get_shortcodes();
     $return = '<a target="#shortcode_hint" class="button w4pl_toggler">shortcodes details</a>';
     $return .= '<table id="shortcode_hint" class="widefat csshide">';
     $return .= '<thead><tr><th style="text-align: right;">Tag</th><th>Details</th></tr></thead><tbody>';
     foreach ($shortcodes as $shortcode => $attr) {
         $rc = isset($rc) && $rc == '' ? $rc = 'alt' : '';
         $return .= '<tr class="' . $rc . '">';
         $return .= '<th valign="top" style="text-align: right; font-size:12px; line-height: 1.3em;"><code>[' . $shortcode . ']</code></th>';
         $return .= '<td style="font-size:12px; line-height: 1.3em;">' . $attr['desc'] . '</td>';
         $return .= '</tr>';
     }
     $return .= '</tbody></table>';
     return $return;
 }