PluginProbe
Plugins List / 2.2.7
Plugins List v2.2.7
trunk 0.2.1 0.2.2 1.0 2.0 2.1 2.2.7 2.3.2 2.4.4 2.5.2 2.6 2.6.1 2.7
plugins-list / includes / shortcodes.php

shortcodes.php in Plugins List 2.2.7, at includes/shortcodes.php

58 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shortcodes
4 *
5 * Define the various shortcodes
6 *
7 * @package Artiss-Plugins-List
8 * @since 1.0
9 */
10
11 /**
12 * Main Shortcode Function
13 *
14 * Extract shortcode parameters and call main function to output results
15 *
16 * @since 1.0
17 *
18 * @uses get_plugins_list Get the list of plugins
19 *
20 * @param string $paras Shortcode parameters
21 * @return string Output
22 */
23
24 function apl_plugins_list_shortcode( $paras ) {
25
26 extract( shortcode_atts( array( 'format' => '', 'show_inactive' => '', 'cache' => '', 'nofollow' => '', 'target' => '' ), $paras ) );
27
28 $output = get_plugins_list( $format, $show_inactive, $cache, $nofollow, $target );
29
30 return $output;
31 }
32
33 add_shortcode( 'plugins_list', 'apl_plugins_list_shortcode' );
34
35 /**
36 * Number of plugins shortcode
37 *
38 * Shortcode to return number of plugins
39 *
40 * @since 2.2
41 *
42 * @uses get_plugin_number Get the number of plugins
43 *
44 * @param string $paras Shortcode parameters
45 * @return string Output
46 */
47
48 function apl_plugin_number_shortcode( $paras ) {
49
50 extract( shortcode_atts( array( 'inactive' => '', 'cache' => '' ), $paras ) );
51
52 $output = get_plugin_number( $inactive, $cache );
53
54 return $output;
55 }
56
57 add_shortcode( 'plugins_number', 'apl_plugin_number_shortcode' );
58 ?>