PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.6
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.6
8.0.6 8.0.5 8.0.4 8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 All 48 releases
← All changes | includes/admin/meta-boxes/log-extra-data-ui.php +6 -6 7.9.9.7 → 8.0.6 View file →
@@ -142,9 +142,9 @@
142 142 array(
143 143 'name' => __( 'Trigger', 'gamipress' ),
144 144 'tooltip' => __( 'The event user has triggered.', 'gamipress' ),
145 145 'label_cb' => 'cmb_tooltip_label_cb',
146 - 'id' => ( ( ! is_gamipress_upgraded_to( '1.4.7' ) ) ? $prefix : '' ) . 'trigger_type',
146 + 'id' => 'trigger_type',
147 147 'type' => 'advanced_select',
148 148 'options' => gamipress_get_activity_triggers(),
149 149 ),
150 150 array(
@@ -155,13 +155,9 @@
155 155 'type' => 'text',
156 156 ),
157 157 );
158 158
159 - if( ! is_gamipress_upgraded_to( '1.4.7' ) ) {
160 - $trigger = ct_get_object_meta( $object_id, $prefix . 'trigger_type', true );
161 - } else {
162 - $trigger = $object->trigger_type;
163 - }
159 + $trigger = $object->trigger_type;
164 160
165 161 // If is a specific activity trigger, then add the achievement_post field
166 162 if( in_array( $trigger, array_keys( gamipress_get_specific_activity_triggers() ) ) ) {
167 163
@@ -311,8 +307,12 @@
311 307 */
312 308 function gamipress_get_log_extra_data_ui_ajax_handler() {
313 309 // Security check, forces to die if not security passed
314 310 check_ajax_referer( 'gamipress_admin', 'nonce' );
311 +
312 + // Check user capabilities
313 + if( ! current_user_can( gamipress_get_manager_capability() ) )
314 + wp_send_json_error( __( 'You are not allowed to perform this action.', 'gamipress' ) );
315 315
316 316 ct_setup_table( 'gamipress_logs' );
317 317
318 318 $ct_object = ct_get_object( absint( $_REQUEST['object_id'] ) );