PluginProbe ʕ •ᴥ•ʔ
Easy Updates Manager / 8.0.5
Easy Updates Manager v8.0.5
trunk 2.0.0 2.1.0 2.2.0 2.2.1 2.3.0 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 3.0.0 3.1.0 3.2.0 3.3.0 3.4.0 3.5.0 3.6.0 4.0 4.0.2 4.0.3 4.1.0 4.1.10 4.1.12 4.2.21 4.2.24 4.3.0 4.3.10 4.3.12 4.3.13 4.6.0 4.7.0 5.0.0 5.1.0 5.1.1 5.2.0 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.4.2 5.4.3 5.4.5 6.0.0 6.0.1 6.0.3 6.0.5 6.1.0 6.1.1 6.1.3 6.1.5 6.1.8 6.2.0 6.2.11 6.2.2 6.2.3 6.2.5 6.2.7 6.2.9 6.3.0 6.3.1 6.3.3 6.4.0 6.4.4 6.4.6 6.4.7 6.4.8 7.0.0 7.0.1 7.0.2 7.0.3 8.0.1 8.0.2 8.0.3 8.0.5 8.1.0 8.1.1 8.2.0 9.0.0 9.0.1 9.0.10 9.0.11 9.0.12 9.0.13 9.0.14 9.0.15 9.0.16 9.0.17 9.0.18 9.0.19 9.0.20 9.0.21 9.0.3 9.0.5 9.0.6 9.0.7 9.0.8 9.0.9
stops-core-theme-and-plugin-updates / includes / MPSUM_Admin_Themes.php
stops-core-theme-and-plugin-updates / includes Last commit date
MPSUM_Admin.php 7 years ago MPSUM_Admin_Advanced.php 7 years ago MPSUM_Admin_Advanced_Preview.php 7 years ago MPSUM_Admin_Ajax.php 7 years ago MPSUM_Admin_Bar.php 7 years ago MPSUM_Admin_Core.php 7 years ago MPSUM_Admin_Dashboard.php 7 years ago MPSUM_Admin_Help.php 7 years ago MPSUM_Admin_Logs.php 7 years ago MPSUM_Admin_Plugins.php 7 years ago MPSUM_Admin_Screen_Options.php 7 years ago MPSUM_Admin_Themes.php 7 years ago MPSUM_Advanced_Premium.php 7 years ago MPSUM_Check_Plugin_Install_Status.php 7 years ago MPSUM_Check_Theme_Install_Status.php 7 years ago MPSUM_Commands.php 7 years ago MPSUM_Disable_Updates.php 7 years ago MPSUM_Disable_Updates_All.php 7 years ago MPSUM_Disable_Updates_Plugins.php 7 years ago MPSUM_Disable_Updates_Themes.php 7 years ago MPSUM_Disable_Updates_Translations.php 7 years ago MPSUM_Disable_Updates_WordPress.php 7 years ago MPSUM_Exclude_Users.php 7 years ago MPSUM_Force_Updates.php 7 years ago MPSUM_List_Table.php 7 years ago MPSUM_Logs.php 7 years ago MPSUM_Logs_List_Table.php 7 years ago MPSUM_Plugins_List_Table.php 7 years ago MPSUM_Reset_Options.php 7 years ago MPSUM_Themes_List_Table.php 7 years ago MPSUM_UpdraftCentral.php 7 years ago MPSUM_UpdraftCentral_EUM_Commands.php 7 years ago MPSUM_Utils.php 7 years ago easy-updates-manager-notices.php 7 years ago updraft-notices.php 7 years ago
MPSUM_Admin_Themes.php
107 lines
1 <?php
2 if (!defined('ABSPATH')) die('No direct access.');
3 /**
4 * Controls the themes tab and handles the saving of its options.
5 *
6 * @package WordPress
7 * @since 5.0.0
8 */
9 class MPSUM_Admin_Themes {
10
11 /**
12 * Holds the slug to the admin panel page
13 *
14 * @since 5.0.0
15 * @access private
16 * @var string $slug
17 */
18 private $slug = '';
19
20 /**
21 * Holds the tab name
22 *
23 * @since 5.0.0
24 * @access private
25 * @var string $tab
26 */
27 private $tab = 'themes';
28
29 /**
30 * Class constructor.
31 *
32 * Initialize the class
33 *
34 * @since 5.0.0
35 * @access public
36 *
37 * @param string $slug Slug to the admin panel page
38 */
39 public function __construct( $slug = '' ) {
40 $this->slug = $slug;
41
42 // Admin Tab Actions
43 add_action('mpsum_admin_tab_themes', array( $this, 'tab_output' ));
44 add_filter('mpsum_theme_action_links', array( $this, 'theme_action_links' ), 11, 2);
45 }
46
47 /**
48 * Determine whether the themes can be updated or not.
49 *
50 * Determine whether the themes can be updated or not.
51 *
52 * @since 5.0.0
53 *
54 * @return bool True if the themes can be updated, false if not.
55 */
56 public static function can_update_themes() {
57 $core_options = MPSUM_Updates_Manager::get_options('core');
58 if (isset($core_options['all_updates']) && 'off' == $core_options['all_updates']) {
59 return false;
60 }
61 if (isset($core_options['theme_updates']) && 'off' == $core_options['theme_updates']) {
62 return false;
63 }
64 return true;
65 }
66
67 /**
68 * Output the HTML interface for the themes tab.
69 *
70 * Output the HTML interface for the themes tab.
71 *
72 * @since 5.0.0
73 * @access public
74 * @see __construct
75 * @internal Uses the mpsum_admin_tab_themes action
76 */
77 public function tab_output() {
78 $params = array(
79 'can_update' => self::can_update_themes(),
80 'slug' => $this->slug,
81 'tab' => $this->tab,
82 'paged' => '1',
83 'view' => 'all'
84 );
85 Easy_Updates_Manager()->include_template('admin-tab-themes.php', false, $params);
86 } //end tab_output_plugins
87
88 /**
89 * Outputs the theme action links beneath each theme row.
90 *
91 * Outputs the theme action links beneath each theme row.
92 *
93 * @since 5.0.0
94 * @access public
95 * @see __construct
96 * @internal uses mpsum_theme_action_links filter
97 *
98 * @param array $settings Array of settings to output.
99 * @param WP_Theme $theme The theme object to take action on.
100 *
101 * @return array Array of settings to output
102 */
103 public function theme_action_links( $settings, $theme ) {
104 return $settings;
105 }
106 }
107