diff --git a/admin/section/class-convertkit-admin-settings-broadcasts.php b/admin/section/class-convertkit-admin-settings-broadcasts.php index 971687564..08e4705b6 100644 --- a/admin/section/class-convertkit-admin-settings-broadcasts.php +++ b/admin/section/class-convertkit-admin-settings-broadcasts.php @@ -337,7 +337,7 @@ public function category_callback( $args ) { 'name' => $this->settings_key . '[' . $args['name'] . ']', 'id' => $this->settings_key . '_' . $args['name'], 'class' => 'convertkit-select2 enabled', - 'selected' => $this->settings->get_by_key( $args['name'] ), + 'selected' => $this->settings->category_id(), 'taxonomy' => 'category', 'hide_empty' => false, ) @@ -360,7 +360,7 @@ public function date_callback( $args ) { // Output field. echo $this->get_date_field( // phpcs:ignore WordPress.Security.EscapeOutput $args['name'], - esc_attr( $this->settings->get_by_key( $args['name'] ) ), + esc_attr( $this->settings->published_at_min_date() ), $args['description'], // phpcs:ignore WordPress.Security.EscapeOutput array( 'enabled', diff --git a/includes/class-convertkit-settings-broadcasts.php b/includes/class-convertkit-settings-broadcasts.php index f4993da5b..d2fe1057b 100644 --- a/includes/class-convertkit-settings-broadcasts.php +++ b/includes/class-convertkit-settings-broadcasts.php @@ -64,31 +64,6 @@ public function get() { } - /** - * Returns Broadcasts settings value for the given key. - * - * @since 2.2.9 - * - * @param string $key Setting Key. - * @return string Value - */ - public function get_by_key( $key ) { - - // If the setting doesn't exist, bail. - if ( ! array_key_exists( $key, $this->settings ) ) { - return ''; - } - - // If the setting is empty, fallback to the default. - if ( empty( $this->settings[ $key ] ) ) { - $defaults = $this->get_defaults(); - return $defaults[ $key ]; - } - - return $this->settings[ $key ]; - - } - /** * Returns whether Broadcasts are enabled in the Plugin settings. *