PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 7.9.7
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v7.9.7
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 7.8.8 All 47 releases
gamipress / includes / admin / meta-boxes / achievement-type.php

achievement-type.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI 7.9.7, at includes/admin/meta-boxes/achievement-type.php

55 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Achievement Type Meta Boxes
4 *
5 * @package GamiPress\Admin\Meta_Boxes\Achievement_Type
6 * @author GamiPress <[email protected]>, Ruben Garcia <[email protected]>
7 * @since 1.4.7
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 /**
13 * Register achievement type meta boxes
14 *
15 * @since 1.0.0
16 */
17 function gamipress_achievement_type_meta_boxes() {
18
19 // Start with an underscore to hide fields from custom fields list
20 $prefix = '_gamipress_';
21
22 // Achievement Type Data
23 gamipress_add_meta_box(
24 'achievement-type-data',
25 __( 'Achievement Type Data', 'gamipress' ),
26 'achievement-type',
27 array(
28 'post_title' => array(
29 'name' => __( 'Singular Name', 'gamipress' ),
30 'tooltip' => __( 'The singular name for this achievement type.', 'gamipress' ),
31 'label_cb' => 'cmb_tooltip_label_cb',
32 'type' => 'text_medium',
33 ),
34 $prefix . 'plural_name' => array(
35 'name' => __( 'Plural Name', 'gamipress' ),
36 'tooltip' => __( 'The plural name for this achievement type.', 'gamipress' ),
37 'label_cb' => 'cmb_tooltip_label_cb',
38 'type' => 'text_medium',
39 ),
40 'post_name' => array(
41 'name' => __( 'Slug', 'gamipress' ),
42 'desc' => '<span class="gamipress-permalink hide-if-no-js">' . site_url() . '/<strong class="gamipress-post-name"></strong>/</span><br>',
43 'tooltip' => __( 'Slug is used for internal references, as some shortcode attributes, to completely differentiate this achievement type from any other (leave blank to automatically generate one).', 'gamipress' ),
44 'label_cb' => 'cmb_tooltip_label_cb',
45 'type' => 'text_medium',
46 'attributes' => array(
47 'maxlength' => 20
48 )
49 ),
50 ),
51 array( 'priority' => 'high', )
52 );
53
54 }
55 add_action( 'gamipress_init_achievement-type_meta_boxes', 'gamipress_achievement_type_meta_boxes' );