PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.2.0
Forumax – AI Powered Advanced Community Forum Plugin v2.2.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
← All changes | includes/features/bbpc_attachments/code/admin.php +91 -89 1.2.72.2.0 View file →
@@ -1,89 +1,91 @@
1 -<?php
2 -
3 -if ( ! defined( 'ABSPATH' ) ) {
4 - exit;
5 -}
6 -
7 -class GDATTAdmin {
8 - private $admin_plugin = false;
9 -
10 - function __construct() {
11 - add_action( 'after_setup_theme', [ $this, 'load' ] );
12 - }
13 -
14 - public static function instance() {
15 - static $instance = false;
16 -
17 - if ( $instance === false ) {
18 - $instance = new GDATTAdmin();
19 - }
20 -
21 - return $instance;
22 - }
23 -
24 - public function load() {
25 - add_filter( 'plugin_action_links', [ $this, 'plugin_actions' ], 10, 2 );
26 - add_filter( 'plugin_row_meta', [ $this, 'plugin_links' ], 10, 2 );
27 - }
28 -
29 - public function plugin_actions( $links, $file ) {
30 - if ( $file == 'gd-bbpress-attachments/gd-bbpress-attachments.php' ) {
31 - $settings_link = '<a href="edit.php?post_type=forum&page=gdbbpress_attachments">' . __( 'Settings', 'bbp-core' ) . '</a>';
32 - array_unshift( $links, $settings_link );
33 - }
34 -
35 - return $links;
36 - }
37 -
38 - public function plugin_links( $links, $file ) {
39 - if ( $file == 'gd-bbpress-attachments/gd-bbpress-attachments.php' ) {
40 - $links[] = '<a target="_blank" style="color: #cc0000; font-weight: bold;" href="https://plugins.dev4press.com/gd-bbpress-toolbox/">' . __( 'Upgrade to GD bbPress Toolbox Pro', 'bbp-core' ) . '</a>';
41 - }
42 -
43 - return $links;
44 - }
45 -
46 - public function load_admin_page() {
47 - $screen = get_current_screen();
48 -
49 - $screen->set_help_sidebar(
50 - '
51 - <p><strong>Dev4Press:</strong></p>
52 - <p><a target="_blank" href="https://www.dev4press.com/">' . __( 'Website', 'bbp-core' ) . '</a></p>
53 - <p><a target="_blank" href="https://twitter.com/milangd">' . __( 'On Twitter', 'bbp-core' ) . '</a></p>
54 - <p><a target="_blank" href="https://facebook.com/dev4press">' . __( 'On Facebook', 'bbp-core' ) . '</a></p>'
55 - );
56 -
57 - $screen->add_help_tab(
58 - [
59 - 'id' => 'gdpt-screenhelp-help',
60 - 'title' => __( 'Get Help', 'bbp-core' ),
61 - 'content' => '<h5>' . __( 'General Plugin Information', 'bbp-core' ) . '</h5>
62 - <p><a href="https://plugins.dev4press.com/gd-bbpress-attachments/" target="_blank">' . __( 'Home Page on Dev4Press.com', 'bbp-core' ) . '</a> |
63 - <a href="https://wordpress.org/plugins/gd-bbpress-attachments/" target="_blank">' . __( 'Home Page on WordPress.org', 'bbp-core' ) . '</a></p>
64 - <h5>' . __( 'Getting Plugin Support', 'bbp-core' ) . '</h5>
65 - <p><a href="https://support.dev4press.com/forums/forum/plugins-free/gd-bbpress-attachments/" target="_blank">' . __( 'Support Forum on Dev4Press.com', 'bbp-core' ) . '</a> |
66 - <a href="https://wordpress.org/support/plugin/gd-bbpress-attachments" target="_blank">' . __( 'Support Forum on WordPress.org', 'bbp-core' ) . '</a> </p>',
67 - ]
68 - );
69 -
70 - $screen->add_help_tab(
71 - [
72 - 'id' => 'gdpt-screenhelp-website',
73 - 'title' => 'Dev4Press',
74 - 'sfc',
75 - 'content' => '<p>' . __( 'On Dev4Press website you can find many useful plugins, themes and tutorials, all for WordPress. Please, take a few minutes to browse some of these resources, you might find some of them very useful.', 'bbp-core' ) . '</p>
76 - <p><a href="https://plugins.dev4press.com/plugins/" target="_blank"><strong>' . __( 'Plugins', 'bbp-core' ) . '</strong></a> - ' . __( 'We have more than 10 plugins available, some of them are commercial and some are available for free.', 'bbp-core' ) . '</p>
77 - <p><a href="https://support.dev4press.com/kb/" target="_blank"><strong>' . __( 'Knowledge Base', 'bbp-core' ) . '</strong></a> - ' . __( 'Premium and free tutorials for our plugins themes, and many general and practical WordPress tutorials.', 'bbp-core' ) . '</p>
78 - <p><a href="https://support.dev4press.com/forums/" target="_blank"><strong>' . __( 'Support Forums', 'bbp-core' ) . '</strong></a> - ' . __( 'Premium support forum for all with valid licenses to get help. Also, report bugs and leave suggestions.', 'bbp-core' ) . '</p>',
79 - ]
80 - );
81 - }
82 -
83 - public function menu_attachments() {
84 - $options = BBPCATTCore::instance()->o;
85 - $_user_roles = bbpc_bbpress_get_user_roles();
86 -
87 - include BBPCATTACHMENTS_PATH . 'forms/panels.php';
88 - }
89 -}
1 +<?php
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +class GDATTAdmin {
8 + private $admin_plugin = false;
9 +
10 + function __construct() {
11 + add_action( 'after_setup_theme', [ $this, 'load' ] );
12 + }
13 +
14 + public static function instance() {
15 + static $instance = false;
16 +
17 + if ( $instance === false ) {
18 + $instance = new GDATTAdmin();
19 + }
20 +
21 + return $instance;
22 + }
23 +
24 + public function load() {
25 + add_filter( 'plugin_action_links', [ $this, 'plugin_actions' ], 10, 2 );
26 + add_filter( 'plugin_row_meta', [ $this, 'plugin_links' ], 10, 2 );
27 + }
28 +
29 + public function plugin_actions( $links, $file ) {
30 + if ( $file == 'gd-bbpress-attachments/gd-bbpress-attachments.php' ) {
31 + $settings_link = '<a href="edit.php?post_type=forum&page=gdbbpress_attachments">' . __( 'Settings', 'forumax' ) . '</a>';
32 + array_unshift( $links, $settings_link );
33 + }
34 +
35 + return $links;
36 + }
37 +
38 + public function plugin_links( $links, $file ) {
39 + if ( $file == 'gd-bbpress-attachments/gd-bbpress-attachments.php' ) {
40 + $links[] = '<a target="_blank" style="color: #cc0000; font-weight: bold;" href="https://plugins.dev4press.com/gd-bbpress-toolbox/">' . __( 'Upgrade to GD bbPress Toolbox Pro', 'forumax' ) . '</a>';
41 + }
42 +
43 + return $links;
44 + }
45 +
46 + public function load_admin_page() {
47 + $screen = get_current_screen();
48 +
49 + $screen->set_help_sidebar(
50 + '
51 + <p><strong>Dev4Press:</strong></p>
52 + <p><a target="_blank" href="https://www.dev4press.com/">' . __( 'Website', 'forumax' ) . '</a></p>
53 + <p><a target="_blank" href="https://twitter.com/milangd">' . __( 'On Twitter', 'forumax' ) . '</a></p>
54 + <p><a target="_blank" href="https://facebook.com/dev4press">' . __( 'On Facebook', 'forumax' ) . '</a></p>'
55 + );
56 +
57 + $screen->add_help_tab(
58 + [
59 + 'id' => 'gdpt-screenhelp-help',
60 + 'title' => __( 'Get Help', 'forumax' ),
61 + 'content' => '<h5>' . __( 'General Plugin Information', 'forumax' ) . '</h5>
62 + <p><a href="https://plugins.dev4press.com/gd-bbpress-attachments/" target="_blank">' . __( 'Home Page on Dev4Press.com', 'forumax' ) . '</a> |
63 + <a href="https://wordpress.org/plugins/gd-bbpress-attachments/" target="_blank">' . __( 'Home Page on WordPress.org', 'forumax' ) . '</a></p>
64 + <h5>' . __( 'Getting Plugin Support', 'forumax' ) . '</h5>
65 + <p><a href="https://support.dev4press.com/forums/forum/plugins-free/gd-bbpress-attachments/" target="_blank">' . __( 'Support Forum on Dev4Press.com', 'forumax' ) . '</a> |
66 + <a href="https://wordpress.org/support/plugin/gd-bbpress-attachments" target="_blank">' . __( 'Support Forum on WordPress.org', 'forumax' ) . '</a> </p>',
67 + ]
68 + );
69 +
70 + $screen->add_help_tab(
71 + [
72 + 'id' => 'gdpt-screenhelp-website',
73 + 'title' => 'Dev4Press',
74 + 'sfc',
75 + 'content' => '<p>' . __( 'On Dev4Press website you can find many useful plugins, themes and tutorials, all for WordPress. Please, take a few minutes to browse some of these resources, you might find some of them very useful.', 'forumax' ) . '</p>
76 + <p><a href="https://plugins.dev4press.com/plugins/" target="_blank"><strong>' . __( 'Plugins', 'forumax' ) . '</strong></a> - ' . __( 'We have more than 10 plugins available, some of them are commercial and some are available for free.', 'forumax' ) . '</p>
77 + <p><a href="https://support.dev4press.com/kb/" target="_blank"><strong>' . __( 'Knowledge Base', 'forumax' ) . '</strong></a> - ' . __( 'Premium and free tutorials for our plugins themes, and many general and practical WordPress tutorials.', 'forumax' ) . '</p>
78 + <p><a href="https://support.dev4press.com/forums/" target="_blank"><strong>' . __( 'Support Forums', 'forumax' ) . '</strong></a> - ' . __( 'Premium support forum for all with valid licenses to get help. Also, report bugs and leave suggestions.', 'forumax' ) . '</p>',
79 + ]
80 + );
81 + }
82 +
83 + public function menu_attachments() {
84 + $options = BBPCATTCore::instance()->o;
85 + $_user_roles = bbpc_bbpress_get_user_roles();
86 +
87 + include BBPCATTACHMENTS_PATH . 'forms/panels.php';
88 + }
89 +}
90 +
91 +