Issues (80)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

inc/setup.php (1 issue)

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
 * Theme basic setup.
4
 *
5
 * @package spurs
6
 */
7
8
// Exit if accessed directly.
9
defined( 'ABSPATH' ) || exit;
10
11
// Set the content width based on the theme's design and stylesheet.
12
if ( ! isset( $content_width ) ) {
13
	$content_width = 640; /* pixels */
14
}
15
16
add_action( 'after_setup_theme', 'spurs_setup' );
17
if ( ! function_exists( 'spurs_setup' ) ) {
18
	/**
19
	 * Sets up theme defaults and registers support for various WordPress features.
20
	 *
21
	 * Note that this function is hooked into the after_setup_theme hook, which
22
	 * runs before the init hook. The init hook is too late for some features, such
23
	 * as indicating support for post thumbnails.
24
	 */
25
	function spurs_setup() {
26
		/*
27
		 * Make theme available for translation.
28
		 * Translations can be filed in the /languages/ directory.
29
		 * If you're building a theme based on Spurs, use a find and replace
30
		 * to change 'spurs' to the name of your theme in all the template files
31
		 */
32
		load_theme_textdomain( 'spurs', get_template_directory() . '/languages' );
33
34
		// Add default posts and comments RSS feed links to head.
35
		add_theme_support( 'automatic-feed-links' );
36
37
		/*
38
		 * Let WordPress manage the document title.
39
		 * By adding theme support, we declare that this theme does not use a
40
		 * hard-coded <title> tag in the document head, and expect WordPress to
41
		 * provide it for us.
42
		 */
43
		add_theme_support( 'title-tag' );
44
45
		// This theme uses wp_nav_menu() in one location.
46
		register_nav_menus( array(
47
			'primary' => __( 'Primary Menu', 'spurs' ),
48
		) );
49
50
		/*
51
		 * Switch default core markup for search form, comment form, and comments
52
		 * to output valid HTML5.
53
		 */
54
		add_theme_support( 'html5', array(
55
			'search-form',
56
			'comment-form',
57
			'comment-list',
58
			'gallery',
59
			'caption',
60
		) );
61
62
		/*
63
		 * Adding Thumbnail basic support
64
		 */
65
		add_theme_support( 'post-thumbnails' );
66
67
		/*
68
		 * Adding support for Widget edit icons in customizer
69
		 */
70
		add_theme_support( 'customize-selective-refresh-widgets' );
71
72
		/*
73
		 * Enable support for Post Formats.
74
		 * See http://codex.wordpress.org/Post_Formats
75
		 */
76
		add_theme_support( 'post-formats', array(
77
			'aside',
78
			'image',
79
			'video',
80
			'quote',
81
			'link',
82
		) );
83
84
		// Set up the WordPress core custom background feature.
85
		add_theme_support( 'custom-background', apply_filters( 'spurs_custom_background_args', array(
86
			'default-color' => 'ffffff',
87
			'default-image' => '',
88
		) ) );
89
90
		// Set up the WordPress Theme logo feature.
91
		add_theme_support( 'custom-logo' );
92
93
		// Add support for responsive embedded content.
94
		add_theme_support( 'responsive-embeds' );
95
96
		// Add support for default styles.
97
		add_theme_support( 'wp-block-styles' );
98
99
		// Add support for full width blocks.
100
		add_theme_support( 'align-wide' );
101
102
		// Check and setup theme default settings.
103
		spurs_setup_theme_default_settings();
104
105
		// Adds brand colors to Blocks color palette.
106
		add_theme_support( 'editor-color-palette', array(
107
			array(
108
				'name'  => __( 'Green', 'spurs' ),
109
				'slug'  => 'green',
110
				'color' => '#6aaf08',
111
			),
112
			array(
113
				'name'  => __( 'Dark Green', 'spurs' ),
114
				'slug'  => 'dark-green',
115
				'color' => '#548a06',
116
			),
117
			array(
118
				'name'  => __( 'Blue', 'spurs' ),
119
				'slug'  => 'blue',
120
				'color' => '#007ac3',
121
			),
122
			array(
123
				'name'  => __( 'Black', 'spurs' ),
124
				'slug'  => 'black',
125
				'color' => '#2b2b2b',
126
			),
127
			array(
128
				'name'  => __( 'White', 'spurs' ),
129
				'slug'  => 'white',
130
				'color' => '#FFFFFF',
131
			),
132
133
		) );
134
135
		// Hard cropped featured images
136
		//add_image_size( 'featured-rounded', 230, 230, true );
137
	}
138
} // spurs_setup.
139
140
add_filter( 'excerpt_more', 'spurs_custom_excerpt_more' );
141
if ( ! function_exists( 'spurs_custom_excerpt_more' ) ) {
142
	/**
143
	 * Removes the ... from the excerpt read more link
144
	 *
145
	 * @param string $more The excerpt.
146
	 *
147
	 * @return string
148
	 */
149
	function spurs_custom_excerpt_more( $more ) {
150
		if ( ! is_admin() ) {
151
			$more = '';
0 ignored issues
show
Consider using a different name than the parameter $more. This often makes code more readable.
Loading history...
152
		}
153
154
		return $more;
155
	}
156
}
157
158
// ACF Pro Options Page
159
if ( function_exists( 'acf_add_options_page' ) ) {
160
161
	acf_add_options_page( array(
162
		'page_title' => 'Theme General Settings',
163
		'menu_title' => 'Theme Settings',
164
		'menu_slug'  => 'theme-general-settings',
165
		'capability' => 'edit_posts',
166
		'redirect'   => false
167
	) );
168
169
}