PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmInbox.php +8 -6 6.28 → trunk View file →
@@ -230,9 +230,9 @@
230 230 *
231 231 * @return bool
232 232 */
233 233 private function has_started( $message ) {
234 - return empty( $message['starts'] ) ? true : $message['starts'] <= time();
234 + return ! empty( $message['starts'] ) ? $message['starts'] <= time() : true;
235 235 }
236 236
237 237 /**
238 238 * @param array $message
@@ -399,12 +399,14 @@
399 399 *
400 400 * @return void
401 401 */
402 402 public function remove( $key ) {
403 - if ( isset( self::$messages[ $key ] ) ) {
404 - unset( self::$messages[ $key ] );
405 - $this->update_list();
403 + if ( ! isset( self::$messages[ $key ] ) ) {
404 + return;
406 405 }
406 +
407 + unset( self::$messages[ $key ] );
408 + $this->update_list();
407 409 }
408 410
409 411 /**
410 412 * @return void
@@ -418,9 +420,9 @@
418 420 *
419 421 * @return bool True if a banner is available and shown.
420 422 */
421 423 public static function maybe_show_banner() {
422 - if ( empty( self::$banner_messages ) ) {
424 + if ( ! self::$banner_messages ) {
423 425 return false;
424 426 }
425 427
426 428 $message = end( self::$banner_messages );
@@ -465,9 +467,9 @@
465 467 }
466 468
467 469 $query['utm_medium'] = 'banner';
468 470 $parts['query'] = http_build_query( $query );
469 - return 'href="' . $parts['scheme'] . '://' . $parts['host'] . $parts['path'] . '?' . $parts['query'] . '"';
471 + return 'href="' . esc_url( $parts['scheme'] . '://' . $parts['host'] . $parts['path'] . '?' . $parts['query'] ) . '"';
470 472 },
471 473 $cta
472 474 );
473 475 }