PluginProbe
Plugin Check (PCP) / 0.1
Plugin Check (PCP) v0.1
2.1.0 trunk 0.1 0.2.0 0.2.1 0.2.2 0.2.3 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 2.0.0 ci-artifacts
plugin-check / plugin-check.php

plugin-check.php in Plugin Check (PCP) 0.1, at plugin-check.php

53 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Plugin-Check
4 Plugin URI: http://pross.org.uk/plugins
5 Description: Plugin-Check BETA
6 Author: Pross
7 Author URI: http://pross.org.uk
8 Version: 0.1
9 */
10
11
12 function plugincheck_load_styles() {
13 wp_enqueue_style('style', WP_PLUGIN_URL . '/theme-check/style.css', null, null, 'screen');
14 }
15
16 add_action( 'admin_menu', 'plugincheck_add_page' );
17 function plugincheck_add_page() {
18 $page = add_plugins_page( 'Plugin Check', 'Plugin Check', 'manage_options', 'plugincheck', 'plugincheck_do_page' );
19 add_action('admin_print_styles-' . $page, 'plugincheck_load_styles');
20 }
21
22 function plugincheck_add_headers( $extra_headers ) {
23 $extra_headers = array( 'License', 'License URI', 'Template Version' );
24 return $extra_headers;
25 }
26
27 function plugincheck_do_page() {
28 if ( !current_user_can( 'manage_options' ) ) {
29 wp_die( __( 'You do not have sufficient permissions to access this page.', 'themecheck' ) );
30 }
31
32 add_filter( 'extra_theme_headers', 'tc_add_headers' );
33
34 include 'checkbase.php';
35 include 'main.php';
36
37 echo '<div id="theme-check" class="wrap">';
38 echo '<div id="icon-themes" class="icon32"><br /></div><h2>Plugin-Check</h2>';
39 echo '<div class="theme-check">';
40 tc_form();
41 if ( !isset( $_POST[ 'plugincheck' ] ) ) {
42 tc_intro();
43
44 }
45
46 if ( isset( $_POST[ 'plugincheck' ] ) ) {
47 if ( isset( $_POST[ 'trac' ] ) ) define( 'TC_TRAC', true );
48 plugin_check_main( );
49 }
50 echo '</div> <!-- .theme-check-->';
51 echo '</div>';
52 }
53