PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.0.0
Forumax – AI Powered Advanced Community Forum Plugin v2.0.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 2.0.0 2.1.0 All 29 releases
bbp-core / includes / admin / options / options_general.php

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

55 lines 1.8 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 'output' => ':root',
30 'output_mode' => '--bbpc_brand_color_opt',
31 ],
32
33 [
34 'id' => 'customizer_visibility',
35 'type' => 'switcher',
36 'title' => esc_html__( 'Options Visibility on Customizer', 'forumax' ),
37 'text_on' => esc_html__( 'Enabled', 'forumax' ),
38 'text_off' => esc_html__( 'Disabled', 'forumax' ),
39 'text_width' => 100
40 ],
41
42 [
43 'type' => 'content',
44 'title' => esc_html__( 'Customizer Options', 'forumax' ),
45 'content' => '<a href="' . esc_url( $forum_url ) . '" target="_blank" id="bbpc_forum_option_link">' . esc_html__( 'Forum', 'forumax' )
46 . '</a> ' . '<a href="' . esc_url( $topic_url ) . '" target="_blank" id="bbpc_topic_option_link">' . esc_html__( 'Topic',
47 'forumax' ) . '</a>',
48 'dependency' => [
49 [ 'customizer_visibility', '==', true ],
50 ],
51 ]
52 ]
53 ]
54 );
55