PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
← All changes | base/post-model.php +7 -2 1.0.12 → 1.0.64 View file →
@@ -6,8 +6,10 @@
6 6 */
7 7
8 8 namespace Timetics\Base;
9 9
10 +defined( 'ABSPATH' ) || exit;
11 +
10 12 use Timetics\Base\ForwardCalls;
11 13
12 14 /**
13 15 * Class Post Model
@@ -46,9 +48,10 @@
46 48 if ( isset( $this->data[$name] ) ) {
47 49 return $this->data[$name];
48 50 }
49 51
50 - throw new \Exception( sprintf( esc_html__( 'Undefined property %s', 'timetics' ), $name ) );
52 + /* translators: %s: Property name */
53 + throw new \Exception( sprintf( esc_html__( 'Undefined property %s', 'timetics' ), esc_attr( $name ) ) );
51 54 }
52 55
53 56 /**
54 57 * Set dynamic property
@@ -59,9 +62,10 @@
59 62 * @return void
60 63 */
61 64 public function __set( $key, $value ) {
62 65 if ( ! isset( $this->data[$key] ) ) {
63 - throw new \Exception( sprintf( esc_html__( 'Undefined property %s', 'timetics' ), $key ) );
66 + /* translators: %s: Property name */
67 + throw new \Exception( sprintf( esc_html__( 'Undefined property %s', 'timetics' ), esc_attr( $key ) ) );
64 68 }
65 69
66 70 $this->data[$key] = $value;
67 71 }
@@ -158,8 +162,9 @@
158 162 ];
159 163
160 164 if ( $meta ) {
161 165 $meta['relation'] = 'AND';
166 + // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Meta query is necessary for filtering posts by meta fields
162 167 $args['meta_query'] = $meta;
163 168 }
164 169
165 170 $posts = get_posts( $args );