These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Plugin Name: Carbon Fields |
||
4 | * Description: WordPress developer-friendly custom fields for post types, taxonomy terms, users, comments, widgets, options and more. |
||
5 | * Version: 1.0 |
||
6 | * Author: htmlburger |
||
7 | * Author URI: https://htmlburger.com/ |
||
8 | * Plugin URI: https://github.com/htmlburger/carbon-fields |
||
9 | * License: GPL2 |
||
10 | * Requires at least: 4.0 |
||
11 | * Tested up to: 4.4.1 |
||
12 | * Text Domain: carbon_fields |
||
13 | * Domain Path: /languages |
||
14 | */ |
||
15 | |||
16 | $dir = dirname( __FILE__ ); |
||
17 | |||
18 | if ( file_exists( $dir . '/vendor/autoload.php' ) ) { |
||
19 | require( $dir . '/vendor/autoload.php' ); |
||
20 | } else { |
||
21 | function carbon_fields_spl_autoload_register( $class ) { |
||
22 | $prefix = 'Carbon_Fields'; |
||
23 | if ( stripos( $class, $prefix ) === false ) { |
||
24 | return; |
||
25 | } |
||
26 | |||
27 | $file_path = dirname(__FILE__) . '/core/' . str_ireplace( 'Carbon_Fields\\', '', $class ) . '.php'; |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
28 | include_once( $file_path ); |
||
29 | } |
||
30 | |||
31 | spl_autoload_register( 'carbon_fields_spl_autoload_register' ); |
||
32 | } |
||
33 | |||
34 | include_once( dirname( __FILE__ ) . '/carbon-fields.php' ); |