PluginProbe
QuadMenu – Mega Menu / 1.8.9
QuadMenu – Mega Menu v1.8.9
3.3.8 3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 88 releases
quadmenu / lib / ReduxCore / inc / themecheck / checks / full_package.php

full_package.php in QuadMenu – Mega Menu 1.8.9, at lib/ReduxCore/inc/themecheck/checks/full_package.php

57 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Redux_Full_Package implements themecheck {
4 protected $error = array();
5
6 function check( $php_files, $css_files, $other_files ) {
7
8 $ret = true;
9
10 $check = Redux_ThemeCheck::get_instance();
11 $redux = $check::get_redux_details( $php_files );
12
13 if ( $redux ) {
14
15 $blacklist = array(
16 '.tx' => __( 'Redux localization utilities', 'themecheck' ),
17 'bin' => __( 'Redux Resting Diles', 'themecheck' ),
18 'codestyles' => __( 'Redux Code Styles', 'themecheck' ),
19 'tests' => __( 'Redux Unit Testing', 'themecheck' ),
20 'class.redux-plugin.php' => __( 'Redux Plugin File', 'themecheck' ),
21 'bootstrap_tests.php' => __( 'Redux Boostrap Tests', 'themecheck' ),
22 '.travis.yml' => __( 'CI Testing FIle', 'themecheck' ),
23 'phpunit.xml' => __( 'PHP Unit Testing', 'themecheck' ),
24 );
25
26 $errors = array();
27
28 foreach ( $blacklist as $file => $reason ) {
29 checkcount();
30 if ( file_exists( $redux['parent_dir'] . $file ) ) {
31 $errors[ $redux['parent_dir'] . $file ] = $reason;
32 }
33 }
34
35 if ( ! empty( $errors ) ) {
36 $error = '<span class="tc-lead tc-required">REQUIRED</span> ' . __( 'It appears that you have embedded the full Redux package inside your theme. You need only embed the <strong>ReduxCore</strong> folder. Embedding anything else will get your rejected from theme submission. Suspected Redux package file(s):', 'redux-framework' );
37 $error .= '<ol>';
38 foreach ( $errors as $key => $e ) {
39 $error .= '<li><strong>' . $e . '</strong>: ' . $key . '</li>';
40 }
41 $error .= '</ol>';
42 $this->error[] = '<div class="redux-error">' . $error . '</div>';
43 $ret = false;
44 }
45 }
46
47 return $ret;
48 }
49
50 function getError() {
51 return $this->error;
52 }
53 }
54
55 $themechecks = array();
56
57 $themechecks[] = new Redux_Full_Package();