Issues (461)

Branch: master

Security Analysis    not enabled

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

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

lib/theme-support.php (7 issues)

1
<?php
0 ignored issues
show
This file is missing a doc comment.
Loading history...
2
3
/**
4
 * Enqueues the editor styles.
5
 *
6
 * @return void
7
 */
8
function editor_styles() {
9
10
	// Enqueue  shared editor styles.
11
	add_editor_style(
12
		'/assets/css/admin/gutenberg-admin.css'
13
	);
14
	add_editor_style(
15
		'/assets/css/yoast/yoast.css'
16
	);
17
18
}
19
add_action( 'admin_init', 'editor_styles' );
20
21
/**
22
 * Add theme support functions.
23
 *
24
 * @package lsx
25
 */
26
27
if ( ! function_exists( 'theme_support' ) ) :
28
	/**
29
	 * Add theme support functions.
30
	 *
31
	 * @return void
32
	 */
33
	function theme_support() {
34
		// Add support for editor styles.
35
		add_theme_support( 'editor-styles' );
36
		// Add support for full and wide align images.
37
		add_theme_support( 'align-wide' );
38
		// Add support for styling blocks.
39
		add_theme_support( 'wp-block-styles' );
40
		// Add support for responsive embedded content.
41
		add_theme_support( 'responsive-embeds' );
42
		// Add support for Custom Line Heights.
43
		add_theme_support( 'custom-line-height' );
44
		// Add support for Custom Units.
45
		add_theme_support( 'custom-units' );
46
		// Add support for experimental link colors.
47
		add_theme_support( 'experimental-link-color' );
48
		// Add custom editor font sizes.
49
		add_theme_support(
50
			'editor-font-sizes',
51
			array(
52
				array(
53
					'name'      => esc_html_x( 'Small', 'font size option label', 'lsx' ),
54
					'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ),
55
					'size'      => 13,
56
					'slug'      => 'small',
57
				),
58
				array(
59
					'name'      => esc_html_x( 'Normal', 'font size option label', 'lsx' ),
60
					'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ),
61
					'size'      => 15,
62
					'slug'      => 'normal',
63
				),
64
				array(
65
					'name'      => esc_html_x( 'Medium', 'font size option label', 'lsx' ),
66
					'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ),
67
					'size'      => 22,
68
					'slug'      => 'medium',
69
				),
70
				array(
71
					'name'      => esc_html_x( 'Large', 'font size option label', 'lsx' ),
72
					'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ),
73
					'size'      => 30,
74
					'slug'      => 'large',
75
				),
76
				array(
77
					'name'      => esc_html_x( 'Huge', 'font size option label', 'lsx' ),
78
					'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ),
79
					'size'      => 40,
80
					'slug'      => 'huge',
81
				),
82
			)
83
		);
84
85
		// Add support for custom color scheme.
86
		add_theme_support( 'editor-color-palette', array(
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
87
			array(
88
				'name'  => __( 'Strong Blue', 'lsx' ),
89
				'slug'  => 'strong-blue',
90
				'color' => '#27639e',
91
			),
92
			array(
93
				'name'  => __( 'Lighter Blue', 'lsx' ),
94
				'slug'  => 'lighter-blue',
95
				'color' => '#428bca',
96
			),
97
			array(
98
				'name'  => __( 'Yellow', 'lsx' ),
99
				'slug'  => 'light-yellow',
100
				'color' => '#f7ae00',
101
			),
102
			array(
103
				'name'  => __( 'Dark Yellow', 'lsx' ),
104
				'slug'  => 'dark-yellow',
105
				'color' => '#ab7800',
106
			),
107
			array(
108
				'name'  => __( 'Green', 'lsx' ),
109
				'slug'  => 'light-green',
110
				'color' => '#6BA913',
111
			),
112
			array(
113
				'name'  => __( 'Dark Green', 'lsx' ),
114
				'slug'  => 'dark-green',
115
				'color' => '#3F640B',
116
			),
117
			array(
118
				'name'  => __( 'White', 'lsx' ),
119
				'slug'  => 'white',
120
				'color' => '#ffffff',
121
			),
122
			array(
123
				'name'  => __( 'Black', 'lsx' ),
124
				'slug'  => 'black',
125
				'color' => '#000000',
126
			),
127
		) );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
128
129
		$primary_color    = 'rgba(39,99,158,1)';
130
		$secondary_color  = 'rgba(247,174,0,1)';
131
		$tertiary_color   = 'rgba(107,169,19,1)';
132
		$background_color = 'rgba(249,249,249,1)';
133
134
		add_theme_support(
135
			'editor-gradient-presets',
136
			array(
137
				array(
138
					'name'     => __( 'Primary to Secondary', 'lsx' ),
139
					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)',
140
					'slug'     => 'primary-to-secondary',
141
				),
142
				array(
143
					'name'     => __( 'Primary to Tertiary', 'lsx' ),
144
					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)',
145
					'slug'     => 'primary-to-tertiary',
146
				),
147
				array(
148
					'name'     => __( 'Primary to Background', 'lsx' ),
149
					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)',
150
					'slug'     => 'primary-to-background',
151
				),
152
				array(
153
					'name'     => __( 'Secondary to Tertiary', 'lsx' ),
154
					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)',
155
					'slug'     => 'secondary-to-tertiary',
156
				),
157
			)
158
		);
159
	}
160
endif;
161
add_action( 'after_setup_theme', 'theme_support' );
162
163
/**
164
 * WPForms submit button, match Gutenberg button block
165
 *
166
 * @param [type] $form_data
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
167
 * @return void
0 ignored issues
show
Function return type is void, but function contains return statement
Loading history...
168
 */
169
function lsx_wpforms_match_button_block( $form_data ) {
170
	$form_data['settings']['submit_class'] .= ' btn';
171
	return $form_data;
172
}
173
add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' );
174