PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / themes / classic / functions.php

functions.php in wpForo Forum 3.1.6, at themes/classic/functions.php

43 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( ! defined( 'ABSPATH' ) ) exit;
4
5 /**
6 * wpForo Classic Theme Functions
7 * @hook: action - 'init'
8 * @description: only for wpForo theme functions. For WordPress theme functions use functions-wp.php file.
9 * @theme: Classic
10 */
11
12 include_once( wpftpl( 'layouts/4/forum-thread.php' ) );
13 include_once( wpftpl( 'layouts/4/topic-thread.php' ) );
14 include_once( wpftpl( 'layouts/4/post-thread.php' ) );
15
16 function wpforo_thread_reply( $post, $topic = [], $forum = [], $level = 0, $parents = [] ) {
17 if( wpfval( $post, 'postid' ) ) {
18 $post = wpforo_post( $post['postid'] );
19 wpforo_thread_reply_template( $post, $topic, $forum, $level, $parents );
20 }
21 }
22
23 function wpforo_classic_reply_form_head( $string, $args ) {
24 if( $args['layout'] === 3 && WPF()->tpl->layout_exists( 3 ) ) {
25 $string = wpforo_phrase( 'Your Answer', false, 'default' );
26 }
27
28 return $string;
29 }
30
31 add_filter( 'wpforo_reply_form_head', 'wpforo_classic_reply_form_head', 1, 2 );
32
33 function wpforo_forum_layout_editors( $settings, $editor ) {
34 if( $editor === 'post' && 4 === wpfval( WPF()->current_object, 'layout' ) ) {
35 $settings['tinymce']['toolbar1'] = 'fontsizeselect,bold,italic,underline,forecolor,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,blockquote,pre,wpf_spoil,pastetext,source_code,emoticons';
36 $settings['editor_height'] = 100;
37 }
38
39 return $settings;
40 }
41
42 add_filter( 'wpforo_editor_settings', 'wpforo_forum_layout_editors', 1, 2 );
43