Passed
Push — master ( 31e91c...45a73e )
by Amit
07:11
created

functions.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 *
4
 * podium functions and definitions
5
 *
6
 * @package podium
7
 */
8
9
// require array list
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
10
$reqire_files = [
11
    '/inc/environment.class.php', // Set Eniroment.
12
    '/inc/enqueue-scripts.php',  // Enqueue scripts and styles.
13
    '/inc/cleanup.php',          // cleanup & setup theme.
14
    '/inc/widgets.php',          // Implement Custom widgets.
15
    '/inc/template-tags.php',    // Custom template tags for this theme.
16
    '/inc/extras.php',           // Custom functions that act independently of the theme templates.
17
    '/inc/customizer.php',       // Customizer additions.
18
    '/inc/menu-walkers.php',     // TODO -> make comment describing the functionality of the page
19
    '/inc/menu.php',             // TODO -> make comment describing the functionality of the page
20
    '/inc/admin.php',            // Code for better handaling the admin area
21
    '/inc/custom-fields.php',    // Inintialize custom fields (if you prefer to do this without ACF)
22
    '/inc/custom-post-type.php', // Inintialize unique CPT's and taxonomies for this project
23
    '/inc/pagination.php',       // More flexible pagination function
24
    '/inc/clean-filenames.php',  // Custom functions to clean filenames from Unicode to ASCII
25
    '/inc/config.php',           // get the settings for the wordpress theme.
26
    '/inc/media.php',            // Media functions.
27
    '/inc/vendor/autoload.php',  // Load Composer packages
28
    '/inc/tgm.php',              // Plugin installation and activation for Podium based themes.
29
    '/inc/editor-caps.php'       // Configure editor role capabilities
30
31
    // '/inc/disable-feeds.php'  //   Remove fedds content and links
32
];
33
34
// require all the files in the $reqire_files array
35
foreach ($reqire_files as $file) {
36
    require get_template_directory() . $file;
37
}
38
39
// Include array list
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
40
$include_files = [
41
    //'inc/xxxxxxxxxxxxxxxxxxxxxx.php',
42
];
43
44
// Include all the files in the $include_files array
45
foreach ($include_files as $file) {
46
    include get_template_directory() . $file;
47
}
48