PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
bbp-core / includes / admin / options / options_general.php

options_general.php in Forumax – AI Powered Advanced Community Forum Plugin 2.5.0, at includes/admin/options/options_general.php

80 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Select docs page
3 $args = array(
4 'post_type' => 'topic',
5 'posts_per_page' => 1,
6 'orderby' => 'menu_order',
7 'order' => 'desc'
8 );
9
10 $topic_permalink = '';
11 foreach (get_posts($args) as $post) {
12 $topic_permalink = get_permalink($post->ID);
13 }
14
15 $forum_url = admin_url('customize.php?url=') . site_url('/') . get_option('_bbp_root_slug') . '?autofocus[panel]=forumax-settings&autofocus[section]=forum-archive-page';
16 $topic_url = admin_url('customize.php?url=') . $topic_permalink . '?autofocus[panel]=forumax-settings&autofocus[section]=topics_fields';
17
18 // Create a section.
19 CSF::createSection(
20 $prefix,
21 [
22 'title' => __('General', 'forumax'),
23 'icon' => 'dashicons dashicons-admin-generic',
24 'fields' => [
25 [
26 'id' => 'bbpc_brand_color',
27 'type' => 'color',
28 'title' => esc_html__('Frontend Brand Color', 'forumax'),
29 'subtitle' => esc_html__('Choose a primary color to style the frontend appearance of your forum.', 'forumax'),
30 'output' => ':root',
31 'output_mode' => '--bbpc_brand_color_opt',
32 ],
33
34 [
35 'id' => 'sidebar_position',
36 'type' => 'button_set',
37 'title' => esc_html__('Sidebar Position', 'forumax'),
38 'subtitle' => esc_html__('Set the default position for the forum sidebar on topic and archive pages.', 'forumax'),
39 'options' => [
40 'left' => esc_html__('Left', 'forumax'),
41 'right' => esc_html__('Right', 'forumax'),
42 ],
43 'default' => 'left',
44 ],
45
46 [
47 'id' => 'hide_support_assistant',
48 'type' => 'switcher',
49 'title' => esc_html__('Hide Support Chat', 'forumax'),
50 'subtitle' => esc_html__('Hide the documentation support chat button on Forumax admin pages.', 'forumax'),
51 'default' => false,
52 ],
53
54 [
55 'id' => 'customizer_visibility',
56 'type' => 'switcher',
57 'title' => esc_html__('Options Visibility on Customizer', 'forumax'),
58 'subtitle' => esc_html__('Enable this to configure and preview forum styling options inside the WordPress Customizer.', 'forumax'),
59 'text_on' => esc_html__('Enabled', 'forumax'),
60 'text_off' => esc_html__('Disabled', 'forumax'),
61 'text_width' => 100
62 ],
63
64 [
65 'type' => 'content',
66 'title' => esc_html__('Customizer Options', 'forumax'),
67 'subtitle' => esc_html__('Access the real-time customizer to configure specific layout and styling options for your forum.', 'forumax'),
68 'content' => '<a href="' . esc_url($forum_url) . '" target="_blank" id="bbpc_forum_option_link">' . esc_html__('Forum', 'forumax')
69 . '</a> ' . '<a href="' . esc_url($topic_url) . '" target="_blank" id="bbpc_topic_option_link">' . esc_html__(
70 'Topic',
71 'forumax'
72 ) . '</a>',
73 'dependency' => [
74 ['customizer_visibility', '==', true],
75 ],
76 ]
77 ]
78 ]
79 );
80