PluginProbe
WP Ultimate Post Grid / 3.0.0
WP Ultimate Post Grid v3.0.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
← All changes | includes/public/class-wpupg-filter.php +1 -27 3.5.03.0.0 View file →
@@ -45,40 +45,14 @@
45 45 * @param mixed $filter Filter to get the defaults for.
46 46 */
47 47 public static function filter_with_defaults( $filter ) {
48 48 if ( $filter && isset( $filter['type'] ) ) {
49 - // Set default options.
50 49 $defaults = self::get_defaults( $filter['type'] );
50 +
51 51 if ( $defaults ) {
52 52 $filter['options'] = array_replace_recursive( $defaults, $filter['options'] );
53 53 }
54 -
55 - // Set default label.
56 - if ( ! isset( $filter['label'] ) ) {
57 - $filter['label'] = '';
58 - }
59 54 }
60 55
61 56 return $filter;
62 - }
63 -
64 - /**
65 - * Get general filter style defaults.
66 - *
67 - * @since 3.1.0
68 - */
69 - public static function get_general_style_defaults() {
70 - $defaults = apply_filters( 'wpupg_filter_general_style_defaults', array(
71 - 'display' => 'block',
72 - 'alignment' => 'left',
73 - 'spacing_vertical' => 10,
74 - 'spacing_horizontal' => 10,
75 - 'width' => 250,
76 - 'label_display' => 'block',
77 - 'label_alignment' => 'left',
78 - 'label_font_size' => 14,
79 - 'label_style' => 'bold',
80 - ) );
81 -
82 - return $defaults;
83 57 }
84 58 }