PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.5.1
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.5.1
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / includes / Shortcodes / Reactions.php

Reactions.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 3.5.1, at includes/Shortcodes/Reactions.php

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDeveloper\BetterDocs\Shortcodes;
4 use WPDeveloper\BetterDocs\Core\Shortcode;
5
6 class Reactions extends Shortcode {
7 public $view_wrapper = 'betterdocs-article-reactions';
8
9 public function get_name() {
10 return 'betterdocs_article_reactions';
11 }
12
13 public function get_style_depends() {
14 return ['betterdocs-reactions'];
15 }
16
17 public function get_script_depends() {
18 return ['betterdocs-reactions'];
19 }
20
21 /**
22 * Summary of default_attributes
23 * @return array
24 */
25 public function default_attributes() {
26 return [
27 'text' => ''
28 ];
29 }
30
31 /**
32 * Summary of render
33 *
34 * @param mixed $atts
35 * @param mixed $content
36 * @return mixed
37 */
38 public function render( $atts, $content = null ) {
39 $this->views( 'widgets/reactions' );
40 }
41
42 public function view_params() {
43 $reactions_text = ! empty( $this->attributes['text'] ) ? $this->attributes['text'] : $this->customizer->get(
44 'betterdocs_post_reactions_text', __( 'What are your Feelings', 'betterdocs' )
45 );
46
47 return [
48 'reactions_text' => $reactions_text
49 ];
50 }
51 }
52