PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | admin/views/sp-framework/classes/fields.class.php +1 -24 2.3.62.2.10 View file →
@@ -17,14 +17,8 @@
17 17 $this->where = $where;
18 18 $this->parent = $parent;
19 19 }
20 20
21 - /**
22 - * Field name method.
23 - *
24 - * @param string $nested_name Nested field name.
25 - * @return string
26 - */
27 21 public function field_name( $nested_name = '' ) {
28 22
29 23 $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
30 24 $unique_id = ( ! empty( $this->unique ) ) ? $this->unique . '[' . $field_id . ']' : $field_id;
@@ -38,14 +32,8 @@
38 32 return $field_name . $nested_name;
39 33
40 34 }
41 35
42 - /**
43 - * Field attributes.
44 - *
45 - * @param array $custom_atts Custom attributes.
46 - * @return mixed
47 - */
48 36 public function field_attributes( $custom_atts = array() ) {
49 37
50 38 $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
51 39 $attributes = ( ! empty( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
@@ -63,9 +51,9 @@
63 51 $atts = '';
64 52
65 53 if ( ! empty( $attributes ) ) {
66 54 foreach ( $attributes as $key => $value ) {
67 - if ( 'only-key' === $value ) {
55 + if ( $value === 'only-key' ) {
68 56 $atts .= ' ' . $key;
69 57 } else {
70 58 $atts .= ' ' . $key . '="' . $value . '"';
71 59 }
@@ -75,22 +63,12 @@
75 63 return $atts;
76 64
77 65 }
78 66
79 - /**
80 - * Field before.
81 - *
82 - * @return mixed
83 - */
84 67 public function field_before() {
85 68 return ( ! empty( $this->field['before'] ) ) ? $this->field['before'] : '';
86 69 }
87 70
88 - /**
89 - * Field after.
90 - *
91 - * @return mixed
92 - */
93 71 public function field_after() {
94 72
95 73 $output = ( ! empty( $this->field['after'] ) ) ? $this->field['after'] : '';
96 74 $output .= ( ! empty( $this->field['desc'] ) ) ? '<p class="spf-text-desc">' . $this->field['desc'] . '</p>' : '';
@@ -106,9 +84,8 @@
106 84 *
107 85 * @param array $type post types.
108 86 * @param boolean $term post term.
109 87 * @param array $query_args post term.
110 - * @param array $field_unique unique id.
111 88 *
112 89 * @return statement
113 90 */
114 91 public static function field_data( $type = '', $term = false, $query_args = array(), $field_unique = null ) {