PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 1.2.8
Forumax – AI Powered Advanced Community Forum Plugin v1.2.8
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 / settings / options / options_customizer.php

options_customizer.php in Forumax – AI Powered Advanced Community Forum Plugin 1.2.8, at includes/admin/settings/options/options_customizer.php

41 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Select docs page
4 $args = array(
5 'post_type' => 'topic',
6 'posts_per_page' => 1,
7 'orderby' => 'menu_order',
8 'order' => 'desc'
9 );
10
11 $topic_permalink = '';
12 foreach ( get_posts( $args ) as $post ) {
13 $topic_permalink = get_permalink( $post->ID );
14 }
15
16 $forum_url = admin_url('customize.php?url=') . site_url( '/' ) . get_option( '_bbp_root_slug' ) . '?autofocus[panel]=bbp-core-settings&autofocus[section]=forum-archive-page';
17 $topic_url = admin_url( 'customize.php?url=' ) . $topic_permalink . '?autofocus[panel]=bbp-core-settings&autofocus[section]=topics_fields';
18
19 CSF::createSection( $prefix, array(
20 'id' => 'design_fields',
21 'title' => esc_html__( 'Customizer', 'eazydocs' ),
22 'fields' => [
23
24 array(
25 'id' => 'customizer_visibility',
26 'type' => 'switcher',
27 'title' => esc_html__( 'Options Visibility on Customizer', 'eazydocs' ),
28 'text_on' => esc_html__( 'Enabled', 'eazydocs' ),
29 'text_off' => esc_html__( 'Disabled', 'eazydocs' ),
30 'text_width' => 100
31 ),
32
33 array(
34 'type' => 'content',
35 'content' => '<a href="' . esc_url( $forum_url ) . '" target="_blank" id="bbpc_forum_option_link">' . esc_html__( 'Forum', 'eazydocs' ) . '</a> '.'<a href="' . esc_url( $topic_url ) . '" target="_blank" id="bbpc_topic_option_link">' . esc_html__( 'Topic', 'eazydocs' ) . '</a>',
36 'dependency' => array(
37 array( 'customizer_visibility', '==', true ),
38 ),
39 )
40 ]
41 ) );