PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / trunk
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI vtrunk
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 7.8.7 7.8.6 7.8.5 All 44 releases
gamipress / includes / admin / settings / social.php

social.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI trunk, at includes/admin/settings/social.php

99 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin Social Settings
4 *
5 * @package GamiPress\Admin\Settings\Social
6 * @author GamiPress <contact@gamipress.com>, Ruben Garcia <rubengcdev@gmail.com>
7 * @since 1.8.6
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 /**
13 * Social Settings meta boxes
14 *
15 * @since 1.8.6
16 *
17 * @param array $meta_boxes
18 *
19 * @return array
20 */
21 function gamipress_settings_social_meta_boxes( $meta_boxes ) {
22
23 $meta_boxes['social-settings'] = array(
24 'title' => gamipress_dashicon( 'share' ) . __( 'Social Settings', 'gamipress' ),
25 'fields' => apply_filters( 'gamipress_social_settings_fields', array(
26 'enable_share' => array(
27 'name' => __( 'Enable Social Sharing', 'gamipress' ),
28 'tooltip' => __( 'Allow users share the achievements and ranks they have earned.', 'gamipress' ),
29 'label_cb' => 'cmb_tooltip_label_cb',
30 'type' => 'checkbox',
31 'classes' => 'gamipress-switch',
32 ),
33 'social_buttons_preview' => array(
34 'name' => __( 'Preview', 'gamipress' ),
35 'type' => 'html',
36 'content' =>
37 '<p class="gamipress-share-buttons-label">' . __( 'Share:', 'gamipress' ) . '</p>'
38 . '<a href="#" class="gamipress-share-button gamipress-share-button-facebook" title="' . __( 'Share on Facebook', 'gamipress' ) . '" data-network="facebook"></a>'
39 . '<a href="#" class="gamipress-share-button gamipress-share-button-twitter" title="' . __( 'Share on Twitter', 'gamipress' ) . '" data-network="twitter"></a>'
40 . '<a href="#" class="gamipress-share-button gamipress-share-button-linkedin" title="' . __( 'Share on LinkedIn', 'gamipress' ) . '" data-network="linkedin"></a>'
41 . '<a href="#" class="gamipress-share-button gamipress-share-button-pinterest" title="' . __( 'Share on Pinterest', 'gamipress' ) . '" data-network="pinterest"></a>',
42 ),
43 'social_networks' => array(
44 'name' => __( 'Social Networks', 'gamipress' ),
45 'type' => 'multicheck_inline',
46 'classes' => 'gamipress-switch',
47 'select_all_button' => false,
48 'options' => array(
49 'facebook' => __( 'Facebook', 'gamipress' ),
50 'twitter' => __( 'Twitter', 'gamipress' ),
51 'linkedin' => __( 'LinkedIn', 'gamipress' ),
52 'pinterest' => __( 'Pinterest', 'gamipress' ),
53 ),
54 'default' => array( 'facebook', 'twitter', 'linkedin', 'pinterest' )
55 ),
56 'social_button_style' => array(
57 'name' => __( 'Buttons Style', 'gamipress' ),
58 'type' => 'radio_inline',
59 'options' => array(
60 'square' => __( 'Square', 'gamipress' ),
61 'rounded' => __( 'Rounded', 'gamipress' ),
62 'circle' => __( 'Circle', 'gamipress' ),
63 ),
64 'default' => 'square',
65 ),
66 'twitter_achievement_text' => array(
67 'name' => __( 'Twitter Achievement Text', 'gamipress' ),
68 'tooltip' => __( 'Default text when sharing an earned achievement on Twitter. Maximum 280 characters (leave at least 24 characters empty for the achievement URL).', 'gamipress' ),
69 'label_cb' => 'cmb_tooltip_label_cb',
70 'desc' => __( 'Available tags:', 'gamipress' ) . gamipress_get_pattern_tags_html( 'achievement_earned' ),
71 'type' => 'textarea_small',
72 'char_counter' => true,
73 'char_max' => 280,
74 'default' => __( 'I earned the {achievement_type} {achievement_title} on {site_title}', 'gamipress' ),
75 ),
76 'twitter_rank_text' => array(
77 'name' => __( 'Twitter Rank Text', 'gamipress' ),
78 'tooltip' => __( 'Default text when sharing an earned rank on Twitter. Maximum 280 characters (leave at least 24 characters empty for the rank URL).', 'gamipress' ),
79 'label_cb' => 'cmb_tooltip_label_cb',
80 'desc' => __( 'Available tags:', 'gamipress' ) . gamipress_get_pattern_tags_html( 'rank_earned' ),
81 'type' => 'textarea_small',
82 'char_counter' => true,
83 'char_max' => 280,
84 'default' => __( 'I reached the {rank_type} {rank_title} on {site_title}', 'gamipress' ),
85 ),
86 'enable_open_graph_tags' => array(
87 'name' => __( 'Open Graph Tags', 'gamipress' ),
88 'tooltip' => __( 'Open Graph meta tags are human-invisible information required to format the look of your website URLs when shared on social networks. There are plugins that already place them like Yoast SEO, if you don\'t have one, check this option to let GamiPress insert those tags on the achievements and ranks pages.', 'gamipress' ),
89 'label_cb' => 'cmb_tooltip_label_cb',
90 'type' => 'checkbox',
91 'classes' => 'gamipress-switch',
92 ),
93 ) )
94 );
95
96 return $meta_boxes;
97
98 }
99 add_filter( 'gamipress_settings_social_meta_boxes', 'gamipress_settings_social_meta_boxes' );