From ec321e6a281294f00d8a7d8f48a050a530f3af0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Harper?= Date: Tue, 5 Dec 2023 14:37:29 -0500 Subject: [PATCH] applying https://github.com/Tmeister/idea-factory/pull/16 --- admin/includes/class.settings.php | 14 ++++++++------ public/includes/helpers.php | 17 ++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/admin/includes/class.settings.php b/admin/includes/class.settings.php index 1b9194a..6d3d19a 100644 --- a/admin/includes/class.settings.php +++ b/admin/includes/class.settings.php @@ -302,6 +302,14 @@ function get_settings_fields() { 'type' => 'text', 'default' => '', 'sanitize_callback' => 'idea_factory_sanitize_int' + ), + array( + 'name' => 'if_positive_only', + 'label' => __( 'Positive Votes Only', 'idea-factory' ), + 'desc' => __( 'Check this box to only allow positive votes.', 'idea-factory' ), + 'type' => 'checkbox', + 'default' => '', + 'sanitize_callback' => 'idea_factory_sanitize_checkbox' ) ), 'if_settings_advanced' => array( @@ -378,9 +386,3 @@ function idea_factory_sanitize_int( $input ) { endif; $settings = new if_settings_api_wrap(); - - - - - - diff --git a/public/includes/helpers.php b/public/includes/helpers.php index de8e893..8cc566c 100644 --- a/public/includes/helpers.php +++ b/public/includes/helpers.php @@ -448,9 +448,15 @@ function idea_factory_vote_controls( $postid = '' ) { $postid = get_the_ID(); ?> - - + + +