function tw_init_options()
{
    $options = tw_get_options();
    $options = wp_parse_args($options, Axl_Testimonials_Widget::get_defaults());
    $options = Axl_Testimonials_Widget_Settings::validate_settings($options);
    update_option(Axl_Testimonials_Widget_Settings::ID, $options);
}
 public static function get_defaults($single_view = false)
 {
     $options = tw_get_options();
     if (empty($single_view)) {
         $defaults = apply_filters('tw_defaults', $options);
     } else {
         $defaults = apply_filters('tw_defaults_single', $options);
     }
     return $defaults;
 }
Пример #3
0
 public function get_defaults($single_view = false)
 {
     if (empty($single_view)) {
         return apply_filters('testimonials_widget_defaults', tw_get_options());
     } else {
         return apply_filters('testimonials_widget_defaults_single', tw_get_options());
     }
 }