PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 3.1.0
Defender Security – Malware Scanner, Login Security & Firewall v3.1.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / traits / theme.php

theme.php in Defender Security – Malware Scanner, Login Security & Firewall 3.1.0, at src/traits/theme.php

36 lines 555 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WP_Defender\Traits;
4
5 trait Theme {
6
7 /**
8 * Get all installed themes.
9 *
10 * @return array
11 */
12 public function get_themes() {
13 if ( ! function_exists( 'wp_get_themes' ) ) {
14 require_once( ABSPATH . '/wp-includes/theme.php' );
15 }
16 return wp_get_themes();
17 }
18
19 /**
20 * Get all slugs
21 *
22 * @return array
23 */
24 public function get_theme_slugs() {
25 $slugs = array();
26 foreach ( $this->get_themes() as $slug => $theme ) {
27 if ( is_object( $theme->parent() ) ) {
28 continue;
29 }
30 $slugs[] = $slug;
31 }
32
33 return $slugs;
34 }
35 }
36