PluginProbe
Pronamic Client / trunk
Pronamic Client vtrunk
2.4.1 1.2.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.4.0 1.5.0 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 All 54 releases
pronamic-client / includes / functions.php

functions.php in Pronamic Client trunk, at includes/functions.php

49 lines 931 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Get Pronamic plugins
5 *
6 * @link https://developer.wordpress.org/reference/functions/get_plugins/
7 * @return array|false
8 */
9 function pronamic_client_get_plugins() {
10 if ( ! function_exists( 'get_plugins' ) ) {
11 return false;
12 }
13
14 $pronamic_plugins = [];
15
16 $plugins = get_plugins();
17
18 foreach ( $plugins as $file => $plugin ) {
19 if ( isset( $plugin['Author'] ) && false !== strpos( $plugin['Author'], 'Pronamic' ) ) {
20 $pronamic_plugins[ $file ] = $plugin;
21 }
22 }
23
24 return $pronamic_plugins;
25 }
26
27 /**
28 * Get Pronamic themes
29 *
30 * @return array
31 */
32 function pronamic_client_get_themes() {
33 if ( ! function_exists( 'wp_get_themes' ) ) {
34 return false;
35 }
36
37 $pronamic_themes = [];
38
39 $themes = wp_get_themes();
40
41 foreach ( $themes as $slug => $theme ) {
42 if ( isset( $theme['Author'] ) && false !== strpos( $theme['Author'], 'Pronamic' ) ) {
43 $pronamic_themes[ $slug ] = $theme;
44 }
45 }
46
47 return $pronamic_themes;
48 }
49