PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.6
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.6
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
← All changes | includes/Core/ShortcodeFactory.php +56 -41 3.5.04.2.6 View file →
@@ -4,60 +4,75 @@
4 4
5 5 use WPDeveloper\BetterDocs\Utils\Base;
6 6 use WPDeveloper\BetterDocs\Shortcodes\ToC;
7 7 use WPDeveloper\BetterDocs\Shortcodes\FaqList;
8 +use WPDeveloper\BetterDocs\Shortcodes\FaqTab;
8 9 use WPDeveloper\BetterDocs\Shortcodes\Reactions;
9 10 use WPDeveloper\BetterDocs\Shortcodes\FaqClassic;
11 +use WPDeveloper\BetterDocs\Shortcodes\FaqLayoutThree;
10 12 use WPDeveloper\BetterDocs\Shortcodes\SearchForm;
13 +use WPDeveloper\BetterDocs\Shortcodes\SearchModal;
11 14 use WPDeveloper\BetterDocs\Shortcodes\CategoryBox;
12 15 use WPDeveloper\BetterDocs\Shortcodes\SocialShare;
13 16 use WPDeveloper\BetterDocs\Shortcodes\CategoryGrid;
14 17 use WPDeveloper\BetterDocs\Shortcodes\CategoryList;
15 18 use WPDeveloper\BetterDocs\Shortcodes\FeedbackForm;
19 +use WPDeveloper\BetterDocs\Shortcodes\ReadingTime;
16 20 use WPDeveloper\BetterDocs\Dependencies\DI\Container;
21 +use WPDeveloper\BetterDocs\Shortcodes\CategoryBoxThree;
22 +use WPDeveloper\BetterDocs\Shortcodes\CategoryGridThree;
17 23
18 24 class ShortcodeFactory extends Base {
19 - /**
20 - * Summary of Container
21 - * @var Container
22 - */
23 - private $container;
25 + /**
26 + * Summary of Container
27 + * @var Container
28 + */
29 + private $container;
24 30
25 - public function __construct( Container $container ) {
26 - $this->container = $container;
27 - }
31 + public function __construct( Container $container ) {
32 + $this->container = $container;
33 + }
28 34
29 - /**
30 - * Shortcode Lists
31 - *
32 - * @since 2.5.0
33 - *
34 - * @return array<string>
35 - */
36 - private function shortcode_list() {
37 - return apply_filters('betterdocs_shortcodes', [
38 - CategoryBox::class,
39 - CategoryGrid::class,
40 - CategoryList::class,
41 - SearchForm::class,
42 - ToC::class,
43 - SocialShare::class,
44 - FeedbackForm::class,
45 - FaqClassic::class,
46 - FaqList::class,
47 - Reactions::class
48 - ]);
49 - }
35 + /**
36 + * Shortcode Lists
37 + *
38 + * @since 2.5.0
39 + *
40 + * @return array<string>
41 + */
42 + private function shortcode_list() {
43 + return apply_filters(
44 + 'betterdocs_shortcodes',
45 + [
46 + CategoryBox::class,
47 + CategoryBoxThree::class,
48 + CategoryGrid::class,
49 + CategoryGridThree::class,
50 + CategoryList::class,
51 + SearchForm::class,
52 + SearchModal::class,
53 + ToC::class,
54 + SocialShare::class,
55 + FeedbackForm::class,
56 + FaqClassic::class,
57 + FaqLayoutThree::class,
58 + FaqList::class,
59 + FaqTab::class,
60 + Reactions::class,
61 + ReadingTime::class
62 + ]
63 + );
64 + }
50 65
51 - /**
52 - * Initialize all shortcodes
53 - * @return void
54 - */
55 - public function init() {
56 - if ( ! empty( $shortcodes = $this->shortcode_list() ) ) {
57 - foreach ( $shortcodes as $shortcode ) {
58 - $shortcode = $this->container->get( $shortcode );
59 - add_shortcode( $shortcode->get_name(), [$shortcode, 'render_with_hooks'] );
60 - }
61 - }
62 - }
66 + /**
67 + * Initialize all shortcodes
68 + * @return void
69 + */
70 + public function init() {
71 + if ( ! empty( $shortcodes = $this->shortcode_list() ) ) {
72 + foreach ( $shortcodes as $shortcode ) {
73 + $shortcode = $this->container->get( $shortcode );
74 + add_shortcode( $shortcode->get_name(), [ $shortcode, 'render_with_hooks' ] );
75 + }
76 + }
77 + }
63 78 }