refactor(widgets): remove shared redundant settings
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
|
||||
namespace AKSRT\Widgets;
|
||||
|
||||
use AKSRT\Widgets\Traits\CommonWidgetFields;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -313,7 +312,6 @@ if (!function_exists('aksrt_home_widget_get_lazyload_args')) {
|
||||
* Homepage category block widget.
|
||||
*/
|
||||
class CategoryBlockWidget extends \WP_Widget {
|
||||
use CommonWidgetFields;
|
||||
|
||||
|
||||
public function __construct() {
|
||||
@@ -490,7 +488,6 @@ class CategoryBlockWidget extends \WP_Widget {
|
||||
</p>
|
||||
<?php if (function_exists('aksrt_widget_render_location_help')) { aksrt_widget_render_location_help('hybrid'); } ?>
|
||||
<?php
|
||||
$this->render_common_form_section($instance);
|
||||
}
|
||||
|
||||
public function update($new_instance, $old_instance): array {
|
||||
@@ -502,7 +499,7 @@ class CategoryBlockWidget extends \WP_Widget {
|
||||
'layout' => aksrt_home_widget_resolve_layout($new_instance['layout'] ?? 'card', 'card'),
|
||||
'show_more' => ! empty($new_instance['show_more']) ? 1 : 0,
|
||||
'paginate' => in_array(sanitize_key((string) ($new_instance['paginate'] ?? 'none')), ['none', 'ajax', 'number'], true) ? sanitize_key((string) ($new_instance['paginate'] ?? 'none')) : 'none',
|
||||
]; return $this->update_common_fields($new_instance, $old_instance, $business);
|
||||
]; return $business;
|
||||
}
|
||||
|
||||
public static function resolve_category_id_static(array $instance): int {
|
||||
|
||||
Reference in New Issue
Block a user