Version Description
Release Date: November 13th, 2016
Dev time: 4h
- Code refactoring for psr-4
Download this release
Release Info
Developer | overclokk |
Plugin | Italy Cookie Choices (for EU Cookie Law) |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.5 to 2.5.0
- admin/Sanitize.php +122 -0
- admin/Settings.php +1625 -0
- admin/class-italy-cookie-choices-admin-pointer-init.php +0 -178
- admin/class-italy-cookie-choices-admin-pointer.php +0 -168
- admin/class-italy-cookie-choices-admin.php +0 -1629
- admin/class-italy-cookie-choices-sanitize.php +0 -123
- admin/pointerplus.css +0 -45
- admin/pointerplus.js +0 -79
- bootstrap.php +68 -0
- classes/class-italy-cookie-choices-front-end.php +0 -910
- core/Cookie_Choices.php +910 -0
- define-constants.php +48 -0
- functions/general-functions.php +101 -0
- init-admin.php +18 -0
- init.php +26 -0
- italy-cookie-choices.php +12 -345
- lang/italy-cookie-choices-it_IT.mo +0 -0
- lang/italy-cookie-choices-it_IT.po +650 -0
- lang/italy-cookie-choices-ro_RO.mo +0 -0
- lang/italy-cookie-choices-ro_RO.po +546 -0
- lang/italy-cookie-choices.pot +515 -0
- readme.txt +8 -1
- vendor/autoload.php +7 -0
- vendor/composer/ClassLoader.php +415 -0
- vendor/composer/LICENSE +21 -0
- vendor/composer/autoload_classmap.php +9 -0
- vendor/composer/autoload_namespaces.php +9 -0
- vendor/composer/autoload_psr4.php +11 -0
- vendor/composer/autoload_real.php +52 -0
- vendor/composer/autoload_static.php +36 -0
- vendor/composer/installed.json +47 -0
- vendor/overclokk/minimum-requirements/LICENSE.md +312 -0
- vendor/overclokk/minimum-requirements/README.md +73 -0
- vendor/overclokk/minimum-requirements/codeception.dist.yml +59 -0
- vendor/overclokk/minimum-requirements/composer.json +23 -0
- vendor/overclokk/minimum-requirements/composer.lock +2460 -0
- vendor/overclokk/minimum-requirements/index.php +4 -0
- vendor/overclokk/minimum-requirements/minimum-requirements.php +305 -0
- vendor/overclokk/minimum-requirements/tests/_bootstrap.php +3 -0
- vendor/overclokk/minimum-requirements/tests/_data/dump.sql +1 -0
- vendor/overclokk/minimum-requirements/tests/_support/AcceptanceTester.php +26 -0
- vendor/overclokk/minimum-requirements/tests/_support/FunctionalTester.php +26 -0
- vendor/overclokk/minimum-requirements/tests/_support/Helper/Acceptance.php +10 -0
- vendor/overclokk/minimum-requirements/tests/_support/Helper/Functional.php +10 -0
- vendor/overclokk/minimum-requirements/tests/_support/Helper/Unit.php +10 -0
- vendor/overclokk/minimum-requirements/tests/_support/Helper/Wpunit.php +10 -0
- vendor/overclokk/minimum-requirements/tests/_support/UnitTester.php +26 -0
- vendor/overclokk/minimum-requirements/tests/_support/WpunitTester.php +26 -0
- vendor/overclokk/minimum-requirements/tests/_support/_generated/AcceptanceTesterActions.php +2560 -0
- vendor/overclokk/minimum-requirements/tests/_support/_generated/FunctionalTesterActions.php +438 -0
- vendor/overclokk/minimum-requirements/tests/_support/_generated/UnitTesterActions.php +344 -0
- vendor/overclokk/minimum-requirements/tests/_support/_generated/WpunitTesterActions.php +61 -0
- vendor/overclokk/minimum-requirements/tests/acceptance.suite.yml +9 -0
- vendor/overclokk/minimum-requirements/tests/acceptance/_bootstrap.php +2 -0
- vendor/overclokk/minimum-requirements/tests/functional.suite.yml +7 -0
- vendor/overclokk/minimum-requirements/tests/functional/_bootstrap.php +2 -0
- vendor/overclokk/minimum-requirements/tests/unit.suite.yml +9 -0
- vendor/overclokk/minimum-requirements/tests/unit/_bootstrap.php +2 -0
- vendor/overclokk/minimum-requirements/tests/wpunit.suite.yml +7 -0
- vendor/overclokk/minimum-requirements/tests/wpunit/Minimum_RequirementsTest.php +143 -0
- vendor/overclokk/minimum-requirements/tests/wpunit/_bootstrap.php +2 -0
admin/Sanitize.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for sanitizations
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Italy_Cookie_Choices\Admin;
|
7 |
+
|
8 |
+
class Sanitize{
|
9 |
+
|
10 |
+
public function __construct( $input ){
|
11 |
+
|
12 |
+
$this->sanitize_callback( $input );
|
13 |
+
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Sanitize data
|
18 |
+
* @param array $input Data to sanitize
|
19 |
+
* @return array Data sanitized
|
20 |
+
*/
|
21 |
+
public function sanitize_callback( $input ){
|
22 |
+
|
23 |
+
$new_input = array();
|
24 |
+
|
25 |
+
if( isset( $input['active'] ) )
|
26 |
+
$new_input['active'] = $input['active'];
|
27 |
+
|
28 |
+
if( isset( $input['banner'] ) )
|
29 |
+
$new_input['banner'] = $input['banner'];
|
30 |
+
|
31 |
+
if( isset( $input['scroll'] ) )
|
32 |
+
$new_input['scroll'] = $input['scroll'];
|
33 |
+
|
34 |
+
if( isset( $input['secondView'] ) )
|
35 |
+
$new_input['secondView'] = $input['secondView'];
|
36 |
+
|
37 |
+
if( isset( $input['reload'] ) )
|
38 |
+
$new_input['reload'] = $input['reload'];
|
39 |
+
|
40 |
+
if( isset( $input['text'] ) )
|
41 |
+
$new_input['text'] = sanitize_text_field( $input['text'] );
|
42 |
+
|
43 |
+
if( isset( $input['url'] ) )
|
44 |
+
$new_input['url'] = sanitize_text_field( $input['url'] );
|
45 |
+
|
46 |
+
if( isset( $input['anchor_text'] ) )
|
47 |
+
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
48 |
+
|
49 |
+
if( isset( $input['button_text'] ) )
|
50 |
+
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Sezione per lo stile
|
54 |
+
*/
|
55 |
+
if( isset( $input['html_margin'] ) )
|
56 |
+
$new_input['html_margin'] = $input['html_margin'];
|
57 |
+
|
58 |
+
if( isset( $input['js_template'] ) )
|
59 |
+
$new_input['js_template'] = $input['js_template'];
|
60 |
+
|
61 |
+
if( empty( $input['banner_bg'] ) )
|
62 |
+
$new_input['banner_bg'] = '#fff';
|
63 |
+
elseif ( isset( $input['banner_bg'] ) )
|
64 |
+
$new_input['banner_bg'] = sanitize_text_field( $input['banner_bg'] );
|
65 |
+
|
66 |
+
if( empty( $input['banner_text_color'] ) )
|
67 |
+
$new_input['banner_text_color'] = '#000';
|
68 |
+
elseif ( isset( $input['banner_text_color'] ) )
|
69 |
+
$new_input['banner_text_color'] = sanitize_text_field( $input['banner_text_color'] );
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Sezione per le opzioni avanzate
|
73 |
+
* Esempio per add_settings_error()
|
74 |
+
* @link https://wordpress.org/support/topic/how-to-use-add_settings_error-for-nested-options-array?replies=2
|
75 |
+
* @link http://pastebin.com/K4kJ0DNG
|
76 |
+
*/
|
77 |
+
if( empty( $input['cookie_name'] ) ){
|
78 |
+
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie name field it can\'t be empty. Restored default name.', 'italy-cookie-choices' ), 'error');
|
79 |
+
$new_input['cookie_name'] = $this->cookieName;
|
80 |
+
}
|
81 |
+
else
|
82 |
+
$new_input['cookie_name'] = sanitize_text_field( $input['cookie_name'] );
|
83 |
+
|
84 |
+
if( empty( $input['cookie_value'] ) ){
|
85 |
+
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie value field it can\'t be empty. Restored default value.', 'italy-cookie-choices' ), 'error');
|
86 |
+
$new_input['cookie_value'] = $this->cookieVal;
|
87 |
+
}
|
88 |
+
else
|
89 |
+
$new_input['cookie_value'] = sanitize_text_field( $input['cookie_value'] );
|
90 |
+
|
91 |
+
if( isset( $input['slug'] ) )
|
92 |
+
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
93 |
+
|
94 |
+
if( isset( $input['target'] ) )
|
95 |
+
$new_input['target'] = $input['target'];
|
96 |
+
|
97 |
+
if( isset( $input['block'] ) )
|
98 |
+
$new_input['block'] = $input['block'];
|
99 |
+
|
100 |
+
if( isset( $input['widget_block'] ) )
|
101 |
+
$new_input['widget_block'] = $input['widget_block'];
|
102 |
+
|
103 |
+
if( isset( $input['all_block'] ) )
|
104 |
+
$new_input['all_block'] = $input['all_block'];
|
105 |
+
|
106 |
+
if( isset( $input['custom_script_block_body_exclude'] ) )
|
107 |
+
$new_input['custom_script_block_body_exclude'] = $input['custom_script_block_body_exclude'];
|
108 |
+
|
109 |
+
if( isset( $input['custom_script_block'] ) )
|
110 |
+
$new_input['custom_script_block'] = $input['custom_script_block'];
|
111 |
+
|
112 |
+
if( isset( $input['content_message_text'] ) )
|
113 |
+
$new_input['content_message_text'] = sanitize_text_field( $input['content_message_text'] );
|
114 |
+
|
115 |
+
if( isset( $input['content_message_button_text'] ) )
|
116 |
+
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
117 |
+
|
118 |
+
return $new_input;
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
admin/Settings.php
ADDED
@@ -0,0 +1,1625 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for Italy Cookie Choices Admin
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Italy_Cookie_Choices\Admin;
|
7 |
+
|
8 |
+
class Settings {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Definition of variables containing the configuration
|
12 |
+
* to be applied to the various function calls wordpress
|
13 |
+
*/
|
14 |
+
protected $capability = 'manage_options';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Global variables and default values
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
protected $default_options = array();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Option
|
24 |
+
* @var array
|
25 |
+
*/
|
26 |
+
private $options = array();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Default Cookie name
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $cookieName = 'displayCookieConsent';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Default cookie value
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
private $cookieVal = 'y';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Inizialize banner template to default
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $js_template = 'default';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of all posts and pages object
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
private $post_and_page_array = array();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array with predefinited vendor iframe
|
54 |
+
* @var array
|
55 |
+
*/
|
56 |
+
private $iframe_array = array();
|
57 |
+
/**
|
58 |
+
* Array with predefinited vendor script
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
+
private $script_array = array();
|
62 |
+
/**
|
63 |
+
* Array with predefinited vendor embed
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
private $embed_array = array();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* [__construct description]
|
70 |
+
*/
|
71 |
+
public function __construct(){
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Init vendors array
|
75 |
+
*/
|
76 |
+
$this->create_third_party_array();
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get all posts and pages object and merge for jQuery autocomplete function
|
80 |
+
*/
|
81 |
+
// $this->get_post_and_page_array();
|
82 |
+
$this->post_and_page_array = ( is_array( get_pages('numberposts=-1') ) ) ? get_pages('numberposts=-1') : array();
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Add Admin menù page
|
86 |
+
*/
|
87 |
+
add_action( 'admin_menu', array( $this, 'addMenuPage') );
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Init settings
|
91 |
+
*/
|
92 |
+
add_action( 'admin_init', array( $this, 'italy_cl_settings_init') );
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Load script only if is Italy Cookie Choices admin panel
|
96 |
+
*/
|
97 |
+
if ( isset($_GET['page']) && ($_GET['page'] === 'italy-cookie-choices' ) )
|
98 |
+
add_action('admin_enqueue_scripts', array( $this, 'add_script_and_style' ));
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Add link in plugin activation panel
|
102 |
+
*/
|
103 |
+
add_filter( 'plugin_action_links_' . ITALY_COOKIE_CHOICES_BASENAME, array( $this, 'plugin_action_links' ) );
|
104 |
+
|
105 |
+
//Add the export settings method
|
106 |
+
add_action( 'admin_init', array( $this, 'settings_export' ) );
|
107 |
+
//Add the import settings method
|
108 |
+
add_action( 'admin_init', array( $this, 'settings_import' ) );
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Encode a variable into JSON, with some sanity checks.
|
114 |
+
*
|
115 |
+
* @since 4.1.0
|
116 |
+
*
|
117 |
+
* @param mixed $data Variable (usually an array or object) to encode as JSON.
|
118 |
+
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
|
119 |
+
* @param int $depth Optional. Maximum depth to walk through $data. Must be
|
120 |
+
* greater than 0. Default 512.
|
121 |
+
* @return bool|string The JSON encoded string, or false if it cannot be encoded.
|
122 |
+
*/
|
123 |
+
public function wp_json_encode( $data, $options = 0, $depth = 512 ) {
|
124 |
+
|
125 |
+
/*
|
126 |
+
* json_encode() has had extra params added over the years.
|
127 |
+
* $options was added in 5.3, and $depth in 5.5.
|
128 |
+
* We need to make sure we call it with the correct arguments.
|
129 |
+
*/
|
130 |
+
if ( version_compare( PHP_VERSION, '5.5', '>=' ) )
|
131 |
+
$args = array( $data, $options, $depth );
|
132 |
+
elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) )
|
133 |
+
$args = array( $data, $options );
|
134 |
+
else
|
135 |
+
$args = array( $data );
|
136 |
+
|
137 |
+
$json = call_user_func_array( 'json_encode', $args );
|
138 |
+
|
139 |
+
// If json_encode() was successful, no need to do more sanity checking.
|
140 |
+
// ... unless we're in an old version of PHP, and json_encode() returned
|
141 |
+
// a string containing 'null'. Then we need to do more sanity checking.
|
142 |
+
if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )
|
143 |
+
return $json;
|
144 |
+
|
145 |
+
return call_user_func_array( 'json_encode', $args );
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Add page for italy-cookie-choices admin page
|
150 |
+
*/
|
151 |
+
public function addMenuPage(){
|
152 |
+
|
153 |
+
add_options_page(
|
154 |
+
__('Italy Cookie Choices Dashboard', 'italy-cookie-choices'),
|
155 |
+
'Italy Cookie Choices',
|
156 |
+
$this->capability,
|
157 |
+
'italy-cookie-choices',
|
158 |
+
array( $this, 'dashboard')
|
159 |
+
);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* The dashboard callback
|
164 |
+
*/
|
165 |
+
public function dashboard(){
|
166 |
+
|
167 |
+
if ( !current_user_can( $this->capability ) )
|
168 |
+
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
169 |
+
|
170 |
+
include_once( 'template/admin.php' );
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Initialize plugin
|
176 |
+
* @return [type] [description]
|
177 |
+
*/
|
178 |
+
public function italy_cl_settings_init() {
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Create default options
|
182 |
+
* @var array
|
183 |
+
*/
|
184 |
+
$this->default_options = array(
|
185 |
+
|
186 |
+
'text' => '',
|
187 |
+
'url' => '',
|
188 |
+
'anchor_text' => '',
|
189 |
+
'button_text' => '',
|
190 |
+
'cookie_name' => $this->cookieName,
|
191 |
+
'cookie_value' => $this->cookieVal,
|
192 |
+
'content_message_text' => '',
|
193 |
+
'content_message_button_text' => ''
|
194 |
+
|
195 |
+
);
|
196 |
+
|
197 |
+
/**
|
198 |
+
* All options in array
|
199 |
+
* @var array
|
200 |
+
*/
|
201 |
+
$this->options = get_option( 'italy_cookie_choices' );
|
202 |
+
|
203 |
+
/**
|
204 |
+
* If the theme options don't exist, create them.
|
205 |
+
*/
|
206 |
+
if( false === $this->options )
|
207 |
+
add_option( 'italy_cookie_choices', $this->default_options );
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Section options page
|
211 |
+
*/
|
212 |
+
add_settings_section(
|
213 |
+
'setting_section',
|
214 |
+
__( 'Italy Cookie Choices options page', 'italy-cookie-choices' ),
|
215 |
+
array( $this, 'italy_cl_settings_section_callback'),
|
216 |
+
'italy_cl_options_group'
|
217 |
+
);
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Checkbox for activation
|
221 |
+
*/
|
222 |
+
add_settings_field(
|
223 |
+
'active',
|
224 |
+
__( 'Activate', 'italy-cookie-choices' ),
|
225 |
+
array( $this, 'italy_cl_option_active'),
|
226 |
+
'italy_cl_options_group',
|
227 |
+
'setting_section'
|
228 |
+
);
|
229 |
+
|
230 |
+
/**
|
231 |
+
* How to display banner
|
232 |
+
* Default Bar
|
233 |
+
*/
|
234 |
+
add_settings_field(
|
235 |
+
'banner',
|
236 |
+
__( 'Where display the banner', 'italy-cookie-choices' ),
|
237 |
+
array( $this, 'italy_cl_option_banner'),
|
238 |
+
'italy_cl_options_group',
|
239 |
+
'setting_section'
|
240 |
+
);
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Checkbox for scroll event
|
244 |
+
*/
|
245 |
+
add_settings_field(
|
246 |
+
'scroll',
|
247 |
+
__( 'Mouse scroll event', 'italy-cookie-choices' ),
|
248 |
+
array( $this, 'italy_cl_option_scroll'),
|
249 |
+
'italy_cl_options_group',
|
250 |
+
'setting_section'
|
251 |
+
);
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Checkbox for open in new page
|
255 |
+
*/
|
256 |
+
add_settings_field(
|
257 |
+
'secondView',
|
258 |
+
__( 'Accept on second view', 'italy-cookie-choices' ),
|
259 |
+
array( $this, 'italy_cl_option_secondView'),
|
260 |
+
'italy_cl_options_group',
|
261 |
+
'setting_section'
|
262 |
+
);
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Checkbox for reload page
|
266 |
+
*/
|
267 |
+
add_settings_field(
|
268 |
+
'reload',
|
269 |
+
__( 'Refresh page', 'italy-cookie-choices' ),
|
270 |
+
array( $this, 'italy_cl_option_reload'),
|
271 |
+
'italy_cl_options_group',
|
272 |
+
'setting_section'
|
273 |
+
);
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Input for short policy text
|
277 |
+
*/
|
278 |
+
add_settings_field(
|
279 |
+
'text',
|
280 |
+
__( 'Text to display', 'italy-cookie-choices' ),
|
281 |
+
array( $this, 'italy_cl_option_text'),
|
282 |
+
'italy_cl_options_group',
|
283 |
+
'setting_section'
|
284 |
+
);
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Input for url policy page
|
288 |
+
*/
|
289 |
+
add_settings_field(
|
290 |
+
'url',
|
291 |
+
__( 'URL for cookie policy', 'italy-cookie-choices' ),
|
292 |
+
array( $this, 'italy_cl_option_url'),
|
293 |
+
'italy_cl_options_group',
|
294 |
+
'setting_section'
|
295 |
+
);
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Cookie policy page slug
|
299 |
+
*/
|
300 |
+
add_settings_field(
|
301 |
+
'slug',
|
302 |
+
__( 'Cookie policy page slug', 'italy-cookie-choices' ),
|
303 |
+
array( $this, 'italy_cl_option_slug'),
|
304 |
+
'italy_cl_options_group',
|
305 |
+
'setting_section'
|
306 |
+
);
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Input for anchor text
|
310 |
+
*/
|
311 |
+
add_settings_field(
|
312 |
+
'anchor_text',
|
313 |
+
__( 'Anchor text for URL', 'italy-cookie-choices' ),
|
314 |
+
array( $this, 'italy_cl_option_anchor_text'),
|
315 |
+
'italy_cl_options_group',
|
316 |
+
'setting_section'
|
317 |
+
);
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Input for button text
|
321 |
+
*/
|
322 |
+
add_settings_field(
|
323 |
+
'button_text',
|
324 |
+
__( 'Button text', 'italy-cookie-choices' ),
|
325 |
+
array( $this, 'italy_cl_option_button_text'),
|
326 |
+
'italy_cl_options_group',
|
327 |
+
'setting_section'
|
328 |
+
);
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Settings sections for Style
|
332 |
+
*/
|
333 |
+
add_settings_section(
|
334 |
+
'style_setting_section',
|
335 |
+
__( 'Style settings', 'italy-cookie-choices' ),
|
336 |
+
array( $this, 'italy_cl_style_settings_section_callback'),
|
337 |
+
'italy_cl_options_group'
|
338 |
+
);
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Select box for js_template selection
|
342 |
+
*/
|
343 |
+
add_settings_field(
|
344 |
+
'js_template',
|
345 |
+
__( 'CookieChoices Template', 'italy-cookie-choices' ),
|
346 |
+
array( $this, 'italy_cl_option_js_template'),
|
347 |
+
'italy_cl_options_group',
|
348 |
+
'style_setting_section'
|
349 |
+
);
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Checkbox for activation
|
353 |
+
*/
|
354 |
+
add_settings_field(
|
355 |
+
'html_margin',
|
356 |
+
__( 'HTML top margin', 'italy-cookie-choices' ),
|
357 |
+
array( $this, 'italy_cl_option_html_margin'),
|
358 |
+
'italy_cl_options_group',
|
359 |
+
'style_setting_section'
|
360 |
+
);
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Background color for banner
|
364 |
+
*/
|
365 |
+
add_settings_field(
|
366 |
+
'banner_bg',
|
367 |
+
__( 'Banner Background color', 'italy-cookie-choices' ),
|
368 |
+
array( $this, 'italy_cl_option_banner_bg'),
|
369 |
+
'italy_cl_options_group',
|
370 |
+
'style_setting_section'
|
371 |
+
);
|
372 |
+
|
373 |
+
/**
|
374 |
+
* Color for text in banner
|
375 |
+
*/
|
376 |
+
add_settings_field(
|
377 |
+
'banner_text_color',
|
378 |
+
__( 'Banner text color', 'italy-cookie-choices' ),
|
379 |
+
array( $this, 'italy_cl_option_banner_text_color'),
|
380 |
+
'italy_cl_options_group',
|
381 |
+
'style_setting_section'
|
382 |
+
);
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Text area for custom CSS
|
386 |
+
*/
|
387 |
+
add_settings_field(
|
388 |
+
'customCSS',
|
389 |
+
__( 'Custom CSS', 'italy-cookie-choices' ),
|
390 |
+
array( $this, 'italy_cl_option_customCSS'),
|
391 |
+
'italy_cl_options_group',
|
392 |
+
'style_setting_section'
|
393 |
+
);
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Text area for custom CSS class
|
397 |
+
*/
|
398 |
+
add_settings_field(
|
399 |
+
'customClass',
|
400 |
+
__( 'Custom CSS Class (Optional)', 'italy-cookie-choices' ),
|
401 |
+
array( $this, 'italy_cl_option_customClass'),
|
402 |
+
'italy_cl_options_group',
|
403 |
+
'style_setting_section'
|
404 |
+
);
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Settings sections for Advanced options
|
408 |
+
*/
|
409 |
+
add_settings_section(
|
410 |
+
'advanced_setting_section',
|
411 |
+
__( 'Advanced settings', 'italy-cookie-choices' ),
|
412 |
+
array( $this, 'italy_cl_advanced_settings_section_callback'),
|
413 |
+
'italy_cl_options_group'
|
414 |
+
);
|
415 |
+
|
416 |
+
/**
|
417 |
+
* cookie name
|
418 |
+
*/
|
419 |
+
add_settings_field(
|
420 |
+
'cookie_name',
|
421 |
+
__( 'Cookie name', 'italy-cookie-choices' ),
|
422 |
+
array( $this, 'italy_cl_option_cookie_name'),
|
423 |
+
'italy_cl_options_group',
|
424 |
+
'advanced_setting_section'
|
425 |
+
);
|
426 |
+
|
427 |
+
/**
|
428 |
+
* cookie value
|
429 |
+
*/
|
430 |
+
add_settings_field(
|
431 |
+
'cookie_value',
|
432 |
+
__( 'Cookie value', 'italy-cookie-choices' ),
|
433 |
+
array( $this, 'italy_cl_option_cookie_value'),
|
434 |
+
'italy_cl_options_group',
|
435 |
+
'advanced_setting_section'
|
436 |
+
);
|
437 |
+
|
438 |
+
/**
|
439 |
+
* Checkbox for open in new page
|
440 |
+
*/
|
441 |
+
add_settings_field(
|
442 |
+
'target',
|
443 |
+
__( 'Open policy in new page', 'italy-cookie-choices' ),
|
444 |
+
array( $this, 'italy_cl_option_target'),
|
445 |
+
'italy_cl_options_group',
|
446 |
+
'advanced_setting_section'
|
447 |
+
);
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Checkbox for activation third part cookie eraser
|
451 |
+
*/
|
452 |
+
add_settings_field(
|
453 |
+
'block',
|
454 |
+
__( 'Third part cookie block (beta)', 'italy-cookie-choices' ),
|
455 |
+
array( $this, 'italy_cl_option_block'),
|
456 |
+
'italy_cl_options_group',
|
457 |
+
'advanced_setting_section'
|
458 |
+
);
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Function for custom script allow
|
462 |
+
*/
|
463 |
+
add_settings_field(
|
464 |
+
'custom_script_block_body_exclude',
|
465 |
+
__( 'Scripts allowed in body', 'italy-cookie-choices' ),
|
466 |
+
array( $this, 'italy_cl_option_custom_script_block_body_exclude'),
|
467 |
+
'italy_cl_options_group',
|
468 |
+
'advanced_setting_section'
|
469 |
+
);
|
470 |
+
|
471 |
+
/**
|
472 |
+
* Function for custom script block
|
473 |
+
*/
|
474 |
+
add_settings_field(
|
475 |
+
'custom_script_block',
|
476 |
+
__( 'Scripts to be blocked', 'italy-cookie-choices' ),
|
477 |
+
array( $this, 'italy_cl_option_custom_script_block'),
|
478 |
+
'italy_cl_options_group',
|
479 |
+
'advanced_setting_section'
|
480 |
+
);
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Function for content message text
|
484 |
+
*/
|
485 |
+
add_settings_field(
|
486 |
+
'content_message_text',
|
487 |
+
__( 'Text message for locked embedded content', 'italy-cookie-choices' ),
|
488 |
+
array( $this, 'italy_cl_option_content_message_text'),
|
489 |
+
'italy_cl_options_group',
|
490 |
+
'advanced_setting_section'
|
491 |
+
);
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Function for button text in message
|
495 |
+
*/
|
496 |
+
add_settings_field(
|
497 |
+
'content_message_button_text',
|
498 |
+
__( 'Button text to activate locked embedded content', 'italy-cookie-choices' ),
|
499 |
+
array( $this, 'italy_cl_option_content_message_button_text'),
|
500 |
+
'italy_cl_options_group',
|
501 |
+
'advanced_setting_section'
|
502 |
+
);
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Register setting
|
506 |
+
*/
|
507 |
+
register_setting(
|
508 |
+
'italy_cl_options_group',
|
509 |
+
'italy_cookie_choices',
|
510 |
+
array( $this, 'sanitize_callback')
|
511 |
+
);
|
512 |
+
|
513 |
+
|
514 |
+
}
|
515 |
+
|
516 |
+
|
517 |
+
/**
|
518 |
+
* Display message in plugin control panel
|
519 |
+
* @return string Return message
|
520 |
+
*/
|
521 |
+
public function italy_cl_settings_section_callback() {
|
522 |
+
|
523 |
+
_e( 'Customize your banner for cookie law', 'italy-cookie-choices' );
|
524 |
+
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Snippet for checkbox
|
529 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
530 |
+
*/
|
531 |
+
public function italy_cl_option_active($args) {
|
532 |
+
|
533 |
+
$active = ( isset( $this->options['active'] ) ) ? $this->options['active'] : '' ;
|
534 |
+
?>
|
535 |
+
|
536 |
+
<input type='checkbox' name='italy_cookie_choices[active]' <?php checked( $active, 1 ); ?> value='1' id="italy_cookie_choices[active]">
|
537 |
+
<label for="italy_cookie_choices[active]" id="active">
|
538 |
+
<?php _e( 'Display banner for Cookie Law in front-end', 'italy-cookie-choices' ); ?>
|
539 |
+
</label>
|
540 |
+
|
541 |
+
<?php
|
542 |
+
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Choose how to display banner in page
|
547 |
+
* @return string Display input and labels in plugin options page
|
548 |
+
*/
|
549 |
+
public function italy_cl_option_banner($args) {
|
550 |
+
|
551 |
+
$banner = ( isset( $this->options['banner'] ) ) ? $this->options['banner'] : '1' ;
|
552 |
+
|
553 |
+
?>
|
554 |
+
|
555 |
+
<input name="italy_cookie_choices[banner]" type="radio" value="1" id="radio_1" <?php checked( '1', $banner ); ?> />
|
556 |
+
|
557 |
+
<label for="radio_1" id="label_radio_1">
|
558 |
+
<?php _e( 'Top Bar (Default, Display a top bar with your message)', 'italy-cookie-choices' ); ?>
|
559 |
+
</label>
|
560 |
+
|
561 |
+
<br>
|
562 |
+
|
563 |
+
<input name="italy_cookie_choices[banner]" type="radio" value="2" id="radio_2" <?php checked( '2', $banner ); ?> />
|
564 |
+
|
565 |
+
<label for="radio_2" id="label_radio_2">
|
566 |
+
<?php _e( 'Dialog (Display an overlay with your message)', 'italy-cookie-choices' ); ?>
|
567 |
+
</label>
|
568 |
+
|
569 |
+
<br>
|
570 |
+
|
571 |
+
<input name="italy_cookie_choices[banner]" type="radio" value="3" id="radio_3" <?php checked( '3', $banner ); ?> />
|
572 |
+
|
573 |
+
<label for="radio_3" id="label_radio_3">
|
574 |
+
<?php _e( 'Bottom Bar (Display a bar in the footer with your message)', 'italy-cookie-choices' ); ?>
|
575 |
+
</label>
|
576 |
+
|
577 |
+
|
578 |
+
|
579 |
+
<?php
|
580 |
+
|
581 |
+
}
|
582 |
+
|
583 |
+
/**
|
584 |
+
* Snippet for checkbox
|
585 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
586 |
+
*/
|
587 |
+
public function italy_cl_option_scroll($args) {
|
588 |
+
|
589 |
+
$scroll = ( isset( $this->options['scroll'] ) ) ? $this->options['scroll'] : '' ;
|
590 |
+
?>
|
591 |
+
|
592 |
+
<input type='checkbox' name='italy_cookie_choices[scroll]' <?php checked( $scroll, 1 ); ?> value='1' id="italy_cookie_choices[scroll]">
|
593 |
+
<label for="italy_cookie_choices[scroll]">
|
594 |
+
<?php _e( 'Accepts disclosures on mouse scroll event', 'italy-cookie-choices' ); ?>
|
595 |
+
</label>
|
596 |
+
|
597 |
+
<?php
|
598 |
+
|
599 |
+
}
|
600 |
+
|
601 |
+
/**
|
602 |
+
* Snippet for second view checkbox $secondView
|
603 |
+
* @return strimg Activate for accept on second view
|
604 |
+
* Default do nothing
|
605 |
+
*/
|
606 |
+
public function italy_cl_option_secondView($args) {
|
607 |
+
|
608 |
+
$secondView = ( isset( $this->options['secondView'] ) ) ? $this->options['secondView'] : '' ;
|
609 |
+
|
610 |
+
?>
|
611 |
+
|
612 |
+
<input type='checkbox' name='italy_cookie_choices[secondView]' <?php checked( $secondView, 1 ); ?> value='1' id="italy_cookie_choices[secondView]">
|
613 |
+
<label for="italy_cookie_choices[secondView]">
|
614 |
+
<?php _e( 'Activate accept on second view', 'italy-cookie-choices' ); ?>
|
615 |
+
</label>
|
616 |
+
|
617 |
+
<?php
|
618 |
+
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* Snippet for reload
|
623 |
+
* @return strimg Reload page after click
|
624 |
+
*/
|
625 |
+
public function italy_cl_option_reload($args) {
|
626 |
+
|
627 |
+
$reload = ( isset( $this->options['reload'] ) ) ? $this->options['reload'] : '' ;
|
628 |
+
?>
|
629 |
+
|
630 |
+
<input type='checkbox' name='italy_cookie_choices[reload]' <?php checked( $reload, 1 ); ?> value='1' id="italy_cookie_choices[reload]">
|
631 |
+
<label for="italy_cookie_choices[reload]">
|
632 |
+
<?php _e( 'Refresh page after button click (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
633 |
+
</label>
|
634 |
+
|
635 |
+
<?php
|
636 |
+
|
637 |
+
}
|
638 |
+
|
639 |
+
/**
|
640 |
+
* Textarea for the message to display
|
641 |
+
* @return string
|
642 |
+
*/
|
643 |
+
public function italy_cl_option_text($args) {
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Allow HTML tags in text area
|
647 |
+
* changed esc_textarea( $this->options['text'] ); with wp_kses_post( $this->options['text'] );
|
648 |
+
* @todo Add padding to text editor
|
649 |
+
* @todo Add word counter for UX for the displayed banner on mobile
|
650 |
+
*/
|
651 |
+
|
652 |
+
if ( function_exists("wp_editor") ):
|
653 |
+
wp_editor(
|
654 |
+
wp_kses_post( $this->options['text'] ),
|
655 |
+
'italy_cookie_choices_text',
|
656 |
+
array(
|
657 |
+
'textarea_name' => 'italy_cookie_choices[text]',
|
658 |
+
'media_buttons' => false,
|
659 |
+
'textarea_rows' => 5,
|
660 |
+
'editor_css' => '<style>#wp-italy_cookie_choices_text-wrap{max-width:520px}</style>',
|
661 |
+
'teeny' => true
|
662 |
+
)
|
663 |
+
);
|
664 |
+
else:
|
665 |
+
?>
|
666 |
+
<textarea rows="5" cols="70" name="italy_cookie_choices[text]" id="italy_cookie_choices[text]" placeholder="<?php _e( 'Your short cookie policy', 'italy-cookie-choices' ) ?>" ><?php echo wp_kses_post( $this->options['text'] ); ?></textarea>
|
667 |
+
|
668 |
+
<?php endif; ?>
|
669 |
+
|
670 |
+
<br>
|
671 |
+
|
672 |
+
<label for="italy_cookie_choices[text]">
|
673 |
+
<?php echo __( 'People will see this notice only the first time that they enter your site', 'italy-cookie-choices' ); ?>
|
674 |
+
</label>
|
675 |
+
|
676 |
+
<?php
|
677 |
+
|
678 |
+
}
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Input for url policy page
|
682 |
+
* @return string
|
683 |
+
*/
|
684 |
+
public function italy_cl_option_url($args) {
|
685 |
+
|
686 |
+
/**
|
687 |
+
* Get the $post_ID for autocomplete function and put it in javascript var
|
688 |
+
* @var array
|
689 |
+
*/
|
690 |
+
$urls = array();
|
691 |
+
foreach( $this->post_and_page_array as $post )
|
692 |
+
$urls[] = get_permalink( $post->ID );
|
693 |
+
|
694 |
+
?>
|
695 |
+
<script>
|
696 |
+
var urls = '<?php echo $this->wp_json_encode( $urls ); ?>';
|
697 |
+
</script>
|
698 |
+
<input type="text" id="italy_cookie_choices[url]" name="italy_cookie_choices[url]" value="<?php echo esc_url( $this->options['url'] ); ?>" placeholder="<?php _e( 'e.g. http://www.aboutcookies.org/', 'italy-cookie-choices' ) ?>" size="70" />
|
699 |
+
<br>
|
700 |
+
<label for="italy_cookie_choices[url]">
|
701 |
+
<?php echo __( 'Insert here the link to your policy page', 'italy-cookie-choices' ); ?> <a href="post-new.php?post_type=page"><?php _e( 'otherwise create a new one and then add URL to this input', 'italy-cookie-choices' ); ?></a>
|
702 |
+
<br>
|
703 |
+
<?php echo __( 'Start typing first two letters of the name of the policy page and then select it from the menu below the input', 'italy-cookie-choices' ); ?>
|
704 |
+
</label>
|
705 |
+
|
706 |
+
<?php
|
707 |
+
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Slug for cookie policy page
|
712 |
+
* @return strimg Slug for cookie policy page Default null
|
713 |
+
*/
|
714 |
+
public function italy_cl_option_slug($args) {
|
715 |
+
|
716 |
+
$slug = ( isset( $this->options['slug'] ) ) ? $this->options['slug'] : '' ;
|
717 |
+
|
718 |
+
/**
|
719 |
+
* Get the $post_name for autocomplete function and put it in javascript var
|
720 |
+
* @var array
|
721 |
+
*/
|
722 |
+
$slugs = array();
|
723 |
+
foreach( $this->post_and_page_array as $post )
|
724 |
+
$slugs[] = $post->post_name;
|
725 |
+
|
726 |
+
?>
|
727 |
+
<script>
|
728 |
+
var slugs = '<?php echo $this->wp_json_encode( $slugs ); ?>';
|
729 |
+
</script>
|
730 |
+
<input type="text" id="italy_cookie_choices[slug]" name="italy_cookie_choices[slug]" value="<?php echo esc_attr( $slug ); ?>" placeholder="<?php _e( 'e.g. privacy-e-cookie', 'italy-cookie-choices' ); ?>" size="70" class="slug_autocomplete"/>
|
731 |
+
<br>
|
732 |
+
<label for="italy_cookie_choices[slug]">
|
733 |
+
<?php _e( 'Insert your cookie policy page slug (e.g. for the page http://www.miodominio.it/privacy-e-cookie/ the slug is <strong>privacy-e-cookie</strong>).<br>In this way it will display only the topbar in your cookie policy page, the scroll and the second view will be deactivated in that page too.', 'italy-cookie-choices' ); ?>
|
734 |
+
<br>
|
735 |
+
<?php echo __( 'Start typing first two letters of the name of the policy page and then select it from the menu below the input', 'italy-cookie-choices' ); ?>
|
736 |
+
</label>
|
737 |
+
|
738 |
+
<?php
|
739 |
+
|
740 |
+
}
|
741 |
+
|
742 |
+
/**
|
743 |
+
* Input for anchor_text
|
744 |
+
* @return string
|
745 |
+
*/
|
746 |
+
public function italy_cl_option_anchor_text($args) {
|
747 |
+
|
748 |
+
?>
|
749 |
+
<input type="text" id="italy_cookie_choices[anchor_text]" name="italy_cookie_choices[anchor_text]" value="<?php echo esc_attr( $this->options['anchor_text'] ); ?>" placeholder="<?php _e( 'e.g. More Info', 'italy-cookie-choices' ) ?>" />
|
750 |
+
|
751 |
+
<label for="italy_cookie_choices[anchor_text]">
|
752 |
+
<?php echo __( 'Insert here anchor text for the link', 'italy-cookie-choices'); ?>
|
753 |
+
</label>
|
754 |
+
|
755 |
+
<?php
|
756 |
+
|
757 |
+
}
|
758 |
+
|
759 |
+
/**
|
760 |
+
* Input for anchor_text
|
761 |
+
* @return string
|
762 |
+
*/
|
763 |
+
public function italy_cl_option_button_text($args) {
|
764 |
+
|
765 |
+
?>
|
766 |
+
<input type="text" id="italy_cookie_choices[button_text]" name="italy_cookie_choices[button_text]" value="<?php echo esc_attr( $this->options['button_text'] ); ?>" placeholder="<?php _e( 'e.g. Close', 'italy-cookie-choices' ) ?>" />
|
767 |
+
|
768 |
+
<label for="italy_cookie_choices[button_text]">
|
769 |
+
<?php echo __( 'Insert here name of button (e.g. "Close") ', 'italy-cookie-choices' ); ?>
|
770 |
+
</label>
|
771 |
+
|
772 |
+
<?php
|
773 |
+
|
774 |
+
}
|
775 |
+
|
776 |
+
/**
|
777 |
+
* NUOVA SETTINGS SECTIONS PER LO STILE
|
778 |
+
*/
|
779 |
+
|
780 |
+
/**
|
781 |
+
* Display message in stile plugin panel
|
782 |
+
* @return string
|
783 |
+
*/
|
784 |
+
public function italy_cl_style_settings_section_callback() {
|
785 |
+
|
786 |
+
_e( 'Customize your style settings', 'italy-cookie-choices' );
|
787 |
+
|
788 |
+
}
|
789 |
+
|
790 |
+
/**
|
791 |
+
* Snippet for checkbox
|
792 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
793 |
+
*/
|
794 |
+
public function italy_cl_option_html_margin($args) {
|
795 |
+
|
796 |
+
$html_margin = ( isset( $this->options['html_margin'] ) ) ? $this->options['html_margin'] : '' ;
|
797 |
+
|
798 |
+
?>
|
799 |
+
|
800 |
+
<input type='checkbox' name='italy_cookie_choices[html_margin]' <?php checked( $html_margin, 1 ); ?> value='1' id="italy_cookie_choices[html_margin]">
|
801 |
+
<label for="italy_cookie_choices[html_margin]">
|
802 |
+
<?php _e( 'Add a page top margin for info top bar, only for default topbar stile', 'italy-cookie-choices' ); ?>
|
803 |
+
</label>
|
804 |
+
|
805 |
+
<?php
|
806 |
+
|
807 |
+
}
|
808 |
+
|
809 |
+
/**
|
810 |
+
* Snippet for select
|
811 |
+
* @return strimg Chose the JS_Template to use.
|
812 |
+
*/
|
813 |
+
public function italy_cl_option_js_template($args) {
|
814 |
+
|
815 |
+
$js_template = ( isset( $this->options['js_template'] ) ) ? $this->options['js_template'] : $this->js_template ;
|
816 |
+
|
817 |
+
?>
|
818 |
+
<select name='italy_cookie_choices[js_template]' id="italy_cookie_choices[js_template]">
|
819 |
+
|
820 |
+
<option value="default" <?php if ( $js_template === 'default' ) echo 'selected';?>><?php _e( 'Default cookiechoices template (centered with text links)', 'italy-cookie-choices' ); ?></option>
|
821 |
+
|
822 |
+
<option value="bigbutton" <?php if ( $js_template === 'bigbutton' ) echo 'selected';?>><?php _e( 'Centered container with left aligned text and big buttons', 'italy-cookie-choices' ); ?></option>
|
823 |
+
|
824 |
+
<option value="smallbutton" <?php if ( $js_template === 'smallbutton' ) echo 'selected';?>><?php _e( 'Centered container with left aligned text and small buttons', 'italy-cookie-choices' ); ?></option>
|
825 |
+
|
826 |
+
<option value="custom" <?php if ( $js_template === 'custom' ) echo 'selected';?>><?php _e( 'My custom CSS', 'italy-cookie-choices' ); ?></option>
|
827 |
+
|
828 |
+
</select>
|
829 |
+
<label for="italy_cookie_choices[js_template]">
|
830 |
+
<?php _e( 'Select the template to use', 'italy-cookie-choices' ); ?>
|
831 |
+
</label>
|
832 |
+
|
833 |
+
<?php
|
834 |
+
|
835 |
+
}
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Snippet for checkbox
|
839 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
840 |
+
*/
|
841 |
+
public function italy_cl_option_banner_bg($args) {
|
842 |
+
|
843 |
+
$banner_bg = ( isset( $this->options['banner_bg'] ) ) ? $this->options['banner_bg'] : '#fff' ;
|
844 |
+
|
845 |
+
?>
|
846 |
+
|
847 |
+
<input type="text" id="italy_cookie_choices[banner_bg]" name="italy_cookie_choices[banner_bg]" value="<?php echo esc_attr( $banner_bg ); ?>" placeholder="<?php echo esc_attr( $banner_bg ); ?>" class="color-field" data-default-color="#fff"/>
|
848 |
+
|
849 |
+
|
850 |
+
<label for="italy_cookie_choices[banner_bg]">
|
851 |
+
<?php _e( 'Custom Background color for banner', 'italy-cookie-choices' ); ?>
|
852 |
+
</label>
|
853 |
+
|
854 |
+
<?php
|
855 |
+
|
856 |
+
}
|
857 |
+
|
858 |
+
/**
|
859 |
+
* Snippet for banner text color
|
860 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
861 |
+
*/
|
862 |
+
public function italy_cl_option_banner_text_color($args) {
|
863 |
+
|
864 |
+
$banner_text_color = ( isset( $this->options['banner_text_color'] ) ) ? $this->options['banner_text_color'] : '#000' ;
|
865 |
+
|
866 |
+
?>
|
867 |
+
|
868 |
+
<input type="text" id="italy_cookie_choices[banner_text_color]" name="italy_cookie_choices[banner_text_color]" value="<?php echo esc_attr( $banner_text_color ); ?>" placeholder="<?php echo esc_attr( $banner_text_color ); ?>" class="color-field" data-default-color="#000"/>
|
869 |
+
|
870 |
+
<label for="italy_cookie_choices[banner_text_color]">
|
871 |
+
<?php _e( 'Custom text color for banner', 'italy-cookie-choices' ); ?>
|
872 |
+
</label>
|
873 |
+
|
874 |
+
<?php
|
875 |
+
|
876 |
+
}
|
877 |
+
|
878 |
+
/**
|
879 |
+
* Textarea for custom CSS
|
880 |
+
* @return string
|
881 |
+
*/
|
882 |
+
public function italy_cl_option_customCSS($args) {
|
883 |
+
|
884 |
+
$customCSS = ( isset( $this->options['customCSS'] ) ) ? $this->options['customCSS'] : '' ;
|
885 |
+
|
886 |
+
?>
|
887 |
+
|
888 |
+
<textarea rows="5" cols="70" name="italy_cookie_choices[customCSS]" id="italy_cookie_choices[customCSS]" placeholder="<?php _e( 'Your custom css', 'italy-cookie-choices' ) ?>" ><?php echo esc_textarea( $customCSS ); ?></textarea>
|
889 |
+
<br>
|
890 |
+
<label for="italy_cookie_choices[customCSS]">
|
891 |
+
<?php echo __( 'Inset here your custom CSS for banner', 'italy-cookie-choices' ); ?>
|
892 |
+
</label>
|
893 |
+
|
894 |
+
<?php
|
895 |
+
|
896 |
+
}
|
897 |
+
|
898 |
+
/**
|
899 |
+
* Input for custom CSS class
|
900 |
+
* @return string
|
901 |
+
*/
|
902 |
+
public function italy_cl_option_customClass($args) {
|
903 |
+
|
904 |
+
$bannerStyle = ( isset( $this->options['bannerStyle'] ) ) ? esc_attr( $this->options['bannerStyle'] ) : 'bannerStyle' ;
|
905 |
+
|
906 |
+
$contentStyle = ( isset( $this->options['contentStyle'] ) ) ? esc_attr( $this->options['contentStyle'] ) : 'contentStyle' ;
|
907 |
+
|
908 |
+
$consentText = ( isset( $this->options['consentText'] ) ) ? esc_attr( $this->options['consentText'] ) : 'consentText' ;
|
909 |
+
|
910 |
+
$infoClass = ( isset( $this->options['infoClass'] ) ) ? esc_attr( $this->options['infoClass'] ) : 'italybtn' ;
|
911 |
+
|
912 |
+
$closeClass = ( isset( $this->options['closeClass'] ) ) ? esc_attr( $this->options['closeClass'] ) : 'italybtn' ;
|
913 |
+
|
914 |
+
?>
|
915 |
+
|
916 |
+
<input type="text" id="italy_cookie_choices[bannerStyle]" name="italy_cookie_choices[bannerStyle]" value="<?php echo esc_attr( $bannerStyle ); ?>" placeholder="<?php _e( 'Eg: bannerStyle', 'italy-cookie-choices' ); ?>" />
|
917 |
+
<label for="italy_cookie_choices[bannerStyle]">
|
918 |
+
<?php echo __( 'CSS class for div container (Default <code>bannerStyle</code>)', 'italy-cookie-choices' ); ?>
|
919 |
+
</label>
|
920 |
+
<br>
|
921 |
+
<input type="text" id="italy_cookie_choices[contentStyle]" name="italy_cookie_choices[contentStyle]" value="<?php echo esc_attr( $contentStyle ); ?>" placeholder="<?php _e( 'Eg: contentStyle', 'italy-cookie-choices' ); ?>" />
|
922 |
+
<label for="italy_cookie_choices[contentStyle]">
|
923 |
+
<?php echo __( 'CSS class for div content (Default <code>contentStyle</code>)', 'italy-cookie-choices' ); ?>
|
924 |
+
</label>
|
925 |
+
<br>
|
926 |
+
<input type="text" id="italy_cookie_choices[consentText]" name="italy_cookie_choices[consentText]" value="<?php echo esc_attr( $consentText ); ?>" placeholder="<?php _e( 'Eg: consentText', 'italy-cookie-choices' );; ?>" />
|
927 |
+
<label for="italy_cookie_choices[consentText]">
|
928 |
+
<?php echo __( 'CSS class for span content (Default <code>consentText</code>)', 'italy-cookie-choices' ); ?>
|
929 |
+
</label>
|
930 |
+
<br>
|
931 |
+
<input type="text" id="italy_cookie_choices[infoClass]" name="italy_cookie_choices[infoClass]" value="<?php echo esc_attr( $infoClass ); ?>" placeholder="<?php _e( 'Eg: infoClass', 'italy-cookie-choices' ); ?>" />
|
932 |
+
<label for="italy_cookie_choices[infoClass]">
|
933 |
+
<?php echo __( 'CSS class for Info link (Default <code>itaybtn</code>)', 'italy-cookie-choices' ); ?>
|
934 |
+
</label>
|
935 |
+
<br>
|
936 |
+
<input type="text" id="italy_cookie_choices[closeClass]" name="italy_cookie_choices[closeClass]" value="<?php echo esc_attr( $closeClass ); ?>" placeholder="<?php _e( 'Eg: closeClass', 'italy-cookie-choices' ); ?>" />
|
937 |
+
<label for="italy_cookie_choices[closeClass]">
|
938 |
+
<?php echo __( 'CSS class for close link (Default <code>itaybtn</code>)', 'italy-cookie-choices' ); ?>
|
939 |
+
</label>
|
940 |
+
|
941 |
+
<p><?php _e( 'Customize with your personal CSS class', 'italy-cookie-choices' ); ?></p>
|
942 |
+
|
943 |
+
<?php
|
944 |
+
|
945 |
+
}
|
946 |
+
|
947 |
+
/**
|
948 |
+
* NUOVA SETTINGS SECTIONS PER LE OPZIONI AVANZATE
|
949 |
+
*/
|
950 |
+
|
951 |
+
/**
|
952 |
+
* Display message in plugin advanced setting section
|
953 |
+
* @return string
|
954 |
+
*/
|
955 |
+
public function italy_cl_advanced_settings_section_callback() {
|
956 |
+
|
957 |
+
_e( 'Customize your advanced settings', 'italy-cookie-choices' );
|
958 |
+
|
959 |
+
}
|
960 |
+
|
961 |
+
/**
|
962 |
+
* Snippet for cookie name
|
963 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
964 |
+
*/
|
965 |
+
public function italy_cl_option_cookie_name($args) {
|
966 |
+
|
967 |
+
$cookie_name = ( isset( $this->options['cookie_name'] ) ) ? $this->options['cookie_name'] : $this->cookieName ;
|
968 |
+
|
969 |
+
?>
|
970 |
+
<input type="text" id="italy_cookie_choices[cookie_name]" name="italy_cookie_choices[cookie_name]" value="<?php echo esc_attr( $cookie_name ); ?>" placeholder="<?php echo esc_attr( $this->cookieName ); ?>" />
|
971 |
+
|
972 |
+
<label for="italy_cookie_choices[cookie_name]">
|
973 |
+
<?php _e( 'Insert your cookie name (Default: displayCookieConsent)', 'italy-cookie-choices' ); ?>
|
974 |
+
</label>
|
975 |
+
|
976 |
+
<?php
|
977 |
+
|
978 |
+
}
|
979 |
+
|
980 |
+
/**
|
981 |
+
* Snippet for cookie value
|
982 |
+
* @return strimg Activate banner in front-end Default doesn't display
|
983 |
+
*/
|
984 |
+
public function italy_cl_option_cookie_value($args) {
|
985 |
+
|
986 |
+
$cookie_value = ( isset( $this->options['cookie_value'] ) ) ? $this->options['cookie_value'] : $this->cookieVal ;
|
987 |
+
|
988 |
+
?>
|
989 |
+
<input type="text" id="italy_cookie_choices[cookie_value]" name="italy_cookie_choices[cookie_value]" value="<?php echo esc_attr( $cookie_value ); ?>" placeholder="<?php echo esc_attr( $this->cookieVal ); ?>" />
|
990 |
+
|
991 |
+
<label for="italy_cookie_choices[cookie_value]">
|
992 |
+
<?php _e( 'Insert your cookie value (Default: y)', 'italy-cookie-choices' ); ?>
|
993 |
+
</label>
|
994 |
+
|
995 |
+
<?php
|
996 |
+
|
997 |
+
}
|
998 |
+
|
999 |
+
/**
|
1000 |
+
* Snippet for target checkbox
|
1001 |
+
* @return strimg Activate for open policy page in new tab
|
1002 |
+
* Default open in same tab
|
1003 |
+
*/
|
1004 |
+
public function italy_cl_option_target($args) {
|
1005 |
+
|
1006 |
+
$target = ( isset( $this->options['target'] ) ) ? $this->options['target'] : '' ;
|
1007 |
+
|
1008 |
+
?>
|
1009 |
+
|
1010 |
+
<input type='checkbox' name='italy_cookie_choices[target]' <?php checked( $target, 1 ); ?> value='1' id="italy_cookie_choices[target]">
|
1011 |
+
<label for="italy_cookie_choices[target]">
|
1012 |
+
<?php _e( 'Open your cookie policy page in new one', 'italy-cookie-choices' ); ?>
|
1013 |
+
</label>
|
1014 |
+
|
1015 |
+
<?php
|
1016 |
+
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
/**
|
1020 |
+
* Snippet for target checkbox
|
1021 |
+
* @return strimg Activate for open policy page in new tab
|
1022 |
+
* Default open in same tab
|
1023 |
+
*/
|
1024 |
+
public function italy_cl_option_block($args) {
|
1025 |
+
|
1026 |
+
$all_block = ( isset( $this->options['all_block'] ) ) ? $this->options['all_block'] : '' ;
|
1027 |
+
|
1028 |
+
$block = ( isset( $this->options['block'] ) && $all_block === '' ) ? $this->options['block'] : '' ;
|
1029 |
+
|
1030 |
+
$widget_block = ( isset( $this->options['widget_block'] ) && $all_block === '' ) ? $this->options['widget_block'] : '' ;
|
1031 |
+
|
1032 |
+
?>
|
1033 |
+
|
1034 |
+
<input type='checkbox' name='italy_cookie_choices[block]' <?php checked( $block, 1 ); ?> value='1' id="italy_cookie_choices[block]">
|
1035 |
+
<label for="italy_cookie_choices[block]">
|
1036 |
+
<?php _e( 'Cookie from any embed in your content (Beta) (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
1037 |
+
</label>
|
1038 |
+
<br>
|
1039 |
+
<input type='checkbox' name='italy_cookie_choices[widget_block]' <?php checked( $widget_block, 1 ); ?> value='1' id="italy_cookie_choices[widget_block]">
|
1040 |
+
<label for="italy_cookie_choices[widget_block]">
|
1041 |
+
<?php _e( 'Cookie from any embed in your widget area (Beta) (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
1042 |
+
</label>
|
1043 |
+
<br>
|
1044 |
+
<br>
|
1045 |
+
<input type='checkbox' name='italy_cookie_choices[all_block]' <?php checked( $all_block, 1 ); ?> value='1' id="italy_cookie_choices[all_block]">
|
1046 |
+
<label for="italy_cookie_choices[all_block]">
|
1047 |
+
<?php _e( 'Cookie from any embed in all body, except head and footer (Beta)', 'italy-cookie-choices' ); ?>
|
1048 |
+
</label>
|
1049 |
+
|
1050 |
+
<?php
|
1051 |
+
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
/**
|
1055 |
+
* Textarea for custom_script_block_body_exclude
|
1056 |
+
* Scripts allowed in body
|
1057 |
+
* @return string
|
1058 |
+
*/
|
1059 |
+
public function italy_cl_option_custom_script_block_body_exclude($args) {
|
1060 |
+
|
1061 |
+
/**
|
1062 |
+
* Template with list of code example
|
1063 |
+
*/
|
1064 |
+
require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/template/allow-script.php');
|
1065 |
+
|
1066 |
+
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
1067 |
+
|
1068 |
+
?>
|
1069 |
+
<!-- <div id="editor"><?php // echo esc_textarea( $custom_script_block_body_exclude ); ?></div> -->
|
1070 |
+
|
1071 |
+
<!-- <input type='checkbox' name='italy_cookie_choices[ppp]' <?php // checked( $block, 1 ); ?> value='1' id="italy_cookie_choices[ppp]"> -->
|
1072 |
+
<!-- <br> -->
|
1073 |
+
<textarea rows="5" cols="70" name="italy_cookie_choices[custom_script_block_body_exclude]" id="italy_cookie_choices[custom_script_block_body_exclude]" placeholder="<?php _e( '<script src="http://domain.com/widget-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://otherdomain.com/script-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://lastdomain.com/gadget-example.js"></script>', 'italy-cookie-choices' ) ?>" class="textarea"><?php echo esc_textarea( $custom_script_block_body_exclude ); ?></textarea>
|
1074 |
+
<br>
|
1075 |
+
<a id="SEP" class="button button-secondary add-sep" data-value="<---------SEP--------->"><---------SEP---------></a>
|
1076 |
+
<a id="SOM" class="button button-secondary add-sep" data-value="<---------SOMETHING--------->"><---------SOMETHING---------></a>
|
1077 |
+
|
1078 |
+
<!-- <a href="#TB_inline?width=600&height=550&inlineId=code-example" class="thickbox button button-secondary"><?php // _e( 'View example', 'italy-cookie-choices' ); ?></a> -->
|
1079 |
+
|
1080 |
+
<br>
|
1081 |
+
<label for="italy_cookie_choices[custom_script_block_body_exclude]">
|
1082 |
+
<?php echo __( 'Scripts to be excluded from the automatic block.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex', 'italy-cookie-choices' ); ?>
|
1083 |
+
</label>
|
1084 |
+
<p>
|
1085 |
+
<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki/Custom-script" target="_blank"><?php _e( 'For more information see the documentation', 'italy-cookie-choices' ); ?></a>
|
1086 |
+
</p>
|
1087 |
+
|
1088 |
+
<?php
|
1089 |
+
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
/**
|
1093 |
+
* Textarea for content_message_text
|
1094 |
+
* @return string
|
1095 |
+
*/
|
1096 |
+
public function italy_cl_option_custom_script_block($args) {
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* Template with block script
|
1100 |
+
*/
|
1101 |
+
require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/template/block-script.php');
|
1102 |
+
|
1103 |
+
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
1104 |
+
|
1105 |
+
?>
|
1106 |
+
<textarea rows="5" cols="70" name="italy_cookie_choices[custom_script_block]" id="italy_cookie_choices[custom_script_block]" placeholder="<?php _e( '<script src="http://domain.com/widget-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://otherdomain.com/script-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://lastdomain.com/gadget-example.js"></script>', 'italy-cookie-choices' ) ?>" ><?php echo esc_textarea( $custom_script_block ); ?></textarea>
|
1107 |
+
<br>
|
1108 |
+
<a id="SEP" class="button button-secondary add-sep" data-value="<---------SEP--------->"><---------SEP---------></a>
|
1109 |
+
<a id="SOM" class="button button-secondary add-sep" data-value="<---------SOMETHING--------->"><---------SOMETHING---------></a>
|
1110 |
+
<br>
|
1111 |
+
<label for="italy_cookie_choices[custom_script_block]">
|
1112 |
+
<?php echo __( 'Scripts shown in the head and in the footer does not automatically blocked.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex', 'italy-cookie-choices' ); ?>
|
1113 |
+
</label>
|
1114 |
+
<p>
|
1115 |
+
<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki/Custom-script" target="_blank"><?php _e( 'For more information see the documentation', 'italy-cookie-choices' ); ?></a>
|
1116 |
+
</p>
|
1117 |
+
|
1118 |
+
<?php
|
1119 |
+
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
/**
|
1123 |
+
* Function for custom script block
|
1124 |
+
* @return string
|
1125 |
+
*/
|
1126 |
+
public function italy_cl_option_content_message_text($args) {
|
1127 |
+
|
1128 |
+
$content_message_text = ( isset( $this->options['content_message_text'] ) ) ? $this->options['content_message_text'] : '' ;
|
1129 |
+
|
1130 |
+
/**
|
1131 |
+
* Allow HTML tags in message text area
|
1132 |
+
* changed esc_textarea( $this->options['text'] ); with wp_kses_post( $this->options['text'] );
|
1133 |
+
* @todo Add padding to text editor
|
1134 |
+
*/
|
1135 |
+
|
1136 |
+
if ( function_exists("wp_editor") ):
|
1137 |
+
wp_editor(
|
1138 |
+
wp_kses_post( $content_message_text ),
|
1139 |
+
'italy_cookie_choices_content_message_text',
|
1140 |
+
array(
|
1141 |
+
'textarea_name' => 'italy_cookie_choices[content_message_text]',
|
1142 |
+
'media_buttons' => false,
|
1143 |
+
'textarea_rows' => 5,
|
1144 |
+
'editor_css' => '<style>#wp-italy_cookie_choices_content_message_text-wrap{max-width:520px}</style>',
|
1145 |
+
'teeny' => true
|
1146 |
+
)
|
1147 |
+
);
|
1148 |
+
else:
|
1149 |
+
?>
|
1150 |
+
<textarea rows="5" cols="70" name="italy_cookie_choices[content_message_text]" id="italy_cookie_choices[content_message_text]" placeholder="<?php _e( 'Your lock message for embedded contents inside posts, pages and widgets', 'italy-cookie-choices' ) ?>" ><?php echo wp_kses_post( $content_message_text ); ?></textarea>
|
1151 |
+
<?php endif; ?>
|
1152 |
+
<br>
|
1153 |
+
<label for="italy_cookie_choices[content_message_text]">
|
1154 |
+
<?php echo __( 'People will see this notice only the first time that they enter your site', 'italy-cookie-choices' ); ?>
|
1155 |
+
</label>
|
1156 |
+
|
1157 |
+
<?php
|
1158 |
+
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
/**
|
1162 |
+
* Input for content_message_button_text
|
1163 |
+
* @return string
|
1164 |
+
*/
|
1165 |
+
public function italy_cl_option_content_message_button_text($args) {
|
1166 |
+
|
1167 |
+
$content_message_button_text = ( isset( $this->options['content_message_button_text'] ) ) ? $this->options['content_message_button_text'] : '' ;
|
1168 |
+
|
1169 |
+
?>
|
1170 |
+
<input type="text" id="italy_cookie_choices[content_message_button_text]" name="italy_cookie_choices[content_message_button_text]" value="<?php echo esc_attr( $content_message_button_text ); ?>" placeholder="<?php _e( 'e.g. Close', 'italy-cookie-choices' ) ?>" />
|
1171 |
+
|
1172 |
+
<label for="italy_cookie_choices[content_message_button_text]">
|
1173 |
+
<?php echo __( 'Insert here name of button (e.g. "Close") ', 'italy-cookie-choices' ); ?>
|
1174 |
+
</label>
|
1175 |
+
|
1176 |
+
<?php
|
1177 |
+
|
1178 |
+
}
|
1179 |
+
|
1180 |
+
/**
|
1181 |
+
* Sanitize data
|
1182 |
+
* @param array $input Data to sanitize
|
1183 |
+
* @return array Data sanitized
|
1184 |
+
*/
|
1185 |
+
public function sanitize_callback( $input ){
|
1186 |
+
|
1187 |
+
$new_input = array();
|
1188 |
+
|
1189 |
+
if( isset( $input['active'] ) )
|
1190 |
+
$new_input['active'] = $input['active'];
|
1191 |
+
|
1192 |
+
if( isset( $input['banner'] ) )
|
1193 |
+
$new_input['banner'] = $input['banner'];
|
1194 |
+
|
1195 |
+
if( isset( $input['scroll'] ) )
|
1196 |
+
$new_input['scroll'] = $input['scroll'];
|
1197 |
+
|
1198 |
+
if( isset( $input['secondView'] ) )
|
1199 |
+
$new_input['secondView'] = $input['secondView'];
|
1200 |
+
|
1201 |
+
if( isset( $input['reload'] ) )
|
1202 |
+
$new_input['reload'] = $input['reload'];
|
1203 |
+
|
1204 |
+
/**
|
1205 |
+
* Multilingual for text, url, anchor_text & button_text
|
1206 |
+
*/
|
1207 |
+
if( isset( $input['text'] ) ){
|
1208 |
+
|
1209 |
+
$new_input['text'] = wp_kses_post( $input['text'] );
|
1210 |
+
// $new_input['text'] = sanitize_text_field( $input['text'] );
|
1211 |
+
register_string( 'Italy Cookie Choices', 'Banner text', $new_input['text'] );
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
if( isset( $input['url'] ) ){
|
1215 |
+
|
1216 |
+
$new_input['url'] = sanitize_text_field( $input['url'] );
|
1217 |
+
|
1218 |
+
register_string( 'Italy Cookie Choices', 'Banner url', $new_input['url'] );
|
1219 |
+
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
if( isset( $input['slug'] ) ){
|
1223 |
+
|
1224 |
+
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
1225 |
+
|
1226 |
+
register_string( 'Italy Cookie Choices', 'Banner slug', $new_input['slug'] );
|
1227 |
+
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
if( isset( $input['anchor_text'] ) ){
|
1231 |
+
|
1232 |
+
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
1233 |
+
|
1234 |
+
register_string( 'Italy Cookie Choices', 'Banner anchor text', $new_input['anchor_text'] );
|
1235 |
+
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
if( isset( $input['button_text'] ) ){
|
1239 |
+
|
1240 |
+
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
1241 |
+
|
1242 |
+
register_string( 'Italy Cookie Choices', 'Banner button text', $new_input['button_text'] );
|
1243 |
+
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
/**
|
1247 |
+
* Sezione per lo stile
|
1248 |
+
*/
|
1249 |
+
if( isset( $input['html_margin'] ) )
|
1250 |
+
$new_input['html_margin'] = $input['html_margin'];
|
1251 |
+
|
1252 |
+
if( isset( $input['js_template'] ) )
|
1253 |
+
$new_input['js_template'] = $input['js_template'];
|
1254 |
+
|
1255 |
+
if( empty( $input['banner_bg'] ) )
|
1256 |
+
$new_input['banner_bg'] = '#fff';
|
1257 |
+
elseif ( isset( $input['banner_bg'] ) )
|
1258 |
+
$new_input['banner_bg'] = sanitize_text_field( $input['banner_bg'] );
|
1259 |
+
|
1260 |
+
if( empty( $input['banner_text_color'] ) )
|
1261 |
+
$new_input['banner_text_color'] = '#000';
|
1262 |
+
elseif ( isset( $input['banner_text_color'] ) )
|
1263 |
+
$new_input['banner_text_color'] = sanitize_text_field( $input['banner_text_color'] );
|
1264 |
+
|
1265 |
+
if( isset( $input['customCSS'] ) )
|
1266 |
+
$new_input['customCSS'] = sanitize_text_field( $input['customCSS'] );
|
1267 |
+
|
1268 |
+
if( empty( $input['bannerStyle'] ) )
|
1269 |
+
$new_input['bannerStyle'] = 'bannerStyle';
|
1270 |
+
elseif( isset( $input['bannerStyle'] ) )
|
1271 |
+
$new_input['bannerStyle'] = sanitize_text_field( $input['bannerStyle'] );
|
1272 |
+
|
1273 |
+
if( empty( $input['contentStyle'] ) )
|
1274 |
+
$new_input['contentStyle'] = 'contentStyle';
|
1275 |
+
elseif( isset( $input['contentStyle'] ) )
|
1276 |
+
$new_input['contentStyle'] = sanitize_text_field( $input['contentStyle'] );
|
1277 |
+
|
1278 |
+
if( empty( $input['consentText'] ) )
|
1279 |
+
$new_input['consentText'] = 'consentText';
|
1280 |
+
elseif( isset( $input['consentText'] ) )
|
1281 |
+
$new_input['consentText'] = sanitize_text_field( $input['consentText'] );
|
1282 |
+
|
1283 |
+
if( empty( $input['infoClass'] ) )
|
1284 |
+
$new_input['infoClass'] = 'italybtn';
|
1285 |
+
elseif( isset( $input['infoClass'] ) )
|
1286 |
+
$new_input['infoClass'] = sanitize_text_field( $input['infoClass'] );
|
1287 |
+
|
1288 |
+
if( empty( $input['closeClass'] ) )
|
1289 |
+
$new_input['closeClass'] = 'italybtn';
|
1290 |
+
elseif( isset( $input['closeClass'] ) )
|
1291 |
+
$new_input['closeClass'] = sanitize_text_field( $input['closeClass'] );
|
1292 |
+
|
1293 |
+
/**
|
1294 |
+
* Sezione per le opzioni avanzate
|
1295 |
+
* Esempio per add_settings_error()
|
1296 |
+
* @link https://wordpress.org/support/topic/how-to-use-add_settings_error-for-nested-options-array?replies=2
|
1297 |
+
* @link http://pastebin.com/K4kJ0DNG
|
1298 |
+
*/
|
1299 |
+
if( empty( $input['cookie_name'] ) ){
|
1300 |
+
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie name field it can\'t be empty. Restored default name.', 'italy-cookie-choices' ), 'error');
|
1301 |
+
$new_input['cookie_name'] = $this->cookieName;
|
1302 |
+
}
|
1303 |
+
else
|
1304 |
+
$new_input['cookie_name'] = sanitize_text_field( $input['cookie_name'] );
|
1305 |
+
|
1306 |
+
if( empty( $input['cookie_value'] ) ){
|
1307 |
+
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie value field it can\'t be empty. Restored default value.', 'italy-cookie-choices' ), 'error');
|
1308 |
+
$new_input['cookie_value'] = $this->cookieVal;
|
1309 |
+
}
|
1310 |
+
else
|
1311 |
+
$new_input['cookie_value'] = sanitize_text_field( $input['cookie_value'] );
|
1312 |
+
|
1313 |
+
if( isset( $input['target'] ) )
|
1314 |
+
$new_input['target'] = $input['target'];
|
1315 |
+
|
1316 |
+
if( isset( $input['block'] ) )
|
1317 |
+
$new_input['block'] = $input['block'];
|
1318 |
+
|
1319 |
+
if( isset( $input['widget_block'] ) )
|
1320 |
+
$new_input['widget_block'] = $input['widget_block'];
|
1321 |
+
|
1322 |
+
if( isset( $input['all_block'] ) )
|
1323 |
+
$new_input['all_block'] = $input['all_block'];
|
1324 |
+
|
1325 |
+
/**
|
1326 |
+
* Allow script
|
1327 |
+
*/
|
1328 |
+
if( isset( $input['allow_iframe'] ) )
|
1329 |
+
$new_input['allow_iframe'] = $input['allow_iframe'];
|
1330 |
+
|
1331 |
+
if( isset( $input['allow_script'] ) )
|
1332 |
+
$new_input['allow_script'] = $input['allow_script'];
|
1333 |
+
|
1334 |
+
if( isset( $input['allow_embed'] ) )
|
1335 |
+
$new_input['allow_embed'] = $input['allow_embed'];
|
1336 |
+
|
1337 |
+
if( isset( $input['custom_script_block_body_exclude'] ) )
|
1338 |
+
$new_input['custom_script_block_body_exclude'] = $input['custom_script_block_body_exclude'];
|
1339 |
+
/**********************************************************************/
|
1340 |
+
|
1341 |
+
/**
|
1342 |
+
* Block script
|
1343 |
+
*/
|
1344 |
+
if( isset( $input['block_iframe'] ) )
|
1345 |
+
$new_input['block_iframe'] = $input['block_iframe'];
|
1346 |
+
|
1347 |
+
if( isset( $input['block_script'] ) )
|
1348 |
+
$new_input['block_script'] = $input['block_script'];
|
1349 |
+
|
1350 |
+
if( isset( $input['block_embed'] ) )
|
1351 |
+
$new_input['block_embed'] = $input['block_embed'];
|
1352 |
+
|
1353 |
+
if( isset( $input['custom_script_block'] ) )
|
1354 |
+
$new_input['custom_script_block'] = $input['custom_script_block'];
|
1355 |
+
/**********************************************************************/
|
1356 |
+
|
1357 |
+
if( isset( $input['content_message_text'] ) ){
|
1358 |
+
|
1359 |
+
$new_input['content_message_text'] = wp_kses_post( $input['content_message_text'] );
|
1360 |
+
|
1361 |
+
register_string( 'Italy Cookie Choices', 'Content message text', $new_input['content_message_text'] );
|
1362 |
+
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
if( isset( $input['content_message_button_text'] ) ){
|
1366 |
+
|
1367 |
+
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
1368 |
+
|
1369 |
+
register_string( 'Italy Cookie Choices', 'Content message button text', $new_input['content_message_button_text'] );
|
1370 |
+
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
return $new_input;
|
1374 |
+
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
/**
|
1378 |
+
* Function for color picker in admin
|
1379 |
+
* @param string $hook_suffix Hook for script
|
1380 |
+
* @return Append script
|
1381 |
+
* @link https://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
|
1382 |
+
* @link http://code.tutsplus.com/articles/how-to-use-wordpress-color-picker-api--wp-33067
|
1383 |
+
*/
|
1384 |
+
public function add_script_and_style( $hook_suffix ) {
|
1385 |
+
|
1386 |
+
// first check that $hook_suffix is appropriate for your admin page
|
1387 |
+
if ( 'settings_page_italy-cookie-choices' !== $hook_suffix )
|
1388 |
+
return;
|
1389 |
+
|
1390 |
+
/**
|
1391 |
+
* Add color picker in admin menù
|
1392 |
+
*/
|
1393 |
+
wp_enqueue_style( 'wp-color-picker' );
|
1394 |
+
|
1395 |
+
/**
|
1396 |
+
* Load jQuery autocomplete for slug and url input
|
1397 |
+
*/
|
1398 |
+
wp_enqueue_style( 'jquery-ui-autocomplete' );
|
1399 |
+
wp_enqueue_script( 'jquery-ui-autocomplete' );
|
1400 |
+
|
1401 |
+
/**
|
1402 |
+
* Add thickbox for diplay code example
|
1403 |
+
* @link https://codex.wordpress.org/Javascript_Reference/ThickBox
|
1404 |
+
*/
|
1405 |
+
// add_thickbox();
|
1406 |
+
|
1407 |
+
/**
|
1408 |
+
* Load ACE from CDN
|
1409 |
+
* Functionality for custom script editor and CSS editor
|
1410 |
+
*/
|
1411 |
+
// wp_register_script('ace', '//cdn.jsdelivr.net/ace/1.1.9/min/ace.js', false, null, true);
|
1412 |
+
// wp_enqueue_script('ace');
|
1413 |
+
|
1414 |
+
wp_enqueue_style(
|
1415 |
+
'italy-cookie-choices-css',
|
1416 |
+
plugins_url('admin/css/admin.css', ITALY_COOKIE_CHOICES_FILE ),
|
1417 |
+
array( 'dashicons' ),
|
1418 |
+
null
|
1419 |
+
);
|
1420 |
+
|
1421 |
+
wp_enqueue_script(
|
1422 |
+
'italy-cookie-choices-script',
|
1423 |
+
plugins_url('admin/js/src/script.js', ITALY_COOKIE_CHOICES_FILE ),
|
1424 |
+
array(
|
1425 |
+
// 'jquery',
|
1426 |
+
'wp-color-picker',
|
1427 |
+
'jquery-ui-widget',
|
1428 |
+
'jquery-ui-autocomplete',
|
1429 |
+
'jquery-effects-shake',
|
1430 |
+
// 'ace'
|
1431 |
+
),
|
1432 |
+
null,
|
1433 |
+
true
|
1434 |
+
);
|
1435 |
+
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
/**
|
1439 |
+
* Add link in plugin activation panel
|
1440 |
+
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
|
1441 |
+
* @param array $links Array of link in wordpress dashboard
|
1442 |
+
* @return array Array with my links
|
1443 |
+
*/
|
1444 |
+
public function plugin_action_links( $links ){
|
1445 |
+
|
1446 |
+
array_unshift($links, '<a href="options-general.php?page=italy-cookie-choices">' . __('Settings','italy-cookie-choices') . '</a>');
|
1447 |
+
|
1448 |
+
array_unshift($links, '<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki" target="_blank">' . __('Documentation','italy-cookie-choices') . '</a>');
|
1449 |
+
|
1450 |
+
return $links;
|
1451 |
+
}// plugin_action_links()
|
1452 |
+
|
1453 |
+
/**
|
1454 |
+
* Set the three array with predefinited third party script|iframe|embed
|
1455 |
+
* @see https://codex.wordpress.org/Embeds For more embed
|
1456 |
+
* @todo See above
|
1457 |
+
* @return void
|
1458 |
+
*/
|
1459 |
+
private function create_third_party_array(){
|
1460 |
+
|
1461 |
+
$this->iframe_array = array(
|
1462 |
+
'' => '',
|
1463 |
+
'google' => 'google',
|
1464 |
+
'google_maps' => 'maps',
|
1465 |
+
'youtube' => 'youtube',
|
1466 |
+
'disqus' => 'disqus',
|
1467 |
+
'twitter' => 'twitter',
|
1468 |
+
'vimeo' => 'vimeo',
|
1469 |
+
'facebook' => 'facebook',
|
1470 |
+
);
|
1471 |
+
|
1472 |
+
$this->script_array = array(
|
1473 |
+
'' => '',
|
1474 |
+
'google' => 'google',
|
1475 |
+
'google_maps' => 'maps',
|
1476 |
+
'googleapis' => 'googleapis',
|
1477 |
+
'AdSense' => 'googlesyndication',
|
1478 |
+
'doubleclick' => 'doubleclick',
|
1479 |
+
'plusone' => 'plusone',
|
1480 |
+
'platform' => 'platform',
|
1481 |
+
'analytics' => 'analytics',
|
1482 |
+
'facebook' => 'facebook',
|
1483 |
+
'addthis' => 'addthis',
|
1484 |
+
'twitter' => 'twitter',
|
1485 |
+
'linkedin' => 'linkedin',
|
1486 |
+
'pinterest' => 'pinterest',
|
1487 |
+
'disqus' => 'disqus',
|
1488 |
+
'vimeo' => 'vimeo',
|
1489 |
+
'youtube' => 'youtube',
|
1490 |
+
'youtube-nocookie' => 'youtube-nocookie',
|
1491 |
+
'_getTracker' => '_getTracker',
|
1492 |
+
'instagram' => 'instagram',
|
1493 |
+
'cdninstagram' => 'cdninstagram',
|
1494 |
+
'digg' => 'digg',
|
1495 |
+
'eventbrite' => 'eventbrite',
|
1496 |
+
'wordpress' => 'wp'
|
1497 |
+
);
|
1498 |
+
|
1499 |
+
$this->embed_array = array(
|
1500 |
+
'' => ''
|
1501 |
+
);
|
1502 |
+
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
/**
|
1506 |
+
* This function add the HTML to display new functionality for UX allow and block script
|
1507 |
+
* @param array $array Pass the plugin option array[name]
|
1508 |
+
* @param string $arr_name A string name of the array
|
1509 |
+
* @param array $arr_key Array for predefinited script|emebd|iframe
|
1510 |
+
* This add a select box with script name
|
1511 |
+
* @return string Return the HTML for new input
|
1512 |
+
*/
|
1513 |
+
function foreach_script( $array, $arr_name, $arr_key ){
|
1514 |
+
|
1515 |
+
$select = '<select>';
|
1516 |
+
|
1517 |
+
foreach ($arr_key as $key => $value)
|
1518 |
+
$select .= '<option value="' . $value . '">' . $key . '</option>';
|
1519 |
+
|
1520 |
+
$select .= '</select>';
|
1521 |
+
|
1522 |
+
// <button class=" button" disabled>   </button>
|
1523 |
+
$input = '<div class="custom-script">';
|
1524 |
+
$i = 0;
|
1525 |
+
foreach ( $array as $key => $value ){
|
1526 |
+
|
1527 |
+
$input .= '<div class="italy-cookie-choices-clone-div"><input type="text" class="regular-text" data-type="' . $arr_name . '" value="' . esc_attr( $value ) .'" name="italy_cookie_choices[' . $arr_name . '][' . esc_attr( $value ) .']" id="italy_cookie_choices[' . $arr_name . '][' . esc_attr( $value ) .']"/> ' . $select . ' <span><a class="button add" style="font-size:22px"> + </a> ' . ( $i === 0 ? '<a class="button cancel" style="font-size:22px"> x </a>' : '<a class=" button remove" style="font-size:22px"> × </a>' ) . '</span></div>';
|
1528 |
+
|
1529 |
+
$i++;
|
1530 |
+
|
1531 |
+
}
|
1532 |
+
$input .= '</div>';
|
1533 |
+
|
1534 |
+
echo $input;
|
1535 |
+
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
/**
|
1539 |
+
* Process a settings export from config
|
1540 |
+
* @since 1.0.0
|
1541 |
+
*/
|
1542 |
+
function settings_export() {
|
1543 |
+
|
1544 |
+
if ( empty( $_POST[ 'icc_action' ] ) || 'export_settings' !== $_POST[ 'icc_action' ] )
|
1545 |
+
return;
|
1546 |
+
|
1547 |
+
if ( !wp_verify_nonce( $_POST[ 'icc_export_nonce' ], 'icc_export_nonce' ) )
|
1548 |
+
return;
|
1549 |
+
|
1550 |
+
if ( !current_user_can( $this->capability ) )
|
1551 |
+
return;
|
1552 |
+
|
1553 |
+
$settings[0] = $this->options;
|
1554 |
+
|
1555 |
+
ignore_user_abort( true );
|
1556 |
+
|
1557 |
+
nocache_headers();
|
1558 |
+
|
1559 |
+
// date_default_timezone_set('UTC');
|
1560 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
1561 |
+
header( 'Content-Disposition: attachment; filename=italy-cookie-choices-settings-export-' . date( 'm-d-Y' ) . '.json' );
|
1562 |
+
header( "Expires: 0" );
|
1563 |
+
|
1564 |
+
echo $this->wp_json_encode( $settings, JSON_PRETTY_PRINT );
|
1565 |
+
|
1566 |
+
exit;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
/**
|
1570 |
+
* Process a settings import from a json file
|
1571 |
+
* @since 1.0.0
|
1572 |
+
*/
|
1573 |
+
function settings_import() {
|
1574 |
+
|
1575 |
+
if ( empty( $_POST[ 'icc_action' ] ) || 'import_settings' != $_POST[ 'icc_action' ] )
|
1576 |
+
return;
|
1577 |
+
|
1578 |
+
if ( !wp_verify_nonce( $_POST[ 'icc_import_nonce' ], 'icc_import_nonce' ) )
|
1579 |
+
return;
|
1580 |
+
|
1581 |
+
if ( !current_user_can( $this->capability ) )
|
1582 |
+
return;
|
1583 |
+
|
1584 |
+
/**
|
1585 |
+
* Get the extension of import file
|
1586 |
+
* @link http://stackoverflow.com/a/19831453 Strict standards: Only variables should be passed by reference
|
1587 |
+
* @var string
|
1588 |
+
*/
|
1589 |
+
$file_name = $_FILES[ 'icc_import_file' ][ 'name' ];
|
1590 |
+
$exploded = explode( '.', $file_name );
|
1591 |
+
$extension = end( $exploded );
|
1592 |
+
|
1593 |
+
/**
|
1594 |
+
* If it is not json than die
|
1595 |
+
*/
|
1596 |
+
if ( $extension !== 'json' )
|
1597 |
+
wp_die( __( 'Please upload a valid .json file', 'italy-cookie-choices' ), __( 'No valid json file', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1598 |
+
|
1599 |
+
/**
|
1600 |
+
* If the file is empty than die
|
1601 |
+
*/
|
1602 |
+
if ( $_FILES[ 'icc_import_file' ][ 'size' ] === 0 )
|
1603 |
+
wp_die( __( 'The json file can\'t be empty', 'italy-cookie-choices' ), __( 'Empty file', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1604 |
+
|
1605 |
+
$import_file = $_FILES[ 'icc_import_file' ][ 'tmp_name' ];
|
1606 |
+
|
1607 |
+
/**
|
1608 |
+
* If $import_file is empty or null than die
|
1609 |
+
*/
|
1610 |
+
if ( empty( $import_file ) )
|
1611 |
+
wp_die( __( 'Please upload a file to import', 'italy-cookie-choices' ), __( 'No file import', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1612 |
+
|
1613 |
+
/**
|
1614 |
+
* Retrieve the settings from the file and convert the json object to an array.
|
1615 |
+
* @var array
|
1616 |
+
*/
|
1617 |
+
$settings = ( array ) json_decode( file_get_contents( $import_file ) );
|
1618 |
+
|
1619 |
+
update_option( 'italy_cookie_choices', get_object_vars( $settings[0] ) );
|
1620 |
+
|
1621 |
+
wp_safe_redirect( admin_url( 'options-general.php?page=' . 'italy-cookie-choices' ) );
|
1622 |
+
exit;
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
}// class
|
admin/class-italy-cookie-choices-admin-pointer-init.php
DELETED
@@ -1,178 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Load and initialize class. If you're loading the Italy_Cookie_Choices_Pointer class in another plugin or theme, this is all you need.
|
4 |
-
require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/class-italy-cookie-choices-admin-pointer.php');
|
5 |
-
|
6 |
-
if ( is_admin() )
|
7 |
-
$pointerplus = new Italy_Cookie_Choices_Pointer( array( 'prefix' => 'italy-cookie-choices' ) );
|
8 |
-
|
9 |
-
// With this you can reset all the pointer with your prefix
|
10 |
-
// $pointerplus->reset_pointer();
|
11 |
-
|
12 |
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
//////////////////// Everything after this point is only for pointerplus configuration ////////////////////
|
14 |
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Some useful link
|
18 |
-
* @link http://wordimpress.com/create-wordpress-theme-activation-popup-message/
|
19 |
-
* @link http://www.wpexplorer.com/making-themes-plugins-more-usable/
|
20 |
-
* @link http://code.tutsplus.com/articles/integrating-with-wordpress-ui-admin-pointers--wp-26853
|
21 |
-
* @link http://premium.wpmudev.org/blog/using-wordpress-pointers-in-your-own-plugins/?utm_expid=3606929-40.lszTaIEzTbifDhvhVdd39A.0&utm_referrer=https%3A%2F%2Fwww.google.it%2F
|
22 |
-
*/
|
23 |
-
|
24 |
-
if ( !class_exists( 'Italy_Cookie_Choices_Pointer_Init' ) ) {
|
25 |
-
|
26 |
-
/**
|
27 |
-
*
|
28 |
-
*/
|
29 |
-
class Italy_Cookie_Choices_Pointer_Init{
|
30 |
-
|
31 |
-
function __construct(){
|
32 |
-
|
33 |
-
// Your prefix
|
34 |
-
add_filter( 'italy-cookie-choices' . '-pointerplus_list', array( $this, 'custom_initial_pointers'), 10, 2);
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Add pointers.
|
41 |
-
*
|
42 |
-
* @param $pointers
|
43 |
-
* @param $prefix for your pointers
|
44 |
-
*
|
45 |
-
* @return mixed
|
46 |
-
*/
|
47 |
-
function custom_initial_pointers( $pointers, $prefix ) {
|
48 |
-
|
49 |
-
// * Default parameters:
|
50 |
-
// $defaults = array(
|
51 |
-
// 'class' => 'pointerplus',
|
52 |
-
// 'width' => 300, //fixed value
|
53 |
-
// 'align' => 'middle',
|
54 |
-
// 'edge' => 'left',
|
55 |
-
// 'post_type' => array(),
|
56 |
-
// 'pages' => array(),
|
57 |
-
// 'jsnext' => '', //empty [t = pointer instance, $ = jQuery]
|
58 |
-
// 'phpcode' => function(){}, //executed on admin_notices action
|
59 |
-
// 'show' => 'open' //default
|
60 |
-
// );
|
61 |
-
|
62 |
-
|
63 |
-
return array_merge( $pointers, array(
|
64 |
-
$prefix . '_settings' => array(
|
65 |
-
'selector' => '#active',
|
66 |
-
'title' => __( 'Radio 1', 'italy-cookie-choices' ),
|
67 |
-
'text' => __( 'The plugin is active and ready to start working.', 'italy-cookie-choices' ),
|
68 |
-
'width' => 260,
|
69 |
-
'icon_class' => 'dashicons-admin-settings',
|
70 |
-
'jsnext' => "button = jQuery('<a id=\"pointer-close\" class=\"button action\">" . __( 'Next' ) . "</a>');
|
71 |
-
button.bind('click.pointer', function () {
|
72 |
-
t.element.pointer('close');
|
73 |
-
jQuery('#label_radio_1').pointer('open');
|
74 |
-
});
|
75 |
-
return button;",
|
76 |
-
// 'phpcode' => $this->custom_phpcode_thickbox( 'https://www.youtube.com/embed/EaWfDuXQfo0' )
|
77 |
-
),
|
78 |
-
$prefix . '_settings1' => array(
|
79 |
-
'selector' => '#label_radio_1',
|
80 |
-
'title' => __( 'Radio 1', 'italy-cookie-choices' ),
|
81 |
-
'text' => __( 'The plugin is active and ready to start working.', 'italy-cookie-choices' ),
|
82 |
-
'width' => 260,
|
83 |
-
'icon_class' => 'dashicons-admin-settings',
|
84 |
-
// 'jsnext' => "button = jQuery('<a id=\"pointer-close\" class=\"button action\">" . __( 'Next' ) . "</a>');
|
85 |
-
// button.bind('click.pointer', function () {
|
86 |
-
// t.element.pointer('close');
|
87 |
-
// jQuery('#contextual-help-link').pointer('open');
|
88 |
-
// });
|
89 |
-
// return button;",
|
90 |
-
// 'phpcode' => $this->custom_phpcode_thickbox()
|
91 |
-
'show' => 'close'
|
92 |
-
),
|
93 |
-
$prefix . '_settings11' => array(
|
94 |
-
'selector' => '#label_radio_111',
|
95 |
-
'title' => __( 'Radio 2', 'italy-cookie-choices' ),
|
96 |
-
'text' => __( 'The plugin is active and ready to start working.', 'italy-cookie-choices' ),
|
97 |
-
'width' => 260,
|
98 |
-
'icon_class' => 'dashicons-admin-settings',
|
99 |
-
'jsnext' => "button = jQuery('<a id=\"pointer-close\" class=\"button action thickbox\" href=\"#TB_inline?width=700&height=500&inlineId=menu-popup\">" . __( 'Open Popup' ) . "</a>');
|
100 |
-
button.bind('click.pointer', function () {
|
101 |
-
t.element.pointer('close');
|
102 |
-
});
|
103 |
-
return button;",
|
104 |
-
'phpcode' => $this->custom_phpcode_thickbox( 'https://www.youtube.com/embed/EaWfDuXQfo0' )
|
105 |
-
),
|
106 |
-
$prefix . '_posts' => array(
|
107 |
-
'selector' => '#radio_1',
|
108 |
-
'title' => __( 'Italy_Cookie_Choices_Pointer for Posts', 'italy-cookie-choices' ),
|
109 |
-
'text' => __( 'One more pointer.', 'italy-cookie-choices' ),
|
110 |
-
'post_type' => array( 'post' ),
|
111 |
-
'icon_class' => 'dashicons-admin-post',
|
112 |
-
'width' => 350,
|
113 |
-
),
|
114 |
-
$prefix . '_pages' => array(
|
115 |
-
'selector' => '#menu-pages',
|
116 |
-
'title' => __( 'Italy_Cookie_Choices_Pointer Pages', 'italy-cookie-choices' ),
|
117 |
-
'text' => __( 'A pointer for pages.', 'italy-cookie-choices' ),
|
118 |
-
'post_type' => array( 'page' ),
|
119 |
-
'icon_class' => 'dashicons-admin-post'
|
120 |
-
),
|
121 |
-
$prefix . '_users' => array(
|
122 |
-
'selector' => '#menu-users',
|
123 |
-
'title' => __( 'Italy_Cookie_Choices_Pointer Users', 'italy-cookie-choices' ),
|
124 |
-
'text' => __( 'A pointer for users.', 'italy-cookie-choices' ),
|
125 |
-
'pages' => array( 'users.php' ),
|
126 |
-
'icon_class' => 'dashicons-admin-users'
|
127 |
-
),
|
128 |
-
$prefix . '_settings_tab1' => array(
|
129 |
-
'selector' => '#show-settings-link',
|
130 |
-
'title' => __( 'Italy_Cookie_Choices_Pointer Help', 'italy-cookie-choices' ),
|
131 |
-
'text' => __( 'A pointer with action.', 'italy-cookie-choices' ),
|
132 |
-
'edge' => 'top',
|
133 |
-
'align' => 'right',
|
134 |
-
'icon_class' => 'dashicons-welcome-learn-more',
|
135 |
-
'jsnext' => "button = jQuery('<a id=\"pointer-close\" class=\"button action\">" . __( 'Next' ) . "</a>');
|
136 |
-
button.bind('click.pointer', function () {
|
137 |
-
t.element.pointer('close');
|
138 |
-
jQuery('#contextual-help-link').pointer('open');
|
139 |
-
});
|
140 |
-
return button;"
|
141 |
-
),
|
142 |
-
/**
|
143 |
-
* $prefix . '_my_custom_id'
|
144 |
-
* per ogni pointer deve essere univoco
|
145 |
-
*/
|
146 |
-
$prefix . '_contextual_tab1' => array(
|
147 |
-
'selector' => '#contextual-help-link', // Il selettore css dove appendere il pointer, può essere un ID o una classe CSS
|
148 |
-
'title' => __( 'Italy_Cookie_Choices_Pointer Help', 'italy-cookie-choices' ),
|
149 |
-
'text' => __( 'A pointer for help tab.<br>Go to Posts, Pages or Users for other pointers.', 'italy-cookie-choices' ),
|
150 |
-
'edge' => 'top',
|
151 |
-
'align' => 'right',
|
152 |
-
'icon_class' => 'dashicons-welcome-learn-more',
|
153 |
-
'show' => 'close' // Serve per non visualizzare il pointer nella pagina, utile per usarlo insieme al pulsante next
|
154 |
-
)
|
155 |
-
) );
|
156 |
-
}
|
157 |
-
|
158 |
-
|
159 |
-
//Function created for support PHP =>5.2
|
160 |
-
//You can use the anonymous function that are not supported by PHP 5.2
|
161 |
-
/**
|
162 |
-
*
|
163 |
-
* @link https://codex.wordpress.org/Javascript_Reference/ThickBox
|
164 |
-
* @return string Return modal fro thickbox
|
165 |
-
*/
|
166 |
-
function custom_phpcode_thickbox( $url = '' ) {
|
167 |
-
add_thickbox();
|
168 |
-
echo '<div id="menu-popup" style="display:none;">
|
169 |
-
<p style="text-align: center;">
|
170 |
-
This is my hidden content! It will appear in ThickBox when the link is clicked.
|
171 |
-
<iframe width="560" height="315" src="' . $url . '" frameborder="0" allowfullscreen></iframe>
|
172 |
-
</p>
|
173 |
-
</div>';
|
174 |
-
}
|
175 |
-
|
176 |
-
}
|
177 |
-
|
178 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/class-italy-cookie-choices-admin-pointer.php
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class Italy_Cookie_Choices_Pointer based on QL_Pointer to facilitate creation of WP Pointers
|
4 |
-
* @author QueryLoop
|
5 |
-
*/
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) )
|
8 |
-
exit;
|
9 |
-
|
10 |
-
class Italy_Cookie_Choices_Pointer {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Prefix strings like styles, scripts and pointers IDs
|
14 |
-
* @var string
|
15 |
-
*/
|
16 |
-
protected $prefix = 'italy-cookie-choices';
|
17 |
-
protected $pointers = array();
|
18 |
-
|
19 |
-
function __construct( $args = array() ) {
|
20 |
-
|
21 |
-
if ( isset( $args[ 'prefix' ] ) ) {
|
22 |
-
$this->prefix = $args[ 'prefix' ];
|
23 |
-
}
|
24 |
-
add_action( 'current_screen', array( $this, 'maybe_add_pointers' ) );
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Set pointers and its options
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
function initial_pointers() {
|
34 |
-
global $pagenow;
|
35 |
-
$defaults = array(
|
36 |
-
'class' => '',
|
37 |
-
'width' => 300, //only fixed value
|
38 |
-
'align' => 'middle',
|
39 |
-
'edge' => 'left',
|
40 |
-
'post_type' => array(),
|
41 |
-
'pages' => array(),
|
42 |
-
'icon_class' => ''
|
43 |
-
);
|
44 |
-
$screen = get_current_screen();
|
45 |
-
$current_post_type = isset( $screen->post_type ) ? $screen->post_type : false;
|
46 |
-
$search_pt = false;
|
47 |
-
|
48 |
-
$pointers = apply_filters( $this->prefix . '-pointerplus_list', array(
|
49 |
-
// Pointers are added through the 'initial_pointerplus' filter
|
50 |
-
), $this->prefix );
|
51 |
-
|
52 |
-
foreach ( $pointers as $key => $pointer ) {
|
53 |
-
$pointers[ $key ] = wp_parse_args( $pointer, $defaults );
|
54 |
-
$search_pt = false;
|
55 |
-
// Clean from null ecc
|
56 |
-
$pointers[ $key ][ 'post_type' ] = array_filter( $pointers[ $key ][ 'post_type' ] );
|
57 |
-
if ( !empty( $pointers[ $key ][ 'post_type' ] ) ) {
|
58 |
-
if ( !empty( $current_post_type ) ) {
|
59 |
-
if ( is_array( $pointers[ $key ][ 'post_type' ] ) ) {
|
60 |
-
// Search the post_type
|
61 |
-
foreach ( $pointers[ $key ][ 'post_type' ] as $value ) {
|
62 |
-
if ( $value === $current_post_type ) {
|
63 |
-
$search_pt = true;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
if ( $search_pt === false ) {
|
67 |
-
unset( $pointers[ $key ] );
|
68 |
-
}
|
69 |
-
} else {
|
70 |
-
new WP_Error( 'broke', __( 'Italy_Cookie_Choices_Pointer Error: post_type is not an array!' ) );
|
71 |
-
}
|
72 |
-
//If not in CPT view remove all the pointers with post_type
|
73 |
-
} else {
|
74 |
-
unset( $pointers[ $key ] );
|
75 |
-
}
|
76 |
-
}
|
77 |
-
// Clean from null ecc
|
78 |
-
if ( !empty( $pointers[ $key ][ 'pages' ] ) && is_array( $pointers[ $key ][ 'pages' ] ) )
|
79 |
-
$pointers[ $key ][ 'pages' ] = array_filter( $pointers[ $key ][ 'pages' ] );
|
80 |
-
|
81 |
-
if ( !empty( $pointers[ $key ][ 'pages' ] ) ) {
|
82 |
-
if ( is_array( $pointers[ $key ][ 'pages' ] ) ) {
|
83 |
-
// Search the page
|
84 |
-
foreach ( $pointers[ $key ][ 'pages' ] as $value ) {
|
85 |
-
if ( $pagenow === $value ) {
|
86 |
-
$search_pt = true;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
if ( $search_pt === false ) {
|
90 |
-
unset( $pointers[ $key ] );
|
91 |
-
}
|
92 |
-
} else {
|
93 |
-
new WP_Error( 'broke', __( 'Italy_Cookie_Choices_Pointer Error: pages is not an array!' ) );
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
return $pointers;
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Check that pointers haven't been dismissed already. If there are pointers to show, enqueue assets.
|
103 |
-
*/
|
104 |
-
function maybe_add_pointers() {
|
105 |
-
// Get default pointers that we want to create
|
106 |
-
$default_keys = $this->initial_pointers();
|
107 |
-
|
108 |
-
// Get pointers dismissed by user
|
109 |
-
$dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
|
110 |
-
|
111 |
-
// Check that our pointers haven't been dismissed already
|
112 |
-
$diff = array_diff_key( $default_keys, array_combine( $dismissed, $dismissed ) );
|
113 |
-
|
114 |
-
// If we have some pointers to show, save them and start enqueuing assets to display them
|
115 |
-
if ( !empty( $diff ) ) {
|
116 |
-
$this->pointers = $diff;
|
117 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );
|
118 |
-
|
119 |
-
foreach ( $diff as $pointer ) {
|
120 |
-
if ( isset( $pointer[ 'phpcode' ] ) ) {
|
121 |
-
add_action( 'admin_notices', $pointer[ 'phpcode' ] );
|
122 |
-
}
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Enqueue pointer styles and scripts to display them.
|
129 |
-
*
|
130 |
-
* @since 1.0.0
|
131 |
-
*/
|
132 |
-
function admin_enqueue_assets() {
|
133 |
-
$base_url = plugins_url( '', __FILE__ );
|
134 |
-
wp_enqueue_style( $this->prefix, $base_url . '/pointerplus.css', array( 'wp-pointer' ) );
|
135 |
-
wp_enqueue_script( $this->prefix, $base_url . '/pointerplus.js?var=' . str_replace( '-', '_', $this->prefix ) . '_pointerplus', array( 'wp-pointer' ) );
|
136 |
-
wp_localize_script( $this->prefix, str_replace( '-', '_', $this->prefix ) . '_pointerplus', apply_filters( $this->prefix . '_pointerplus_js_vars', $this->pointers ) );
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Reset pointer
|
141 |
-
*
|
142 |
-
* @since 1.0.0
|
143 |
-
*/
|
144 |
-
function reset_pointer() {
|
145 |
-
add_action( 'current_screen', array( $this, '_reset_pointer' ), 0 );
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Reset pointer in hook
|
150 |
-
*
|
151 |
-
* @since 1.0.0
|
152 |
-
*/
|
153 |
-
function _reset_pointer( $id = 'me' ) {
|
154 |
-
if ( $id === 'me' ) {
|
155 |
-
$id = get_current_user_id();
|
156 |
-
}
|
157 |
-
$pointers = explode( ',', get_user_meta( $id, 'dismissed_wp_pointers', true ) );
|
158 |
-
foreach ( $pointers as $key => $pointer ) {
|
159 |
-
if ( strpos( $pointer, $this->prefix ) === 0 ) {
|
160 |
-
unset( $pointers[ $key ] );
|
161 |
-
}
|
162 |
-
}
|
163 |
-
$meta = implode( ',', $pointers );
|
164 |
-
|
165 |
-
update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $meta );
|
166 |
-
}
|
167 |
-
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/class-italy-cookie-choices-admin.php
DELETED
@@ -1,1629 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for Italy Cookie Choices Admin
|
4 |
-
*/
|
5 |
-
if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
6 |
-
|
7 |
-
class Italy_Cookie_Choices_Admin{
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Definition of variables containing the configuration
|
11 |
-
* to be applied to the various function calls wordpress
|
12 |
-
*/
|
13 |
-
protected $capability = 'manage_options';
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Global variables and default values
|
17 |
-
* @var array
|
18 |
-
*/
|
19 |
-
protected $default_options = array();
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Option
|
23 |
-
* @var array
|
24 |
-
*/
|
25 |
-
private $options = array();
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Default Cookie name
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
private $cookieName = 'displayCookieConsent';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Default cookie value
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
private $cookieVal = 'y';
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Inizialize banner template to default
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
private $js_template = 'default';
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Array of all posts and pages object
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
private $post_and_page_array = array();
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Array with predefinited vendor iframe
|
53 |
-
* @var array
|
54 |
-
*/
|
55 |
-
private $iframe_array = array();
|
56 |
-
/**
|
57 |
-
* Array with predefinited vendor script
|
58 |
-
* @var array
|
59 |
-
*/
|
60 |
-
private $script_array = array();
|
61 |
-
/**
|
62 |
-
* Array with predefinited vendor embed
|
63 |
-
* @var array
|
64 |
-
*/
|
65 |
-
private $embed_array = array();
|
66 |
-
|
67 |
-
/**
|
68 |
-
* [__construct description]
|
69 |
-
*/
|
70 |
-
public function __construct(){
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Init vendors array
|
74 |
-
*/
|
75 |
-
$this->create_third_party_array();
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Get all posts and pages object and merge for jQuery autocomplete function
|
79 |
-
*/
|
80 |
-
// $this->get_post_and_page_array();
|
81 |
-
$this->post_and_page_array = ( is_array( get_pages('numberposts=-1') ) ) ? get_pages('numberposts=-1') : array();
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Add Admin menù page
|
85 |
-
*/
|
86 |
-
add_action( 'admin_menu', array( $this, 'addMenuPage') );
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Init settings
|
90 |
-
*/
|
91 |
-
add_action( 'admin_init', array( $this, 'italy_cl_settings_init') );
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Load script only if is Italy Cookie Choices admin panel
|
95 |
-
*/
|
96 |
-
if ( isset($_GET['page']) && ($_GET['page'] === 'italy-cookie-choices' ) )
|
97 |
-
add_action('admin_enqueue_scripts', array( $this, 'add_script_and_style' ));
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Add link in plugin activation panel
|
101 |
-
*/
|
102 |
-
add_filter( 'plugin_action_links_' . ITALY_COOKIE_CHOICES_BASENAME, array( $this, 'plugin_action_links' ) );
|
103 |
-
|
104 |
-
//Add the export settings method
|
105 |
-
add_action( 'admin_init', array( $this, 'settings_export' ) );
|
106 |
-
//Add the import settings method
|
107 |
-
add_action( 'admin_init', array( $this, 'settings_import' ) );
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Encode a variable into JSON, with some sanity checks.
|
113 |
-
*
|
114 |
-
* @since 4.1.0
|
115 |
-
*
|
116 |
-
* @param mixed $data Variable (usually an array or object) to encode as JSON.
|
117 |
-
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
|
118 |
-
* @param int $depth Optional. Maximum depth to walk through $data. Must be
|
119 |
-
* greater than 0. Default 512.
|
120 |
-
* @return bool|string The JSON encoded string, or false if it cannot be encoded.
|
121 |
-
*/
|
122 |
-
public function wp_json_encode( $data, $options = 0, $depth = 512 ) {
|
123 |
-
|
124 |
-
/*
|
125 |
-
* json_encode() has had extra params added over the years.
|
126 |
-
* $options was added in 5.3, and $depth in 5.5.
|
127 |
-
* We need to make sure we call it with the correct arguments.
|
128 |
-
*/
|
129 |
-
if ( version_compare( PHP_VERSION, '5.5', '>=' ) )
|
130 |
-
$args = array( $data, $options, $depth );
|
131 |
-
elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) )
|
132 |
-
$args = array( $data, $options );
|
133 |
-
else
|
134 |
-
$args = array( $data );
|
135 |
-
|
136 |
-
$json = call_user_func_array( 'json_encode', $args );
|
137 |
-
|
138 |
-
// If json_encode() was successful, no need to do more sanity checking.
|
139 |
-
// ... unless we're in an old version of PHP, and json_encode() returned
|
140 |
-
// a string containing 'null'. Then we need to do more sanity checking.
|
141 |
-
if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )
|
142 |
-
return $json;
|
143 |
-
|
144 |
-
return call_user_func_array( 'json_encode', $args );
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Add page for italy-cookie-choices admin page
|
149 |
-
*/
|
150 |
-
public function addMenuPage(){
|
151 |
-
|
152 |
-
add_options_page(
|
153 |
-
__('Italy Cookie Choices Dashboard', 'italy-cookie-choices'),
|
154 |
-
'Italy Cookie Choices',
|
155 |
-
$this->capability,
|
156 |
-
'italy-cookie-choices',
|
157 |
-
array( $this, 'dashboard')
|
158 |
-
);
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* The dashboard callback
|
163 |
-
*/
|
164 |
-
public function dashboard(){
|
165 |
-
|
166 |
-
if ( !current_user_can( $this->capability ) )
|
167 |
-
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
168 |
-
|
169 |
-
include_once( 'template/admin.php' );
|
170 |
-
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Initialize plugin
|
175 |
-
* @return [type] [description]
|
176 |
-
*/
|
177 |
-
public function italy_cl_settings_init() {
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Create default options
|
181 |
-
* @var array
|
182 |
-
*/
|
183 |
-
$this->default_options = array(
|
184 |
-
|
185 |
-
'text' => '',
|
186 |
-
'url' => '',
|
187 |
-
'anchor_text' => '',
|
188 |
-
'button_text' => '',
|
189 |
-
'cookie_name' => $this->cookieName,
|
190 |
-
'cookie_value' => $this->cookieVal,
|
191 |
-
'content_message_text' => '',
|
192 |
-
'content_message_button_text' => ''
|
193 |
-
|
194 |
-
);
|
195 |
-
|
196 |
-
/**
|
197 |
-
* All options in array
|
198 |
-
* @var array
|
199 |
-
*/
|
200 |
-
$this->options = get_option( 'italy_cookie_choices' );
|
201 |
-
|
202 |
-
/**
|
203 |
-
* If the theme options don't exist, create them.
|
204 |
-
*/
|
205 |
-
if( false === $this->options )
|
206 |
-
add_option( 'italy_cookie_choices', $this->default_options );
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Section options page
|
210 |
-
*/
|
211 |
-
add_settings_section(
|
212 |
-
'setting_section',
|
213 |
-
__( 'Italy Cookie Choices options page', 'italy-cookie-choices' ),
|
214 |
-
array( $this, 'italy_cl_settings_section_callback'),
|
215 |
-
'italy_cl_options_group'
|
216 |
-
);
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Checkbox for activation
|
220 |
-
*/
|
221 |
-
add_settings_field(
|
222 |
-
'active',
|
223 |
-
__( 'Activate', 'italy-cookie-choices' ),
|
224 |
-
array( $this, 'italy_cl_option_active'),
|
225 |
-
'italy_cl_options_group',
|
226 |
-
'setting_section'
|
227 |
-
);
|
228 |
-
|
229 |
-
/**
|
230 |
-
* How to display banner
|
231 |
-
* Default Bar
|
232 |
-
*/
|
233 |
-
add_settings_field(
|
234 |
-
'banner',
|
235 |
-
__( 'Where display the banner', 'italy-cookie-choices' ),
|
236 |
-
array( $this, 'italy_cl_option_banner'),
|
237 |
-
'italy_cl_options_group',
|
238 |
-
'setting_section'
|
239 |
-
);
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Checkbox for scroll event
|
243 |
-
*/
|
244 |
-
add_settings_field(
|
245 |
-
'scroll',
|
246 |
-
__( 'Mouse scroll event', 'italy-cookie-choices' ),
|
247 |
-
array( $this, 'italy_cl_option_scroll'),
|
248 |
-
'italy_cl_options_group',
|
249 |
-
'setting_section'
|
250 |
-
);
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Checkbox for open in new page
|
254 |
-
*/
|
255 |
-
add_settings_field(
|
256 |
-
'secondView',
|
257 |
-
__( 'Accept on second view', 'italy-cookie-choices' ),
|
258 |
-
array( $this, 'italy_cl_option_secondView'),
|
259 |
-
'italy_cl_options_group',
|
260 |
-
'setting_section'
|
261 |
-
);
|
262 |
-
|
263 |
-
/**
|
264 |
-
* Checkbox for reload page
|
265 |
-
*/
|
266 |
-
add_settings_field(
|
267 |
-
'reload',
|
268 |
-
__( 'Refresh page', 'italy-cookie-choices' ),
|
269 |
-
array( $this, 'italy_cl_option_reload'),
|
270 |
-
'italy_cl_options_group',
|
271 |
-
'setting_section'
|
272 |
-
);
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Input for short policy text
|
276 |
-
*/
|
277 |
-
add_settings_field(
|
278 |
-
'text',
|
279 |
-
__( 'Text to display', 'italy-cookie-choices' ),
|
280 |
-
array( $this, 'italy_cl_option_text'),
|
281 |
-
'italy_cl_options_group',
|
282 |
-
'setting_section'
|
283 |
-
);
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Input for url policy page
|
287 |
-
*/
|
288 |
-
add_settings_field(
|
289 |
-
'url',
|
290 |
-
__( 'URL for cookie policy', 'italy-cookie-choices' ),
|
291 |
-
array( $this, 'italy_cl_option_url'),
|
292 |
-
'italy_cl_options_group',
|
293 |
-
'setting_section'
|
294 |
-
);
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Cookie policy page slug
|
298 |
-
*/
|
299 |
-
add_settings_field(
|
300 |
-
'slug',
|
301 |
-
__( 'Cookie policy page slug', 'italy-cookie-choices' ),
|
302 |
-
array( $this, 'italy_cl_option_slug'),
|
303 |
-
'italy_cl_options_group',
|
304 |
-
'setting_section'
|
305 |
-
);
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Input for anchor text
|
309 |
-
*/
|
310 |
-
add_settings_field(
|
311 |
-
'anchor_text',
|
312 |
-
__( 'Anchor text for URL', 'italy-cookie-choices' ),
|
313 |
-
array( $this, 'italy_cl_option_anchor_text'),
|
314 |
-
'italy_cl_options_group',
|
315 |
-
'setting_section'
|
316 |
-
);
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Input for button text
|
320 |
-
*/
|
321 |
-
add_settings_field(
|
322 |
-
'button_text',
|
323 |
-
__( 'Button text', 'italy-cookie-choices' ),
|
324 |
-
array( $this, 'italy_cl_option_button_text'),
|
325 |
-
'italy_cl_options_group',
|
326 |
-
'setting_section'
|
327 |
-
);
|
328 |
-
|
329 |
-
/**
|
330 |
-
* Settings sections for Style
|
331 |
-
*/
|
332 |
-
add_settings_section(
|
333 |
-
'style_setting_section',
|
334 |
-
__( 'Style settings', 'italy-cookie-choices' ),
|
335 |
-
array( $this, 'italy_cl_style_settings_section_callback'),
|
336 |
-
'italy_cl_options_group'
|
337 |
-
);
|
338 |
-
|
339 |
-
/**
|
340 |
-
* Select box for js_template selection
|
341 |
-
*/
|
342 |
-
add_settings_field(
|
343 |
-
'js_template',
|
344 |
-
__( 'CookieChoices Template', 'italy-cookie-choices' ),
|
345 |
-
array( $this, 'italy_cl_option_js_template'),
|
346 |
-
'italy_cl_options_group',
|
347 |
-
'style_setting_section'
|
348 |
-
);
|
349 |
-
|
350 |
-
/**
|
351 |
-
* Checkbox for activation
|
352 |
-
*/
|
353 |
-
add_settings_field(
|
354 |
-
'html_margin',
|
355 |
-
__( 'HTML top margin', 'italy-cookie-choices' ),
|
356 |
-
array( $this, 'italy_cl_option_html_margin'),
|
357 |
-
'italy_cl_options_group',
|
358 |
-
'style_setting_section'
|
359 |
-
);
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Background color for banner
|
363 |
-
*/
|
364 |
-
add_settings_field(
|
365 |
-
'banner_bg',
|
366 |
-
__( 'Banner Background color', 'italy-cookie-choices' ),
|
367 |
-
array( $this, 'italy_cl_option_banner_bg'),
|
368 |
-
'italy_cl_options_group',
|
369 |
-
'style_setting_section'
|
370 |
-
);
|
371 |
-
|
372 |
-
/**
|
373 |
-
* Color for text in banner
|
374 |
-
*/
|
375 |
-
add_settings_field(
|
376 |
-
'banner_text_color',
|
377 |
-
__( 'Banner text color', 'italy-cookie-choices' ),
|
378 |
-
array( $this, 'italy_cl_option_banner_text_color'),
|
379 |
-
'italy_cl_options_group',
|
380 |
-
'style_setting_section'
|
381 |
-
);
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Text area for custom CSS
|
385 |
-
*/
|
386 |
-
add_settings_field(
|
387 |
-
'customCSS',
|
388 |
-
__( 'Custom CSS', 'italy-cookie-choices' ),
|
389 |
-
array( $this, 'italy_cl_option_customCSS'),
|
390 |
-
'italy_cl_options_group',
|
391 |
-
'style_setting_section'
|
392 |
-
);
|
393 |
-
|
394 |
-
/**
|
395 |
-
* Text area for custom CSS class
|
396 |
-
*/
|
397 |
-
add_settings_field(
|
398 |
-
'customClass',
|
399 |
-
__( 'Custom CSS Class (Optional)', 'italy-cookie-choices' ),
|
400 |
-
array( $this, 'italy_cl_option_customClass'),
|
401 |
-
'italy_cl_options_group',
|
402 |
-
'style_setting_section'
|
403 |
-
);
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Settings sections for Advanced options
|
407 |
-
*/
|
408 |
-
add_settings_section(
|
409 |
-
'advanced_setting_section',
|
410 |
-
__( 'Advanced settings', 'italy-cookie-choices' ),
|
411 |
-
array( $this, 'italy_cl_advanced_settings_section_callback'),
|
412 |
-
'italy_cl_options_group'
|
413 |
-
);
|
414 |
-
|
415 |
-
/**
|
416 |
-
* cookie name
|
417 |
-
*/
|
418 |
-
add_settings_field(
|
419 |
-
'cookie_name',
|
420 |
-
__( 'Cookie name', 'italy-cookie-choices' ),
|
421 |
-
array( $this, 'italy_cl_option_cookie_name'),
|
422 |
-
'italy_cl_options_group',
|
423 |
-
'advanced_setting_section'
|
424 |
-
);
|
425 |
-
|
426 |
-
/**
|
427 |
-
* cookie value
|
428 |
-
*/
|
429 |
-
add_settings_field(
|
430 |
-
'cookie_value',
|
431 |
-
__( 'Cookie value', 'italy-cookie-choices' ),
|
432 |
-
array( $this, 'italy_cl_option_cookie_value'),
|
433 |
-
'italy_cl_options_group',
|
434 |
-
'advanced_setting_section'
|
435 |
-
);
|
436 |
-
|
437 |
-
/**
|
438 |
-
* Checkbox for open in new page
|
439 |
-
*/
|
440 |
-
add_settings_field(
|
441 |
-
'target',
|
442 |
-
__( 'Open policy in new page', 'italy-cookie-choices' ),
|
443 |
-
array( $this, 'italy_cl_option_target'),
|
444 |
-
'italy_cl_options_group',
|
445 |
-
'advanced_setting_section'
|
446 |
-
);
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Checkbox for activation third part cookie eraser
|
450 |
-
*/
|
451 |
-
add_settings_field(
|
452 |
-
'block',
|
453 |
-
__( 'Third part cookie block (beta)', 'italy-cookie-choices' ),
|
454 |
-
array( $this, 'italy_cl_option_block'),
|
455 |
-
'italy_cl_options_group',
|
456 |
-
'advanced_setting_section'
|
457 |
-
);
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Function for custom script allow
|
461 |
-
*/
|
462 |
-
add_settings_field(
|
463 |
-
'custom_script_block_body_exclude',
|
464 |
-
__( 'Scripts allowed in body', 'italy-cookie-choices' ),
|
465 |
-
array( $this, 'italy_cl_option_custom_script_block_body_exclude'),
|
466 |
-
'italy_cl_options_group',
|
467 |
-
'advanced_setting_section'
|
468 |
-
);
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Function for custom script block
|
472 |
-
*/
|
473 |
-
add_settings_field(
|
474 |
-
'custom_script_block',
|
475 |
-
__( 'Scripts to be blocked', 'italy-cookie-choices' ),
|
476 |
-
array( $this, 'italy_cl_option_custom_script_block'),
|
477 |
-
'italy_cl_options_group',
|
478 |
-
'advanced_setting_section'
|
479 |
-
);
|
480 |
-
|
481 |
-
/**
|
482 |
-
* Function for content message text
|
483 |
-
*/
|
484 |
-
add_settings_field(
|
485 |
-
'content_message_text',
|
486 |
-
__( 'Text message for locked embedded content', 'italy-cookie-choices' ),
|
487 |
-
array( $this, 'italy_cl_option_content_message_text'),
|
488 |
-
'italy_cl_options_group',
|
489 |
-
'advanced_setting_section'
|
490 |
-
);
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Function for button text in message
|
494 |
-
*/
|
495 |
-
add_settings_field(
|
496 |
-
'content_message_button_text',
|
497 |
-
__( 'Button text to activate locked embedded content', 'italy-cookie-choices' ),
|
498 |
-
array( $this, 'italy_cl_option_content_message_button_text'),
|
499 |
-
'italy_cl_options_group',
|
500 |
-
'advanced_setting_section'
|
501 |
-
);
|
502 |
-
|
503 |
-
/**
|
504 |
-
* Register setting
|
505 |
-
*/
|
506 |
-
register_setting(
|
507 |
-
'italy_cl_options_group',
|
508 |
-
'italy_cookie_choices',
|
509 |
-
array( $this, 'sanitize_callback')
|
510 |
-
);
|
511 |
-
|
512 |
-
|
513 |
-
}
|
514 |
-
|
515 |
-
|
516 |
-
/**
|
517 |
-
* Display message in plugin control panel
|
518 |
-
* @return string Return message
|
519 |
-
*/
|
520 |
-
public function italy_cl_settings_section_callback() {
|
521 |
-
|
522 |
-
_e( 'Customize your banner for cookie law', 'italy-cookie-choices' );
|
523 |
-
|
524 |
-
}
|
525 |
-
|
526 |
-
/**
|
527 |
-
* Snippet for checkbox
|
528 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
529 |
-
*/
|
530 |
-
public function italy_cl_option_active($args) {
|
531 |
-
|
532 |
-
$active = ( isset( $this->options['active'] ) ) ? $this->options['active'] : '' ;
|
533 |
-
?>
|
534 |
-
|
535 |
-
<input type='checkbox' name='italy_cookie_choices[active]' <?php checked( $active, 1 ); ?> value='1' id="italy_cookie_choices[active]">
|
536 |
-
<label for="italy_cookie_choices[active]" id="active">
|
537 |
-
<?php _e( 'Display banner for Cookie Law in front-end', 'italy-cookie-choices' ); ?>
|
538 |
-
</label>
|
539 |
-
|
540 |
-
<?php
|
541 |
-
|
542 |
-
}
|
543 |
-
|
544 |
-
/**
|
545 |
-
* Choose how to display banner in page
|
546 |
-
* @return string Display input and labels in plugin options page
|
547 |
-
*/
|
548 |
-
public function italy_cl_option_banner($args) {
|
549 |
-
|
550 |
-
$banner = ( isset( $this->options['banner'] ) ) ? $this->options['banner'] : '1' ;
|
551 |
-
|
552 |
-
?>
|
553 |
-
|
554 |
-
<input name="italy_cookie_choices[banner]" type="radio" value="1" id="radio_1" <?php checked( '1', $banner ); ?> />
|
555 |
-
|
556 |
-
<label for="radio_1" id="label_radio_1">
|
557 |
-
<?php _e( 'Top Bar (Default, Display a top bar with your message)', 'italy-cookie-choices' ); ?>
|
558 |
-
</label>
|
559 |
-
|
560 |
-
<br>
|
561 |
-
|
562 |
-
<input name="italy_cookie_choices[banner]" type="radio" value="2" id="radio_2" <?php checked( '2', $banner ); ?> />
|
563 |
-
|
564 |
-
<label for="radio_2" id="label_radio_2">
|
565 |
-
<?php _e( 'Dialog (Display an overlay with your message)', 'italy-cookie-choices' ); ?>
|
566 |
-
</label>
|
567 |
-
|
568 |
-
<br>
|
569 |
-
|
570 |
-
<input name="italy_cookie_choices[banner]" type="radio" value="3" id="radio_3" <?php checked( '3', $banner ); ?> />
|
571 |
-
|
572 |
-
<label for="radio_3" id="label_radio_3">
|
573 |
-
<?php _e( 'Bottom Bar (Display a bar in the footer with your message)', 'italy-cookie-choices' ); ?>
|
574 |
-
</label>
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
<?php
|
579 |
-
|
580 |
-
}
|
581 |
-
|
582 |
-
/**
|
583 |
-
* Snippet for checkbox
|
584 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
585 |
-
*/
|
586 |
-
public function italy_cl_option_scroll($args) {
|
587 |
-
|
588 |
-
$scroll = ( isset( $this->options['scroll'] ) ) ? $this->options['scroll'] : '' ;
|
589 |
-
?>
|
590 |
-
|
591 |
-
<input type='checkbox' name='italy_cookie_choices[scroll]' <?php checked( $scroll, 1 ); ?> value='1' id="italy_cookie_choices[scroll]">
|
592 |
-
<label for="italy_cookie_choices[scroll]">
|
593 |
-
<?php _e( 'Accepts disclosures on mouse scroll event', 'italy-cookie-choices' ); ?>
|
594 |
-
</label>
|
595 |
-
|
596 |
-
<?php
|
597 |
-
|
598 |
-
}
|
599 |
-
|
600 |
-
/**
|
601 |
-
* Snippet for second view checkbox $secondView
|
602 |
-
* @return strimg Activate for accept on second view
|
603 |
-
* Default do nothing
|
604 |
-
*/
|
605 |
-
public function italy_cl_option_secondView($args) {
|
606 |
-
|
607 |
-
$secondView = ( isset( $this->options['secondView'] ) ) ? $this->options['secondView'] : '' ;
|
608 |
-
|
609 |
-
?>
|
610 |
-
|
611 |
-
<input type='checkbox' name='italy_cookie_choices[secondView]' <?php checked( $secondView, 1 ); ?> value='1' id="italy_cookie_choices[secondView]">
|
612 |
-
<label for="italy_cookie_choices[secondView]">
|
613 |
-
<?php _e( 'Activate accept on second view', 'italy-cookie-choices' ); ?>
|
614 |
-
</label>
|
615 |
-
|
616 |
-
<?php
|
617 |
-
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* Snippet for reload
|
622 |
-
* @return strimg Reload page after click
|
623 |
-
*/
|
624 |
-
public function italy_cl_option_reload($args) {
|
625 |
-
|
626 |
-
$reload = ( isset( $this->options['reload'] ) ) ? $this->options['reload'] : '' ;
|
627 |
-
?>
|
628 |
-
|
629 |
-
<input type='checkbox' name='italy_cookie_choices[reload]' <?php checked( $reload, 1 ); ?> value='1' id="italy_cookie_choices[reload]">
|
630 |
-
<label for="italy_cookie_choices[reload]">
|
631 |
-
<?php _e( 'Refresh page after button click (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
632 |
-
</label>
|
633 |
-
|
634 |
-
<?php
|
635 |
-
|
636 |
-
}
|
637 |
-
|
638 |
-
/**
|
639 |
-
* Textarea for the message to display
|
640 |
-
* @return string
|
641 |
-
*/
|
642 |
-
public function italy_cl_option_text($args) {
|
643 |
-
|
644 |
-
/**
|
645 |
-
* Allow HTML tags in text area
|
646 |
-
* changed esc_textarea( $this->options['text'] ); with wp_kses_post( $this->options['text'] );
|
647 |
-
* @todo Add padding to text editor
|
648 |
-
* @todo Add word counter for UX for the displayed banner on mobile
|
649 |
-
*/
|
650 |
-
|
651 |
-
if ( function_exists("wp_editor") ):
|
652 |
-
wp_editor(
|
653 |
-
wp_kses_post( $this->options['text'] ),
|
654 |
-
'italy_cookie_choices_text',
|
655 |
-
array(
|
656 |
-
'textarea_name' => 'italy_cookie_choices[text]',
|
657 |
-
'media_buttons' => false,
|
658 |
-
'textarea_rows' => 5,
|
659 |
-
'editor_css' => '<style>#wp-italy_cookie_choices_text-wrap{max-width:520px}</style>',
|
660 |
-
'teeny' => true
|
661 |
-
)
|
662 |
-
);
|
663 |
-
else:
|
664 |
-
?>
|
665 |
-
<textarea rows="5" cols="70" name="italy_cookie_choices[text]" id="italy_cookie_choices[text]" placeholder="<?php _e( 'Your short cookie policy', 'italy-cookie-choices' ) ?>" ><?php echo wp_kses_post( $this->options['text'] ); ?></textarea>
|
666 |
-
|
667 |
-
<?php endif; ?>
|
668 |
-
|
669 |
-
<br>
|
670 |
-
|
671 |
-
<label for="italy_cookie_choices[text]">
|
672 |
-
<?php echo __( 'People will see this notice only the first time that they enter your site', 'italy-cookie-choices' ); ?>
|
673 |
-
</label>
|
674 |
-
|
675 |
-
<?php
|
676 |
-
|
677 |
-
}
|
678 |
-
|
679 |
-
/**
|
680 |
-
* Input for url policy page
|
681 |
-
* @return string
|
682 |
-
*/
|
683 |
-
public function italy_cl_option_url($args) {
|
684 |
-
|
685 |
-
/**
|
686 |
-
* Get the $post_ID for autocomplete function and put it in javascript var
|
687 |
-
* @var array
|
688 |
-
*/
|
689 |
-
$urls = array();
|
690 |
-
foreach( $this->post_and_page_array as $post )
|
691 |
-
$urls[] = get_permalink( $post->ID );
|
692 |
-
|
693 |
-
?>
|
694 |
-
<script>
|
695 |
-
var urls = '<?php echo $this->wp_json_encode( $urls ); ?>';
|
696 |
-
</script>
|
697 |
-
<input type="text" id="italy_cookie_choices[url]" name="italy_cookie_choices[url]" value="<?php echo esc_url( $this->options['url'] ); ?>" placeholder="<?php _e( 'e.g. http://www.aboutcookies.org/', 'italy-cookie-choices' ) ?>" size="70" />
|
698 |
-
<br>
|
699 |
-
<label for="italy_cookie_choices[url]">
|
700 |
-
<?php echo __( 'Insert here the link to your policy page', 'italy-cookie-choices' ); ?> <a href="post-new.php?post_type=page"><?php _e( 'otherwise create a new one and then add URL to this input', 'italy-cookie-choices' ); ?></a>
|
701 |
-
<br>
|
702 |
-
<?php echo __( 'Start typing first two letters of the name of the policy page and then select it from the menu below the input', 'italy-cookie-choices' ); ?>
|
703 |
-
</label>
|
704 |
-
|
705 |
-
<?php
|
706 |
-
|
707 |
-
}
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Slug for cookie policy page
|
711 |
-
* @return strimg Slug for cookie policy page Default null
|
712 |
-
*/
|
713 |
-
public function italy_cl_option_slug($args) {
|
714 |
-
|
715 |
-
$slug = ( isset( $this->options['slug'] ) ) ? $this->options['slug'] : '' ;
|
716 |
-
|
717 |
-
/**
|
718 |
-
* Get the $post_name for autocomplete function and put it in javascript var
|
719 |
-
* @var array
|
720 |
-
*/
|
721 |
-
$slugs = array();
|
722 |
-
foreach( $this->post_and_page_array as $post )
|
723 |
-
$slugs[] = $post->post_name;
|
724 |
-
|
725 |
-
?>
|
726 |
-
<script>
|
727 |
-
var slugs = '<?php echo $this->wp_json_encode( $slugs ); ?>';
|
728 |
-
</script>
|
729 |
-
<input type="text" id="italy_cookie_choices[slug]" name="italy_cookie_choices[slug]" value="<?php echo esc_attr( $slug ); ?>" placeholder="<?php _e( 'e.g. privacy-e-cookie', 'italy-cookie-choices' ); ?>" size="70" class="slug_autocomplete"/>
|
730 |
-
<br>
|
731 |
-
<label for="italy_cookie_choices[slug]">
|
732 |
-
<?php _e( 'Insert your cookie policy page slug (e.g. for the page http://www.miodominio.it/privacy-e-cookie/ the slug is <strong>privacy-e-cookie</strong>).<br>In this way it will display only the topbar in your cookie policy page, the scroll and the second view will be deactivated in that page too.', 'italy-cookie-choices' ); ?>
|
733 |
-
<br>
|
734 |
-
<?php echo __( 'Start typing first two letters of the name of the policy page and then select it from the menu below the input', 'italy-cookie-choices' ); ?>
|
735 |
-
</label>
|
736 |
-
|
737 |
-
<?php
|
738 |
-
|
739 |
-
}
|
740 |
-
|
741 |
-
/**
|
742 |
-
* Input for anchor_text
|
743 |
-
* @return string
|
744 |
-
*/
|
745 |
-
public function italy_cl_option_anchor_text($args) {
|
746 |
-
|
747 |
-
?>
|
748 |
-
<input type="text" id="italy_cookie_choices[anchor_text]" name="italy_cookie_choices[anchor_text]" value="<?php echo esc_attr( $this->options['anchor_text'] ); ?>" placeholder="<?php _e( 'e.g. More Info', 'italy-cookie-choices' ) ?>" />
|
749 |
-
|
750 |
-
<label for="italy_cookie_choices[anchor_text]">
|
751 |
-
<?php echo __( 'Insert here anchor text for the link', 'italy-cookie-choices'); ?>
|
752 |
-
</label>
|
753 |
-
|
754 |
-
<?php
|
755 |
-
|
756 |
-
}
|
757 |
-
|
758 |
-
/**
|
759 |
-
* Input for anchor_text
|
760 |
-
* @return string
|
761 |
-
*/
|
762 |
-
public function italy_cl_option_button_text($args) {
|
763 |
-
|
764 |
-
?>
|
765 |
-
<input type="text" id="italy_cookie_choices[button_text]" name="italy_cookie_choices[button_text]" value="<?php echo esc_attr( $this->options['button_text'] ); ?>" placeholder="<?php _e( 'e.g. Close', 'italy-cookie-choices' ) ?>" />
|
766 |
-
|
767 |
-
<label for="italy_cookie_choices[button_text]">
|
768 |
-
<?php echo __( 'Insert here name of button (e.g. "Close") ', 'italy-cookie-choices' ); ?>
|
769 |
-
</label>
|
770 |
-
|
771 |
-
<?php
|
772 |
-
|
773 |
-
}
|
774 |
-
|
775 |
-
/**
|
776 |
-
* NUOVA SETTINGS SECTIONS PER LO STILE
|
777 |
-
*/
|
778 |
-
|
779 |
-
/**
|
780 |
-
* Display message in stile plugin panel
|
781 |
-
* @return string
|
782 |
-
*/
|
783 |
-
public function italy_cl_style_settings_section_callback() {
|
784 |
-
|
785 |
-
_e( 'Customize your style settings', 'italy-cookie-choices' );
|
786 |
-
|
787 |
-
}
|
788 |
-
|
789 |
-
/**
|
790 |
-
* Snippet for checkbox
|
791 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
792 |
-
*/
|
793 |
-
public function italy_cl_option_html_margin($args) {
|
794 |
-
|
795 |
-
$html_margin = ( isset( $this->options['html_margin'] ) ) ? $this->options['html_margin'] : '' ;
|
796 |
-
|
797 |
-
?>
|
798 |
-
|
799 |
-
<input type='checkbox' name='italy_cookie_choices[html_margin]' <?php checked( $html_margin, 1 ); ?> value='1' id="italy_cookie_choices[html_margin]">
|
800 |
-
<label for="italy_cookie_choices[html_margin]">
|
801 |
-
<?php _e( 'Add a page top margin for info top bar, only for default topbar stile', 'italy-cookie-choices' ); ?>
|
802 |
-
</label>
|
803 |
-
|
804 |
-
<?php
|
805 |
-
|
806 |
-
}
|
807 |
-
|
808 |
-
/**
|
809 |
-
* Snippet for select
|
810 |
-
* @return strimg Chose the JS_Template to use.
|
811 |
-
*/
|
812 |
-
public function italy_cl_option_js_template($args) {
|
813 |
-
|
814 |
-
$js_template = ( isset( $this->options['js_template'] ) ) ? $this->options['js_template'] : $this->js_template ;
|
815 |
-
|
816 |
-
?>
|
817 |
-
<select name='italy_cookie_choices[js_template]' id="italy_cookie_choices[js_template]">
|
818 |
-
|
819 |
-
<option value="default" <?php if ( $js_template === 'default' ) echo 'selected';?>><?php _e( 'Default cookiechoices template (centered with text links)', 'italy-cookie-choices' ); ?></option>
|
820 |
-
|
821 |
-
<option value="bigbutton" <?php if ( $js_template === 'bigbutton' ) echo 'selected';?>><?php _e( 'Centered container with left aligned text and big buttons', 'italy-cookie-choices' ); ?></option>
|
822 |
-
|
823 |
-
<option value="smallbutton" <?php if ( $js_template === 'smallbutton' ) echo 'selected';?>><?php _e( 'Centered container with left aligned text and small buttons', 'italy-cookie-choices' ); ?></option>
|
824 |
-
|
825 |
-
<option value="custom" <?php if ( $js_template === 'custom' ) echo 'selected';?>><?php _e( 'My custom CSS', 'italy-cookie-choices' ); ?></option>
|
826 |
-
|
827 |
-
</select>
|
828 |
-
<label for="italy_cookie_choices[js_template]">
|
829 |
-
<?php _e( 'Select the template to use', 'italy-cookie-choices' ); ?>
|
830 |
-
</label>
|
831 |
-
|
832 |
-
<?php
|
833 |
-
|
834 |
-
}
|
835 |
-
|
836 |
-
/**
|
837 |
-
* Snippet for checkbox
|
838 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
839 |
-
*/
|
840 |
-
public function italy_cl_option_banner_bg($args) {
|
841 |
-
|
842 |
-
$banner_bg = ( isset( $this->options['banner_bg'] ) ) ? $this->options['banner_bg'] : '#fff' ;
|
843 |
-
|
844 |
-
?>
|
845 |
-
|
846 |
-
<input type="text" id="italy_cookie_choices[banner_bg]" name="italy_cookie_choices[banner_bg]" value="<?php echo esc_attr( $banner_bg ); ?>" placeholder="<?php echo esc_attr( $banner_bg ); ?>" class="color-field" data-default-color="#fff"/>
|
847 |
-
|
848 |
-
|
849 |
-
<label for="italy_cookie_choices[banner_bg]">
|
850 |
-
<?php _e( 'Custom Background color for banner', 'italy-cookie-choices' ); ?>
|
851 |
-
</label>
|
852 |
-
|
853 |
-
<?php
|
854 |
-
|
855 |
-
}
|
856 |
-
|
857 |
-
/**
|
858 |
-
* Snippet for banner text color
|
859 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
860 |
-
*/
|
861 |
-
public function italy_cl_option_banner_text_color($args) {
|
862 |
-
|
863 |
-
$banner_text_color = ( isset( $this->options['banner_text_color'] ) ) ? $this->options['banner_text_color'] : '#000' ;
|
864 |
-
|
865 |
-
?>
|
866 |
-
|
867 |
-
<input type="text" id="italy_cookie_choices[banner_text_color]" name="italy_cookie_choices[banner_text_color]" value="<?php echo esc_attr( $banner_text_color ); ?>" placeholder="<?php echo esc_attr( $banner_text_color ); ?>" class="color-field" data-default-color="#000"/>
|
868 |
-
|
869 |
-
<label for="italy_cookie_choices[banner_text_color]">
|
870 |
-
<?php _e( 'Custom text color for banner', 'italy-cookie-choices' ); ?>
|
871 |
-
</label>
|
872 |
-
|
873 |
-
<?php
|
874 |
-
|
875 |
-
}
|
876 |
-
|
877 |
-
/**
|
878 |
-
* Textarea for custom CSS
|
879 |
-
* @return string
|
880 |
-
*/
|
881 |
-
public function italy_cl_option_customCSS($args) {
|
882 |
-
|
883 |
-
$customCSS = ( isset( $this->options['customCSS'] ) ) ? $this->options['customCSS'] : '' ;
|
884 |
-
|
885 |
-
?>
|
886 |
-
|
887 |
-
<textarea rows="5" cols="70" name="italy_cookie_choices[customCSS]" id="italy_cookie_choices[customCSS]" placeholder="<?php _e( 'Your custom css', 'italy-cookie-choices' ) ?>" ><?php echo esc_textarea( $customCSS ); ?></textarea>
|
888 |
-
<br>
|
889 |
-
<label for="italy_cookie_choices[customCSS]">
|
890 |
-
<?php echo __( 'Inset here your custom CSS for banner', 'italy-cookie-choices' ); ?>
|
891 |
-
</label>
|
892 |
-
|
893 |
-
<?php
|
894 |
-
|
895 |
-
}
|
896 |
-
|
897 |
-
/**
|
898 |
-
* Input for custom CSS class
|
899 |
-
* @return string
|
900 |
-
*/
|
901 |
-
public function italy_cl_option_customClass($args) {
|
902 |
-
|
903 |
-
$bannerStyle = ( isset( $this->options['bannerStyle'] ) ) ? esc_attr( $this->options['bannerStyle'] ) : 'bannerStyle' ;
|
904 |
-
|
905 |
-
$contentStyle = ( isset( $this->options['contentStyle'] ) ) ? esc_attr( $this->options['contentStyle'] ) : 'contentStyle' ;
|
906 |
-
|
907 |
-
$consentText = ( isset( $this->options['consentText'] ) ) ? esc_attr( $this->options['consentText'] ) : 'consentText' ;
|
908 |
-
|
909 |
-
$infoClass = ( isset( $this->options['infoClass'] ) ) ? esc_attr( $this->options['infoClass'] ) : 'italybtn' ;
|
910 |
-
|
911 |
-
$closeClass = ( isset( $this->options['closeClass'] ) ) ? esc_attr( $this->options['closeClass'] ) : 'italybtn' ;
|
912 |
-
|
913 |
-
?>
|
914 |
-
|
915 |
-
<input type="text" id="italy_cookie_choices[bannerStyle]" name="italy_cookie_choices[bannerStyle]" value="<?php echo esc_attr( $bannerStyle ); ?>" placeholder="<?php _e( 'Eg: bannerStyle', 'italy-cookie-choices' ); ?>" />
|
916 |
-
<label for="italy_cookie_choices[bannerStyle]">
|
917 |
-
<?php echo __( 'CSS class for div container (Default <code>bannerStyle</code>)', 'italy-cookie-choices' ); ?>
|
918 |
-
</label>
|
919 |
-
<br>
|
920 |
-
<input type="text" id="italy_cookie_choices[contentStyle]" name="italy_cookie_choices[contentStyle]" value="<?php echo esc_attr( $contentStyle ); ?>" placeholder="<?php _e( 'Eg: contentStyle', 'italy-cookie-choices' ); ?>" />
|
921 |
-
<label for="italy_cookie_choices[contentStyle]">
|
922 |
-
<?php echo __( 'CSS class for div content (Default <code>contentStyle</code>)', 'italy-cookie-choices' ); ?>
|
923 |
-
</label>
|
924 |
-
<br>
|
925 |
-
<input type="text" id="italy_cookie_choices[consentText]" name="italy_cookie_choices[consentText]" value="<?php echo esc_attr( $consentText ); ?>" placeholder="<?php _e( 'Eg: consentText', 'italy-cookie-choices' );; ?>" />
|
926 |
-
<label for="italy_cookie_choices[consentText]">
|
927 |
-
<?php echo __( 'CSS class for span content (Default <code>consentText</code>)', 'italy-cookie-choices' ); ?>
|
928 |
-
</label>
|
929 |
-
<br>
|
930 |
-
<input type="text" id="italy_cookie_choices[infoClass]" name="italy_cookie_choices[infoClass]" value="<?php echo esc_attr( $infoClass ); ?>" placeholder="<?php _e( 'Eg: infoClass', 'italy-cookie-choices' ); ?>" />
|
931 |
-
<label for="italy_cookie_choices[infoClass]">
|
932 |
-
<?php echo __( 'CSS class for Info link (Default <code>itaybtn</code>)', 'italy-cookie-choices' ); ?>
|
933 |
-
</label>
|
934 |
-
<br>
|
935 |
-
<input type="text" id="italy_cookie_choices[closeClass]" name="italy_cookie_choices[closeClass]" value="<?php echo esc_attr( $closeClass ); ?>" placeholder="<?php _e( 'Eg: closeClass', 'italy-cookie-choices' ); ?>" />
|
936 |
-
<label for="italy_cookie_choices[closeClass]">
|
937 |
-
<?php echo __( 'CSS class for close link (Default <code>itaybtn</code>)', 'italy-cookie-choices' ); ?>
|
938 |
-
</label>
|
939 |
-
|
940 |
-
<p><?php _e( 'Customize with your personal CSS class', 'italy-cookie-choices' ); ?></p>
|
941 |
-
|
942 |
-
<?php
|
943 |
-
|
944 |
-
}
|
945 |
-
|
946 |
-
/**
|
947 |
-
* NUOVA SETTINGS SECTIONS PER LE OPZIONI AVANZATE
|
948 |
-
*/
|
949 |
-
|
950 |
-
/**
|
951 |
-
* Display message in plugin advanced setting section
|
952 |
-
* @return string
|
953 |
-
*/
|
954 |
-
public function italy_cl_advanced_settings_section_callback() {
|
955 |
-
|
956 |
-
_e( 'Customize your advanced settings', 'italy-cookie-choices' );
|
957 |
-
|
958 |
-
}
|
959 |
-
|
960 |
-
/**
|
961 |
-
* Snippet for cookie name
|
962 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
963 |
-
*/
|
964 |
-
public function italy_cl_option_cookie_name($args) {
|
965 |
-
|
966 |
-
$cookie_name = ( isset( $this->options['cookie_name'] ) ) ? $this->options['cookie_name'] : $this->cookieName ;
|
967 |
-
|
968 |
-
?>
|
969 |
-
<input type="text" id="italy_cookie_choices[cookie_name]" name="italy_cookie_choices[cookie_name]" value="<?php echo esc_attr( $cookie_name ); ?>" placeholder="<?php echo esc_attr( $this->cookieName ); ?>" />
|
970 |
-
|
971 |
-
<label for="italy_cookie_choices[cookie_name]">
|
972 |
-
<?php _e( 'Insert your cookie name (Default: displayCookieConsent)', 'italy-cookie-choices' ); ?>
|
973 |
-
</label>
|
974 |
-
|
975 |
-
<?php
|
976 |
-
|
977 |
-
}
|
978 |
-
|
979 |
-
/**
|
980 |
-
* Snippet for cookie value
|
981 |
-
* @return strimg Activate banner in front-end Default doesn't display
|
982 |
-
*/
|
983 |
-
public function italy_cl_option_cookie_value($args) {
|
984 |
-
|
985 |
-
$cookie_value = ( isset( $this->options['cookie_value'] ) ) ? $this->options['cookie_value'] : $this->cookieVal ;
|
986 |
-
|
987 |
-
?>
|
988 |
-
<input type="text" id="italy_cookie_choices[cookie_value]" name="italy_cookie_choices[cookie_value]" value="<?php echo esc_attr( $cookie_value ); ?>" placeholder="<?php echo esc_attr( $this->cookieVal ); ?>" />
|
989 |
-
|
990 |
-
<label for="italy_cookie_choices[cookie_value]">
|
991 |
-
<?php _e( 'Insert your cookie value (Default: y)', 'italy-cookie-choices' ); ?>
|
992 |
-
</label>
|
993 |
-
|
994 |
-
<?php
|
995 |
-
|
996 |
-
}
|
997 |
-
|
998 |
-
/**
|
999 |
-
* Snippet for target checkbox
|
1000 |
-
* @return strimg Activate for open policy page in new tab
|
1001 |
-
* Default open in same tab
|
1002 |
-
*/
|
1003 |
-
public function italy_cl_option_target($args) {
|
1004 |
-
|
1005 |
-
$target = ( isset( $this->options['target'] ) ) ? $this->options['target'] : '' ;
|
1006 |
-
|
1007 |
-
?>
|
1008 |
-
|
1009 |
-
<input type='checkbox' name='italy_cookie_choices[target]' <?php checked( $target, 1 ); ?> value='1' id="italy_cookie_choices[target]">
|
1010 |
-
<label for="italy_cookie_choices[target]">
|
1011 |
-
<?php _e( 'Open your cookie policy page in new one', 'italy-cookie-choices' ); ?>
|
1012 |
-
</label>
|
1013 |
-
|
1014 |
-
<?php
|
1015 |
-
|
1016 |
-
}
|
1017 |
-
|
1018 |
-
/**
|
1019 |
-
* Snippet for target checkbox
|
1020 |
-
* @return strimg Activate for open policy page in new tab
|
1021 |
-
* Default open in same tab
|
1022 |
-
*/
|
1023 |
-
public function italy_cl_option_block($args) {
|
1024 |
-
|
1025 |
-
$all_block = ( isset( $this->options['all_block'] ) ) ? $this->options['all_block'] : '' ;
|
1026 |
-
|
1027 |
-
$block = ( isset( $this->options['block'] ) && $all_block === '' ) ? $this->options['block'] : '' ;
|
1028 |
-
|
1029 |
-
$widget_block = ( isset( $this->options['widget_block'] ) && $all_block === '' ) ? $this->options['widget_block'] : '' ;
|
1030 |
-
|
1031 |
-
?>
|
1032 |
-
|
1033 |
-
<input type='checkbox' name='italy_cookie_choices[block]' <?php checked( $block, 1 ); ?> value='1' id="italy_cookie_choices[block]">
|
1034 |
-
<label for="italy_cookie_choices[block]">
|
1035 |
-
<?php _e( 'Cookie from any embed in your content (Beta) (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
1036 |
-
</label>
|
1037 |
-
<br>
|
1038 |
-
<input type='checkbox' name='italy_cookie_choices[widget_block]' <?php checked( $widget_block, 1 ); ?> value='1' id="italy_cookie_choices[widget_block]">
|
1039 |
-
<label for="italy_cookie_choices[widget_block]">
|
1040 |
-
<?php _e( 'Cookie from any embed in your widget area (Beta) (DEPRECATED)', 'italy-cookie-choices' ); ?>
|
1041 |
-
</label>
|
1042 |
-
<br>
|
1043 |
-
<br>
|
1044 |
-
<input type='checkbox' name='italy_cookie_choices[all_block]' <?php checked( $all_block, 1 ); ?> value='1' id="italy_cookie_choices[all_block]">
|
1045 |
-
<label for="italy_cookie_choices[all_block]">
|
1046 |
-
<?php _e( 'Cookie from any embed in all body, except head and footer (Beta)', 'italy-cookie-choices' ); ?>
|
1047 |
-
</label>
|
1048 |
-
|
1049 |
-
<?php
|
1050 |
-
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
/**
|
1054 |
-
* Textarea for custom_script_block_body_exclude
|
1055 |
-
* Scripts allowed in body
|
1056 |
-
* @return string
|
1057 |
-
*/
|
1058 |
-
public function italy_cl_option_custom_script_block_body_exclude($args) {
|
1059 |
-
|
1060 |
-
/**
|
1061 |
-
* Template with list of code example
|
1062 |
-
*/
|
1063 |
-
require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/template/allow-script.php');
|
1064 |
-
|
1065 |
-
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
1066 |
-
|
1067 |
-
?>
|
1068 |
-
<!-- <div id="editor"><?php // echo esc_textarea( $custom_script_block_body_exclude ); ?></div> -->
|
1069 |
-
|
1070 |
-
<!-- <input type='checkbox' name='italy_cookie_choices[ppp]' <?php // checked( $block, 1 ); ?> value='1' id="italy_cookie_choices[ppp]"> -->
|
1071 |
-
<!-- <br> -->
|
1072 |
-
<textarea rows="5" cols="70" name="italy_cookie_choices[custom_script_block_body_exclude]" id="italy_cookie_choices[custom_script_block_body_exclude]" placeholder="<?php _e( '<script src="http://domain.com/widget-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://otherdomain.com/script-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://lastdomain.com/gadget-example.js"></script>', 'italy-cookie-choices' ) ?>" class="textarea"><?php echo esc_textarea( $custom_script_block_body_exclude ); ?></textarea>
|
1073 |
-
<br>
|
1074 |
-
<a id="SEP" class="button button-secondary add-sep" data-value="<---------SEP--------->"><---------SEP---------></a>
|
1075 |
-
<a id="SOM" class="button button-secondary add-sep" data-value="<---------SOMETHING--------->"><---------SOMETHING---------></a>
|
1076 |
-
|
1077 |
-
<!-- <a href="#TB_inline?width=600&height=550&inlineId=code-example" class="thickbox button button-secondary"><?php // _e( 'View example', 'italy-cookie-choices' ); ?></a> -->
|
1078 |
-
|
1079 |
-
<br>
|
1080 |
-
<label for="italy_cookie_choices[custom_script_block_body_exclude]">
|
1081 |
-
<?php echo __( 'Scripts to be excluded from the automatic block.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex', 'italy-cookie-choices' ); ?>
|
1082 |
-
</label>
|
1083 |
-
<p>
|
1084 |
-
<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki/Custom-script" target="_blank"><?php _e( 'For more information see the documentation', 'italy-cookie-choices' ); ?></a>
|
1085 |
-
</p>
|
1086 |
-
|
1087 |
-
<?php
|
1088 |
-
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
/**
|
1092 |
-
* Textarea for content_message_text
|
1093 |
-
* @return string
|
1094 |
-
*/
|
1095 |
-
public function italy_cl_option_custom_script_block($args) {
|
1096 |
-
|
1097 |
-
/**
|
1098 |
-
* Template with block script
|
1099 |
-
*/
|
1100 |
-
require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/template/block-script.php');
|
1101 |
-
|
1102 |
-
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
1103 |
-
|
1104 |
-
?>
|
1105 |
-
<textarea rows="5" cols="70" name="italy_cookie_choices[custom_script_block]" id="italy_cookie_choices[custom_script_block]" placeholder="<?php _e( '<script src="http://domain.com/widget-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://otherdomain.com/script-example.js"></script>'."\n".'<---------SEP--------->'."\n".'<script src="http://lastdomain.com/gadget-example.js"></script>', 'italy-cookie-choices' ) ?>" ><?php echo esc_textarea( $custom_script_block ); ?></textarea>
|
1106 |
-
<br>
|
1107 |
-
<a id="SEP" class="button button-secondary add-sep" data-value="<---------SEP--------->"><---------SEP---------></a>
|
1108 |
-
<a id="SOM" class="button button-secondary add-sep" data-value="<---------SOMETHING--------->"><---------SOMETHING---------></a>
|
1109 |
-
<br>
|
1110 |
-
<label for="italy_cookie_choices[custom_script_block]">
|
1111 |
-
<?php echo __( 'Scripts shown in the head and in the footer does not automatically blocked.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex', 'italy-cookie-choices' ); ?>
|
1112 |
-
</label>
|
1113 |
-
<p>
|
1114 |
-
<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki/Custom-script" target="_blank"><?php _e( 'For more information see the documentation', 'italy-cookie-choices' ); ?></a>
|
1115 |
-
</p>
|
1116 |
-
|
1117 |
-
<?php
|
1118 |
-
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
/**
|
1122 |
-
* Function for custom script block
|
1123 |
-
* @return string
|
1124 |
-
*/
|
1125 |
-
public function italy_cl_option_content_message_text($args) {
|
1126 |
-
|
1127 |
-
$content_message_text = ( isset( $this->options['content_message_text'] ) ) ? $this->options['content_message_text'] : '' ;
|
1128 |
-
|
1129 |
-
/**
|
1130 |
-
* Allow HTML tags in message text area
|
1131 |
-
* changed esc_textarea( $this->options['text'] ); with wp_kses_post( $this->options['text'] );
|
1132 |
-
* @todo Add padding to text editor
|
1133 |
-
*/
|
1134 |
-
|
1135 |
-
if ( function_exists("wp_editor") ):
|
1136 |
-
wp_editor(
|
1137 |
-
wp_kses_post( $content_message_text ),
|
1138 |
-
'italy_cookie_choices_content_message_text',
|
1139 |
-
array(
|
1140 |
-
'textarea_name' => 'italy_cookie_choices[content_message_text]',
|
1141 |
-
'media_buttons' => false,
|
1142 |
-
'textarea_rows' => 5,
|
1143 |
-
'editor_css' => '<style>#wp-italy_cookie_choices_content_message_text-wrap{max-width:520px}</style>',
|
1144 |
-
'teeny' => true
|
1145 |
-
)
|
1146 |
-
);
|
1147 |
-
else:
|
1148 |
-
?>
|
1149 |
-
<textarea rows="5" cols="70" name="italy_cookie_choices[content_message_text]" id="italy_cookie_choices[content_message_text]" placeholder="<?php _e( 'Your lock message for embedded contents inside posts, pages and widgets', 'italy-cookie-choices' ) ?>" ><?php echo wp_kses_post( $content_message_text ); ?></textarea>
|
1150 |
-
<?php endif; ?>
|
1151 |
-
<br>
|
1152 |
-
<label for="italy_cookie_choices[content_message_text]">
|
1153 |
-
<?php echo __( 'People will see this notice only the first time that they enter your site', 'italy-cookie-choices' ); ?>
|
1154 |
-
</label>
|
1155 |
-
|
1156 |
-
<?php
|
1157 |
-
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
/**
|
1161 |
-
* Input for content_message_button_text
|
1162 |
-
* @return string
|
1163 |
-
*/
|
1164 |
-
public function italy_cl_option_content_message_button_text($args) {
|
1165 |
-
|
1166 |
-
$content_message_button_text = ( isset( $this->options['content_message_button_text'] ) ) ? $this->options['content_message_button_text'] : '' ;
|
1167 |
-
|
1168 |
-
?>
|
1169 |
-
<input type="text" id="italy_cookie_choices[content_message_button_text]" name="italy_cookie_choices[content_message_button_text]" value="<?php echo esc_attr( $content_message_button_text ); ?>" placeholder="<?php _e( 'e.g. Close', 'italy-cookie-choices' ) ?>" />
|
1170 |
-
|
1171 |
-
<label for="italy_cookie_choices[content_message_button_text]">
|
1172 |
-
<?php echo __( 'Insert here name of button (e.g. "Close") ', 'italy-cookie-choices' ); ?>
|
1173 |
-
</label>
|
1174 |
-
|
1175 |
-
<?php
|
1176 |
-
|
1177 |
-
}
|
1178 |
-
|
1179 |
-
/**
|
1180 |
-
* Sanitize data
|
1181 |
-
* @param array $input Data to sanitize
|
1182 |
-
* @return array Data sanitized
|
1183 |
-
*/
|
1184 |
-
public function sanitize_callback( $input ){
|
1185 |
-
|
1186 |
-
// require 'class-italy-cookie-choices-sanitize.php';
|
1187 |
-
|
1188 |
-
// new Italy_Cookie_Choices_Sanitize( $input );
|
1189 |
-
|
1190 |
-
$new_input = array();
|
1191 |
-
|
1192 |
-
if( isset( $input['active'] ) )
|
1193 |
-
$new_input['active'] = $input['active'];
|
1194 |
-
|
1195 |
-
if( isset( $input['banner'] ) )
|
1196 |
-
$new_input['banner'] = $input['banner'];
|
1197 |
-
|
1198 |
-
if( isset( $input['scroll'] ) )
|
1199 |
-
$new_input['scroll'] = $input['scroll'];
|
1200 |
-
|
1201 |
-
if( isset( $input['secondView'] ) )
|
1202 |
-
$new_input['secondView'] = $input['secondView'];
|
1203 |
-
|
1204 |
-
if( isset( $input['reload'] ) )
|
1205 |
-
$new_input['reload'] = $input['reload'];
|
1206 |
-
|
1207 |
-
/**
|
1208 |
-
* Multilingual for text, url, anchor_text & button_text
|
1209 |
-
*/
|
1210 |
-
if( isset( $input['text'] ) ){
|
1211 |
-
|
1212 |
-
$new_input['text'] = wp_kses_post( $input['text'] );
|
1213 |
-
// $new_input['text'] = sanitize_text_field( $input['text'] );
|
1214 |
-
register_string( 'Italy Cookie Choices', 'Banner text', $new_input['text'] );
|
1215 |
-
}
|
1216 |
-
|
1217 |
-
if( isset( $input['url'] ) ){
|
1218 |
-
|
1219 |
-
$new_input['url'] = sanitize_text_field( $input['url'] );
|
1220 |
-
|
1221 |
-
register_string( 'Italy Cookie Choices', 'Banner url', $new_input['url'] );
|
1222 |
-
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
if( isset( $input['slug'] ) ){
|
1226 |
-
|
1227 |
-
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
1228 |
-
|
1229 |
-
register_string( 'Italy Cookie Choices', 'Banner slug', $new_input['slug'] );
|
1230 |
-
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
if( isset( $input['anchor_text'] ) ){
|
1234 |
-
|
1235 |
-
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
1236 |
-
|
1237 |
-
register_string( 'Italy Cookie Choices', 'Banner anchor text', $new_input['anchor_text'] );
|
1238 |
-
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
if( isset( $input['button_text'] ) ){
|
1242 |
-
|
1243 |
-
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
1244 |
-
|
1245 |
-
register_string( 'Italy Cookie Choices', 'Banner button text', $new_input['button_text'] );
|
1246 |
-
|
1247 |
-
}
|
1248 |
-
|
1249 |
-
/**
|
1250 |
-
* Sezione per lo stile
|
1251 |
-
*/
|
1252 |
-
if( isset( $input['html_margin'] ) )
|
1253 |
-
$new_input['html_margin'] = $input['html_margin'];
|
1254 |
-
|
1255 |
-
if( isset( $input['js_template'] ) )
|
1256 |
-
$new_input['js_template'] = $input['js_template'];
|
1257 |
-
|
1258 |
-
if( empty( $input['banner_bg'] ) )
|
1259 |
-
$new_input['banner_bg'] = '#fff';
|
1260 |
-
elseif ( isset( $input['banner_bg'] ) )
|
1261 |
-
$new_input['banner_bg'] = sanitize_text_field( $input['banner_bg'] );
|
1262 |
-
|
1263 |
-
if( empty( $input['banner_text_color'] ) )
|
1264 |
-
$new_input['banner_text_color'] = '#000';
|
1265 |
-
elseif ( isset( $input['banner_text_color'] ) )
|
1266 |
-
$new_input['banner_text_color'] = sanitize_text_field( $input['banner_text_color'] );
|
1267 |
-
|
1268 |
-
if( isset( $input['customCSS'] ) )
|
1269 |
-
$new_input['customCSS'] = sanitize_text_field( $input['customCSS'] );
|
1270 |
-
|
1271 |
-
if( empty( $input['bannerStyle'] ) )
|
1272 |
-
$new_input['bannerStyle'] = 'bannerStyle';
|
1273 |
-
elseif( isset( $input['bannerStyle'] ) )
|
1274 |
-
$new_input['bannerStyle'] = sanitize_text_field( $input['bannerStyle'] );
|
1275 |
-
|
1276 |
-
if( empty( $input['contentStyle'] ) )
|
1277 |
-
$new_input['contentStyle'] = 'contentStyle';
|
1278 |
-
elseif( isset( $input['contentStyle'] ) )
|
1279 |
-
$new_input['contentStyle'] = sanitize_text_field( $input['contentStyle'] );
|
1280 |
-
|
1281 |
-
if( empty( $input['consentText'] ) )
|
1282 |
-
$new_input['consentText'] = 'consentText';
|
1283 |
-
elseif( isset( $input['consentText'] ) )
|
1284 |
-
$new_input['consentText'] = sanitize_text_field( $input['consentText'] );
|
1285 |
-
|
1286 |
-
if( empty( $input['infoClass'] ) )
|
1287 |
-
$new_input['infoClass'] = 'italybtn';
|
1288 |
-
elseif( isset( $input['infoClass'] ) )
|
1289 |
-
$new_input['infoClass'] = sanitize_text_field( $input['infoClass'] );
|
1290 |
-
|
1291 |
-
if( empty( $input['closeClass'] ) )
|
1292 |
-
$new_input['closeClass'] = 'italybtn';
|
1293 |
-
elseif( isset( $input['closeClass'] ) )
|
1294 |
-
$new_input['closeClass'] = sanitize_text_field( $input['closeClass'] );
|
1295 |
-
|
1296 |
-
/**
|
1297 |
-
* Sezione per le opzioni avanzate
|
1298 |
-
* Esempio per add_settings_error()
|
1299 |
-
* @link https://wordpress.org/support/topic/how-to-use-add_settings_error-for-nested-options-array?replies=2
|
1300 |
-
* @link http://pastebin.com/K4kJ0DNG
|
1301 |
-
*/
|
1302 |
-
if( empty( $input['cookie_name'] ) ){
|
1303 |
-
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie name field it can\'t be empty. Restored default name.', 'italy-cookie-choices' ), 'error');
|
1304 |
-
$new_input['cookie_name'] = $this->cookieName;
|
1305 |
-
}
|
1306 |
-
else
|
1307 |
-
$new_input['cookie_name'] = sanitize_text_field( $input['cookie_name'] );
|
1308 |
-
|
1309 |
-
if( empty( $input['cookie_value'] ) ){
|
1310 |
-
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie value field it can\'t be empty. Restored default value.', 'italy-cookie-choices' ), 'error');
|
1311 |
-
$new_input['cookie_value'] = $this->cookieVal;
|
1312 |
-
}
|
1313 |
-
else
|
1314 |
-
$new_input['cookie_value'] = sanitize_text_field( $input['cookie_value'] );
|
1315 |
-
|
1316 |
-
if( isset( $input['target'] ) )
|
1317 |
-
$new_input['target'] = $input['target'];
|
1318 |
-
|
1319 |
-
if( isset( $input['block'] ) )
|
1320 |
-
$new_input['block'] = $input['block'];
|
1321 |
-
|
1322 |
-
if( isset( $input['widget_block'] ) )
|
1323 |
-
$new_input['widget_block'] = $input['widget_block'];
|
1324 |
-
|
1325 |
-
if( isset( $input['all_block'] ) )
|
1326 |
-
$new_input['all_block'] = $input['all_block'];
|
1327 |
-
|
1328 |
-
/**
|
1329 |
-
* Allow script
|
1330 |
-
*/
|
1331 |
-
if( isset( $input['allow_iframe'] ) )
|
1332 |
-
$new_input['allow_iframe'] = $input['allow_iframe'];
|
1333 |
-
|
1334 |
-
if( isset( $input['allow_script'] ) )
|
1335 |
-
$new_input['allow_script'] = $input['allow_script'];
|
1336 |
-
|
1337 |
-
if( isset( $input['allow_embed'] ) )
|
1338 |
-
$new_input['allow_embed'] = $input['allow_embed'];
|
1339 |
-
|
1340 |
-
if( isset( $input['custom_script_block_body_exclude'] ) )
|
1341 |
-
$new_input['custom_script_block_body_exclude'] = $input['custom_script_block_body_exclude'];
|
1342 |
-
/**********************************************************************/
|
1343 |
-
|
1344 |
-
/**
|
1345 |
-
* Block script
|
1346 |
-
*/
|
1347 |
-
if( isset( $input['block_iframe'] ) )
|
1348 |
-
$new_input['block_iframe'] = $input['block_iframe'];
|
1349 |
-
|
1350 |
-
if( isset( $input['block_script'] ) )
|
1351 |
-
$new_input['block_script'] = $input['block_script'];
|
1352 |
-
|
1353 |
-
if( isset( $input['block_embed'] ) )
|
1354 |
-
$new_input['block_embed'] = $input['block_embed'];
|
1355 |
-
|
1356 |
-
if( isset( $input['custom_script_block'] ) )
|
1357 |
-
$new_input['custom_script_block'] = $input['custom_script_block'];
|
1358 |
-
/**********************************************************************/
|
1359 |
-
|
1360 |
-
if( isset( $input['content_message_text'] ) ){
|
1361 |
-
|
1362 |
-
$new_input['content_message_text'] = wp_kses_post( $input['content_message_text'] );
|
1363 |
-
|
1364 |
-
register_string( 'Italy Cookie Choices', 'Content message text', $new_input['content_message_text'] );
|
1365 |
-
|
1366 |
-
}
|
1367 |
-
|
1368 |
-
if( isset( $input['content_message_button_text'] ) ){
|
1369 |
-
|
1370 |
-
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
1371 |
-
|
1372 |
-
register_string( 'Italy Cookie Choices', 'Content message button text', $new_input['content_message_button_text'] );
|
1373 |
-
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
return $new_input;
|
1377 |
-
|
1378 |
-
}
|
1379 |
-
|
1380 |
-
/**
|
1381 |
-
* Function for color picker in admin
|
1382 |
-
* @param string $hook_suffix Hook for script
|
1383 |
-
* @return Append script
|
1384 |
-
* @link https://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
|
1385 |
-
* @link http://code.tutsplus.com/articles/how-to-use-wordpress-color-picker-api--wp-33067
|
1386 |
-
*/
|
1387 |
-
public function add_script_and_style( $hook_suffix ) {
|
1388 |
-
|
1389 |
-
// first check that $hook_suffix is appropriate for your admin page
|
1390 |
-
if ( 'settings_page_italy-cookie-choices' !== $hook_suffix )
|
1391 |
-
return;
|
1392 |
-
|
1393 |
-
/**
|
1394 |
-
* Add color picker in admin menù
|
1395 |
-
*/
|
1396 |
-
wp_enqueue_style( 'wp-color-picker' );
|
1397 |
-
|
1398 |
-
/**
|
1399 |
-
* Load jQuery autocomplete for slug and url input
|
1400 |
-
*/
|
1401 |
-
wp_enqueue_style( 'jquery-ui-autocomplete' );
|
1402 |
-
wp_enqueue_script( 'jquery-ui-autocomplete' );
|
1403 |
-
|
1404 |
-
/**
|
1405 |
-
* Add thickbox for diplay code example
|
1406 |
-
* @link https://codex.wordpress.org/Javascript_Reference/ThickBox
|
1407 |
-
*/
|
1408 |
-
// add_thickbox();
|
1409 |
-
|
1410 |
-
/**
|
1411 |
-
* Load ACE from CDN
|
1412 |
-
* Functionality for custom script editor and CSS editor
|
1413 |
-
*/
|
1414 |
-
// wp_register_script('ace', '//cdn.jsdelivr.net/ace/1.1.9/min/ace.js', false, null, true);
|
1415 |
-
// wp_enqueue_script('ace');
|
1416 |
-
|
1417 |
-
wp_enqueue_style(
|
1418 |
-
'italy-cookie-choices-css',
|
1419 |
-
plugins_url('admin/css/admin.css', ITALY_COOKIE_CHOICES_FILE ),
|
1420 |
-
array( 'dashicons' ),
|
1421 |
-
null
|
1422 |
-
);
|
1423 |
-
|
1424 |
-
wp_enqueue_script(
|
1425 |
-
'italy-cookie-choices-script',
|
1426 |
-
plugins_url('admin/js/src/script.js', ITALY_COOKIE_CHOICES_FILE ),
|
1427 |
-
array(
|
1428 |
-
// 'jquery',
|
1429 |
-
'wp-color-picker',
|
1430 |
-
'jquery-ui-widget',
|
1431 |
-
'jquery-ui-autocomplete',
|
1432 |
-
'jquery-effects-shake',
|
1433 |
-
// 'ace'
|
1434 |
-
),
|
1435 |
-
null,
|
1436 |
-
true
|
1437 |
-
);
|
1438 |
-
|
1439 |
-
}
|
1440 |
-
|
1441 |
-
/**
|
1442 |
-
* Add link in plugin activation panel
|
1443 |
-
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
|
1444 |
-
* @param array $links Array of link in wordpress dashboard
|
1445 |
-
* @return array Array with my links
|
1446 |
-
*/
|
1447 |
-
public function plugin_action_links( $links ){
|
1448 |
-
|
1449 |
-
array_unshift($links, '<a href="options-general.php?page=italy-cookie-choices">' . __('Settings','italy-cookie-choices') . '</a>');
|
1450 |
-
|
1451 |
-
array_unshift($links, '<a href="https://github.com/ItalyCookieChoices/italy-cookie-choices/wiki" target="_blank">' . __('Documentation','italy-cookie-choices') . '</a>');
|
1452 |
-
|
1453 |
-
return $links;
|
1454 |
-
}// plugin_action_links()
|
1455 |
-
|
1456 |
-
/**
|
1457 |
-
* Set the three array with predefinited third party script|iframe|embed
|
1458 |
-
* @see https://codex.wordpress.org/Embeds For more embed
|
1459 |
-
* @todo See above
|
1460 |
-
* @return void
|
1461 |
-
*/
|
1462 |
-
private function create_third_party_array(){
|
1463 |
-
|
1464 |
-
$this->iframe_array = array(
|
1465 |
-
'' => '',
|
1466 |
-
'google' => 'google',
|
1467 |
-
'google_maps' => 'maps',
|
1468 |
-
'youtube' => 'youtube',
|
1469 |
-
'disqus' => 'disqus',
|
1470 |
-
'twitter' => 'twitter',
|
1471 |
-
'vimeo' => 'vimeo',
|
1472 |
-
'facebook' => 'facebook',
|
1473 |
-
);
|
1474 |
-
|
1475 |
-
$this->script_array = array(
|
1476 |
-
'' => '',
|
1477 |
-
'google' => 'google',
|
1478 |
-
'google_maps' => 'maps',
|
1479 |
-
'googleapis' => 'googleapis',
|
1480 |
-
'AdSense' => 'googlesyndication',
|
1481 |
-
'doubleclick' => 'doubleclick',
|
1482 |
-
'plusone' => 'plusone',
|
1483 |
-
'platform' => 'platform',
|
1484 |
-
'analytics' => 'analytics',
|
1485 |
-
'facebook' => 'facebook',
|
1486 |
-
'addthis' => 'addthis',
|
1487 |
-
'twitter' => 'twitter',
|
1488 |
-
'linkedin' => 'linkedin',
|
1489 |
-
'pinterest' => 'pinterest',
|
1490 |
-
'disqus' => 'disqus',
|
1491 |
-
'vimeo' => 'vimeo',
|
1492 |
-
'youtube' => 'youtube',
|
1493 |
-
'youtube-nocookie' => 'youtube-nocookie',
|
1494 |
-
'_getTracker' => '_getTracker',
|
1495 |
-
'instagram' => 'instagram',
|
1496 |
-
'cdninstagram' => 'cdninstagram',
|
1497 |
-
'digg' => 'digg',
|
1498 |
-
'eventbrite' => 'eventbrite',
|
1499 |
-
'wordpress' => 'wp'
|
1500 |
-
);
|
1501 |
-
|
1502 |
-
$this->embed_array = array(
|
1503 |
-
'' => ''
|
1504 |
-
);
|
1505 |
-
|
1506 |
-
}
|
1507 |
-
|
1508 |
-
/**
|
1509 |
-
* This function add the HTML to display new functionality for UX allow and block script
|
1510 |
-
* @param array $array Pass the plugin option array[name]
|
1511 |
-
* @param string $arr_name A string name of the array
|
1512 |
-
* @param array $arr_key Array for predefinited script|emebd|iframe
|
1513 |
-
* This add a select box with script name
|
1514 |
-
* @return string Return the HTML for new input
|
1515 |
-
*/
|
1516 |
-
function foreach_script( $array, $arr_name, $arr_key ){
|
1517 |
-
|
1518 |
-
$select = '<select>';
|
1519 |
-
|
1520 |
-
foreach ($arr_key as $key => $value)
|
1521 |
-
$select .= '<option value="' . $value . '">' . $key . '</option>';
|
1522 |
-
|
1523 |
-
$select .= '</select>';
|
1524 |
-
|
1525 |
-
// <button class=" button" disabled>   </button>
|
1526 |
-
$input = '<div class="custom-script">';
|
1527 |
-
$i = 0;
|
1528 |
-
foreach ( $array as $key => $value ){
|
1529 |
-
|
1530 |
-
$input .= '<div class="italy-cookie-choices-clone-div"><input type="text" class="regular-text" data-type="' . $arr_name . '" value="' . esc_attr( $value ) .'" name="italy_cookie_choices[' . $arr_name . '][' . esc_attr( $value ) .']" id="italy_cookie_choices[' . $arr_name . '][' . esc_attr( $value ) .']"/> ' . $select . ' <span><a class="button add" style="font-size:22px"> + </a> ' . ( $i === 0 ? '<a class="button cancel" style="font-size:22px"> x </a>' : '<a class=" button remove" style="font-size:22px"> × </a>' ) . '</span></div>';
|
1531 |
-
|
1532 |
-
$i++;
|
1533 |
-
|
1534 |
-
}
|
1535 |
-
$input .= '</div>';
|
1536 |
-
|
1537 |
-
echo $input;
|
1538 |
-
|
1539 |
-
}
|
1540 |
-
|
1541 |
-
/**
|
1542 |
-
* Process a settings export from config
|
1543 |
-
* @since 1.0.0
|
1544 |
-
*/
|
1545 |
-
function settings_export() {
|
1546 |
-
|
1547 |
-
if ( empty( $_POST[ 'icc_action' ] ) || 'export_settings' !== $_POST[ 'icc_action' ] )
|
1548 |
-
return;
|
1549 |
-
|
1550 |
-
if ( !wp_verify_nonce( $_POST[ 'icc_export_nonce' ], 'icc_export_nonce' ) )
|
1551 |
-
return;
|
1552 |
-
|
1553 |
-
if ( !current_user_can( $this->capability ) )
|
1554 |
-
return;
|
1555 |
-
|
1556 |
-
$settings[0] = $this->options;
|
1557 |
-
|
1558 |
-
ignore_user_abort( true );
|
1559 |
-
|
1560 |
-
nocache_headers();
|
1561 |
-
|
1562 |
-
// date_default_timezone_set('UTC');
|
1563 |
-
header( 'Content-Type: application/json; charset=utf-8' );
|
1564 |
-
header( 'Content-Disposition: attachment; filename=italy-cookie-choices-settings-export-' . date( 'm-d-Y' ) . '.json' );
|
1565 |
-
header( "Expires: 0" );
|
1566 |
-
|
1567 |
-
echo $this->wp_json_encode( $settings, JSON_PRETTY_PRINT );
|
1568 |
-
|
1569 |
-
exit;
|
1570 |
-
}
|
1571 |
-
|
1572 |
-
/**
|
1573 |
-
* Process a settings import from a json file
|
1574 |
-
* @since 1.0.0
|
1575 |
-
*/
|
1576 |
-
function settings_import() {
|
1577 |
-
|
1578 |
-
if ( empty( $_POST[ 'icc_action' ] ) || 'import_settings' != $_POST[ 'icc_action' ] )
|
1579 |
-
return;
|
1580 |
-
|
1581 |
-
if ( !wp_verify_nonce( $_POST[ 'icc_import_nonce' ], 'icc_import_nonce' ) )
|
1582 |
-
return;
|
1583 |
-
|
1584 |
-
if ( !current_user_can( $this->capability ) )
|
1585 |
-
return;
|
1586 |
-
|
1587 |
-
/**
|
1588 |
-
* Get the extension of import file
|
1589 |
-
* @link http://stackoverflow.com/a/19831453 Strict standards: Only variables should be passed by reference
|
1590 |
-
* @var string
|
1591 |
-
*/
|
1592 |
-
$file_name = $_FILES[ 'icc_import_file' ][ 'name' ];
|
1593 |
-
$exploded = explode( '.', $file_name );
|
1594 |
-
$extension = end( $exploded );
|
1595 |
-
|
1596 |
-
/**
|
1597 |
-
* If it is not json than die
|
1598 |
-
*/
|
1599 |
-
if ( $extension !== 'json' )
|
1600 |
-
wp_die( __( 'Please upload a valid .json file', 'italy-cookie-choices' ), __( 'No valid json file', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1601 |
-
|
1602 |
-
/**
|
1603 |
-
* If the file is empty than die
|
1604 |
-
*/
|
1605 |
-
if ( $_FILES[ 'icc_import_file' ][ 'size' ] === 0 )
|
1606 |
-
wp_die( __( 'The json file can\'t be empty', 'italy-cookie-choices' ), __( 'Empty file', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1607 |
-
|
1608 |
-
$import_file = $_FILES[ 'icc_import_file' ][ 'tmp_name' ];
|
1609 |
-
|
1610 |
-
/**
|
1611 |
-
* If $import_file is empty or null than die
|
1612 |
-
*/
|
1613 |
-
if ( empty( $import_file ) )
|
1614 |
-
wp_die( __( 'Please upload a file to import', 'italy-cookie-choices' ), __( 'No file import', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
1615 |
-
|
1616 |
-
/**
|
1617 |
-
* Retrieve the settings from the file and convert the json object to an array.
|
1618 |
-
* @var array
|
1619 |
-
*/
|
1620 |
-
$settings = ( array ) json_decode( file_get_contents( $import_file ) );
|
1621 |
-
|
1622 |
-
update_option( 'italy_cookie_choices', get_object_vars( $settings[0] ) );
|
1623 |
-
|
1624 |
-
wp_safe_redirect( admin_url( 'options-general.php?page=' . 'italy-cookie-choices' ) );
|
1625 |
-
exit;
|
1626 |
-
}
|
1627 |
-
|
1628 |
-
}// class
|
1629 |
-
}//endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/class-italy-cookie-choices-sanitize.php
DELETED
@@ -1,123 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for sanitizations
|
4 |
-
*/
|
5 |
-
if ( !class_exists( 'Italy_Cookie_Choices_Sanitize' ) ){
|
6 |
-
|
7 |
-
class Italy_Cookie_Choices_Sanitize{
|
8 |
-
|
9 |
-
public function __construct( $input ){
|
10 |
-
|
11 |
-
$this->sanitize_callback( $input );
|
12 |
-
|
13 |
-
}
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Sanitize data
|
17 |
-
* @param array $input Data to sanitize
|
18 |
-
* @return array Data sanitized
|
19 |
-
*/
|
20 |
-
public function sanitize_callback( $input ){
|
21 |
-
|
22 |
-
$new_input = array();
|
23 |
-
|
24 |
-
if( isset( $input['active'] ) )
|
25 |
-
$new_input['active'] = $input['active'];
|
26 |
-
|
27 |
-
if( isset( $input['banner'] ) )
|
28 |
-
$new_input['banner'] = $input['banner'];
|
29 |
-
|
30 |
-
if( isset( $input['scroll'] ) )
|
31 |
-
$new_input['scroll'] = $input['scroll'];
|
32 |
-
|
33 |
-
if( isset( $input['secondView'] ) )
|
34 |
-
$new_input['secondView'] = $input['secondView'];
|
35 |
-
|
36 |
-
if( isset( $input['reload'] ) )
|
37 |
-
$new_input['reload'] = $input['reload'];
|
38 |
-
|
39 |
-
if( isset( $input['text'] ) )
|
40 |
-
$new_input['text'] = sanitize_text_field( $input['text'] );
|
41 |
-
|
42 |
-
if( isset( $input['url'] ) )
|
43 |
-
$new_input['url'] = sanitize_text_field( $input['url'] );
|
44 |
-
|
45 |
-
if( isset( $input['anchor_text'] ) )
|
46 |
-
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
47 |
-
|
48 |
-
if( isset( $input['button_text'] ) )
|
49 |
-
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Sezione per lo stile
|
53 |
-
*/
|
54 |
-
if( isset( $input['html_margin'] ) )
|
55 |
-
$new_input['html_margin'] = $input['html_margin'];
|
56 |
-
|
57 |
-
if( isset( $input['js_template'] ) )
|
58 |
-
$new_input['js_template'] = $input['js_template'];
|
59 |
-
|
60 |
-
if( empty( $input['banner_bg'] ) )
|
61 |
-
$new_input['banner_bg'] = '#fff';
|
62 |
-
elseif ( isset( $input['banner_bg'] ) )
|
63 |
-
$new_input['banner_bg'] = sanitize_text_field( $input['banner_bg'] );
|
64 |
-
|
65 |
-
if( empty( $input['banner_text_color'] ) )
|
66 |
-
$new_input['banner_text_color'] = '#000';
|
67 |
-
elseif ( isset( $input['banner_text_color'] ) )
|
68 |
-
$new_input['banner_text_color'] = sanitize_text_field( $input['banner_text_color'] );
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Sezione per le opzioni avanzate
|
72 |
-
* Esempio per add_settings_error()
|
73 |
-
* @link https://wordpress.org/support/topic/how-to-use-add_settings_error-for-nested-options-array?replies=2
|
74 |
-
* @link http://pastebin.com/K4kJ0DNG
|
75 |
-
*/
|
76 |
-
if( empty( $input['cookie_name'] ) ){
|
77 |
-
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie name field it can\'t be empty. Restored default name.', 'italy-cookie-choices' ), 'error');
|
78 |
-
$new_input['cookie_name'] = $this->cookieName;
|
79 |
-
}
|
80 |
-
else
|
81 |
-
$new_input['cookie_name'] = sanitize_text_field( $input['cookie_name'] );
|
82 |
-
|
83 |
-
if( empty( $input['cookie_value'] ) ){
|
84 |
-
add_settings_error( 'italy_cookie_id', 'cookie_name_ID', __('Cookie value field it can\'t be empty. Restored default value.', 'italy-cookie-choices' ), 'error');
|
85 |
-
$new_input['cookie_value'] = $this->cookieVal;
|
86 |
-
}
|
87 |
-
else
|
88 |
-
$new_input['cookie_value'] = sanitize_text_field( $input['cookie_value'] );
|
89 |
-
|
90 |
-
if( isset( $input['slug'] ) )
|
91 |
-
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
92 |
-
|
93 |
-
if( isset( $input['target'] ) )
|
94 |
-
$new_input['target'] = $input['target'];
|
95 |
-
|
96 |
-
if( isset( $input['block'] ) )
|
97 |
-
$new_input['block'] = $input['block'];
|
98 |
-
|
99 |
-
if( isset( $input['widget_block'] ) )
|
100 |
-
$new_input['widget_block'] = $input['widget_block'];
|
101 |
-
|
102 |
-
if( isset( $input['all_block'] ) )
|
103 |
-
$new_input['all_block'] = $input['all_block'];
|
104 |
-
|
105 |
-
if( isset( $input['custom_script_block_body_exclude'] ) )
|
106 |
-
$new_input['custom_script_block_body_exclude'] = $input['custom_script_block_body_exclude'];
|
107 |
-
|
108 |
-
if( isset( $input['custom_script_block'] ) )
|
109 |
-
$new_input['custom_script_block'] = $input['custom_script_block'];
|
110 |
-
|
111 |
-
if( isset( $input['content_message_text'] ) )
|
112 |
-
$new_input['content_message_text'] = sanitize_text_field( $input['content_message_text'] );
|
113 |
-
|
114 |
-
if( isset( $input['content_message_button_text'] ) )
|
115 |
-
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
116 |
-
|
117 |
-
return $new_input;
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
}
|
122 |
-
|
123 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/pointerplus.css
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
/* PointerPlus Based on QueryLoop Pointer */
|
2 |
-
|
3 |
-
.pointerplus .pp-pointer-content {
|
4 |
-
padding: 0px 0px 10px;
|
5 |
-
position: relative;
|
6 |
-
font-size: 13px;
|
7 |
-
background: none repeat scroll 0% 0% #FFF;
|
8 |
-
border: 1px solid #DFDFDF;
|
9 |
-
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.075);
|
10 |
-
}
|
11 |
-
|
12 |
-
.pointerplus .pp-pointer-content h3 {
|
13 |
-
position: relative;
|
14 |
-
margin: -1px -1px 5px;
|
15 |
-
padding: 15px 18px 14px 60px;
|
16 |
-
border-width: 1px 1px medium;
|
17 |
-
border-style: solid solid none;
|
18 |
-
border-color: #3592B6 #3592B6 -moz-use-text-color;
|
19 |
-
-moz-border-top-colors: none;
|
20 |
-
-moz-border-right-colors: none;
|
21 |
-
-moz-border-bottom-colors: none;
|
22 |
-
-moz-border-left-colors: none;
|
23 |
-
border-image: none;
|
24 |
-
line-height: 1.4em;
|
25 |
-
font-size: 14px;
|
26 |
-
color: #FFF;
|
27 |
-
background: none repeat scroll 0% 0% #2EA2CC;
|
28 |
-
}
|
29 |
-
|
30 |
-
.pp-pointer-content p {
|
31 |
-
padding: 0px 15px;
|
32 |
-
}
|
33 |
-
|
34 |
-
.pp-pointer-content h3:before {
|
35 |
-
background: none repeat scroll 0% 0% #FFF;
|
36 |
-
border-radius: 50%;
|
37 |
-
color: #2EA2CC;
|
38 |
-
font: 20px/1.6 "dashicons";
|
39 |
-
position: absolute;
|
40 |
-
top: 8px;
|
41 |
-
left: 15px;
|
42 |
-
text-align: center;
|
43 |
-
width: 32px;
|
44 |
-
height: 32px;
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/pointerplus.js
DELETED
@@ -1,79 +0,0 @@
|
|
1 |
-
/* PointerPlus Based on QueryLoop Pointer */
|
2 |
-
|
3 |
-
//Read the var with data
|
4 |
-
var pp_scripts = document.getElementsByTagName("script");
|
5 |
-
pp_scripts = pp_scripts[pp_scripts.length - 1];
|
6 |
-
|
7 |
-
jQuery(function ($) {
|
8 |
-
'use strict';
|
9 |
-
|
10 |
-
$.fn.onAvailable = function (fn) {
|
11 |
-
var sel = this.selector;
|
12 |
-
var timer;
|
13 |
-
if (this.length > 0) {
|
14 |
-
fn.call(this);
|
15 |
-
} else {
|
16 |
-
timer = setInterval(function () {
|
17 |
-
if ($(sel).length > 0) {
|
18 |
-
fn.call($(sel));
|
19 |
-
clearInterval(timer);
|
20 |
-
}
|
21 |
-
}, 300);
|
22 |
-
}
|
23 |
-
};
|
24 |
-
|
25 |
-
var pointerplus = eval(getParams(pp_scripts).var);
|
26 |
-
$.each(pointerplus, function (key, pointer) {
|
27 |
-
pointer.class += ' pp-' + key;
|
28 |
-
if (!pointer.show) {
|
29 |
-
pointer.show = 'open';
|
30 |
-
}
|
31 |
-
jQuery(pointer.selector).onAvailable(function () {
|
32 |
-
$(pointer.selector).pointer({
|
33 |
-
content: '<h3>' + pointer.title + '</h3><p>' + pointer.text + '</p>',
|
34 |
-
position: {
|
35 |
-
edge: pointer.edge,
|
36 |
-
align: pointer.align
|
37 |
-
},
|
38 |
-
pointerWidth: parseInt(pointer.width),
|
39 |
-
pointerClass: 'wp-pointer pointerplus' + pointer.class,
|
40 |
-
buttons: function (event, t) {
|
41 |
-
if (pointer.jsnext) {
|
42 |
-
var jsnext = new Function('t', '$', pointer.jsnext);
|
43 |
-
return jsnext(t, jQuery);
|
44 |
-
} else {
|
45 |
-
var close = (wpPointerL10n) ? wpPointerL10n.dismiss : 'Dismiss',
|
46 |
-
button = jQuery('<a class="close" href="#">' + close + '</a>');
|
47 |
-
return button.bind('click.pointer', function (e) {
|
48 |
-
e.preventDefault();
|
49 |
-
t.element.pointer('close');
|
50 |
-
});
|
51 |
-
}
|
52 |
-
},
|
53 |
-
close: function () {
|
54 |
-
$.post(ajaxurl, {
|
55 |
-
pointer: key,
|
56 |
-
action: 'dismiss-wp-pointer'
|
57 |
-
});
|
58 |
-
}
|
59 |
-
}).pointer(pointer.show);
|
60 |
-
// Hack for custom dashicons
|
61 |
-
if (pointer.icon_class !== '') {
|
62 |
-
$('.pp-' + key + ' .wp-pointer-content').addClass('pp-pointer-content').removeClass('wp-pointer-content');
|
63 |
-
$('.pp-' + key + ' .pp-pointer-content h3').addClass('dashicons-before').addClass(pointer.icon_class);
|
64 |
-
}
|
65 |
-
});
|
66 |
-
});
|
67 |
-
});
|
68 |
-
|
69 |
-
function getParams(script_choosen) {
|
70 |
-
// Get an array of key=value strings of params
|
71 |
-
var pa = script_choosen.src.split("?").pop().split("&");
|
72 |
-
// Split each key=value into array, the construct js object
|
73 |
-
var p = {};
|
74 |
-
for (var j = 0; j < pa.length; j++) {
|
75 |
-
var kv = pa[j].split("=");
|
76 |
-
p[kv[0]] = kv[1];
|
77 |
-
}
|
78 |
-
return p;
|
79 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bootstrap.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Bootstrap file
|
4 |
+
*
|
5 |
+
* Bootstrap the plugin.
|
6 |
+
*
|
7 |
+
* @link [URL]
|
8 |
+
* @since 2.5.0
|
9 |
+
*
|
10 |
+
* @package Italy_Cookie_Choices
|
11 |
+
*/
|
12 |
+
|
13 |
+
require( __DIR__ . '/vendor/overclokk/minimum-requirements/minimum-requirements.php' );
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Instantiate the class
|
17 |
+
*
|
18 |
+
* @param string $php_ver The minimum PHP version.
|
19 |
+
* @param string $wp_ver The minimum WP version.
|
20 |
+
* @param string $name The name of the theme/plugin to check.
|
21 |
+
* @param array $plugins Required plugins format plugin_path/plugin_name.
|
22 |
+
*
|
23 |
+
* @var Minimum_Requirements
|
24 |
+
*/
|
25 |
+
$requirements = new Minimum_Requirements( '5.3', '3.5' );
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Check compatibility on install
|
29 |
+
* If is not compatible on install print an admin_notice
|
30 |
+
*/
|
31 |
+
register_activation_hook( __FILE__, array( $requirements, 'check_compatibility_on_install' ) );
|
32 |
+
|
33 |
+
/**
|
34 |
+
* If it is already installed and activated check if example new version is compatible, if is not don't load plugin code and prin admin_notice
|
35 |
+
* This part need more test
|
36 |
+
*/
|
37 |
+
if ( ! $requirements->is_compatible_version() ) {
|
38 |
+
|
39 |
+
add_action( 'admin_notices', array( $requirements, 'load_plugin_admin_notices' ) );
|
40 |
+
return;
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Require PHP autoload
|
46 |
+
*/
|
47 |
+
require( __DIR__ . '/vendor/autoload.php' );
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Load general function before init
|
51 |
+
*/
|
52 |
+
require( __DIR__ . '/functions/general-functions.php' );
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Required multilingual functions
|
56 |
+
*/
|
57 |
+
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'includes/functions-italy-cookie-choices-lang.php' );
|
58 |
+
|
59 |
+
add_action( 'init', function () {
|
60 |
+
|
61 |
+
load_plugin_textdomain( 'italy-cookie-choices', false, dirname( ITALY_COOKIE_CHOICES_BASENAME ) . '/lang' );
|
62 |
+
}, 100 );
|
63 |
+
|
64 |
+
add_action( 'plugins_loaded', function () {
|
65 |
+
|
66 |
+
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'init.php' );
|
67 |
+
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'init-admin.php' );
|
68 |
+
}, 11 );
|
classes/class-italy-cookie-choices-front-end.php
DELETED
@@ -1,910 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for Italy Cookie Choices Admin
|
4 |
-
*/
|
5 |
-
if ( !class_exists( 'Italy_Cookie_Choices_Front_End' ) ){
|
6 |
-
|
7 |
-
class Italy_Cookie_Choices_Front_End{
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Option
|
11 |
-
* @var array
|
12 |
-
*/
|
13 |
-
private $options = array();
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Default Cookie name
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
private $cookieName = 'displayCookieConsent';
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Default cookie value
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
private $cookieVal = 'y';
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Pattern for searching embed code in content and widget
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
private $pattern = '#<iframe.*?\/iframe>|<embed.*?>|<script.*?\/script>#is';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Snippet for replacements
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
private $valore = '';
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Inizialize banner template to default
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
private $js_template = 'default';
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Array with embed found
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
public $js_array = array();
|
50 |
-
|
51 |
-
/**
|
52 |
-
* If exist set a page slug
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
private $slug = '';
|
56 |
-
|
57 |
-
/**
|
58 |
-
* URL for policy page
|
59 |
-
* @var string
|
60 |
-
*/
|
61 |
-
private $url = '';
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Array with list of allowed script|iframe|embed
|
65 |
-
* @var array
|
66 |
-
*/
|
67 |
-
private $allow_script = array();
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Array with list of blocked script|iframe|embed
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
private $block_script = array();
|
74 |
-
|
75 |
-
/**
|
76 |
-
* [__construct description]
|
77 |
-
*/
|
78 |
-
public function __construct(){
|
79 |
-
|
80 |
-
$this->options = get_option( 'italy_cookie_choices' );
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Check for second view option
|
84 |
-
* @var bol
|
85 |
-
*/
|
86 |
-
$secondViewOpt = ( isset( $this->options['secondView'] ) ) ? $this->options['secondView'] : '' ;
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Assegno il valore allo slug nel costruttore
|
90 |
-
* Default ID 1 perché su null non settava correttamente lo scroll se il valore era assente
|
91 |
-
* @var bolean
|
92 |
-
*/
|
93 |
-
$this->slug = ( isset( $this->options['slug'] ) && !empty( $this->options['slug'] ) ) ? esc_attr( get_string( 'Italy Cookie Choices', 'Banner slug', $this->options['slug'] ) ) : 1 ;
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Assegno il valore della URL della policy page
|
97 |
-
* Default ID 1 perché su null non settava correttamente lo scroll se il valore era assente
|
98 |
-
* @var bolean
|
99 |
-
*/
|
100 |
-
$this->url = ( isset( $this->options['url'] ) && !empty( $this->options['url'] ) ) ? esc_url( get_string( 'Italy Cookie Choices', 'Banner url', $this->options['url'] ) ) : 1 ;
|
101 |
-
|
102 |
-
/*
|
103 |
-
* Set cookie if the user agree navigating through the pages of the site
|
104 |
-
*/
|
105 |
-
$secondView = false;
|
106 |
-
|
107 |
-
if( $this->is_policy_page( $secondViewOpt ) ) {
|
108 |
-
|
109 |
-
setcookie($this->options['cookie_name'], $this->options['cookie_value'], time()+(3600*24*365), '/');
|
110 |
-
$secondView = true;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Shortcode to put a button in policy page
|
115 |
-
*/
|
116 |
-
add_shortcode( 'accept_button', array( $this, 'accept_button' ) );
|
117 |
-
add_shortcode( 'delete_cookie', array( $this, '_delete_cookie' ) );
|
118 |
-
|
119 |
-
if ( !isset( $_COOKIE[ $this->options['cookie_name'] ] ) && !$secondView ){
|
120 |
-
|
121 |
-
// W3TC Disable Caching
|
122 |
-
if ( !defined( 'DONOTCACHEPAGE' ) )
|
123 |
-
define('DONOTCACHEPAGE', true);
|
124 |
-
if ( !defined( 'SID' ) )
|
125 |
-
define('SID', true);
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Background color for banner
|
129 |
-
* @var string
|
130 |
-
*/
|
131 |
-
$banner_bg = ( isset( $this->options['banner_bg'] ) ) ? $this->options['banner_bg'] : '#ffffff' ;
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Color for text
|
135 |
-
* @var string
|
136 |
-
*/
|
137 |
-
$banner_text_color = ( isset( $this->options['banner_text_color'] ) ) ? $this->options['banner_text_color'] : '#000000' ;
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Text for banner
|
141 |
-
* @var string
|
142 |
-
*/
|
143 |
-
$text = ( isset( $this->options['text'] ) ) ? $this->options['text'] : '' ;
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Text for buttom
|
147 |
-
* @var [type]
|
148 |
-
*/
|
149 |
-
$button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Checkbox for third part cookie in content
|
153 |
-
* @var bol
|
154 |
-
*/
|
155 |
-
$block = ( isset( $this->options['block'] ) ) ? $this->options['block'] : '' ;
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Checkbox for third part cookie in widget
|
159 |
-
* @var bol
|
160 |
-
*/
|
161 |
-
$widget_block = ( isset( $this->options['widget_block'] ) ) ? $this->options['widget_block'] : '' ;
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Checkbox for third part cookie in all page (except head and footer)
|
165 |
-
* @var bol
|
166 |
-
*/
|
167 |
-
$all_block = ( isset( $this->options['all_block'] ) ) ? $this->options['all_block'] : '' ;
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Checkbox custom scripts block in BODY
|
171 |
-
* @var string
|
172 |
-
*/
|
173 |
-
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
174 |
-
|
175 |
-
$this->get_block_script();
|
176 |
-
$this->get_allow_script();
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Checkbox custom scripts block in HEAD and FOOTER
|
180 |
-
* @var string
|
181 |
-
*/
|
182 |
-
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Text to put inside locked post and widget contents
|
186 |
-
* including the button text
|
187 |
-
* @var string
|
188 |
-
*/
|
189 |
-
$content_message_text = ( isset( $this->options['content_message_text'] ) ) ? wp_kses_post( get_string( 'Italy Cookie Choices', 'Content message text', $this->options['content_message_text'] ) ) : '' ;
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Text for button in locked content and widget
|
193 |
-
* @var string
|
194 |
-
*/
|
195 |
-
$content_message_button_text = ( isset( $this->options['content_message_button_text'] ) ) ? esc_attr( get_string( 'Italy Cookie Choices', 'Content message button text', $this->options['content_message_button_text'] ) ) : '' ;
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Replacement for regex
|
199 |
-
* @var string
|
200 |
-
*/
|
201 |
-
$this->valore = '<div class="el"><div style="padding:10px;margin-bottom: 18px;color:' . esc_attr( $banner_text_color ) . ';background-color:' . esc_attr( $banner_bg ) . ';text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);">' . $content_message_text . ' <button onclick="cookieChoices.removeCookieConsent()" style="color: ' . esc_attr( $banner_text_color ) . ';padding: 3px;font-size: 12px;line-height: 12px;text-decoration: none;text-transform: uppercase;margin:0;display: inline-block;font-weight: normal; text-align: center; vertical-align: middle; cursor: pointer; border: 1px solid ' . esc_attr( $banner_text_color ) . ';background: rgba(255, 255, 255, 0.03);">' . $content_message_button_text . '</button></div><cookie></div>';
|
202 |
-
|
203 |
-
if ($block)
|
204 |
-
add_filter( 'the_content', array( $this, 'AutoErase' ), 11);
|
205 |
-
|
206 |
-
if ( $widget_block )
|
207 |
-
add_filter( 'widget_display_callback', array( $this, 'WidgetErase' ), 11, 3 );
|
208 |
-
|
209 |
-
if ( $all_block ) {
|
210 |
-
//add_action('wp_footer', array( $this, 'catchBody' ), -1000000);
|
211 |
-
add_action('wp_head', array( $this, 'bufferBodyStart' ), 1000000);
|
212 |
-
add_action('wp_footer', array( $this, 'bufferBodyEnd' ), -1000000);
|
213 |
-
}
|
214 |
-
if( ( $custom_script_block || $this->block_script ) && $all_block ) {
|
215 |
-
add_action('template_redirect', array( $this, 'bufferHeadStart' ), 2);
|
216 |
-
add_action('wp_head', array( $this, 'bufferHeadEnd' ), 99999);
|
217 |
-
add_action('wp_footer', array( $this, 'bufferFooterStart' ), -99998);
|
218 |
-
add_action('shutdown', array( $this, 'bufferFooterEnd' ), -1000000);
|
219 |
-
} else {
|
220 |
-
/**
|
221 |
-
* Function for print cookiechoiches inline
|
222 |
-
*/
|
223 |
-
add_action( 'wp_footer', array( $this, 'print_script_inline'), -99999 );
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Only for debug
|
228 |
-
*/
|
229 |
-
// var_dump($_COOKIE);
|
230 |
-
// var_dump(headers_list());
|
231 |
-
|
232 |
-
}
|
233 |
-
|
234 |
-
}//__construct
|
235 |
-
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Get the current page url
|
239 |
-
* @link http://www.brosulo.net/content/informatica/ottenere-la-url-completa-da-una-pagina-php-0
|
240 |
-
*/
|
241 |
-
private function CurrentPageURL() {
|
242 |
-
|
243 |
-
if ( isset( $_SERVER['HTTPS'] ) )
|
244 |
-
$pageURL = $_SERVER['HTTPS'];
|
245 |
-
else
|
246 |
-
$pageURL = NULL;
|
247 |
-
|
248 |
-
$pageURL = $pageURL === 'on' ? 'https://' : 'http://';
|
249 |
-
$pageURL .= $_SERVER["SERVER_NAME"];
|
250 |
-
$pageURL .= ( $_SERVER['SERVER_PORT'] !== '80' ) ? ':' . $_SERVER["SERVER_PORT"] : '';
|
251 |
-
$pageURL .= $_SERVER["REQUEST_URI"];
|
252 |
-
|
253 |
-
return $pageURL;
|
254 |
-
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Check if is the policy page
|
259 |
-
* Required url input
|
260 |
-
* @param boolean $secondViewOpt Check for second view option
|
261 |
-
* @return boolean Return bolean value
|
262 |
-
*/
|
263 |
-
private function is_policy_page( $secondViewOpt = false ){
|
264 |
-
|
265 |
-
if(
|
266 |
-
// if HTTP_ACCEPT is set
|
267 |
-
( isset( $_SERVER['HTTP_ACCEPT'] ) &&
|
268 |
-
|
269 |
-
// if is an HTML request (alternative methods???)
|
270 |
-
strpos( $_SERVER['HTTP_ACCEPT'], 'html' ) !== false ) &&
|
271 |
-
|
272 |
-
//if the page isn't privacy page
|
273 |
-
// ( $_SERVER['REQUEST_URI'] != $this->slug ) &&
|
274 |
-
( $this->CurrentPageURL() !== $this->url ) &&
|
275 |
-
//if HTTP_REFERER is set
|
276 |
-
( isset( $_SERVER['HTTP_REFERER'] ) ) &&
|
277 |
-
//if isn't refresh
|
278 |
-
( parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH) !== $_SERVER['REQUEST_URI'] ) &&
|
279 |
-
//if referrer is not privacy page (to be evaluated)
|
280 |
-
// ( parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH ) != $this->slug ) &&
|
281 |
-
// ( $_SERVER['HTTP_REFERER'] !== $this->url ) &&
|
282 |
-
//if the cookie is not already set
|
283 |
-
( !isset( $_COOKIE[ $this->options['cookie_name'] ] ) ) &&
|
284 |
-
//if the referer is in the same domain
|
285 |
-
( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ) === $_SERVER['HTTP_HOST'] ) &&
|
286 |
-
// If the secondView options is checked
|
287 |
-
( $secondViewOpt )
|
288 |
-
)
|
289 |
-
return true;
|
290 |
-
else
|
291 |
-
return false;
|
292 |
-
|
293 |
-
}
|
294 |
-
|
295 |
-
|
296 |
-
private function in_array_match($value, $array) {
|
297 |
-
foreach($array as $k=>$v) {
|
298 |
-
if(preg_match('/'.str_replace(preg_quote("<---------SOMETHING--------->"), ".*", preg_quote(preg_replace( "/([\r|\n]*)/is", "", trim($v)), '/')).'/is', preg_replace( "/([\r|\n]*)/is", "", $value))) {
|
299 |
-
return true;
|
300 |
-
}
|
301 |
-
}
|
302 |
-
return false;
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Remove custom script in header and footer
|
307 |
-
* @param string $buffer Source of page.
|
308 |
-
* @return string Return the new HTML
|
309 |
-
*/
|
310 |
-
public function removeCustomScript( $buffer ) {
|
311 |
-
/**
|
312 |
-
* Custom script to block
|
313 |
-
* @var string
|
314 |
-
*/
|
315 |
-
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
316 |
-
|
317 |
-
if( ! $custom_script_block && ! $this->block_script )
|
318 |
-
return $buffer;
|
319 |
-
else {
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Replace space with <---------SEP--------->
|
323 |
-
* @var string
|
324 |
-
*/
|
325 |
-
$custom_script_block = preg_replace( "/([\r|\n]*)<---------SEP--------->([\r|\n]*)/is", "<---------SEP--------->", $custom_script_block );
|
326 |
-
|
327 |
-
/**
|
328 |
-
* Convert $custom_script_block to an array
|
329 |
-
* @var array
|
330 |
-
*/
|
331 |
-
$custom_script_block_array = explode( "<---------SEP--------->", $custom_script_block );
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Merge the script array from new UX functionality
|
335 |
-
* @var array
|
336 |
-
*/
|
337 |
-
$custom_script_block_array = array_merge( $custom_script_block_array, $this->block_script );
|
338 |
-
|
339 |
-
foreach( $custom_script_block_array as $single_script) {
|
340 |
-
preg_match_all( '/' . str_replace( preg_quote( "<---------SOMETHING--------->" ), ".*", preg_quote( trim( $single_script ), '/' ) ) . '/is', $buffer, $matches );
|
341 |
-
if ( ! empty( $matches[0] ) ) {
|
342 |
-
foreach ( $matches[0] as $v ) {
|
343 |
-
$buffer = str_replace( trim( $v ), "<!-- removed head from Italy Cookie Choices PHP Class -->", $buffer );
|
344 |
-
$this->js_array[] = trim( $v );
|
345 |
-
}
|
346 |
-
}
|
347 |
-
}
|
348 |
-
return $buffer;
|
349 |
-
}
|
350 |
-
}
|
351 |
-
|
352 |
-
public function bufferBodyStart() {
|
353 |
-
if ( ob_get_contents() )
|
354 |
-
ob_end_flush();
|
355 |
-
ob_start();
|
356 |
-
|
357 |
-
}
|
358 |
-
|
359 |
-
public function bufferBodyEnd() {
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Check if $custom_script_block_body_exclude is set
|
363 |
-
* @var string
|
364 |
-
*/
|
365 |
-
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
366 |
-
|
367 |
-
/**
|
368 |
-
* Replace space with <---------SEP--------->
|
369 |
-
* @var string
|
370 |
-
*/
|
371 |
-
$custom_script_block_body_exclude = preg_replace( "/([\r|\n]*)<---------SEP--------->([\r|\n]*)/is", "<---------SEP--------->", $custom_script_block_body_exclude );
|
372 |
-
|
373 |
-
/**
|
374 |
-
* Create array
|
375 |
-
* @var array
|
376 |
-
*/
|
377 |
-
$custom_script_block_body_exclude_array = explode( "<---------SEP--------->", $custom_script_block_body_exclude );
|
378 |
-
|
379 |
-
if( ! is_array( $custom_script_block_body_exclude_array ) || empty( $custom_script_block_body_exclude_array[0] ) )
|
380 |
-
$custom_script_block_body_exclude_array = array();
|
381 |
-
|
382 |
-
/**
|
383 |
-
* Merge the script array from new UX functionality
|
384 |
-
* @var array
|
385 |
-
*/
|
386 |
-
$custom_script_block_body_exclude_array = array_merge( $custom_script_block_body_exclude_array, $this->allow_script );
|
387 |
-
|
388 |
-
$buffer = ob_get_contents();
|
389 |
-
if ( ob_get_contents() )
|
390 |
-
ob_end_clean();
|
391 |
-
preg_match( "/(.*)(<body.*)/s", $buffer, $matches );
|
392 |
-
$head = ( isset( $matches[1] ) ) ? $matches[1] : '';
|
393 |
-
$body = ( isset( $matches[2] ) ) ? $matches[2] : '';
|
394 |
-
preg_match_all( $this->pattern, $body, $body_matches );
|
395 |
-
|
396 |
-
if ( ! empty( $body_matches[0] ) ) {
|
397 |
-
foreach ( $body_matches[0] as $k => $v ) {
|
398 |
-
|
399 |
-
if ( ! $this->in_array_match( trim( $v ), $custom_script_block_body_exclude_array ) ) {
|
400 |
-
$body = preg_replace( '/' . str_replace( preg_quote( "<---------SOMETHING--------->" ), ".*", preg_quote( trim( $v ), '/' ) ) . '/is', $this->valore, $body );
|
401 |
-
$this->js_array[] = trim( $v );
|
402 |
-
}
|
403 |
-
}
|
404 |
-
}
|
405 |
-
|
406 |
-
$buffer_new = $head.$body;
|
407 |
-
echo '<!-- ICCStartBody -->' . $buffer_new . '<!-- ICCEndBody -->';
|
408 |
-
}
|
409 |
-
|
410 |
-
public function bufferFooterStart() {
|
411 |
-
/**
|
412 |
-
* Check if we are in feed page, then do nothing
|
413 |
-
*/
|
414 |
-
if ( is_feed() )
|
415 |
-
return;
|
416 |
-
|
417 |
-
if ( ob_get_contents() )
|
418 |
-
ob_end_flush();
|
419 |
-
ob_start();
|
420 |
-
}
|
421 |
-
|
422 |
-
public function bufferFooterEnd() {
|
423 |
-
/**
|
424 |
-
* Check if we are in feed page, then do nothing
|
425 |
-
*/
|
426 |
-
if ( is_feed() )
|
427 |
-
return;
|
428 |
-
|
429 |
-
$buffer = ob_get_contents();
|
430 |
-
if ( ob_get_contents() )
|
431 |
-
ob_end_clean();
|
432 |
-
// If is an HTML request (alternative methods???).
|
433 |
-
if( isset( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER["HTTP_ACCEPT"], 'html' ) !== false ) {
|
434 |
-
$buffer_new = $this->removeCustomScript( $buffer );
|
435 |
-
/**
|
436 |
-
* Function for print cookiechoiches inline
|
437 |
-
*/
|
438 |
-
$this->print_script_inline();
|
439 |
-
echo '<!-- ICCStartFooter -->' . $buffer_new . '<!-- ICCEndFooter -->';
|
440 |
-
} else {
|
441 |
-
echo $buffer;
|
442 |
-
}
|
443 |
-
}
|
444 |
-
|
445 |
-
public function bufferHeadStart() {
|
446 |
-
if ( ob_get_contents() )
|
447 |
-
ob_end_flush();
|
448 |
-
ob_start();
|
449 |
-
}
|
450 |
-
|
451 |
-
public function bufferHeadEnd() {
|
452 |
-
$buffer = ob_get_contents();
|
453 |
-
if ( ob_get_contents() )
|
454 |
-
ob_end_clean();
|
455 |
-
$buffer_new = $this->removeCustomScript( $buffer );
|
456 |
-
echo '<!-- ICCStartHead -->' . $buffer_new . '<!-- ICCEndHead -->';
|
457 |
-
}
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Script preimpostati da escludere dal blocco
|
461 |
-
* Preparare un array key valore a parte, unico per entrambi
|
462 |
-
* Questo array sarà utilizzato per generare anche le input dinamicamente
|
463 |
-
* array(
|
464 |
-
* 'facebook' => 'script'
|
465 |
-
* )
|
466 |
-
* Return the Array con gli script preimpostati.
|
467 |
-
*/
|
468 |
-
private function get_allow_script() {
|
469 |
-
|
470 |
-
$allow_iframe = ( isset( $this->options['allow_iframe'] ) ) ? $this->options['allow_iframe'] : array( '' );
|
471 |
-
$allow_script = ( isset( $this->options['allow_script'] ) ) ? $this->options['allow_script'] : array( '' );
|
472 |
-
$allow_embed = ( isset( $this->options['allow_embed'] ) ) ? $this->options['allow_embed'] : array( '' );
|
473 |
-
|
474 |
-
$array = array();
|
475 |
-
|
476 |
-
foreach ( $allow_iframe as $key => $value )
|
477 |
-
if ( ! empty( $value ) )
|
478 |
-
$this->allow_script[] = '<iframe<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></iframe>';
|
479 |
-
|
480 |
-
foreach ( $allow_script as $key => $value )
|
481 |
-
if ( ! empty( $value ) )
|
482 |
-
$this->allow_script[] = '<script<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></script>';
|
483 |
-
|
484 |
-
foreach ( $allow_embed as $key => $value )
|
485 |
-
if ( ! empty( $value ) )
|
486 |
-
$this->allow_script[] = '<embed<---------SOMETHING--------->' . $value . '<---------SOMETHING--------->>';
|
487 |
-
|
488 |
-
}
|
489 |
-
|
490 |
-
private function get_block_script( $val = array() ) {
|
491 |
-
|
492 |
-
$block_iframe = ( isset( $this->options['block_iframe'] ) ) ? $this->options['block_iframe'] : array( '' );
|
493 |
-
$block_script = ( isset( $this->options['block_script'] ) ) ? $this->options['block_script'] : array( '' );
|
494 |
-
$block_embed = ( isset( $this->options['block_embed'] ) ) ? $this->options['block_embed'] : array( '' );
|
495 |
-
|
496 |
-
$array = array();
|
497 |
-
|
498 |
-
foreach ( $block_iframe as $value )
|
499 |
-
if ( ! empty( $value ) )
|
500 |
-
$this->block_script[] = '<iframe<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></iframe>';
|
501 |
-
|
502 |
-
foreach ( $block_script as $value )
|
503 |
-
if ( ! empty( $value ) )
|
504 |
-
$this->block_script[] = '<script<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></script>';
|
505 |
-
|
506 |
-
foreach ( $block_embed as $value )
|
507 |
-
if ( ! empty( $value ) )
|
508 |
-
$this->block_script[] = '<embed<---------SOMETHING--------->' . $value . '<---------SOMETHING--------->>';
|
509 |
-
|
510 |
-
}
|
511 |
-
|
512 |
-
/**
|
513 |
-
* Function for matching embed, return the Array with embed found
|
514 |
-
* @param string $pattern Pattern.
|
515 |
-
* @param string $content Content.
|
516 |
-
*/
|
517 |
-
public function matches( $pattern, $content ) {
|
518 |
-
|
519 |
-
preg_match_all( $this->pattern, $content, $matches );
|
520 |
-
|
521 |
-
/**
|
522 |
-
* Memorizzo gli embed trovati e li appendo all'array $js_array
|
523 |
-
* @var array
|
524 |
-
*/
|
525 |
-
if ( ! empty( $matches[0] ) )
|
526 |
-
$this->js_array = array_merge( $this->js_array, $matches[0] );
|
527 |
-
|
528 |
-
}
|
529 |
-
|
530 |
-
/**
|
531 |
-
* Erase third part embed
|
532 |
-
* @param string $content Article content.
|
533 |
-
*/
|
534 |
-
public function AutoErase( $content ) {
|
535 |
-
|
536 |
-
$this->matches( $this->pattern, $content );
|
537 |
-
|
538 |
-
$content = preg_replace( $this->pattern, $this->valore , $content );
|
539 |
-
|
540 |
-
return $content;
|
541 |
-
}
|
542 |
-
|
543 |
-
private function fnFixArray( $v ) {
|
544 |
-
|
545 |
-
if ( is_array( $v ) or is_object( $v ) ) {
|
546 |
-
|
547 |
-
foreach ( $v as $k1 => $v1 ) {
|
548 |
-
|
549 |
-
$v[ $k1 ] = $this->fnFixArray( $v1 );
|
550 |
-
|
551 |
-
}
|
552 |
-
|
553 |
-
return $v;
|
554 |
-
|
555 |
-
}
|
556 |
-
|
557 |
-
if ( ! is_string( $v ) or empty( $v ) ) return $v;
|
558 |
-
|
559 |
-
$this->matches( $this->pattern, $v );
|
560 |
-
|
561 |
-
return preg_replace( $this->pattern, $this->valore , $v );
|
562 |
-
|
563 |
-
}
|
564 |
-
|
565 |
-
public function WidgetErase( $instance, $widget, $args ) {
|
566 |
-
|
567 |
-
return $this->fnFixArray( $instance );
|
568 |
-
|
569 |
-
}
|
570 |
-
|
571 |
-
/**
|
572 |
-
* Encode a variable into JSON, with some sanity checks.
|
573 |
-
*
|
574 |
-
* @since 4.1.0
|
575 |
-
*
|
576 |
-
* @param mixed $data Variable (usually an array or object) to encode as JSON.
|
577 |
-
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
|
578 |
-
* @param int $depth Optional. Maximum depth to walk through $data. Must be
|
579 |
-
* greater than 0. Default 512.
|
580 |
-
* @return bool|string The JSON encoded string, or false if it cannot be encoded.
|
581 |
-
*/
|
582 |
-
public function wp_json_encode( $data, $options = 0, $depth = 512 ) {
|
583 |
-
|
584 |
-
/**
|
585 |
-
* json_encode() has had extra params added over the years.
|
586 |
-
* $options was added in 5.3, and $depth in 5.5.
|
587 |
-
* We need to make sure we call it with the correct arguments.
|
588 |
-
*/
|
589 |
-
if ( version_compare( PHP_VERSION, '5.5', '>=' ) )
|
590 |
-
$args = array( $data, $options, $depth );
|
591 |
-
elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) )
|
592 |
-
$args = array( $data, $options );
|
593 |
-
else $args = array( $data );
|
594 |
-
|
595 |
-
$json = call_user_func_array( 'json_encode', $args );
|
596 |
-
|
597 |
-
// If json_encode() was successful, no need to do more sanity checking.
|
598 |
-
// ... unless we're in an old version of PHP, and json_encode() returned
|
599 |
-
// a string containing 'null'. Then we need to do more sanity checking.
|
600 |
-
if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )
|
601 |
-
return $json;
|
602 |
-
|
603 |
-
return call_user_func_array( 'json_encode', $args );
|
604 |
-
}
|
605 |
-
|
606 |
-
/**
|
607 |
-
* Print script inline before </body>
|
608 |
-
* @return string Print script inline
|
609 |
-
* @link https://www.cookiechoices.org/
|
610 |
-
*/
|
611 |
-
public function print_script_inline() {
|
612 |
-
|
613 |
-
/**
|
614 |
-
* If is not active exit
|
615 |
-
*/
|
616 |
-
if ( ! isset( $this->options['active'] ) || is_feed() )
|
617 |
-
return;
|
618 |
-
|
619 |
-
/**
|
620 |
-
* Accept on scroll
|
621 |
-
* @var bol
|
622 |
-
*/
|
623 |
-
$scroll = ( isset( $this->options['scroll'] ) && ! ( is_page( $this->slug ) || is_single( $this->slug ) ) ) ? $this->options['scroll'] : '' ;
|
624 |
-
|
625 |
-
/**
|
626 |
-
* Reload on accept
|
627 |
-
* @var bol
|
628 |
-
*/
|
629 |
-
$reload = ( isset( $this->options['reload'] ) ) ? $this->options['reload'] : '' ;
|
630 |
-
|
631 |
-
/**
|
632 |
-
* ADVANCED OPTIONS
|
633 |
-
*/
|
634 |
-
/**
|
635 |
-
* Cookie name
|
636 |
-
* @var string
|
637 |
-
*/
|
638 |
-
$cookie_name = ( isset( $this->options['cookie_name'] ) ) ? $this->options['cookie_name'] : $this->cookieName ;
|
639 |
-
|
640 |
-
/**
|
641 |
-
* Cookie value
|
642 |
-
* @var string/bolean
|
643 |
-
*/
|
644 |
-
$cookie_value = ( isset( $this->options['cookie_value'] ) ) ? $this->options['cookie_value'] : $this->cookieVal ;
|
645 |
-
|
646 |
-
/**
|
647 |
-
* Js_Template value
|
648 |
-
* @var string
|
649 |
-
*/
|
650 |
-
// $js_template = ( isset( $this->options['js_template'] ) && $this->options['js_template'] !== 'custom') ? $this->options['js_template'] : $this->js_template ;
|
651 |
-
$js_template = ( isset( $this->options['js_template'] ) ) ? $this->options['js_template'] : $this->js_template ;
|
652 |
-
|
653 |
-
/**
|
654 |
-
* If is set html_margin checkbox in admin panel then add margin-top to HTML tag
|
655 |
-
* @var bol
|
656 |
-
*/
|
657 |
-
$htmlM = '' ;
|
658 |
-
|
659 |
-
/**
|
660 |
-
* If set open policy page in new browser tab
|
661 |
-
* @var bol
|
662 |
-
*/
|
663 |
-
$target = ( isset( $this->options['target'] ) ) ? $this->options['target'] : '' ;
|
664 |
-
|
665 |
-
/**
|
666 |
-
* Colore dello sfondo della dialog/topbar
|
667 |
-
* @var string
|
668 |
-
*/
|
669 |
-
$banner_bg = ( isset( $this->options['banner_bg'] ) && ! empty( $this->options['banner_bg'] ) ) ? esc_attr( $this->options['banner_bg'] ) : '#fff' ;
|
670 |
-
|
671 |
-
/**
|
672 |
-
* Colore del font della dialog/topbar
|
673 |
-
* @var string
|
674 |
-
*/
|
675 |
-
$banner_text_color = ( isset( $this->options['banner_text_color'] ) && ! empty( $this->options['banner_text_color'] ) ) ? esc_attr( $this->options['banner_text_color'] ) : '#000' ;
|
676 |
-
|
677 |
-
/**
|
678 |
-
* Custom CSS
|
679 |
-
* @var string
|
680 |
-
*/
|
681 |
-
$customCSS = ( isset( $this->options['customCSS'] ) ) ? esc_attr( $this->options['customCSS'] ) : '' ;
|
682 |
-
|
683 |
-
/**
|
684 |
-
* CSS class for div bannerStyle
|
685 |
-
* @var string
|
686 |
-
*/
|
687 |
-
$bannerStyle = ( isset( $this->options['bannerStyle'] ) && ! empty( $this->options['bannerStyle'] ) ) ? esc_attr( $this->options['bannerStyle'] ) : 'bannerStyle' ;
|
688 |
-
|
689 |
-
/**
|
690 |
-
* CSS class for div content
|
691 |
-
* @var string
|
692 |
-
*/
|
693 |
-
$contStyle = ( isset( $this->options['contentStyle'] ) && ! empty( $this->options['contentStyle'] ) ) ? esc_attr( $this->options['contentStyle'] ) : 'contentStyle' ;
|
694 |
-
|
695 |
-
/**
|
696 |
-
* CSS class for text in span
|
697 |
-
* @var string
|
698 |
-
*/
|
699 |
-
$consentText = ( isset( $this->options['consentText'] ) && ! empty( $this->options['consentText'] ) ) ? esc_attr( $this->options['consentText'] ) : 'consentText' ;
|
700 |
-
|
701 |
-
/**
|
702 |
-
* CSS class for info link
|
703 |
-
* @var string
|
704 |
-
*/
|
705 |
-
$infoClass = ( isset( $this->options['infoClass'] ) && ! empty( $this->options['infoClass'] ) ) ? esc_attr( $this->options['infoClass'] ) : 'italybtn' ;
|
706 |
-
|
707 |
-
/**
|
708 |
-
* CSS class for close link
|
709 |
-
* @var string
|
710 |
-
*/
|
711 |
-
$closeClass = ( isset( $this->options['closeClass'] ) && ! empty( $this->options['closeClass'] ) ) ? esc_attr( $this->options['closeClass'] ) : 'italybtn' ;
|
712 |
-
|
713 |
-
/**
|
714 |
-
* If $infoClass and $closeClass are exactly alike print only first var
|
715 |
-
* @var [type]
|
716 |
-
*/
|
717 |
-
$buttonClass = ( $infoClass === $closeClass ) ? $infoClass : $infoClass . ',.' . $closeClass;
|
718 |
-
|
719 |
-
/**
|
720 |
-
* Attribute for text for template
|
721 |
-
* @var string
|
722 |
-
*/
|
723 |
-
$text_align = 'center';
|
724 |
-
|
725 |
-
/**
|
726 |
-
* CSS for content style
|
727 |
-
* @var string
|
728 |
-
*/
|
729 |
-
$contentStyle = '';
|
730 |
-
|
731 |
-
/**
|
732 |
-
* Button style
|
733 |
-
* @var string
|
734 |
-
*/
|
735 |
-
$buttonStyle = '.' . $buttonClass . '{margin-left:10px;}';
|
736 |
-
|
737 |
-
/**
|
738 |
-
* Conditional button style for bigbutton or smallbutton
|
739 |
-
* Default margin
|
740 |
-
*/
|
741 |
-
if ( 'bigbutton' === $js_template ) {
|
742 |
-
|
743 |
-
$buttonStyle = '.' . $buttonClass . '{color:' . $banner_text_color . ';padding:7px 12px;font-size:18px;line-height:18px;text-decoration:none;text-transform:uppercase;margin:10px 20px 2px 0;letter-spacing: 0.125em;display:inline-block;font-weight:normal;text-align:center; vertical-align:middle;cursor:pointer;border:1px solid ' . $banner_text_color . ';background:rgba(255, 255, 255, 0.03);}.' . $consentText . '{display:block}';
|
744 |
-
|
745 |
-
$text_align = 'left';
|
746 |
-
|
747 |
-
} elseif ( 'smallbutton' === $js_template ) {
|
748 |
-
|
749 |
-
$buttonStyle = '.' . $buttonClass . '{color:' . $banner_text_color . ';padding:3px 7px;font-size:14px;line-height:14px;text-decoration:none;text-transform:uppercase;margin:10px 20px 2px 0;letter-spacing: 0.115em;display:inline-block;font-weight:normal;text-align:center; vertical-align:middle;cursor:pointer;border:1px solid ' . $banner_text_color . ';background:rgba(255, 255, 255, 0.03);}.' . $consentText . '{display:block}';
|
750 |
-
|
751 |
-
$text_align = 'left';
|
752 |
-
|
753 |
-
}
|
754 |
-
|
755 |
-
/**
|
756 |
-
* Select what kind of banner to display
|
757 |
-
* @var $banner Bar/Dialog
|
758 |
-
* @var $contentStyle Style for content div
|
759 |
-
* @var $style Style for banner
|
760 |
-
* @var $bPos Deprecated
|
761 |
-
* @var $htmlM Bolean for margin top
|
762 |
-
*/
|
763 |
-
if ( $this->options['banner'] === '1' ) {
|
764 |
-
|
765 |
-
$banner = 'Bar';
|
766 |
-
|
767 |
-
$contentStyle = ( 'bigbutton' === $js_template || 'smallbutton' === $js_template ) ? '.contentStyle{max-width:980px;margin-right:auto;margin-left:auto;padding:15px;}' : '' ;
|
768 |
-
|
769 |
-
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:' . $text_align . ';top:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
770 |
-
|
771 |
-
$bPos = 'top:0'; // Deprecato.
|
772 |
-
|
773 |
-
$htmlM = ( isset( $this->options['html_margin'] ) ) ? $this->options['html_margin'] : '' ;
|
774 |
-
|
775 |
-
} elseif ( $this->options['banner'] === '2' && ! ( is_page( $this->slug ) || is_single( $this->slug ) ) ) {
|
776 |
-
|
777 |
-
$banner = 'Dialog';
|
778 |
-
|
779 |
-
$style = ( 'custom' === $js_template ) ? $customCSS : '.glassStyle{position:fixed;width:100%;height:100%;z-index:999;top:0;left:0;opacity:0.5;filter:alpha(opacity=50);background-color:#ccc;}.' . $bannerStyle . '{min-width:100%;z-index:9999;position:fixed;top:25%;}.contentStyle{position:relative;background-color:' . $banner_bg . ';padding:20px;box-shadow:4px 4px 25px #888;max-width:80%;margin:0 auto;}' . $buttonStyle;
|
780 |
-
|
781 |
-
$bPos = 'top:0'; // Deprecato.
|
782 |
-
|
783 |
-
} elseif ( $this->options['banner'] === '3' ) {
|
784 |
-
|
785 |
-
$banner = 'Bar';
|
786 |
-
|
787 |
-
$contentStyle = ( 'bigbutton' === $js_template || 'smallbutton' === $js_template ) ? '.contentStyle{max-width:980px;margin-right:auto;margin-left:auto;padding:15px;}' : '' ;
|
788 |
-
|
789 |
-
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:' . $text_align . ';bottom:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
790 |
-
|
791 |
-
$bPos = 'bottom:0'; // Deprecato.
|
792 |
-
|
793 |
-
} else {
|
794 |
-
|
795 |
-
$banner = 'Bar';
|
796 |
-
|
797 |
-
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:center;top:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
798 |
-
|
799 |
-
$bPos = 'top:0'; // Deprecato.
|
800 |
-
|
801 |
-
}
|
802 |
-
|
803 |
-
/**
|
804 |
-
* Declarations of JS variables and set parameters
|
805 |
-
* var elPos = Gestisce la Posizione banner nella funzione _createHeaderElement
|
806 |
-
* var infoClass = aggiunge una classe personalizzata per il link info
|
807 |
-
* var closeClass = aggiunge una classe personalizzata per il link di accettazione
|
808 |
-
* var htmlM = Aggiunge un margine a HTML per la top bar
|
809 |
-
* var coNA = cookie name
|
810 |
-
* var coVA = cookie val
|
811 |
-
* var rel = Setto il reload per la pagina all'accettazione
|
812 |
-
* var tar = Target -blank
|
813 |
-
* var bgB = Colore del background della topbar/dialog
|
814 |
-
* var btcB = Colore del font della topbar/dialog
|
815 |
-
* var bannerStyle = Variabile per le classe del contenitore
|
816 |
-
* var contentStyle = Variabile per le classe del contenitore del contenuto
|
817 |
-
* var consText = Variabile per le classe dello span per il testo
|
818 |
-
* @var string
|
819 |
-
*/
|
820 |
-
|
821 |
-
$jsVariables = 'var coNA="' . $cookie_name . '",coVA="' . $cookie_value . '";scroll="' . $scroll . '",elPos="fixed",infoClass="' . $infoClass . '",closeClass="' . $closeClass . '",htmlM="' . $htmlM . '",rel="' . $reload . '",tar="' . $target . '",bgB="' . $banner_bg . '",btcB="' . $banner_text_color . '",bPos="' . $bPos . '",bannerStyle="' . $bannerStyle . '",contentStyle="' . $contStyle . '",consText="' . $consentText . '",jsArr = ' . $this->wp_json_encode( apply_filters( 'icc_js_array', $this->js_array ) ) . ';';
|
822 |
-
|
823 |
-
/**
|
824 |
-
* Snippet per il multilingua
|
825 |
-
* function get_string return multilanguage $value
|
826 |
-
* if isn't installed any language plugin return $value
|
827 |
-
*/
|
828 |
-
$text = $this->wp_json_encode( wp_kses_post( get_string( 'Italy Cookie Choices', 'Banner text', $this->options['text'] ) ) );
|
829 |
-
|
830 |
-
$url = esc_url( get_string( 'Italy Cookie Choices', 'Banner url', $this->options['url'] ) );
|
831 |
-
|
832 |
-
$anchor_text = esc_js( get_string( 'Italy Cookie Choices', 'Banner anchor text', $this->options['anchor_text'] ) );
|
833 |
-
|
834 |
-
$button_text = esc_js( get_string( 'Italy Cookie Choices', 'Banner button text', $this->options['button_text'] ) );
|
835 |
-
|
836 |
-
/**
|
837 |
-
* Snippet for display banner
|
838 |
-
* @uses json_encode Funzione usate per il testo del messaggio.
|
839 |
-
* Ricordarsi che aggiunge già
|
840 |
-
* le doppie virgolette "" alla stringa
|
841 |
-
* @var string
|
842 |
-
*/
|
843 |
-
$banner = 'document.addEventListener("DOMContentLoaded", function(event) {cookieChoices.showCookieConsent' . $banner . '(' . $text . ', "' . $button_text . '", "' . $anchor_text . '", "' . $url . '");});';
|
844 |
-
|
845 |
-
/**
|
846 |
-
* Noscript snippet in case browser has JavaScript disabled
|
847 |
-
* @var string
|
848 |
-
*/
|
849 |
-
$noscript = '<noscript><style type="text/css">html{margin-top:35px}</style><div id="cookieChoiceInfo"><span>' . $text . '</span><a href="' . $url . '" class="' . $infoClass . '" target="_blank">' . $anchor_text . '</a></div></noscript>';
|
850 |
-
|
851 |
-
/**
|
852 |
-
* Select wich file to use in debug mode
|
853 |
-
* @var string
|
854 |
-
*/
|
855 |
-
// $fileJS = ( WP_DEBUG ) ? '/js/' . $js_template . '/cookiechoices.js' : '/js/' . $js_template . '/cookiechoices.php' ;
|
856 |
-
$fileJS = ( WP_DEBUG ) ? '/js/default/cookiechoices.js' : '/js/default/cookiechoices.php' ;
|
857 |
-
|
858 |
-
$output_html = '<!-- Italy Cookie Choices -->' . '<style type="text/css">' . $style . '</style><script>' . $jsVariables . file_get_contents( ITALY_COOKIE_CHOICES_DIRNAME . $fileJS ) . $banner . '</script>' . $noscript;
|
859 |
-
|
860 |
-
echo apply_filters( 'icc_output_html', $output_html );
|
861 |
-
|
862 |
-
}
|
863 |
-
|
864 |
-
/**
|
865 |
-
* Shortcode per stampare il bottone nella pagina della policy
|
866 |
-
* @param array $atts Array con gli attributi dello shortcode.
|
867 |
-
* @param string $content Content of shortcode.
|
868 |
-
* @return string Button per l'accettazione
|
869 |
-
*/
|
870 |
-
public function accept_button( $atts, $content = null ) {
|
871 |
-
|
872 |
-
$button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
873 |
-
|
874 |
-
return '<span class="el"><button onclick="cookieChoices.removeCookieConsent()">' . esc_attr( $button_text ) . '</button></span>';
|
875 |
-
|
876 |
-
}
|
877 |
-
|
878 |
-
/**
|
879 |
-
* Shortcode per stampare il bottone nella pagina della policy
|
880 |
-
* @param array $atts Array con gli attributi dello shortcode.
|
881 |
-
* @param string $content Content of shortcode.
|
882 |
-
* @return string Button per l'accettazione
|
883 |
-
*/
|
884 |
-
public function _delete_cookie( $atts, $content = null ) {
|
885 |
-
|
886 |
-
// $button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
887 |
-
$button_text = 'Delete cookie';
|
888 |
-
|
889 |
-
return '<span class="ele"><button onclick="deleteCookie()">' . esc_attr( $button_text ) . '</button></span>';
|
890 |
-
|
891 |
-
}
|
892 |
-
|
893 |
-
/**
|
894 |
-
* Display cookie, only for internal use
|
895 |
-
* @return string
|
896 |
-
*/
|
897 |
-
private function _display_cookie() {
|
898 |
-
|
899 |
-
$cookie_list = '<ul>';
|
900 |
-
|
901 |
-
foreach ( $_COOKIE as $key => $val )
|
902 |
-
$cookie_list .= '<li>Cooke name: ' . esc_attr( $key ) . ' - val: ' . esc_attr( $val ) . '</li>';
|
903 |
-
|
904 |
-
$cookie_list .= '</ul>';
|
905 |
-
|
906 |
-
return $cookie_list;
|
907 |
-
|
908 |
-
}
|
909 |
-
} // class
|
910 |
-
} //endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Cookie_Choices\Core;
|
7 |
+
|
8 |
+
class Cookie_Choices{
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Option
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
private $options = array();
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Default Cookie name
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $cookieName = 'displayCookieConsent';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Default cookie value
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $cookieVal = 'y';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Pattern for searching embed code in content and widget
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $pattern = '#<iframe.*?\/iframe>|<embed.*?>|<script.*?\/script>#is';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Snippet for replacements
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
private $valore = '';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Inizialize banner template to default
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $js_template = 'default';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array with embed found
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
public $js_array = array();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* If exist set a page slug
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
private $slug = '';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* URL for policy page
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
private $url = '';
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Array with list of allowed script|iframe|embed
|
66 |
+
* @var array
|
67 |
+
*/
|
68 |
+
private $allow_script = array();
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Array with list of blocked script|iframe|embed
|
72 |
+
* @var array
|
73 |
+
*/
|
74 |
+
private $block_script = array();
|
75 |
+
|
76 |
+
/**
|
77 |
+
* [__construct description]
|
78 |
+
*/
|
79 |
+
public function __construct(){
|
80 |
+
|
81 |
+
$this->options = get_option( 'italy_cookie_choices' );
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Check for second view option
|
85 |
+
* @var bol
|
86 |
+
*/
|
87 |
+
$secondViewOpt = ( isset( $this->options['secondView'] ) ) ? $this->options['secondView'] : '' ;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Assegno il valore allo slug nel costruttore
|
91 |
+
* Default ID 1 perché su null non settava correttamente lo scroll se il valore era assente
|
92 |
+
* @var bolean
|
93 |
+
*/
|
94 |
+
$this->slug = ( isset( $this->options['slug'] ) && !empty( $this->options['slug'] ) ) ? esc_attr( get_string( 'Italy Cookie Choices', 'Banner slug', $this->options['slug'] ) ) : 1 ;
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Assegno il valore della URL della policy page
|
98 |
+
* Default ID 1 perché su null non settava correttamente lo scroll se il valore era assente
|
99 |
+
* @var bolean
|
100 |
+
*/
|
101 |
+
$this->url = ( isset( $this->options['url'] ) && !empty( $this->options['url'] ) ) ? esc_url( get_string( 'Italy Cookie Choices', 'Banner url', $this->options['url'] ) ) : 1 ;
|
102 |
+
|
103 |
+
/*
|
104 |
+
* Set cookie if the user agree navigating through the pages of the site
|
105 |
+
*/
|
106 |
+
$secondView = false;
|
107 |
+
|
108 |
+
if( $this->is_policy_page( $secondViewOpt ) ) {
|
109 |
+
|
110 |
+
setcookie($this->options['cookie_name'], $this->options['cookie_value'], time()+(3600*24*365), '/');
|
111 |
+
$secondView = true;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Shortcode to put a button in policy page
|
116 |
+
*/
|
117 |
+
add_shortcode( 'accept_button', array( $this, 'accept_button' ) );
|
118 |
+
add_shortcode( 'delete_cookie', array( $this, '_delete_cookie' ) );
|
119 |
+
|
120 |
+
if ( !isset( $_COOKIE[ $this->options['cookie_name'] ] ) && !$secondView ){
|
121 |
+
|
122 |
+
// W3TC Disable Caching
|
123 |
+
if ( !defined( 'DONOTCACHEPAGE' ) )
|
124 |
+
define('DONOTCACHEPAGE', true);
|
125 |
+
if ( !defined( 'SID' ) )
|
126 |
+
define('SID', true);
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Background color for banner
|
130 |
+
* @var string
|
131 |
+
*/
|
132 |
+
$banner_bg = ( isset( $this->options['banner_bg'] ) ) ? $this->options['banner_bg'] : '#ffffff' ;
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Color for text
|
136 |
+
* @var string
|
137 |
+
*/
|
138 |
+
$banner_text_color = ( isset( $this->options['banner_text_color'] ) ) ? $this->options['banner_text_color'] : '#000000' ;
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Text for banner
|
142 |
+
* @var string
|
143 |
+
*/
|
144 |
+
$text = ( isset( $this->options['text'] ) ) ? $this->options['text'] : '' ;
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Text for buttom
|
148 |
+
* @var [type]
|
149 |
+
*/
|
150 |
+
$button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Checkbox for third part cookie in content
|
154 |
+
* @var bol
|
155 |
+
*/
|
156 |
+
$block = ( isset( $this->options['block'] ) ) ? $this->options['block'] : '' ;
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Checkbox for third part cookie in widget
|
160 |
+
* @var bol
|
161 |
+
*/
|
162 |
+
$widget_block = ( isset( $this->options['widget_block'] ) ) ? $this->options['widget_block'] : '' ;
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Checkbox for third part cookie in all page (except head and footer)
|
166 |
+
* @var bol
|
167 |
+
*/
|
168 |
+
$all_block = ( isset( $this->options['all_block'] ) ) ? $this->options['all_block'] : '' ;
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Checkbox custom scripts block in BODY
|
172 |
+
* @var string
|
173 |
+
*/
|
174 |
+
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
175 |
+
|
176 |
+
$this->get_blocked_script();
|
177 |
+
$this->get_allowed_script();
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Checkbox custom scripts block in HEAD and FOOTER
|
181 |
+
* @var string
|
182 |
+
*/
|
183 |
+
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Text to put inside locked post and widget contents
|
187 |
+
* including the button text
|
188 |
+
* @var string
|
189 |
+
*/
|
190 |
+
$content_message_text = ( isset( $this->options['content_message_text'] ) ) ? wp_kses_post( get_string( 'Italy Cookie Choices', 'Content message text', $this->options['content_message_text'] ) ) : '' ;
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Text for button in locked content and widget
|
194 |
+
* @var string
|
195 |
+
*/
|
196 |
+
$content_message_button_text = ( isset( $this->options['content_message_button_text'] ) ) ? esc_attr( get_string( 'Italy Cookie Choices', 'Content message button text', $this->options['content_message_button_text'] ) ) : '' ;
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Replacement for regex
|
200 |
+
* @var string
|
201 |
+
*/
|
202 |
+
$this->valore = '<div class="el"><div style="padding:10px;margin-bottom: 18px;color:' . esc_attr( $banner_text_color ) . ';background-color:' . esc_attr( $banner_bg ) . ';text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);">' . $content_message_text . ' <button onclick="cookieChoices.removeCookieConsent()" style="color: ' . esc_attr( $banner_text_color ) . ';padding: 3px;font-size: 12px;line-height: 12px;text-decoration: none;text-transform: uppercase;margin:0;display: inline-block;font-weight: normal; text-align: center; vertical-align: middle; cursor: pointer; border: 1px solid ' . esc_attr( $banner_text_color ) . ';background: rgba(255, 255, 255, 0.03);">' . $content_message_button_text . '</button></div><cookie></div>';
|
203 |
+
|
204 |
+
if ($block)
|
205 |
+
add_filter( 'the_content', array( $this, 'AutoErase' ), 11);
|
206 |
+
|
207 |
+
if ( $widget_block )
|
208 |
+
add_filter( 'widget_display_callback', array( $this, 'WidgetErase' ), 11, 3 );
|
209 |
+
|
210 |
+
if ( $all_block ) {
|
211 |
+
//add_action('wp_footer', array( $this, 'catchBody' ), -1000000);
|
212 |
+
add_action('wp_head', array( $this, 'bufferBodyStart' ), 1000000);
|
213 |
+
add_action('wp_footer', array( $this, 'bufferBodyEnd' ), -1000000);
|
214 |
+
}
|
215 |
+
if( ( $custom_script_block || $this->block_script ) && $all_block ) {
|
216 |
+
add_action('template_redirect', array( $this, 'bufferHeadStart' ), 2);
|
217 |
+
add_action('wp_head', array( $this, 'bufferHeadEnd' ), 99999);
|
218 |
+
add_action('wp_footer', array( $this, 'bufferFooterStart' ), -99998);
|
219 |
+
add_action('shutdown', array( $this, 'bufferFooterEnd' ), -1000000);
|
220 |
+
} else {
|
221 |
+
/**
|
222 |
+
* Function for print cookiechoiches inline
|
223 |
+
*/
|
224 |
+
add_action( 'wp_footer', array( $this, 'print_script_inline'), -99999 );
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Only for debug
|
229 |
+
*/
|
230 |
+
// var_dump($_COOKIE);
|
231 |
+
// var_dump(headers_list());
|
232 |
+
|
233 |
+
}
|
234 |
+
|
235 |
+
}//__construct
|
236 |
+
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Get the current page url
|
240 |
+
* @link http://www.brosulo.net/content/informatica/ottenere-la-url-completa-da-una-pagina-php-0
|
241 |
+
*/
|
242 |
+
private function CurrentPageURL() {
|
243 |
+
|
244 |
+
if ( isset( $_SERVER['HTTPS'] ) )
|
245 |
+
$pageURL = $_SERVER['HTTPS'];
|
246 |
+
else
|
247 |
+
$pageURL = NULL;
|
248 |
+
|
249 |
+
$pageURL = $pageURL === 'on' ? 'https://' : 'http://';
|
250 |
+
$pageURL .= $_SERVER["SERVER_NAME"];
|
251 |
+
$pageURL .= ( $_SERVER['SERVER_PORT'] !== '80' ) ? ':' . $_SERVER["SERVER_PORT"] : '';
|
252 |
+
$pageURL .= $_SERVER["REQUEST_URI"];
|
253 |
+
|
254 |
+
return esc_url( $pageURL );
|
255 |
+
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Check if is the policy page
|
260 |
+
* Required url input
|
261 |
+
* @param boolean $secondViewOpt Check for second view option
|
262 |
+
* @return boolean Return bolean value
|
263 |
+
*/
|
264 |
+
private function is_policy_page( $secondViewOpt = false ){
|
265 |
+
|
266 |
+
if(
|
267 |
+
// if HTTP_ACCEPT is set
|
268 |
+
( isset( $_SERVER['HTTP_ACCEPT'] ) &&
|
269 |
+
|
270 |
+
// if is an HTML request (alternative methods???)
|
271 |
+
strpos( $_SERVER['HTTP_ACCEPT'], 'html' ) !== false ) &&
|
272 |
+
|
273 |
+
//if the page isn't privacy page
|
274 |
+
// ( $_SERVER['REQUEST_URI'] != $this->slug ) &&
|
275 |
+
( $this->CurrentPageURL() !== $this->url ) &&
|
276 |
+
//if HTTP_REFERER is set
|
277 |
+
( isset( $_SERVER['HTTP_REFERER'] ) ) &&
|
278 |
+
//if isn't refresh
|
279 |
+
( parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH) !== $_SERVER['REQUEST_URI'] ) &&
|
280 |
+
//if referrer is not privacy page (to be evaluated)
|
281 |
+
// ( parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH ) != $this->slug ) &&
|
282 |
+
// ( $_SERVER['HTTP_REFERER'] !== $this->url ) &&
|
283 |
+
//if the cookie is not already set
|
284 |
+
( !isset( $_COOKIE[ $this->options['cookie_name'] ] ) ) &&
|
285 |
+
//if the referer is in the same domain
|
286 |
+
( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ) === $_SERVER['HTTP_HOST'] ) &&
|
287 |
+
// If the secondView options is checked
|
288 |
+
( $secondViewOpt )
|
289 |
+
)
|
290 |
+
return true;
|
291 |
+
else
|
292 |
+
return false;
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
private function in_array_match($value, $array) {
|
298 |
+
foreach($array as $k=>$v) {
|
299 |
+
if(preg_match('/'.str_replace(preg_quote("<---------SOMETHING--------->"), ".*", preg_quote(preg_replace( "/([\r|\n]*)/is", "", trim($v)), '/')).'/is', preg_replace( "/([\r|\n]*)/is", "", $value))) {
|
300 |
+
return true;
|
301 |
+
}
|
302 |
+
}
|
303 |
+
return false;
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Remove custom script in header and footer
|
308 |
+
* @param string $buffer Source of page.
|
309 |
+
* @return string Return the new HTML
|
310 |
+
*/
|
311 |
+
public function removeCustomScript( $buffer ) {
|
312 |
+
/**
|
313 |
+
* Custom script to block
|
314 |
+
* @var string
|
315 |
+
*/
|
316 |
+
$custom_script_block = ( isset( $this->options['custom_script_block'] ) ) ? $this->options['custom_script_block'] : '' ;
|
317 |
+
|
318 |
+
if( ! $custom_script_block && ! $this->block_script )
|
319 |
+
return $buffer;
|
320 |
+
else {
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Replace space with <---------SEP--------->
|
324 |
+
* @var string
|
325 |
+
*/
|
326 |
+
$custom_script_block = preg_replace( "/([\r|\n]*)<---------SEP--------->([\r|\n]*)/is", "<---------SEP--------->", $custom_script_block );
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Convert $custom_script_block to an array
|
330 |
+
* @var array
|
331 |
+
*/
|
332 |
+
$custom_script_block_array = explode( "<---------SEP--------->", $custom_script_block );
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Merge the script array from new UX functionality
|
336 |
+
* @var array
|
337 |
+
*/
|
338 |
+
$custom_script_block_array = array_merge( $custom_script_block_array, $this->block_script );
|
339 |
+
|
340 |
+
foreach( $custom_script_block_array as $single_script) {
|
341 |
+
preg_match_all( '/' . str_replace( preg_quote( "<---------SOMETHING--------->" ), ".*", preg_quote( trim( $single_script ), '/' ) ) . '/is', $buffer, $matches );
|
342 |
+
if ( ! empty( $matches[0] ) ) {
|
343 |
+
foreach ( $matches[0] as $v ) {
|
344 |
+
$buffer = str_replace( trim( $v ), "<!-- removed head from Italy Cookie Choices PHP Class -->", $buffer );
|
345 |
+
$this->js_array[] = trim( $v );
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
return $buffer;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
public function bufferBodyStart() {
|
354 |
+
if ( ob_get_contents() )
|
355 |
+
ob_end_flush();
|
356 |
+
ob_start();
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
public function bufferBodyEnd() {
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Check if $custom_script_block_body_exclude is set
|
364 |
+
* @var string
|
365 |
+
*/
|
366 |
+
$custom_script_block_body_exclude = ( isset( $this->options['custom_script_block_body_exclude'] ) ) ? $this->options['custom_script_block_body_exclude'] : '' ;
|
367 |
+
|
368 |
+
/**
|
369 |
+
* Replace space with <---------SEP--------->
|
370 |
+
* @var string
|
371 |
+
*/
|
372 |
+
$custom_script_block_body_exclude = preg_replace( "/([\r|\n]*)<---------SEP--------->([\r|\n]*)/is", "<---------SEP--------->", $custom_script_block_body_exclude );
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Create array
|
376 |
+
* @var array
|
377 |
+
*/
|
378 |
+
$custom_script_block_body_exclude_array = explode( "<---------SEP--------->", $custom_script_block_body_exclude );
|
379 |
+
|
380 |
+
if( ! is_array( $custom_script_block_body_exclude_array ) || empty( $custom_script_block_body_exclude_array[0] ) )
|
381 |
+
$custom_script_block_body_exclude_array = array();
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Merge the script array from new UX functionality
|
385 |
+
* @var array
|
386 |
+
*/
|
387 |
+
$custom_script_block_body_exclude_array = array_merge( $custom_script_block_body_exclude_array, $this->allow_script );
|
388 |
+
|
389 |
+
$buffer = ob_get_contents();
|
390 |
+
if ( ob_get_contents() )
|
391 |
+
ob_end_clean();
|
392 |
+
preg_match( "/(.*)(<body.*)/s", $buffer, $matches );
|
393 |
+
$head = ( isset( $matches[1] ) ) ? $matches[1] : '';
|
394 |
+
$body = ( isset( $matches[2] ) ) ? $matches[2] : '';
|
395 |
+
preg_match_all( $this->pattern, $body, $body_matches );
|
396 |
+
|
397 |
+
if ( ! empty( $body_matches[0] ) ) {
|
398 |
+
foreach ( $body_matches[0] as $k => $v ) {
|
399 |
+
|
400 |
+
if ( ! $this->in_array_match( trim( $v ), $custom_script_block_body_exclude_array ) ) {
|
401 |
+
$body = preg_replace( '/' . str_replace( preg_quote( "<---------SOMETHING--------->" ), ".*", preg_quote( trim( $v ), '/' ) ) . '/is', $this->valore, $body );
|
402 |
+
$this->js_array[] = trim( $v );
|
403 |
+
}
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
$buffer_new = $head.$body;
|
408 |
+
echo '<!-- ICCStartBody -->' . $buffer_new . '<!-- ICCEndBody -->';
|
409 |
+
}
|
410 |
+
|
411 |
+
public function bufferFooterStart() {
|
412 |
+
/**
|
413 |
+
* Check if we are in feed page, then do nothing
|
414 |
+
*/
|
415 |
+
if ( is_feed() )
|
416 |
+
return;
|
417 |
+
|
418 |
+
if ( ob_get_contents() )
|
419 |
+
ob_end_flush();
|
420 |
+
ob_start();
|
421 |
+
}
|
422 |
+
|
423 |
+
public function bufferFooterEnd() {
|
424 |
+
/**
|
425 |
+
* Check if we are in feed page, then do nothing
|
426 |
+
*/
|
427 |
+
if ( is_feed() )
|
428 |
+
return;
|
429 |
+
|
430 |
+
$buffer = ob_get_contents();
|
431 |
+
if ( ob_get_contents() )
|
432 |
+
ob_end_clean();
|
433 |
+
// If is an HTML request (alternative methods???).
|
434 |
+
if( isset( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER["HTTP_ACCEPT"], 'html' ) !== false ) {
|
435 |
+
$buffer_new = $this->removeCustomScript( $buffer );
|
436 |
+
/**
|
437 |
+
* Function for print cookiechoiches inline
|
438 |
+
*/
|
439 |
+
$this->print_script_inline();
|
440 |
+
echo '<!-- ICCStartFooter -->' . $buffer_new . '<!-- ICCEndFooter -->';
|
441 |
+
} else {
|
442 |
+
echo $buffer;
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
public function bufferHeadStart() {
|
447 |
+
if ( ob_get_contents() )
|
448 |
+
ob_end_flush();
|
449 |
+
ob_start();
|
450 |
+
}
|
451 |
+
|
452 |
+
public function bufferHeadEnd() {
|
453 |
+
$buffer = ob_get_contents();
|
454 |
+
if ( ob_get_contents() )
|
455 |
+
ob_end_clean();
|
456 |
+
$buffer_new = $this->removeCustomScript( $buffer );
|
457 |
+
echo '<!-- ICCStartHead -->' . $buffer_new . '<!-- ICCEndHead -->';
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Script preimpostati da escludere dal blocco
|
462 |
+
* Preparare un array key valore a parte, unico per entrambi
|
463 |
+
* Questo array sarà utilizzato per generare anche le input dinamicamente
|
464 |
+
* array(
|
465 |
+
* 'facebook' => 'script'
|
466 |
+
* )
|
467 |
+
* Return the Array con gli script preimpostati.
|
468 |
+
*/
|
469 |
+
private function get_allowed_script() {
|
470 |
+
|
471 |
+
$allow_iframe = ( isset( $this->options['allow_iframe'] ) ) ? $this->options['allow_iframe'] : array( '' );
|
472 |
+
$allow_script = ( isset( $this->options['allow_script'] ) ) ? $this->options['allow_script'] : array( '' );
|
473 |
+
$allow_embed = ( isset( $this->options['allow_embed'] ) ) ? $this->options['allow_embed'] : array( '' );
|
474 |
+
|
475 |
+
$array = array();
|
476 |
+
|
477 |
+
foreach ( $allow_iframe as $key => $value )
|
478 |
+
if ( ! empty( $value ) )
|
479 |
+
$this->allow_script[] = '<iframe<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></iframe>';
|
480 |
+
|
481 |
+
foreach ( $allow_script as $key => $value )
|
482 |
+
if ( ! empty( $value ) )
|
483 |
+
$this->allow_script[] = '<script<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></script>';
|
484 |
+
|
485 |
+
foreach ( $allow_embed as $key => $value )
|
486 |
+
if ( ! empty( $value ) )
|
487 |
+
$this->allow_script[] = '<embed<---------SOMETHING--------->' . $value . '<---------SOMETHING--------->>';
|
488 |
+
|
489 |
+
}
|
490 |
+
|
491 |
+
private function get_blocked_script( $val = array() ) {
|
492 |
+
|
493 |
+
$block_iframe = ( isset( $this->options['block_iframe'] ) ) ? $this->options['block_iframe'] : array( '' );
|
494 |
+
$block_script = ( isset( $this->options['block_script'] ) ) ? $this->options['block_script'] : array( '' );
|
495 |
+
$block_embed = ( isset( $this->options['block_embed'] ) ) ? $this->options['block_embed'] : array( '' );
|
496 |
+
|
497 |
+
$array = array();
|
498 |
+
|
499 |
+
foreach ( $block_iframe as $value )
|
500 |
+
if ( ! empty( $value ) )
|
501 |
+
$this->block_script[] = '<iframe<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></iframe>';
|
502 |
+
|
503 |
+
foreach ( $block_script as $value )
|
504 |
+
if ( ! empty( $value ) )
|
505 |
+
$this->block_script[] = '<script<---------SOMETHING--------->' . $value . '<---------SOMETHING---------></script>';
|
506 |
+
|
507 |
+
foreach ( $block_embed as $value )
|
508 |
+
if ( ! empty( $value ) )
|
509 |
+
$this->block_script[] = '<embed<---------SOMETHING--------->' . $value . '<---------SOMETHING--------->>';
|
510 |
+
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Function for matching embed, return the Array with embed found
|
515 |
+
* @param string $pattern Pattern.
|
516 |
+
* @param string $content Content.
|
517 |
+
*/
|
518 |
+
public function matches( $pattern, $content ) {
|
519 |
+
|
520 |
+
preg_match_all( $this->pattern, $content, $matches );
|
521 |
+
|
522 |
+
/**
|
523 |
+
* Memorizzo gli embed trovati e li appendo all'array $js_array
|
524 |
+
* @var array
|
525 |
+
*/
|
526 |
+
if ( ! empty( $matches[0] ) )
|
527 |
+
$this->js_array = array_merge( $this->js_array, $matches[0] );
|
528 |
+
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Erase third part embed
|
533 |
+
* @param string $content Article content.
|
534 |
+
*/
|
535 |
+
public function AutoErase( $content ) {
|
536 |
+
|
537 |
+
$this->matches( $this->pattern, $content );
|
538 |
+
|
539 |
+
$content = preg_replace( $this->pattern, $this->valore , $content );
|
540 |
+
|
541 |
+
return $content;
|
542 |
+
}
|
543 |
+
|
544 |
+
private function fnFixArray( $v ) {
|
545 |
+
|
546 |
+
if ( is_array( $v ) or is_object( $v ) ) {
|
547 |
+
|
548 |
+
foreach ( $v as $k1 => $v1 ) {
|
549 |
+
|
550 |
+
$v[ $k1 ] = $this->fnFixArray( $v1 );
|
551 |
+
|
552 |
+
}
|
553 |
+
|
554 |
+
return $v;
|
555 |
+
|
556 |
+
}
|
557 |
+
|
558 |
+
if ( ! is_string( $v ) or empty( $v ) ) return $v;
|
559 |
+
|
560 |
+
$this->matches( $this->pattern, $v );
|
561 |
+
|
562 |
+
return preg_replace( $this->pattern, $this->valore , $v );
|
563 |
+
|
564 |
+
}
|
565 |
+
|
566 |
+
public function WidgetErase( $instance, $widget, $args ) {
|
567 |
+
|
568 |
+
return $this->fnFixArray( $instance );
|
569 |
+
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Encode a variable into JSON, with some sanity checks.
|
574 |
+
*
|
575 |
+
* @since 4.1.0
|
576 |
+
*
|
577 |
+
* @param mixed $data Variable (usually an array or object) to encode as JSON.
|
578 |
+
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
|
579 |
+
* @param int $depth Optional. Maximum depth to walk through $data. Must be
|
580 |
+
* greater than 0. Default 512.
|
581 |
+
* @return bool|string The JSON encoded string, or false if it cannot be encoded.
|
582 |
+
*/
|
583 |
+
public function wp_json_encode( $data, $options = 0, $depth = 512 ) {
|
584 |
+
|
585 |
+
/**
|
586 |
+
* json_encode() has had extra params added over the years.
|
587 |
+
* $options was added in 5.3, and $depth in 5.5.
|
588 |
+
* We need to make sure we call it with the correct arguments.
|
589 |
+
*/
|
590 |
+
if ( version_compare( PHP_VERSION, '5.5', '>=' ) )
|
591 |
+
$args = array( $data, $options, $depth );
|
592 |
+
elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) )
|
593 |
+
$args = array( $data, $options );
|
594 |
+
else $args = array( $data );
|
595 |
+
|
596 |
+
$json = call_user_func_array( 'json_encode', $args );
|
597 |
+
|
598 |
+
// If json_encode() was successful, no need to do more sanity checking.
|
599 |
+
// ... unless we're in an old version of PHP, and json_encode() returned
|
600 |
+
// a string containing 'null'. Then we need to do more sanity checking.
|
601 |
+
if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )
|
602 |
+
return $json;
|
603 |
+
|
604 |
+
return call_user_func_array( 'json_encode', $args );
|
605 |
+
}
|
606 |
+
|
607 |
+
/**
|
608 |
+
* Print script inline before </body>
|
609 |
+
* @return string Print script inline
|
610 |
+
* @link https://www.cookiechoices.org/
|
611 |
+
*/
|
612 |
+
public function print_script_inline() {
|
613 |
+
|
614 |
+
/**
|
615 |
+
* If is not active exit
|
616 |
+
*/
|
617 |
+
if ( ! isset( $this->options['active'] ) || is_feed() )
|
618 |
+
return;
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Accept on scroll
|
622 |
+
* @var bol
|
623 |
+
*/
|
624 |
+
$scroll = ( isset( $this->options['scroll'] ) && ! ( is_page( $this->slug ) || is_single( $this->slug ) ) ) ? $this->options['scroll'] : '' ;
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Reload on accept
|
628 |
+
* @var bol
|
629 |
+
*/
|
630 |
+
$reload = ( isset( $this->options['reload'] ) ) ? $this->options['reload'] : '' ;
|
631 |
+
|
632 |
+
/**
|
633 |
+
* ADVANCED OPTIONS
|
634 |
+
*/
|
635 |
+
/**
|
636 |
+
* Cookie name
|
637 |
+
* @var string
|
638 |
+
*/
|
639 |
+
$cookie_name = ( isset( $this->options['cookie_name'] ) ) ? $this->options['cookie_name'] : $this->cookieName ;
|
640 |
+
|
641 |
+
/**
|
642 |
+
* Cookie value
|
643 |
+
* @var string/bolean
|
644 |
+
*/
|
645 |
+
$cookie_value = ( isset( $this->options['cookie_value'] ) ) ? $this->options['cookie_value'] : $this->cookieVal ;
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Js_Template value
|
649 |
+
* @var string
|
650 |
+
*/
|
651 |
+
// $js_template = ( isset( $this->options['js_template'] ) && $this->options['js_template'] !== 'custom') ? $this->options['js_template'] : $this->js_template ;
|
652 |
+
$js_template = ( isset( $this->options['js_template'] ) ) ? $this->options['js_template'] : $this->js_template ;
|
653 |
+
|
654 |
+
/**
|
655 |
+
* If is set html_margin checkbox in admin panel then add margin-top to HTML tag
|
656 |
+
* @var bol
|
657 |
+
*/
|
658 |
+
$htmlM = '' ;
|
659 |
+
|
660 |
+
/**
|
661 |
+
* If set open policy page in new browser tab
|
662 |
+
* @var bol
|
663 |
+
*/
|
664 |
+
$target = ( isset( $this->options['target'] ) ) ? $this->options['target'] : '' ;
|
665 |
+
|
666 |
+
/**
|
667 |
+
* Colore dello sfondo della dialog/topbar
|
668 |
+
* @var string
|
669 |
+
*/
|
670 |
+
$banner_bg = ( isset( $this->options['banner_bg'] ) && ! empty( $this->options['banner_bg'] ) ) ? esc_attr( $this->options['banner_bg'] ) : '#fff' ;
|
671 |
+
|
672 |
+
/**
|
673 |
+
* Colore del font della dialog/topbar
|
674 |
+
* @var string
|
675 |
+
*/
|
676 |
+
$banner_text_color = ( isset( $this->options['banner_text_color'] ) && ! empty( $this->options['banner_text_color'] ) ) ? esc_attr( $this->options['banner_text_color'] ) : '#000' ;
|
677 |
+
|
678 |
+
/**
|
679 |
+
* Custom CSS
|
680 |
+
* @var string
|
681 |
+
*/
|
682 |
+
$customCSS = ( isset( $this->options['customCSS'] ) ) ? esc_attr( $this->options['customCSS'] ) : '' ;
|
683 |
+
|
684 |
+
/**
|
685 |
+
* CSS class for div bannerStyle
|
686 |
+
* @var string
|
687 |
+
*/
|
688 |
+
$bannerStyle = ( isset( $this->options['bannerStyle'] ) && ! empty( $this->options['bannerStyle'] ) ) ? esc_attr( $this->options['bannerStyle'] ) : 'bannerStyle' ;
|
689 |
+
|
690 |
+
/**
|
691 |
+
* CSS class for div content
|
692 |
+
* @var string
|
693 |
+
*/
|
694 |
+
$contStyle = ( isset( $this->options['contentStyle'] ) && ! empty( $this->options['contentStyle'] ) ) ? esc_attr( $this->options['contentStyle'] ) : 'contentStyle' ;
|
695 |
+
|
696 |
+
/**
|
697 |
+
* CSS class for text in span
|
698 |
+
* @var string
|
699 |
+
*/
|
700 |
+
$consentText = ( isset( $this->options['consentText'] ) && ! empty( $this->options['consentText'] ) ) ? esc_attr( $this->options['consentText'] ) : 'consentText' ;
|
701 |
+
|
702 |
+
/**
|
703 |
+
* CSS class for info link
|
704 |
+
* @var string
|
705 |
+
*/
|
706 |
+
$infoClass = ( isset( $this->options['infoClass'] ) && ! empty( $this->options['infoClass'] ) ) ? esc_attr( $this->options['infoClass'] ) : 'italybtn' ;
|
707 |
+
|
708 |
+
/**
|
709 |
+
* CSS class for close link
|
710 |
+
* @var string
|
711 |
+
*/
|
712 |
+
$closeClass = ( isset( $this->options['closeClass'] ) && ! empty( $this->options['closeClass'] ) ) ? esc_attr( $this->options['closeClass'] ) : 'italybtn' ;
|
713 |
+
|
714 |
+
/**
|
715 |
+
* If $infoClass and $closeClass are exactly alike print only first var
|
716 |
+
* @var [type]
|
717 |
+
*/
|
718 |
+
$buttonClass = ( $infoClass === $closeClass ) ? $infoClass : $infoClass . ',.' . $closeClass;
|
719 |
+
|
720 |
+
/**
|
721 |
+
* Attribute for text for template
|
722 |
+
* @var string
|
723 |
+
*/
|
724 |
+
$text_align = 'center';
|
725 |
+
|
726 |
+
/**
|
727 |
+
* CSS for content style
|
728 |
+
* @var string
|
729 |
+
*/
|
730 |
+
$contentStyle = '';
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Button style
|
734 |
+
* @var string
|
735 |
+
*/
|
736 |
+
$buttonStyle = '.' . $buttonClass . '{margin-left:10px;}';
|
737 |
+
|
738 |
+
/**
|
739 |
+
* Conditional button style for bigbutton or smallbutton
|
740 |
+
* Default margin
|
741 |
+
*/
|
742 |
+
if ( 'bigbutton' === $js_template ) {
|
743 |
+
|
744 |
+
$buttonStyle = '.' . $buttonClass . '{color:' . $banner_text_color . ';padding:7px 12px;font-size:18px;line-height:18px;text-decoration:none;text-transform:uppercase;margin:10px 20px 2px 0;letter-spacing: 0.125em;display:inline-block;font-weight:normal;text-align:center; vertical-align:middle;cursor:pointer;border:1px solid ' . $banner_text_color . ';background:rgba(255, 255, 255, 0.03);}.' . $consentText . '{display:block}';
|
745 |
+
|
746 |
+
$text_align = 'left';
|
747 |
+
|
748 |
+
} elseif ( 'smallbutton' === $js_template ) {
|
749 |
+
|
750 |
+
$buttonStyle = '.' . $buttonClass . '{color:' . $banner_text_color . ';padding:3px 7px;font-size:14px;line-height:14px;text-decoration:none;text-transform:uppercase;margin:10px 20px 2px 0;letter-spacing: 0.115em;display:inline-block;font-weight:normal;text-align:center; vertical-align:middle;cursor:pointer;border:1px solid ' . $banner_text_color . ';background:rgba(255, 255, 255, 0.03);}.' . $consentText . '{display:block}';
|
751 |
+
|
752 |
+
$text_align = 'left';
|
753 |
+
|
754 |
+
}
|
755 |
+
|
756 |
+
/**
|
757 |
+
* Select what kind of banner to display
|
758 |
+
* @var $banner Bar/Dialog
|
759 |
+
* @var $contentStyle Style for content div
|
760 |
+
* @var $style Style for banner
|
761 |
+
* @var $bPos Deprecated
|
762 |
+
* @var $htmlM Bolean for margin top
|
763 |
+
*/
|
764 |
+
if ( $this->options['banner'] === '1' ) {
|
765 |
+
|
766 |
+
$banner = 'Bar';
|
767 |
+
|
768 |
+
$contentStyle = ( 'bigbutton' === $js_template || 'smallbutton' === $js_template ) ? '.contentStyle{max-width:980px;margin-right:auto;margin-left:auto;padding:15px;}' : '' ;
|
769 |
+
|
770 |
+
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:' . $text_align . ';top:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
771 |
+
|
772 |
+
$bPos = 'top:0'; // Deprecato.
|
773 |
+
|
774 |
+
$htmlM = ( isset( $this->options['html_margin'] ) ) ? $this->options['html_margin'] : '' ;
|
775 |
+
|
776 |
+
} elseif ( $this->options['banner'] === '2' && ! ( is_page( $this->slug ) || is_single( $this->slug ) ) ) {
|
777 |
+
|
778 |
+
$banner = 'Dialog';
|
779 |
+
|
780 |
+
$style = ( 'custom' === $js_template ) ? $customCSS : '.glassStyle{position:fixed;width:100%;height:100%;z-index:999;top:0;left:0;opacity:0.5;filter:alpha(opacity=50);background-color:#ccc;}.' . $bannerStyle . '{min-width:100%;z-index:9999;position:fixed;top:25%;}.contentStyle{position:relative;background-color:' . $banner_bg . ';padding:20px;box-shadow:4px 4px 25px #888;max-width:80%;margin:0 auto;}' . $buttonStyle;
|
781 |
+
|
782 |
+
$bPos = 'top:0'; // Deprecato.
|
783 |
+
|
784 |
+
} elseif ( $this->options['banner'] === '3' ) {
|
785 |
+
|
786 |
+
$banner = 'Bar';
|
787 |
+
|
788 |
+
$contentStyle = ( 'bigbutton' === $js_template || 'smallbutton' === $js_template ) ? '.contentStyle{max-width:980px;margin-right:auto;margin-left:auto;padding:15px;}' : '' ;
|
789 |
+
|
790 |
+
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:' . $text_align . ';bottom:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
791 |
+
|
792 |
+
$bPos = 'bottom:0'; // Deprecato.
|
793 |
+
|
794 |
+
} else {
|
795 |
+
|
796 |
+
$banner = 'Bar';
|
797 |
+
|
798 |
+
$style = ( 'custom' === $js_template ) ? $customCSS : '#cookieChoiceInfo{background-color: ' . $banner_bg . ';color: ' . $banner_text_color . ';left:0;margin:0;padding:4px;position:fixed;text-align:center;top:0;width:100%;z-index:9999;}' . $contentStyle . $buttonStyle;
|
799 |
+
|
800 |
+
$bPos = 'top:0'; // Deprecato.
|
801 |
+
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Declarations of JS variables and set parameters
|
806 |
+
* var elPos = Gestisce la Posizione banner nella funzione _createHeaderElement
|
807 |
+
* var infoClass = aggiunge una classe personalizzata per il link info
|
808 |
+
* var closeClass = aggiunge una classe personalizzata per il link di accettazione
|
809 |
+
* var htmlM = Aggiunge un margine a HTML per la top bar
|
810 |
+
* var coNA = cookie name
|
811 |
+
* var coVA = cookie val
|
812 |
+
* var rel = Setto il reload per la pagina all'accettazione
|
813 |
+
* var tar = Target -blank
|
814 |
+
* var bgB = Colore del background della topbar/dialog
|
815 |
+
* var btcB = Colore del font della topbar/dialog
|
816 |
+
* var bannerStyle = Variabile per le classe del contenitore
|
817 |
+
* var contentStyle = Variabile per le classe del contenitore del contenuto
|
818 |
+
* var consText = Variabile per le classe dello span per il testo
|
819 |
+
* @var string
|
820 |
+
*/
|
821 |
+
|
822 |
+
$jsVariables = 'var coNA="' . $cookie_name . '",coVA="' . $cookie_value . '";scroll="' . $scroll . '",elPos="fixed",infoClass="' . $infoClass . '",closeClass="' . $closeClass . '",htmlM="' . $htmlM . '",rel="' . $reload . '",tar="' . $target . '",bgB="' . $banner_bg . '",btcB="' . $banner_text_color . '",bPos="' . $bPos . '",bannerStyle="' . $bannerStyle . '",contentStyle="' . $contStyle . '",consText="' . $consentText . '",jsArr = ' . $this->wp_json_encode( apply_filters( 'icc_js_array', $this->js_array ) ) . ';';
|
823 |
+
|
824 |
+
/**
|
825 |
+
* Snippet per il multilingua
|
826 |
+
* function get_string return multilanguage $value
|
827 |
+
* if isn't installed any language plugin return $value
|
828 |
+
*/
|
829 |
+
$text = $this->wp_json_encode( wp_kses_post( get_string( 'Italy Cookie Choices', 'Banner text', $this->options['text'] ) ) );
|
830 |
+
|
831 |
+
$url = esc_url( get_string( 'Italy Cookie Choices', 'Banner url', $this->options['url'] ) );
|
832 |
+
|
833 |
+
$anchor_text = esc_js( get_string( 'Italy Cookie Choices', 'Banner anchor text', $this->options['anchor_text'] ) );
|
834 |
+
|
835 |
+
$button_text = esc_js( get_string( 'Italy Cookie Choices', 'Banner button text', $this->options['button_text'] ) );
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Snippet for display banner
|
839 |
+
* @uses json_encode Funzione usate per il testo del messaggio.
|
840 |
+
* Ricordarsi che aggiunge già
|
841 |
+
* le doppie virgolette "" alla stringa
|
842 |
+
* @var string
|
843 |
+
*/
|
844 |
+
$banner = 'document.addEventListener("DOMContentLoaded", function(event) {cookieChoices.showCookieConsent' . $banner . '(' . $text . ', "' . $button_text . '", "' . $anchor_text . '", "' . $url . '");});';
|
845 |
+
|
846 |
+
/**
|
847 |
+
* Noscript snippet in case browser has JavaScript disabled
|
848 |
+
* @var string
|
849 |
+
*/
|
850 |
+
$noscript = '<noscript><style type="text/css">html{margin-top:35px}</style><div id="cookieChoiceInfo"><span>' . $text . '</span><a href="' . $url . '" class="' . $infoClass . '" target="_blank">' . $anchor_text . '</a></div></noscript>';
|
851 |
+
|
852 |
+
/**
|
853 |
+
* Select wich file to use in debug mode
|
854 |
+
* @var string
|
855 |
+
*/
|
856 |
+
// $fileJS = ( WP_DEBUG ) ? '/js/' . $js_template . '/cookiechoices.js' : '/js/' . $js_template . '/cookiechoices.php' ;
|
857 |
+
$fileJS = ( WP_DEBUG ) ? '/js/default/cookiechoices.js' : '/js/default/cookiechoices.php' ;
|
858 |
+
|
859 |
+
$output_html = '<!-- Italy Cookie Choices -->' . '<style type="text/css">' . $style . '</style><script>' . $jsVariables . file_get_contents( ITALY_COOKIE_CHOICES_DIRNAME . $fileJS ) . $banner . '</script>' . $noscript;
|
860 |
+
|
861 |
+
echo apply_filters( 'icc_output_html', $output_html );
|
862 |
+
|
863 |
+
}
|
864 |
+
|
865 |
+
/**
|
866 |
+
* Shortcode per stampare il bottone nella pagina della policy
|
867 |
+
* @param array $atts Array con gli attributi dello shortcode.
|
868 |
+
* @param string $content Content of shortcode.
|
869 |
+
* @return string Button per l'accettazione
|
870 |
+
*/
|
871 |
+
public function accept_button( $atts, $content = null ) {
|
872 |
+
|
873 |
+
$button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
874 |
+
|
875 |
+
return '<span class="el"><button onclick="cookieChoices.removeCookieConsent()">' . esc_attr( $button_text ) . '</button></span>';
|
876 |
+
|
877 |
+
}
|
878 |
+
|
879 |
+
/**
|
880 |
+
* Shortcode per stampare il bottone nella pagina della policy
|
881 |
+
* @param array $atts Array con gli attributi dello shortcode.
|
882 |
+
* @param string $content Content of shortcode.
|
883 |
+
* @return string Button per l'accettazione
|
884 |
+
*/
|
885 |
+
public function _delete_cookie( $atts, $content = null ) {
|
886 |
+
|
887 |
+
// $button_text = ( isset( $this->options['button_text'] ) ) ? $this->options['button_text'] : '' ;
|
888 |
+
$button_text = 'Delete cookie';
|
889 |
+
|
890 |
+
return '<span class="ele"><button onclick="deleteCookie()">' . esc_attr( $button_text ) . '</button></span>';
|
891 |
+
|
892 |
+
}
|
893 |
+
|
894 |
+
/**
|
895 |
+
* Display cookie, only for internal use
|
896 |
+
* @return string
|
897 |
+
*/
|
898 |
+
private function _display_cookie() {
|
899 |
+
|
900 |
+
$cookie_list = '<ul>';
|
901 |
+
|
902 |
+
foreach ( $_COOKIE as $key => $val )
|
903 |
+
$cookie_list .= '<li>Cooke name: ' . esc_attr( $key ) . ' - val: ' . esc_attr( $val ) . '</li>';
|
904 |
+
|
905 |
+
$cookie_list .= '</ul>';
|
906 |
+
|
907 |
+
return $cookie_list;
|
908 |
+
|
909 |
+
}
|
910 |
+
} // class
|
define-constants.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Set default constants
|
4 |
+
*
|
5 |
+
* @package Italy_Cookie_Choices
|
6 |
+
* @since 2.5.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Set default constant for the plugin.
|
11 |
+
*/
|
12 |
+
function icc_set_plugin_default_constant() {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Define some costant for internal use
|
16 |
+
*/
|
17 |
+
if ( ! defined( 'ITALY_COOKIE_CHOICES_PLUGIN' ) ) {
|
18 |
+
define( 'ITALY_COOKIE_CHOICES_PLUGIN', true );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended\italystrap.php
|
23 |
+
*/
|
24 |
+
if ( ! defined( 'ITALY_COOKIE_CHOICES_FILE' ) ) {
|
25 |
+
define( 'ITALY_COOKIE_CHOICES_FILE', __FILE__ );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended/
|
30 |
+
*/
|
31 |
+
if ( ! defined( 'ITALY_COOKIE_CHOICES_PLUGIN_PATH' ) ) {
|
32 |
+
define( 'ITALY_COOKIE_CHOICES_PLUGIN_PATH', plugin_dir_path( ITALY_COOKIE_CHOICES_FILE ) );
|
33 |
+
}
|
34 |
+
/**
|
35 |
+
* Example = italystrap-extended/italystrap.php
|
36 |
+
*/
|
37 |
+
if ( ! defined( 'ITALY_COOKIE_CHOICES_BASENAME' ) ) {
|
38 |
+
define( 'ITALY_COOKIE_CHOICES_BASENAME', plugin_basename( ITALY_COOKIE_CHOICES_FILE ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italy-cookie-choices
|
43 |
+
*/
|
44 |
+
if ( ! defined( 'ITALY_COOKIE_CHOICES_DIRNAME' ) ) {
|
45 |
+
define( 'ITALY_COOKIE_CHOICES_DIRNAME', dirname( ITALY_COOKIE_CHOICES_FILE ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
functions/general-functions.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* General functions file.
|
4 |
+
*
|
5 |
+
* All general functions are here.
|
6 |
+
*
|
7 |
+
* @link [URL]
|
8 |
+
* @since 2.5.0
|
9 |
+
*
|
10 |
+
* @package Italy_Cookie_Choices
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Italy_Cookie_Choices\Core;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Check the current request URI, if we can determine it's probably an XML sitemap, kill loading the widgets
|
17 |
+
* @return boolean Return true if is in sitemap.xml (fix for WordPress SEO by Yoast)
|
18 |
+
*/
|
19 |
+
function is_sitemaps_xml() {
|
20 |
+
|
21 |
+
if ( ! isset( $_SERVER['REQUEST_URI'] ) ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$request_uri = $_SERVER['REQUEST_URI'];
|
26 |
+
$extension = substr( $request_uri, -4 );
|
27 |
+
|
28 |
+
if ( false !== stripos( $request_uri, 'sitemap' ) && ( in_array( $extension, array( '.xml', '.xsl' ) ) ) ) {
|
29 |
+
return true;
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Check if User Agent is a Bot
|
36 |
+
*
|
37 |
+
* Some links with spiders list
|
38 |
+
* @link http://www.robotstxt.org/db.html
|
39 |
+
* @link http://www.searchenginedictionary.com/spider-names.shtml
|
40 |
+
* @link http://www.useragentstring.com/pages/Crawlerlist/
|
41 |
+
*
|
42 |
+
* @return boolean Return true if User Agent is a Bot
|
43 |
+
*/
|
44 |
+
function is_bot() {
|
45 |
+
|
46 |
+
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
|
47 |
+
return false;
|
48 |
+
}
|
49 |
+
|
50 |
+
$http_user_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
|
51 |
+
|
52 |
+
$bots = array(
|
53 |
+
'googlebot',
|
54 |
+
'facebookexternalhit',
|
55 |
+
'adsbot-google',
|
56 |
+
'google keyword suggestion',
|
57 |
+
'facebot',
|
58 |
+
'yandexbot',
|
59 |
+
'bingbot',
|
60 |
+
'ia_archiver',
|
61 |
+
'ahrefsbot',
|
62 |
+
'ezooms',
|
63 |
+
'gslfbot',
|
64 |
+
'wbsearchbot',
|
65 |
+
'twitterbot',
|
66 |
+
'tweetmemebot',
|
67 |
+
'twikle',
|
68 |
+
'paperlibot',
|
69 |
+
'wotbox',
|
70 |
+
'unwindfetchor',
|
71 |
+
'exabot',
|
72 |
+
'mj12bot',
|
73 |
+
'yandeximages',
|
74 |
+
'turnitinbot',
|
75 |
+
'pingdom',
|
76 |
+
'Slurp',
|
77 |
+
'search.msn.com',
|
78 |
+
'nutch',
|
79 |
+
'simpy',
|
80 |
+
'bot',
|
81 |
+
'aspseek',
|
82 |
+
'crawler',
|
83 |
+
'msnbot',
|
84 |
+
'libwww-perl',
|
85 |
+
'fast',
|
86 |
+
'baidu',
|
87 |
+
'googlebot-mobile',
|
88 |
+
'adsbot-google-mobile',
|
89 |
+
'yahooseeker',
|
90 |
+
);
|
91 |
+
|
92 |
+
$bots = apply_filters( 'icc_bots', $bots );
|
93 |
+
|
94 |
+
$bots = strtolower( implode( '|', $bots ) );
|
95 |
+
|
96 |
+
if ( preg_match( '/(' . $bots . ')/i', $http_user_agent ) ) {
|
97 |
+
return true;
|
98 |
+
} else {
|
99 |
+
return false;
|
100 |
+
}
|
101 |
+
}
|
init-admin.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Init plugin admin panel
|
4 |
+
*
|
5 |
+
* Manage the plugin admin panel init
|
6 |
+
*
|
7 |
+
* @since 2.5.0
|
8 |
+
*
|
9 |
+
* @package Italy_Cookie_Choices
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Italy_Cookie_Choices\Admin;
|
13 |
+
|
14 |
+
if ( ! is_admin() ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
$icc_settings = new Settings();
|
init.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Init plugin
|
4 |
+
*
|
5 |
+
* Manage the plugin init
|
6 |
+
*
|
7 |
+
* @since 2.5.0
|
8 |
+
*
|
9 |
+
* @package Italy_Cookie_Choices
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Italy_Cookie_Choices\Core;
|
13 |
+
|
14 |
+
if ( is_admin() ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
if ( is_bot() ) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
if ( is_sitemaps_xml() ) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
$icc_cookie_choices = new Cookie_Choices();
|
italy-cookie-choices.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Italy Cookie Choices (for EU Cookie Law)
|
4 |
-
* Plugin URI: https://
|
5 |
* Description: Italy Cookie Choices allows you to easily comply with the european cookie law and block third part cookie in your page.
|
6 |
-
* Version: 2.
|
7 |
* Author: Enea Overclokk, Andrea Pernici, Andrea Cardinale
|
8 |
* Author URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
9 |
* Text Domain: italy-cookie-choices
|
@@ -12,7 +12,7 @@
|
|
12 |
* GitHub Plugin URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
13 |
* GitHub Branch: master
|
14 |
*
|
15 |
-
* @package
|
16 |
* @since 1.0.0
|
17 |
*
|
18 |
* This program is free software; you can redistribute it and/or modify
|
@@ -32,352 +32,19 @@
|
|
32 |
/**
|
33 |
* This will make shure the plugin files can't be accessed within the web browser directly.
|
34 |
*/
|
35 |
-
if ( ! defined( 'WPINC' ) )
|
36 |
die;
|
|
|
37 |
|
38 |
-
|
39 |
-
* Define some costant for internal use
|
40 |
-
*/
|
41 |
-
if ( ! defined( 'ITALY_COOKIE_CHOICES_PLUGIN' ) )
|
42 |
-
define( 'ITALY_COOKIE_CHOICES_PLUGIN', true );
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended\italystrap.php
|
46 |
-
*/
|
47 |
-
if ( ! defined( 'ITALY_COOKIE_CHOICES_FILE' ) )
|
48 |
-
define( 'ITALY_COOKIE_CHOICES_FILE', __FILE__ );
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended/
|
52 |
-
*/
|
53 |
-
if ( ! defined( 'ITALY_COOKIE_CHOICES_PLUGIN_PATH' ) )
|
54 |
-
define( 'ITALY_COOKIE_CHOICES_PLUGIN_PATH', plugin_dir_path( ITALY_COOKIE_CHOICES_FILE ) );
|
55 |
-
/**
|
56 |
-
* Example = italystrap-extended/italystrap.php
|
57 |
-
*/
|
58 |
-
if ( ! defined( 'ITALY_COOKIE_CHOICES_BASENAME' ) )
|
59 |
-
define( 'ITALY_COOKIE_CHOICES_BASENAME', plugin_basename( ITALY_COOKIE_CHOICES_FILE ) );
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italy-cookie-choices
|
63 |
-
*/
|
64 |
-
if ( ! defined( 'ITALY_COOKIE_CHOICES_DIRNAME' ) )
|
65 |
-
define( 'ITALY_COOKIE_CHOICES_DIRNAME', dirname( ITALY_COOKIE_CHOICES_FILE ) );
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Require PHP files
|
69 |
-
*/
|
70 |
-
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'admin/class-italy-cookie-choices-admin.php' );
|
71 |
|
72 |
-
|
73 |
|
74 |
-
require(
|
75 |
-
/**
|
76 |
-
* Required multilingual functions
|
77 |
-
*/
|
78 |
-
// require(ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'includes/functions-italy-cookie-choices-lang.php');
|
79 |
|
80 |
/**
|
81 |
-
*
|
82 |
-
*
|
|
|
83 |
*/
|
84 |
-
|
85 |
-
if ( ! class_exists( 'Italy_Cookie_Choices' ) ) {
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Italy Cookie Choices Class for showing Cookie Banner and block thirdy party script
|
89 |
-
*/
|
90 |
-
class Italy_Cookie_Choices{
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Minimum requirement PHP
|
94 |
-
* @var string
|
95 |
-
*/
|
96 |
-
private $PHP_ver = '5.3';
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Minimum requirement WordPress
|
100 |
-
* @var string
|
101 |
-
*/
|
102 |
-
private $WP_ver = '3.5';
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Make some magics
|
106 |
-
*/
|
107 |
-
public function __construct() {
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Check if is compatible and then instantiate it
|
111 |
-
*/
|
112 |
-
if ( $this->is_compatible_version() && is_admin() ) {
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Required multilingual functions
|
116 |
-
*/
|
117 |
-
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'includes/functions-italy-cookie-choices-lang.php' );
|
118 |
-
|
119 |
-
new Italy_Cookie_Choices_Admin;
|
120 |
-
// new Italy_Cookie_Choices_Pointer_Init;
|
121 |
-
|
122 |
-
} else if (
|
123 |
-
|
124 |
-
! $this->_is_bot()
|
125 |
-
|
126 |
-
// If is compatible.
|
127 |
-
&& $this->is_compatible_version()
|
128 |
-
|
129 |
-
// Only if is not admin.
|
130 |
-
&& ! is_admin()
|
131 |
-
|
132 |
-
// If is not sitemaps.xml by Yoast.
|
133 |
-
&& ! $this->is_sitemaps_xml()
|
134 |
-
|
135 |
-
) {
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Required multilingual functions
|
139 |
-
*/
|
140 |
-
require( ITALY_COOKIE_CHOICES_PLUGIN_PATH . 'includes/functions-italy-cookie-choices-lang.php' );
|
141 |
-
|
142 |
-
if ( function_exists( 'pll__' ) )// Compatibility with Polylang.
|
143 |
-
add_action( 'plugins_loaded', array( $this, 'dependency_init' ), 11 );
|
144 |
-
else new Italy_Cookie_Choices_Front_End;
|
145 |
-
|
146 |
-
} else add_action( 'admin_notices', array( $this, 'load_plugin_admin_notices' ) );
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Check compatibility on install
|
150 |
-
*/
|
151 |
-
register_activation_hook( __FILE__, array( $this, 'check_compatibility_on_install' ) );
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Adjust priority to make sure this runs
|
155 |
-
*/
|
156 |
-
add_action( 'init', array( $this, 'init' ), 100 );
|
157 |
-
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Check if plugin is compatible, if it is not then it wont activate
|
162 |
-
* Show error message in case plugin is not compatible
|
163 |
-
*/
|
164 |
-
public function check_compatibility_on_install() {
|
165 |
-
|
166 |
-
if ( ! $this->is_compatible_version() ) {
|
167 |
-
|
168 |
-
$HTML = '<div>' . __( 'Activation of Italy Cookie Choices in not possible', 'italy-cookie-choices' ) . ':</div><ul>';
|
169 |
-
|
170 |
-
if ( ! $this->is_compatible_php() )
|
171 |
-
$HTML .= '<li>' . $this->get_admin_notices_php( false ) . '</li>';
|
172 |
-
|
173 |
-
if ( ! $this->is_compatible_wordpress() )
|
174 |
-
$HTML .= '<li>' . $this->get_admin_notices_wordpress( false ) . '</li>';
|
175 |
-
|
176 |
-
$HTML .= '</ul>';
|
177 |
-
|
178 |
-
wp_die( $HTML, __( 'Activation of Italy Cookie Choices in not possible', 'italy-cookie-choices' ), array( 'back_link' => true ) );
|
179 |
-
};
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Init functions
|
184 |
-
*/
|
185 |
-
public function init() {
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Load Lang file
|
189 |
-
*/
|
190 |
-
load_plugin_textdomain( 'italy-cookie-choices', false, dirname( ITALY_COOKIE_CHOICES_BASENAME ) . '/lang' );
|
191 |
-
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* For Polylang compatibility
|
196 |
-
* Istantiate Class
|
197 |
-
*/
|
198 |
-
public function dependency_init() {
|
199 |
-
|
200 |
-
new Italy_Cookie_Choices_Front_End;
|
201 |
-
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Checking compatibility with installed versions of the plugin
|
206 |
-
* In case of incompatibility still fully loaded plugin (return)
|
207 |
-
* @return boolean Check if plugin is compatible
|
208 |
-
*/
|
209 |
-
public function is_compatible_version() {
|
210 |
-
|
211 |
-
if ( $this->is_compatible_php() && $this->is_compatible_wordpress() )
|
212 |
-
return true;
|
213 |
-
else return false;
|
214 |
-
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Checking the compatibility of the plugin with the version of PHP
|
219 |
-
* In case of incompatibility still fully loaded plugin (return)
|
220 |
-
* @return boolean Check PHP compatibility
|
221 |
-
*/
|
222 |
-
public function is_compatible_php() {
|
223 |
-
|
224 |
-
if ( version_compare( phpversion(), $this->PHP_ver, '<' ) )
|
225 |
-
return false;
|
226 |
-
else return true;
|
227 |
-
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Checking the compatibility of the plugin with the version of Wordpress
|
232 |
-
* In case of incompatibility still fully loaded plugin (return)
|
233 |
-
* @return boolean Check WordPress compatibility
|
234 |
-
*/
|
235 |
-
public function is_compatible_wordpress() {
|
236 |
-
|
237 |
-
if ( version_compare( $GLOBALS['wp_version'], $this->WP_ver, '<' ) )
|
238 |
-
return false;
|
239 |
-
else return true;
|
240 |
-
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* If the plugin is active, but the minimum requirements are not met
|
245 |
-
* the function is called to add the details on the notice board error
|
246 |
-
* Print error message
|
247 |
-
*/
|
248 |
-
public function load_plugin_admin_notices() {
|
249 |
-
|
250 |
-
if ( ! $this->is_compatible_php() )
|
251 |
-
echo $this->get_admin_notices_php( true );
|
252 |
-
|
253 |
-
if ( ! $this->is_compatible_wordpress() )
|
254 |
-
echo $this->get_admin_notices_wordpress( true );
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Get the admin notice PHP
|
259 |
-
* @param bolean $wrap
|
260 |
-
* @return string Return the admin notice for PHP
|
261 |
-
*/
|
262 |
-
public function get_admin_notices_php( $wrap ) {
|
263 |
-
|
264 |
-
return $this->get_admin_notices_text( $wrap, 'PHP', phpversion(), $this->PHP_ver );
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Get the admin notice WordPress
|
269 |
-
* @param bolean $wrap
|
270 |
-
* @return string Return the admin notice for WordPress
|
271 |
-
*/
|
272 |
-
public function get_admin_notices_wordpress( $wrap ) {
|
273 |
-
|
274 |
-
return $this->get_admin_notices_text( $wrap, 'WordPress', $GLOBALS['wp_version'], $this->WP_ver );
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* A function that creates a generic error to be displayed during
|
279 |
-
* the activation function or on the bulletin board of directors.
|
280 |
-
* @param bolean $wrap
|
281 |
-
* @param string $s1 PHP or WordPress.
|
282 |
-
* @param string $s2 Current version.
|
283 |
-
* @param string $s3 Required version.
|
284 |
-
* @return string Display errors
|
285 |
-
*/
|
286 |
-
public function get_admin_notices_text( $wrap, $s1, $s2, $s3 ) {
|
287 |
-
|
288 |
-
$HTML = __( 'Your server is running %s version %s but this plugin requires at least %s', 'italy-cookie-choices' );
|
289 |
-
|
290 |
-
if ( false === $wrap )
|
291 |
-
$HTML = '<div>' . $HTML . '</div>';
|
292 |
-
|
293 |
-
else $HTML = '<div class="error"><p><b>Italy Cookie Choices</b> - ' . $HTML . '</p></div>';
|
294 |
-
|
295 |
-
return sprintf( $HTML, $s1, $s2, $s3 );
|
296 |
-
}
|
297 |
-
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Check the current request URI, if we can determine it's probably an XML sitemap, kill loading the widgets
|
301 |
-
* @return boolean Return true if is in sitemap.xml (fix for WordPress SEO by Yoast)
|
302 |
-
*/
|
303 |
-
public function is_sitemaps_xml() {
|
304 |
-
|
305 |
-
if ( ! isset( $_SERVER['REQUEST_URI'] ) )
|
306 |
-
return;
|
307 |
-
|
308 |
-
$request_uri = $_SERVER['REQUEST_URI'];
|
309 |
-
$extension = substr( $request_uri, -4 );
|
310 |
-
|
311 |
-
if ( false !== stripos( $request_uri, 'sitemap' ) && ( in_array( $extension, array( '.xml', '.xsl' ) ) ) )
|
312 |
-
return true;
|
313 |
-
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Check if User Agent is a Bot
|
318 |
-
*
|
319 |
-
* Some links with spiders list
|
320 |
-
* @link http://www.robotstxt.org/db.html
|
321 |
-
* @link http://www.searchenginedictionary.com/spider-names.shtml
|
322 |
-
* @link http://www.useragentstring.com/pages/Crawlerlist/
|
323 |
-
*
|
324 |
-
* @return boolean Return true if User Agent is a Bot
|
325 |
-
*/
|
326 |
-
private function _is_bot() {
|
327 |
-
|
328 |
-
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
|
329 |
-
return false;
|
330 |
-
|
331 |
-
$http_user_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
|
332 |
-
|
333 |
-
$bots = array(
|
334 |
-
'googlebot',
|
335 |
-
'facebookexternalhit',
|
336 |
-
'adsbot-google',
|
337 |
-
'google keyword suggestion',
|
338 |
-
'facebot',
|
339 |
-
'yandexbot',
|
340 |
-
'bingbot',
|
341 |
-
'ia_archiver',
|
342 |
-
'ahrefsbot',
|
343 |
-
'ezooms',
|
344 |
-
'gslfbot',
|
345 |
-
'wbsearchbot',
|
346 |
-
'twitterbot',
|
347 |
-
'tweetmemebot',
|
348 |
-
'twikle',
|
349 |
-
'paperlibot',
|
350 |
-
'wotbox',
|
351 |
-
'unwindfetchor',
|
352 |
-
'exabot',
|
353 |
-
'mj12bot',
|
354 |
-
'yandeximages',
|
355 |
-
'turnitinbot',
|
356 |
-
'pingdom',
|
357 |
-
'Slurp',
|
358 |
-
'search.msn.com',
|
359 |
-
'nutch',
|
360 |
-
'simpy',
|
361 |
-
'bot',
|
362 |
-
'aspseek',
|
363 |
-
'crawler',
|
364 |
-
'msnbot',
|
365 |
-
'libwww-perl',
|
366 |
-
'fast',
|
367 |
-
'baidu',
|
368 |
-
'googlebot-mobile',
|
369 |
-
'adsbot-google-mobile',
|
370 |
-
'yahooseeker',
|
371 |
-
);
|
372 |
-
|
373 |
-
$bots = strtolower( implode( '|', $bots ) );
|
374 |
-
|
375 |
-
if ( preg_match( '/(' . $bots . ')/i', $http_user_agent ) ) return true;
|
376 |
-
|
377 |
-
else return false;
|
378 |
-
|
379 |
-
}
|
380 |
-
} // End Italy_Cookie_Choices
|
381 |
-
|
382 |
-
new Italy_Cookie_Choices;
|
383 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Italy Cookie Choices (for EU Cookie Law)
|
4 |
+
* Plugin URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
5 |
* Description: Italy Cookie Choices allows you to easily comply with the european cookie law and block third part cookie in your page.
|
6 |
+
* Version: 2.5.0
|
7 |
* Author: Enea Overclokk, Andrea Pernici, Andrea Cardinale
|
8 |
* Author URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
9 |
* Text Domain: italy-cookie-choices
|
12 |
* GitHub Plugin URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
13 |
* GitHub Branch: master
|
14 |
*
|
15 |
+
* @package Italy_Cookie_Choices
|
16 |
* @since 1.0.0
|
17 |
*
|
18 |
* This program is free software; you can redistribute it and/or modify
|
32 |
/**
|
33 |
* This will make shure the plugin files can't be accessed within the web browser directly.
|
34 |
*/
|
35 |
+
if ( ! defined( 'WPINC' ) ) {
|
36 |
die;
|
37 |
+
}
|
38 |
|
39 |
+
require( __DIR__ . '/define-constants.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
icc_set_plugin_default_constant();
|
42 |
|
43 |
+
require( __DIR__ . '/bootstrap.php' );
|
|
|
|
|
|
|
|
|
44 |
|
45 |
/**
|
46 |
+
* Fires once Italy_Cookie_Choices plugin has been loaded.
|
47 |
+
*
|
48 |
+
* @since 2.5.0
|
49 |
*/
|
50 |
+
do_action( 'icc_plugin_loaded' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: italy-cookie-choices\n"
|
4 |
+
"POT-Creation-Date: 2015-09-08 17:00+0200\n"
|
5 |
+
"PO-Revision-Date: 2015-09-08 17:25+0200\n"
|
6 |
+
"Last-Translator: Enea Overclokk <info@overclokk.net>\n"
|
7 |
+
"Language-Team: info@overclokk.net\n"
|
8 |
+
"Language: it_IT\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.4\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-0: node_modules\n"
|
19 |
+
"X-Poedit-SearchPathExcluded-1: .git\n"
|
20 |
+
|
21 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:66
|
22 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:80
|
23 |
+
msgid "Radio 1"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:67
|
27 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:81
|
28 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:96
|
29 |
+
msgid "The plugin is active and ready to start working."
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:70
|
33 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:135
|
34 |
+
msgid "Next"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:95
|
38 |
+
msgid "Radio 2"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:99
|
42 |
+
msgid "Open Popup"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:108
|
46 |
+
msgid "Italy_Cookie_Choices_Pointer for Posts"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:109
|
50 |
+
msgid "One more pointer."
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:116
|
54 |
+
msgid "Italy_Cookie_Choices_Pointer Pages"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:117
|
58 |
+
msgid "A pointer for pages."
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:123
|
62 |
+
msgid "Italy_Cookie_Choices_Pointer Users"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:124
|
66 |
+
msgid "A pointer for users."
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:130
|
70 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:148
|
71 |
+
msgid "Italy_Cookie_Choices_Pointer Help"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:131
|
75 |
+
msgid "A pointer with action."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:149
|
79 |
+
msgid ""
|
80 |
+
"A pointer for help tab.<br>Go to Posts, Pages or Users for other pointers."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:70
|
84 |
+
msgid "Italy_Cookie_Choices_Pointer Error: post_type is not an array!"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:93
|
88 |
+
msgid "Italy_Cookie_Choices_Pointer Error: pages is not an array!"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: admin/class-italy-cookie-choices-admin.php:147
|
92 |
+
msgid "Italy Cookie Choices Dashboard"
|
93 |
+
msgstr "Pannello di Italy Cookie Choices"
|
94 |
+
|
95 |
+
#: admin/class-italy-cookie-choices-admin.php:161
|
96 |
+
msgid "You do not have sufficient permissions to access this page."
|
97 |
+
msgstr "Non hai abbastanza permessi per visualizzare questa pagina."
|
98 |
+
|
99 |
+
#: admin/class-italy-cookie-choices-admin.php:207
|
100 |
+
msgid "Italy Cookie Choices options page"
|
101 |
+
msgstr "Pagina opzioni per Italy Cookie Choices"
|
102 |
+
|
103 |
+
#: admin/class-italy-cookie-choices-admin.php:217
|
104 |
+
msgid "Activate"
|
105 |
+
msgstr "Attiva"
|
106 |
+
|
107 |
+
#: admin/class-italy-cookie-choices-admin.php:229
|
108 |
+
msgid "Where display the banner"
|
109 |
+
msgstr "Dove mostrare il banner"
|
110 |
+
|
111 |
+
#: admin/class-italy-cookie-choices-admin.php:240
|
112 |
+
msgid "Mouse scroll event"
|
113 |
+
msgstr "Evento scroll del mouse"
|
114 |
+
|
115 |
+
#: admin/class-italy-cookie-choices-admin.php:251
|
116 |
+
msgid "Accept on second view"
|
117 |
+
msgstr "Accettazione continuando la navigazione"
|
118 |
+
|
119 |
+
#: admin/class-italy-cookie-choices-admin.php:262
|
120 |
+
msgid "Refresh page"
|
121 |
+
msgstr "Aggiorna la pagina"
|
122 |
+
|
123 |
+
#: admin/class-italy-cookie-choices-admin.php:273
|
124 |
+
msgid "Text to display"
|
125 |
+
msgstr "Testo da mostrare"
|
126 |
+
|
127 |
+
#: admin/class-italy-cookie-choices-admin.php:284
|
128 |
+
msgid "URL for cookie policy"
|
129 |
+
msgstr "URL per la cookie policy"
|
130 |
+
|
131 |
+
#: admin/class-italy-cookie-choices-admin.php:295
|
132 |
+
msgid "Cookie policy page slug"
|
133 |
+
msgstr "Slug pagina Cookie policy"
|
134 |
+
|
135 |
+
#: admin/class-italy-cookie-choices-admin.php:306
|
136 |
+
msgid "Anchor text for URL"
|
137 |
+
msgstr "Anchor text per la URL"
|
138 |
+
|
139 |
+
#: admin/class-italy-cookie-choices-admin.php:317
|
140 |
+
msgid "Button text"
|
141 |
+
msgstr "Testo per il bottone"
|
142 |
+
|
143 |
+
#: admin/class-italy-cookie-choices-admin.php:328
|
144 |
+
msgid "Style settings"
|
145 |
+
msgstr "Impostazioni per lo stile"
|
146 |
+
|
147 |
+
#: admin/class-italy-cookie-choices-admin.php:338
|
148 |
+
msgid "CookieChoices Template"
|
149 |
+
msgstr "CookieChoices Template"
|
150 |
+
|
151 |
+
#: admin/class-italy-cookie-choices-admin.php:349
|
152 |
+
msgid "HTML top margin"
|
153 |
+
msgstr "Margine alto per HTML"
|
154 |
+
|
155 |
+
#: admin/class-italy-cookie-choices-admin.php:360
|
156 |
+
msgid "Banner Background color"
|
157 |
+
msgstr "Colore di sfondo per il banner"
|
158 |
+
|
159 |
+
#: admin/class-italy-cookie-choices-admin.php:371
|
160 |
+
msgid "Banner text color"
|
161 |
+
msgstr "Colore per il testo del banner"
|
162 |
+
|
163 |
+
#: admin/class-italy-cookie-choices-admin.php:382
|
164 |
+
msgid "Custom CSS"
|
165 |
+
msgstr "CSS personalizzato"
|
166 |
+
|
167 |
+
#: admin/class-italy-cookie-choices-admin.php:393
|
168 |
+
msgid "Custom CSS Class (Optional)"
|
169 |
+
msgstr "Classi CSS personalizzate (Opzionali)"
|
170 |
+
|
171 |
+
#: admin/class-italy-cookie-choices-admin.php:404
|
172 |
+
msgid "Advanced settings"
|
173 |
+
msgstr "Opzioni avanzate"
|
174 |
+
|
175 |
+
#: admin/class-italy-cookie-choices-admin.php:414
|
176 |
+
msgid "Cookie name"
|
177 |
+
msgstr "Nome del Cookie"
|
178 |
+
|
179 |
+
#: admin/class-italy-cookie-choices-admin.php:425
|
180 |
+
msgid "Cookie value"
|
181 |
+
msgstr "Valore del Cookie"
|
182 |
+
|
183 |
+
#: admin/class-italy-cookie-choices-admin.php:436
|
184 |
+
msgid "Open policy in new page"
|
185 |
+
msgstr "Apri in una nuova pagina"
|
186 |
+
|
187 |
+
#: admin/class-italy-cookie-choices-admin.php:447
|
188 |
+
msgid "Third part cookie block (beta)"
|
189 |
+
msgstr "Blocco dei cookie di terze parti (Beta)"
|
190 |
+
|
191 |
+
#: admin/class-italy-cookie-choices-admin.php:458
|
192 |
+
msgid "Scripts allowed in body"
|
193 |
+
msgstr "Script da non bloccare"
|
194 |
+
|
195 |
+
#: admin/class-italy-cookie-choices-admin.php:469
|
196 |
+
msgid "Scripts to be blocked"
|
197 |
+
msgstr "Script da bloccare"
|
198 |
+
|
199 |
+
#: admin/class-italy-cookie-choices-admin.php:480
|
200 |
+
msgid "Text message for locked embedded content"
|
201 |
+
msgstr "Testo per gli embed bloccati"
|
202 |
+
|
203 |
+
#: admin/class-italy-cookie-choices-admin.php:491
|
204 |
+
msgid "Button text to activate locked embedded content"
|
205 |
+
msgstr "Testo per il bottone di accettazione degli embed bloccati"
|
206 |
+
|
207 |
+
#: admin/class-italy-cookie-choices-admin.php:516
|
208 |
+
msgid "Customize your banner for cookie law"
|
209 |
+
msgstr "Personalizza il banner per la Cookie Law"
|
210 |
+
|
211 |
+
#: admin/class-italy-cookie-choices-admin.php:531
|
212 |
+
msgid "Display banner for Cookie Law in front-end"
|
213 |
+
msgstr ""
|
214 |
+
"Visualizza il banner sul tuo sito web, se non attivi non viene mostrato "
|
215 |
+
"nulla."
|
216 |
+
|
217 |
+
#: admin/class-italy-cookie-choices-admin.php:551
|
218 |
+
msgid "Top Bar (Default, Display a top bar with your message)"
|
219 |
+
msgstr "Top Bar (Default, Visualizza una top bar con il tuo messaggio)"
|
220 |
+
|
221 |
+
#: admin/class-italy-cookie-choices-admin.php:559
|
222 |
+
msgid "Dialog (Display an overlay with your message)"
|
223 |
+
msgstr "Dialog (Visualizza un popup con il tuo messaggio)"
|
224 |
+
|
225 |
+
#: admin/class-italy-cookie-choices-admin.php:567
|
226 |
+
msgid "Bottom Bar (Display a bar in the footer with your message)"
|
227 |
+
msgstr "Bottom Bar (Visualizza una barra nel footer con il tuo messaggio)"
|
228 |
+
|
229 |
+
#: admin/class-italy-cookie-choices-admin.php:587
|
230 |
+
msgid "Accepts disclosures on mouse scroll event"
|
231 |
+
msgstr "Accetta l'informativa sull'evento scroll del mouse"
|
232 |
+
|
233 |
+
#: admin/class-italy-cookie-choices-admin.php:607
|
234 |
+
msgid "Activate accept on second view"
|
235 |
+
msgstr "Attiva l'accettazione se l'utente continua la navigazione"
|
236 |
+
|
237 |
+
#: admin/class-italy-cookie-choices-admin.php:625
|
238 |
+
msgid "Refresh page after button click (DEPRECATED)"
|
239 |
+
msgstr "Aggiorna la pagina dopo l'accettazione (DEPRECATA)"
|
240 |
+
|
241 |
+
#: admin/class-italy-cookie-choices-admin.php:658
|
242 |
+
msgid "Your short cookie policy"
|
243 |
+
msgstr "La tua informativa breve"
|
244 |
+
|
245 |
+
#: admin/class-italy-cookie-choices-admin.php:665
|
246 |
+
#: admin/class-italy-cookie-choices-admin.php:1156
|
247 |
+
msgid ""
|
248 |
+
"People will see this notice only the first time that they enter your site"
|
249 |
+
msgstr ""
|
250 |
+
"Le persone visualizzeranno il messaggio la prima volta che visiteranno il "
|
251 |
+
"tuo sito"
|
252 |
+
|
253 |
+
#: admin/class-italy-cookie-choices-admin.php:690
|
254 |
+
msgid "e.g. http://www.aboutcookies.org/"
|
255 |
+
msgstr "es: http://www.aboutcookies.org/"
|
256 |
+
|
257 |
+
#: admin/class-italy-cookie-choices-admin.php:693
|
258 |
+
msgid "Insert here the link to your policy page"
|
259 |
+
msgstr "Inserisci il link alla tua pagina con l'informativa estesa"
|
260 |
+
|
261 |
+
#: admin/class-italy-cookie-choices-admin.php:693
|
262 |
+
msgid "otherwise create a new one and then add URL to this input"
|
263 |
+
msgstr ""
|
264 |
+
"altrimenti puoi crearne una nuova e quindi aggiungere la URL in questa input"
|
265 |
+
|
266 |
+
#: admin/class-italy-cookie-choices-admin.php:695
|
267 |
+
#: admin/class-italy-cookie-choices-admin.php:727
|
268 |
+
msgid ""
|
269 |
+
"Start typing first two letters of the name of the policy page and then "
|
270 |
+
"select it from the menu below the input"
|
271 |
+
msgstr ""
|
272 |
+
"Comincia digitando le prime due lettere della pagina della tua informativa "
|
273 |
+
"estesa e quindi selezionala dal menù a tendina che appare sotto la input"
|
274 |
+
|
275 |
+
#: admin/class-italy-cookie-choices-admin.php:722
|
276 |
+
msgid "e.g. privacy-e-cookie"
|
277 |
+
msgstr "es: privacy-e-cookie"
|
278 |
+
|
279 |
+
#: admin/class-italy-cookie-choices-admin.php:725
|
280 |
+
msgid ""
|
281 |
+
"Insert your cookie policy page slug (e.g. for the page http://www.miodominio."
|
282 |
+
"it/privacy-e-cookie/ the slug is <strong>privacy-e-cookie</strong>).<br>In "
|
283 |
+
"this way it will display only the topbar in your cookie policy page, the "
|
284 |
+
"scroll and the second view will be deactivated in that page too."
|
285 |
+
msgstr ""
|
286 |
+
"Inserisci il tuo slug della pagina dell'informativa estesa (ad es. per la "
|
287 |
+
"pagina http://www.miodominio.it/privacy-e-cookie/ lo slug sarà "
|
288 |
+
"<strong>privacy-e-cookie</strong>).<br>In questo modo verrà visualizzata "
|
289 |
+
"solo la barra superiore nella pagina dell'informativa, Anche lo scroll e "
|
290 |
+
"l'accettazione continuando la navigazione verranno disattivati in quella "
|
291 |
+
"pagina."
|
292 |
+
|
293 |
+
#: admin/class-italy-cookie-choices-admin.php:741
|
294 |
+
msgid "e.g. More Info"
|
295 |
+
msgstr "es: Maggiori informazioni"
|
296 |
+
|
297 |
+
#: admin/class-italy-cookie-choices-admin.php:744
|
298 |
+
msgid "Insert here anchor text for the link"
|
299 |
+
msgstr "Inserisci qui l'anchor text per il link"
|
300 |
+
|
301 |
+
#: admin/class-italy-cookie-choices-admin.php:758
|
302 |
+
#: admin/class-italy-cookie-choices-admin.php:1172
|
303 |
+
msgid "e.g. Close"
|
304 |
+
msgstr "es: Chiudi"
|
305 |
+
|
306 |
+
#: admin/class-italy-cookie-choices-admin.php:761
|
307 |
+
#: admin/class-italy-cookie-choices-admin.php:1175
|
308 |
+
msgid "Insert here name of button (e.g. \"Close\") "
|
309 |
+
msgstr "Inserisci il testo del link per chiudere il popup/banner (es: Chiudi)"
|
310 |
+
|
311 |
+
#: admin/class-italy-cookie-choices-admin.php:778
|
312 |
+
msgid "Customize your style settings"
|
313 |
+
msgstr "Personalizza le impostazioni per lo stile"
|
314 |
+
|
315 |
+
#: admin/class-italy-cookie-choices-admin.php:794
|
316 |
+
msgid "Add a page top margin for info top bar, only for default topbar stile"
|
317 |
+
msgstr "Aggiungi un margine in cima alla pagina, solo per la topbar di default"
|
318 |
+
|
319 |
+
#: admin/class-italy-cookie-choices-admin.php:812
|
320 |
+
msgid "Default cookiechoices template (centered with text links)"
|
321 |
+
msgstr "Template di default, testo centrato con link testuali."
|
322 |
+
|
323 |
+
#: admin/class-italy-cookie-choices-admin.php:814
|
324 |
+
msgid "Centered container with left aligned text and big buttons"
|
325 |
+
msgstr ""
|
326 |
+
"Template con contenitore centrato (980px), testo allineato a sinistra e "
|
327 |
+
"bottoni grandi"
|
328 |
+
|
329 |
+
#: admin/class-italy-cookie-choices-admin.php:816
|
330 |
+
msgid "Centered container with left aligned text and small buttons"
|
331 |
+
msgstr ""
|
332 |
+
"Template con contenitore centrato (980px), testo allineato a sinistra e "
|
333 |
+
"bottoni piccoli"
|
334 |
+
|
335 |
+
#: admin/class-italy-cookie-choices-admin.php:818
|
336 |
+
msgid "My custom CSS"
|
337 |
+
msgstr "Il mio css personalizzato"
|
338 |
+
|
339 |
+
#: admin/class-italy-cookie-choices-admin.php:822
|
340 |
+
msgid "Select the template to use"
|
341 |
+
msgstr "Seleziona il template che vuoi usare"
|
342 |
+
|
343 |
+
#: admin/class-italy-cookie-choices-admin.php:843
|
344 |
+
msgid "Custom Background color for banner"
|
345 |
+
msgstr "Colore di sfondo per il banner"
|
346 |
+
|
347 |
+
#: admin/class-italy-cookie-choices-admin.php:863
|
348 |
+
msgid "Custom text color for banner"
|
349 |
+
msgstr "Colore del testo per il banner"
|
350 |
+
|
351 |
+
#: admin/class-italy-cookie-choices-admin.php:880
|
352 |
+
msgid "Your custom css"
|
353 |
+
msgstr "Il tuo css personalizzato"
|
354 |
+
|
355 |
+
#: admin/class-italy-cookie-choices-admin.php:883
|
356 |
+
msgid "Inset here your custom CSS for banner"
|
357 |
+
msgstr "Inserisci qui il tuo CSS personalizzato per il banner"
|
358 |
+
|
359 |
+
#: admin/class-italy-cookie-choices-admin.php:908
|
360 |
+
msgid "Eg: bannerStyle"
|
361 |
+
msgstr "Es: bannerStyle"
|
362 |
+
|
363 |
+
#: admin/class-italy-cookie-choices-admin.php:910
|
364 |
+
msgid "CSS class for div container (Default <code>bannerStyle</code>)"
|
365 |
+
msgstr ""
|
366 |
+
"Classe CSS per il tag div del contenitore (Default <code>bannerStyle</code>)"
|
367 |
+
|
368 |
+
#: admin/class-italy-cookie-choices-admin.php:913
|
369 |
+
msgid "Eg: contentStyle"
|
370 |
+
msgstr "Es: contentStyle"
|
371 |
+
|
372 |
+
#: admin/class-italy-cookie-choices-admin.php:915
|
373 |
+
msgid "CSS class for div content (Default <code>contentStyle</code>)"
|
374 |
+
msgstr ""
|
375 |
+
"Classe CSS per il tag div del contenuto (Default <code>contentStyle</code>)"
|
376 |
+
|
377 |
+
#: admin/class-italy-cookie-choices-admin.php:918
|
378 |
+
msgid "Eg: consentText"
|
379 |
+
msgstr "Es: consentText"
|
380 |
+
|
381 |
+
#: admin/class-italy-cookie-choices-admin.php:920
|
382 |
+
msgid "CSS class for span content (Default <code>consentText</code>)"
|
383 |
+
msgstr "Classe CSS per il tag span (Default <code>consentText</code>)"
|
384 |
+
|
385 |
+
#: admin/class-italy-cookie-choices-admin.php:923
|
386 |
+
msgid "Eg: infoClass"
|
387 |
+
msgstr "Es: infoClass"
|
388 |
+
|
389 |
+
#: admin/class-italy-cookie-choices-admin.php:925
|
390 |
+
msgid "CSS class for Info link (Default <code>itaybtn</code>)"
|
391 |
+
msgstr "Classe CSS per il link info (Default <code>itaybtn</code>)"
|
392 |
+
|
393 |
+
#: admin/class-italy-cookie-choices-admin.php:928
|
394 |
+
msgid "Eg: closeClass"
|
395 |
+
msgstr "Es: closeClass"
|
396 |
+
|
397 |
+
#: admin/class-italy-cookie-choices-admin.php:930
|
398 |
+
msgid "CSS class for close link (Default <code>itaybtn</code>)"
|
399 |
+
msgstr "Classe CSS per il link di chiusura (Default <code>itaybtn</code>)"
|
400 |
+
|
401 |
+
#: admin/class-italy-cookie-choices-admin.php:933
|
402 |
+
msgid "Customize with your personal CSS class"
|
403 |
+
msgstr "Personalizza con le tue classi CSS"
|
404 |
+
|
405 |
+
#: admin/class-italy-cookie-choices-admin.php:949
|
406 |
+
msgid "Customize your advanced settings"
|
407 |
+
msgstr "Personalizza le impostazioni avanzate"
|
408 |
+
|
409 |
+
#: admin/class-italy-cookie-choices-admin.php:965
|
410 |
+
msgid "Insert your cookie name (Default: displayCookieConsent)"
|
411 |
+
msgstr "Inserisci il nome del tuo Cookie (Default: displayCookieConsent)"
|
412 |
+
|
413 |
+
#: admin/class-italy-cookie-choices-admin.php:984
|
414 |
+
msgid "Insert your cookie value (Default: y)"
|
415 |
+
msgstr "Inserisci il valore del tuo Cookie (Default: y)"
|
416 |
+
|
417 |
+
#: admin/class-italy-cookie-choices-admin.php:1004
|
418 |
+
msgid "Open your cookie policy page in new one"
|
419 |
+
msgstr "Apri la tua pagina per la Cookie policy in una nuova"
|
420 |
+
|
421 |
+
#: admin/class-italy-cookie-choices-admin.php:1028
|
422 |
+
msgid "Cookie from any embed in your content (Beta) (DEPRECATED)"
|
423 |
+
msgstr "Cookie da tutti gli embed nel tuo contenuto (Beta) (DEPRECATA)"
|
424 |
+
|
425 |
+
#: admin/class-italy-cookie-choices-admin.php:1033
|
426 |
+
msgid "Cookie from any embed in your widget area (Beta) (DEPRECATED)"
|
427 |
+
msgstr "Cookie da tutti gli embed nei tuoi widget (Beta) (DEPRECATA)"
|
428 |
+
|
429 |
+
#: admin/class-italy-cookie-choices-admin.php:1039
|
430 |
+
msgid "Cookie from any embed in all body, except head and footer (Beta)"
|
431 |
+
msgstr ""
|
432 |
+
"Cookie da tutti gli embed nella tua pagina, eccetto head e footer (Beta)"
|
433 |
+
|
434 |
+
#: admin/class-italy-cookie-choices-admin.php:1082
|
435 |
+
#: admin/class-italy-cookie-choices-admin.php:1108
|
436 |
+
msgid ""
|
437 |
+
"<script src="http://domain.com/widget-example.js"></"
|
438 |
+
"script>\n"
|
439 |
+
"<---------SEP--------->\n"
|
440 |
+
"<script src="http://otherdomain.com/script-example.js"></"
|
441 |
+
"script>\n"
|
442 |
+
"<---------SEP--------->\n"
|
443 |
+
"<script src="http://lastdomain.com/gadget-example.js"></"
|
444 |
+
"script>"
|
445 |
+
msgstr ""
|
446 |
+
"<script src="http://domain.com/widget-example.js"></"
|
447 |
+
"script>\n"
|
448 |
+
"<---------SEP--------->\n"
|
449 |
+
"<script src="http://otherdomain.com/script-example.js"></"
|
450 |
+
"script>\n"
|
451 |
+
"<---------SEP--------->\n"
|
452 |
+
"<script src="http://lastdomain.com/gadget-example.js"></"
|
453 |
+
"script>"
|
454 |
+
|
455 |
+
#: admin/class-italy-cookie-choices-admin.php:1086
|
456 |
+
msgid "View example"
|
457 |
+
msgstr "Vedi esempio"
|
458 |
+
|
459 |
+
#: admin/class-italy-cookie-choices-admin.php:1089
|
460 |
+
msgid ""
|
461 |
+
"Scripts to be excluded from the automatic block.<br />Split each script with "
|
462 |
+
"<strong><em><---------SEP---------></em></strong><br>Use "
|
463 |
+
"<strong><---------SOMETHING---------></strong> for custom regex"
|
464 |
+
msgstr ""
|
465 |
+
"Script che devono essere esclusi dal blocco automatico.<br>Suddividere ogni "
|
466 |
+
"script con <strong> <em><---------SEP---------></em></strong><br>Usa "
|
467 |
+
"<strong><---------SOMETHING---------></strong> per regex personalizzata"
|
468 |
+
|
469 |
+
#: admin/class-italy-cookie-choices-admin.php:1092
|
470 |
+
#: admin/class-italy-cookie-choices-admin.php:1117
|
471 |
+
msgid "For more information see the documentation"
|
472 |
+
msgstr "Per maggiorni informazioni guarda la documentazione"
|
473 |
+
|
474 |
+
#: admin/class-italy-cookie-choices-admin.php:1114
|
475 |
+
msgid ""
|
476 |
+
"Scripts shown in the head and in the footer does not automatically blocked."
|
477 |
+
"<br />Split each script with <strong><em><---------SEP---------></em></"
|
478 |
+
"strong><br>Use <strong><---------SOMETHING---------></strong> for custom "
|
479 |
+
"regex"
|
480 |
+
msgstr ""
|
481 |
+
"Script in head e footer non automaticamente bloccati.<br />Dividi ogni "
|
482 |
+
"script con <strong><em><---------SEP---------></em></strong><br>Usa "
|
483 |
+
"<strong><---------SOMETHING---------></strong> per una regex personalizzata."
|
484 |
+
|
485 |
+
#: admin/class-italy-cookie-choices-admin.php:1152
|
486 |
+
msgid "Your lock message for embedded contents inside posts, pages and widgets"
|
487 |
+
msgstr ""
|
488 |
+
"Il tuo messaggio da visualizzare nel box per i contenuti bloccati "
|
489 |
+
"incorporati all'interno di pagine, articoli e widget"
|
490 |
+
|
491 |
+
#: admin/class-italy-cookie-choices-admin.php:1306
|
492 |
+
#: admin/class-italy-cookie-choices-sanitize.php:77
|
493 |
+
msgid "Cookie name field it can't be empty. Restored default name."
|
494 |
+
msgstr ""
|
495 |
+
"Il campo del nome del Cookie non può essere vuoto. Ripristinato il nome di "
|
496 |
+
"default."
|
497 |
+
|
498 |
+
#: admin/class-italy-cookie-choices-admin.php:1313
|
499 |
+
#: admin/class-italy-cookie-choices-sanitize.php:84
|
500 |
+
msgid "Cookie value field it can't be empty. Restored default value."
|
501 |
+
msgstr ""
|
502 |
+
"Il campo del valore del Cookie non può essere vuoto. Ripristinato il valore "
|
503 |
+
"di default."
|
504 |
+
|
505 |
+
#: admin/class-italy-cookie-choices-admin.php:1419
|
506 |
+
msgid "Settings"
|
507 |
+
msgstr "Impostazioni"
|
508 |
+
|
509 |
+
#: admin/class-italy-cookie-choices-admin.php:1421
|
510 |
+
msgid "Documentation"
|
511 |
+
msgstr "Documantazione"
|
512 |
+
|
513 |
+
#: admin/class-italy-cookie-choices-admin.php:1485
|
514 |
+
msgid "Please upload a valid .json file"
|
515 |
+
msgstr "Carica un file .json valido"
|
516 |
+
|
517 |
+
#: admin/class-italy-cookie-choices-admin.php:1485
|
518 |
+
msgid "No valid json file"
|
519 |
+
msgstr "File json non valido"
|
520 |
+
|
521 |
+
#: admin/class-italy-cookie-choices-admin.php:1491
|
522 |
+
msgid "The json file can't be empty"
|
523 |
+
msgstr "Il file .json non può essere vuoto"
|
524 |
+
|
525 |
+
#: admin/class-italy-cookie-choices-admin.php:1491
|
526 |
+
msgid "Empty file"
|
527 |
+
msgstr "File vuoto"
|
528 |
+
|
529 |
+
#: admin/class-italy-cookie-choices-admin.php:1499
|
530 |
+
msgid "Please upload a file to import"
|
531 |
+
msgstr "Aggiungi un file da importare"
|
532 |
+
|
533 |
+
#: admin/class-italy-cookie-choices-admin.php:1499
|
534 |
+
msgid "No file import"
|
535 |
+
msgstr "Nessun file da importare"
|
536 |
+
|
537 |
+
#: admin/template/admin.php:30
|
538 |
+
msgid "Export Settings"
|
539 |
+
msgstr "Esporta la configurazione"
|
540 |
+
|
541 |
+
#: admin/template/admin.php:32
|
542 |
+
msgid ""
|
543 |
+
"Export the plugin settings for this site as a .json file. This allows you to "
|
544 |
+
"easily import the configuration into another site."
|
545 |
+
msgstr ""
|
546 |
+
"Esporta la configurazione del plugin per questo sito in un file .json. "
|
547 |
+
"Questo ti permette di importare facilmente la configurazione su un altro "
|
548 |
+
"sito."
|
549 |
+
|
550 |
+
#: admin/template/admin.php:39
|
551 |
+
msgid "Export"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: admin/template/admin.php:46
|
555 |
+
msgid "Import Settings"
|
556 |
+
msgstr "Importa la configurazione"
|
557 |
+
|
558 |
+
#: admin/template/admin.php:48
|
559 |
+
msgid ""
|
560 |
+
"Import the plugin settings from a .json file. This file can be obtained by "
|
561 |
+
"exporting the settings on another site using the form above."
|
562 |
+
msgstr ""
|
563 |
+
"Importa la configurazione del plugin da un file .json creato "
|
564 |
+
"precedentemente. Questo file lo puoi ottenere esportando le impostazioni da "
|
565 |
+
"un altro sito usando il form sopra."
|
566 |
+
|
567 |
+
#: admin/template/admin.php:56
|
568 |
+
msgid "Import"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: admin/template/code-example.php:7
|
572 |
+
msgid "Script inline example"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: italy-cookie-choices.php:168 italy-cookie-choices.php:178
|
576 |
+
msgid "Activation of Italy Cookie Choices in not possible"
|
577 |
+
msgstr "L'attivazione di Italy Cookie Choices non è possibile"
|
578 |
+
|
579 |
+
#: italy-cookie-choices.php:279
|
580 |
+
#, php-format
|
581 |
+
msgid ""
|
582 |
+
"Your server is running %s version %s but this plugin requires at least %s"
|
583 |
+
msgstr ""
|
584 |
+
"Il tuo server sta eseguendo %s con la versione %s ma qesto plugin richiede "
|
585 |
+
"almeno la versione %s"
|
586 |
+
|
587 |
+
#~ msgid "e.g. privacy-e-cookie.html"
|
588 |
+
#~ msgstr "es. privacy-e-cookie"
|
589 |
+
|
590 |
+
#~ msgid "e.g. your-policy-url.html"
|
591 |
+
#~ msgstr "es: la-tua-pagina-per-la-cookie-policy"
|
592 |
+
|
593 |
+
#~ msgid ""
|
594 |
+
#~ "Insert your cookie policy page slug (e.g. your-policy-url), it will "
|
595 |
+
#~ "display only topbar in your cookie policy page and the scroll and the "
|
596 |
+
#~ "second view will be deactivated in that page."
|
597 |
+
#~ msgstr ""
|
598 |
+
#~ "Inserisci lo slug della pagina della tua cookie policy (e.s. your-policy-"
|
599 |
+
#~ "url), sarà visualizzata solo la topbar, scroll e accettazione durante la "
|
600 |
+
#~ "navigazione disattivati in quella pagina."
|
601 |
+
|
602 |
+
#~ msgid ""
|
603 |
+
#~ "Insert your cookie policy page slug (e.g. your-policy-url), it will "
|
604 |
+
#~ "display only topbar in your cookie policy page"
|
605 |
+
#~ msgstr ""
|
606 |
+
#~ "Inserisci lo slug della tua pagina per la Cookie policy, in questa pagina "
|
607 |
+
#~ "verrà mostrata soltanto la topbar"
|
608 |
+
|
609 |
+
#~ msgid ""
|
610 |
+
#~ "Scripts to be excluded from the automatic block.<br />Split each script "
|
611 |
+
#~ "with <strong><em><---------SEP---------></em></strong>"
|
612 |
+
#~ msgstr ""
|
613 |
+
#~ "Scripts da non bloccare con il blocco automatico.<br />Dividi ogni script "
|
614 |
+
#~ "con <strong><em><---------SEP---------></em></strong>"
|
615 |
+
|
616 |
+
#~ msgid ""
|
617 |
+
#~ "Scripts shown in the head and in the footer does not automatically "
|
618 |
+
#~ "blocked.<br />Split each script with <strong><em><---------SEP---------"
|
619 |
+
#~ "></em></strong>"
|
620 |
+
#~ msgstr ""
|
621 |
+
#~ "Script inseriti nella head e nel footer non automaticamente bloccati.<br /"
|
622 |
+
#~ ">Split each script with <strong><em><---------SEP---------></em></"
|
623 |
+
#~ "strong>"
|
624 |
+
|
625 |
+
#~ msgid "Banner text"
|
626 |
+
#~ msgstr "Testo del banner"
|
627 |
+
|
628 |
+
#~ msgid "Function for custom script block"
|
629 |
+
#~ msgstr "Script personalizzati"
|
630 |
+
|
631 |
+
#~ msgid "Top Bar (Default, Display a top bar wth your message)"
|
632 |
+
#~ msgstr "Top Bar (Default, verrà visualizzata una barra in cima alla pagina)"
|
633 |
+
|
634 |
+
#~ msgid "Refresh page after button click"
|
635 |
+
#~ msgstr ""
|
636 |
+
#~ "Aggiorna la pagina dopo il click sul link di accettazione (Usare con "
|
637 |
+
#~ "parsimonia se hai il sito molto lento, es 5'')"
|
638 |
+
|
639 |
+
#~ msgid "Add a page top margin for info top bar"
|
640 |
+
#~ msgstr ""
|
641 |
+
#~ "Aggiunge un margine nella parte alta della pagine solo per la topbar"
|
642 |
+
|
643 |
+
#~ msgid "Cookie from any embed in your content (Beta)"
|
644 |
+
#~ msgstr "Cookie di terze parti nel content di pagine/articoli (Beta)"
|
645 |
+
|
646 |
+
#~ msgid "Cookie from any embed in your widget area (Beta)"
|
647 |
+
#~ msgstr "Cookie di terze parti nei widget (Beta)"
|
648 |
+
|
649 |
+
#~ msgid "More Info"
|
650 |
+
#~ msgstr "Più info"
|
lang/italy-cookie-choices-ro_RO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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: italy-cookie-choices\n"
|
4 |
+
"POT-Creation-Date: 2015-07-09 19:08+0200\n"
|
5 |
+
"PO-Revision-Date: 2015-07-11 00:08+0100\n"
|
6 |
+
"Last-Translator: Florin Lungu <me@florinlungu.it>\n"
|
7 |
+
"Language-Team: info@overclokk.net\n"
|
8 |
+
"Language: ro_RO\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.4\n"
|
13 |
+
"X-Poedit-Basepath: ..\\\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: node_modules\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-1: .git\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:66
|
22 |
+
msgid "Radio 1"
|
23 |
+
msgstr "Radio 1"
|
24 |
+
|
25 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:67
|
26 |
+
msgid "The plugin is active and ready to start working."
|
27 |
+
msgstr "Acest plugin este activat și gata pentru a fi folosit."
|
28 |
+
|
29 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:70
|
30 |
+
msgid "Open Popup"
|
31 |
+
msgstr "Deschide popup"
|
32 |
+
|
33 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:79
|
34 |
+
#, fuzzy
|
35 |
+
msgid "Italy_Cookie_Choices_Pointer for Posts"
|
36 |
+
msgstr "Pagina cu opțiuni pentru Italy Cookie Choices"
|
37 |
+
|
38 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:80
|
39 |
+
msgid "One more pointer."
|
40 |
+
msgstr "Un alt punctator."
|
41 |
+
|
42 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:87
|
43 |
+
#, fuzzy
|
44 |
+
msgid "Italy_Cookie_Choices_Pointer Pages"
|
45 |
+
msgstr "Pagina cu opțiuni pentru Italy Cookie Choices"
|
46 |
+
|
47 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:88
|
48 |
+
msgid "A pointer for pages."
|
49 |
+
msgstr "Un punctator pentru pagini."
|
50 |
+
|
51 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:94
|
52 |
+
#, fuzzy
|
53 |
+
msgid "Italy_Cookie_Choices_Pointer Users"
|
54 |
+
msgstr "Pagina cu opțiuni pentru Italy Cookie Choices"
|
55 |
+
|
56 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:95
|
57 |
+
msgid "A pointer for users."
|
58 |
+
msgstr "Un punctator pentru utilizatori."
|
59 |
+
|
60 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:101
|
61 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:115
|
62 |
+
#, fuzzy
|
63 |
+
msgid "Italy_Cookie_Choices_Pointer Help"
|
64 |
+
msgstr "Pagina cu opțiuni pentru Italy Cookie Choices"
|
65 |
+
|
66 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:102
|
67 |
+
msgid "A pointer with action."
|
68 |
+
msgstr "Un punctator cu actiune."
|
69 |
+
|
70 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:106
|
71 |
+
msgid "Next"
|
72 |
+
msgstr "Următor"
|
73 |
+
|
74 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:116
|
75 |
+
msgid ""
|
76 |
+
"A pointer for help tab.<br>Go to Posts, Pages or Users for other pointers."
|
77 |
+
msgstr ""
|
78 |
+
"Un punctator pentru tab-ul de ajutor.<br>Intră în Postări, Pagini sau "
|
79 |
+
"Utilizatori pentru alți punctatori."
|
80 |
+
|
81 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:72
|
82 |
+
msgid "Italy_Cookie_Choices_Pointer Error: post_type is not an array!"
|
83 |
+
msgstr "Eroare Italy_Cookie_Choices_Pointer: post_type nu este un array!"
|
84 |
+
|
85 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:95
|
86 |
+
msgid "Italy_Cookie_Choices_Pointer Error: pages is not an array!"
|
87 |
+
msgstr "Eroare Italy_Cookie_Choices_Pointer: pages nu este un array!"
|
88 |
+
|
89 |
+
#: admin/class-italy-cookie-choices-admin.php:87
|
90 |
+
msgid "Italy Cookie Choices Dashboard"
|
91 |
+
msgstr "Panoul de control Italy Cookie Choices"
|
92 |
+
|
93 |
+
#: admin/class-italy-cookie-choices-admin.php:101
|
94 |
+
msgid "You do not have sufficient permissions to access this page."
|
95 |
+
msgstr "Nu ai destule autorizații pentru a vedea această pagină."
|
96 |
+
|
97 |
+
#: admin/class-italy-cookie-choices-admin.php:160
|
98 |
+
msgid "Italy Cookie Choices options page"
|
99 |
+
msgstr "Pagina cu opțiuni pentru Italy Cookie Choices"
|
100 |
+
|
101 |
+
#: admin/class-italy-cookie-choices-admin.php:170
|
102 |
+
msgid "Activate"
|
103 |
+
msgstr "Activează"
|
104 |
+
|
105 |
+
#: admin/class-italy-cookie-choices-admin.php:182
|
106 |
+
msgid "Where display the banner"
|
107 |
+
msgstr "Unde sa vizualizezi banner-ul"
|
108 |
+
|
109 |
+
#: admin/class-italy-cookie-choices-admin.php:193
|
110 |
+
msgid "Mouse scroll event"
|
111 |
+
msgstr "Acțiune scroll de mouse"
|
112 |
+
|
113 |
+
#: admin/class-italy-cookie-choices-admin.php:204
|
114 |
+
msgid "Accept on second view"
|
115 |
+
msgstr "Acceptați intr-o noua fereastră"
|
116 |
+
|
117 |
+
#: admin/class-italy-cookie-choices-admin.php:215
|
118 |
+
msgid "Refresh page"
|
119 |
+
msgstr "Actualizează pagina"
|
120 |
+
|
121 |
+
#: admin/class-italy-cookie-choices-admin.php:226
|
122 |
+
msgid "Text to display"
|
123 |
+
msgstr "Textul pentru afișare"
|
124 |
+
|
125 |
+
#: admin/class-italy-cookie-choices-admin.php:237
|
126 |
+
msgid "URL for cookie policy"
|
127 |
+
msgstr "URL pentru politica cookie"
|
128 |
+
|
129 |
+
#: admin/class-italy-cookie-choices-admin.php:248
|
130 |
+
msgid "Cookie policy page slug"
|
131 |
+
msgstr "Slug pentru pagina de Politica Cookie"
|
132 |
+
|
133 |
+
#: admin/class-italy-cookie-choices-admin.php:259
|
134 |
+
msgid "Anchor text for URL"
|
135 |
+
msgstr "Ancora text pentru URL"
|
136 |
+
|
137 |
+
#: admin/class-italy-cookie-choices-admin.php:270
|
138 |
+
msgid "Button text"
|
139 |
+
msgstr "Text-ul pentru buton"
|
140 |
+
|
141 |
+
#: admin/class-italy-cookie-choices-admin.php:281
|
142 |
+
msgid "Style settings"
|
143 |
+
msgstr "Setări de stil"
|
144 |
+
|
145 |
+
#: admin/class-italy-cookie-choices-admin.php:291
|
146 |
+
msgid "CookieChoices Template"
|
147 |
+
msgstr "Template CookieChoices"
|
148 |
+
|
149 |
+
#: admin/class-italy-cookie-choices-admin.php:302
|
150 |
+
msgid "HTML top margin"
|
151 |
+
msgstr "Marginea înaltă pentru HTML"
|
152 |
+
|
153 |
+
#: admin/class-italy-cookie-choices-admin.php:313
|
154 |
+
msgid "Banner Background color"
|
155 |
+
msgstr "Culoare de background pentru banner "
|
156 |
+
|
157 |
+
#: admin/class-italy-cookie-choices-admin.php:324
|
158 |
+
msgid "Banner text color"
|
159 |
+
msgstr "Culoarea text-ului din banner"
|
160 |
+
|
161 |
+
#: admin/class-italy-cookie-choices-admin.php:335
|
162 |
+
msgid "Custom CSS"
|
163 |
+
msgstr "CSS personal"
|
164 |
+
|
165 |
+
#: admin/class-italy-cookie-choices-admin.php:346
|
166 |
+
msgid "Custom CSS Class (Optional)"
|
167 |
+
msgstr "Clasă CSS personalizată (Opțional)"
|
168 |
+
|
169 |
+
#: admin/class-italy-cookie-choices-admin.php:357
|
170 |
+
msgid "Advanced settings"
|
171 |
+
msgstr "Setări avansate"
|
172 |
+
|
173 |
+
#: admin/class-italy-cookie-choices-admin.php:367
|
174 |
+
msgid "Cookie name"
|
175 |
+
msgstr "Nume Cookie"
|
176 |
+
|
177 |
+
#: admin/class-italy-cookie-choices-admin.php:378
|
178 |
+
msgid "Cookie value"
|
179 |
+
msgstr "Valoare Cookie"
|
180 |
+
|
181 |
+
#: admin/class-italy-cookie-choices-admin.php:389
|
182 |
+
msgid "Open policy in new page"
|
183 |
+
msgstr "Deschide politica de cookie in o pagina nouă"
|
184 |
+
|
185 |
+
#: admin/class-italy-cookie-choices-admin.php:400
|
186 |
+
msgid "Third part cookie block (beta)"
|
187 |
+
msgstr "Blochează cookie-urile externe"
|
188 |
+
|
189 |
+
#: admin/class-italy-cookie-choices-admin.php:411
|
190 |
+
msgid "Scripts allowed in body"
|
191 |
+
msgstr "Script permis in body"
|
192 |
+
|
193 |
+
#: admin/class-italy-cookie-choices-admin.php:422
|
194 |
+
msgid "Scripts to be blocked"
|
195 |
+
msgstr "Script care urmează sa fie blocat"
|
196 |
+
|
197 |
+
#: admin/class-italy-cookie-choices-admin.php:433
|
198 |
+
msgid "Text message for locked embedded content"
|
199 |
+
msgstr "Mesaj pentru conținuturile încorporate blocate"
|
200 |
+
|
201 |
+
#: admin/class-italy-cookie-choices-admin.php:444
|
202 |
+
msgid "Button text to activate locked embedded content"
|
203 |
+
msgstr "Textul butonului pentru a activa conținutul încorporat blocat"
|
204 |
+
|
205 |
+
#: admin/class-italy-cookie-choices-admin.php:469
|
206 |
+
msgid "Customize your banner for cookie law"
|
207 |
+
msgstr "Personalizează banner-ul pentru Cookie Law"
|
208 |
+
|
209 |
+
#: admin/class-italy-cookie-choices-admin.php:484
|
210 |
+
msgid "Display banner for Cookie Law in front-end"
|
211 |
+
msgstr "Visualizează banner-ul in front-end"
|
212 |
+
|
213 |
+
#: admin/class-italy-cookie-choices-admin.php:504
|
214 |
+
msgid "Top Bar (Default, Display a top bar with your message)"
|
215 |
+
msgstr ""
|
216 |
+
"Bara înaltă (Predefinită, Vizualizează o bara în partea înaltă cu mesajul "
|
217 |
+
"tău)"
|
218 |
+
|
219 |
+
#: admin/class-italy-cookie-choices-admin.php:512
|
220 |
+
msgid "Dialog (Display an overlay with your message)"
|
221 |
+
msgstr "Dialog (Visualizează un pop-up cu text-ul tău)"
|
222 |
+
|
223 |
+
#: admin/class-italy-cookie-choices-admin.php:520
|
224 |
+
msgid "Bottom Bar (Display a bar in the footer with your message)"
|
225 |
+
msgstr ""
|
226 |
+
"Bara în partea de jos a ecranului (Vizualizează o bară in partea de jos a "
|
227 |
+
"ecranului cu mesajul tău)"
|
228 |
+
|
229 |
+
#: admin/class-italy-cookie-choices-admin.php:540
|
230 |
+
msgid "Accepts disclosures on mouse scroll event"
|
231 |
+
msgstr "Acceptă informativa cu scroll de mouse"
|
232 |
+
|
233 |
+
#: admin/class-italy-cookie-choices-admin.php:560
|
234 |
+
msgid "Activate accept on second view"
|
235 |
+
msgstr "Activează accept într-o fereastră nouă"
|
236 |
+
|
237 |
+
#: admin/class-italy-cookie-choices-admin.php:578
|
238 |
+
msgid "Refresh page after button click (DEPRECATED)"
|
239 |
+
msgstr "Reîncarcă pagina dupa click pe buton (Deprecat)"
|
240 |
+
|
241 |
+
#: admin/class-italy-cookie-choices-admin.php:611
|
242 |
+
msgid "Your short cookie policy"
|
243 |
+
msgstr "Informativa ta scurtă despre cookie"
|
244 |
+
|
245 |
+
#: admin/class-italy-cookie-choices-admin.php:618
|
246 |
+
#: admin/class-italy-cookie-choices-admin.php:1086
|
247 |
+
msgid ""
|
248 |
+
"People will see this notice only the first time that they enter your site"
|
249 |
+
msgstr "Persoanele v-or vedea mesajul doar prima dată când vizită site-ul tău"
|
250 |
+
|
251 |
+
#: admin/class-italy-cookie-choices-admin.php:643
|
252 |
+
msgid "e.g. http://www.aboutcookies.org/"
|
253 |
+
msgstr "De exemplu: http://www.aboutcookies.org/"
|
254 |
+
|
255 |
+
#: admin/class-italy-cookie-choices-admin.php:646
|
256 |
+
msgid "Insert here the link to your policy page"
|
257 |
+
msgstr "Introduce link-ul la pagina ta cu informativa extinsă"
|
258 |
+
|
259 |
+
#: admin/class-italy-cookie-choices-admin.php:646
|
260 |
+
msgid "otherwise create a new one and then add URL to this input"
|
261 |
+
msgstr "altfel realizează unul nou și atunci adăugă URL-ul în acest input"
|
262 |
+
|
263 |
+
#: admin/class-italy-cookie-choices-admin.php:648
|
264 |
+
#: admin/class-italy-cookie-choices-admin.php:680
|
265 |
+
msgid ""
|
266 |
+
"Start typing first two letters of the name of the policy page and then "
|
267 |
+
"select it from the menu below the input"
|
268 |
+
msgstr ""
|
269 |
+
"Începe să scrii două litere din numele paginii de policy și selectează-l din "
|
270 |
+
"meniul de după input"
|
271 |
+
|
272 |
+
#: admin/class-italy-cookie-choices-admin.php:675
|
273 |
+
msgid "e.g. privacy-e-cookie"
|
274 |
+
msgstr "de exemplu: privacy-e-cookie"
|
275 |
+
|
276 |
+
#: admin/class-italy-cookie-choices-admin.php:678
|
277 |
+
msgid ""
|
278 |
+
"Insert your cookie policy page slug (e.g. for the page http://www.miodominio."
|
279 |
+
"it/privacy-e-cookie/ the slug is <strong>privacy-e-cookie</strong>).<br>In "
|
280 |
+
"this way it will display only the topbar in your cookie policy page, the "
|
281 |
+
"scroll and the second view will be deactivated in that page too."
|
282 |
+
msgstr ""
|
283 |
+
"Introduceți slug-ul paginii de policy (de exemplu: pentru pagina http://www."
|
284 |
+
"dominiulmeu.ro/cookie-privacy/, slug-ul este <strong>cookie-privacy</"
|
285 |
+
"strong>).<br>În acest mod va fi vizualizat doar în bara din partea înalta a "
|
286 |
+
"ecranului din pagina cu politica despre cookie, scrollarea și a doua "
|
287 |
+
"fereastră va fi dezactivată în acea pagină de asemenea."
|
288 |
+
|
289 |
+
#: admin/class-italy-cookie-choices-admin.php:694
|
290 |
+
msgid "e.g. More Info"
|
291 |
+
msgstr "De exemplu: Mai multe informații"
|
292 |
+
|
293 |
+
#: admin/class-italy-cookie-choices-admin.php:697
|
294 |
+
msgid "Insert here anchor text for the link"
|
295 |
+
msgstr "Introdu aici ancora text pentru link"
|
296 |
+
|
297 |
+
#: admin/class-italy-cookie-choices-admin.php:711
|
298 |
+
#: admin/class-italy-cookie-choices-admin.php:1102
|
299 |
+
msgid "e.g. Close"
|
300 |
+
msgstr "De exemplu: Închide"
|
301 |
+
|
302 |
+
#: admin/class-italy-cookie-choices-admin.php:714
|
303 |
+
#: admin/class-italy-cookie-choices-admin.php:1105
|
304 |
+
msgid "Insert here name of button (e.g. \"Close\") "
|
305 |
+
msgstr ""
|
306 |
+
"Introduce textul link-ului pentru închiderea pop-upului/banner-ului (ex: "
|
307 |
+
"Închide)"
|
308 |
+
|
309 |
+
#: admin/class-italy-cookie-choices-admin.php:731
|
310 |
+
msgid "Customize your style settings"
|
311 |
+
msgstr "Personalizează setările de stil"
|
312 |
+
|
313 |
+
#: admin/class-italy-cookie-choices-admin.php:747
|
314 |
+
msgid "Add a page top margin for info top bar, only for default topbar stile"
|
315 |
+
msgstr ""
|
316 |
+
"Adaugă o margine în partea înaltă a paginii pentru bara cu informații din "
|
317 |
+
"partea înaltă a ecranului, doar pentru stilul predefinit a barei din partea "
|
318 |
+
"înaltă a ecranului"
|
319 |
+
|
320 |
+
#: admin/class-italy-cookie-choices-admin.php:765
|
321 |
+
msgid "Default cookiechoices template (centered with text links)"
|
322 |
+
msgstr "Template predefinit pentru cookiechoices (centrat cu link-uri text)"
|
323 |
+
|
324 |
+
#: admin/class-italy-cookie-choices-admin.php:767
|
325 |
+
msgid "Centered container with left aligned text and big buttons"
|
326 |
+
msgstr "Contenitor centrat, cu text-ul alineat la stânga și butoane mari"
|
327 |
+
|
328 |
+
#: admin/class-italy-cookie-choices-admin.php:769
|
329 |
+
msgid "Centered container with left aligned text and small buttons"
|
330 |
+
msgstr ""
|
331 |
+
"Contenitor alineat la stânga, cu text-ul alineat la stânga si butoane mici"
|
332 |
+
|
333 |
+
#: admin/class-italy-cookie-choices-admin.php:771
|
334 |
+
msgid "My custom CSS"
|
335 |
+
msgstr "Personalizări CSS personale"
|
336 |
+
|
337 |
+
#: admin/class-italy-cookie-choices-admin.php:775
|
338 |
+
msgid "Select the template to use"
|
339 |
+
msgstr "Alege un template care să-l folosești"
|
340 |
+
|
341 |
+
#: admin/class-italy-cookie-choices-admin.php:796
|
342 |
+
msgid "Custom Background color for banner"
|
343 |
+
msgstr "Culoare personalizată pentru background-ul bannerului"
|
344 |
+
|
345 |
+
#: admin/class-italy-cookie-choices-admin.php:816
|
346 |
+
msgid "Custom text color for banner"
|
347 |
+
msgstr "Culoare personalizată pentru culoarea textului în banner"
|
348 |
+
|
349 |
+
#: admin/class-italy-cookie-choices-admin.php:833
|
350 |
+
msgid "Your custom css"
|
351 |
+
msgstr "Personalizările tale CSS"
|
352 |
+
|
353 |
+
#: admin/class-italy-cookie-choices-admin.php:836
|
354 |
+
msgid "Inset here your custom CSS for banner"
|
355 |
+
msgstr "Introduce-ți aici stilul CSS pentru banner"
|
356 |
+
|
357 |
+
#: admin/class-italy-cookie-choices-admin.php:861
|
358 |
+
msgid "Eg: bannerStyle"
|
359 |
+
msgstr "Exemplu: bannerStyle"
|
360 |
+
|
361 |
+
#: admin/class-italy-cookie-choices-admin.php:863
|
362 |
+
msgid "CSS class for div container (Default <code>bannerStyle</code>)"
|
363 |
+
msgstr ""
|
364 |
+
"Classă CSS pentru contenitorul div (Predefinit <code>bannerStyle</code>)"
|
365 |
+
|
366 |
+
#: admin/class-italy-cookie-choices-admin.php:866
|
367 |
+
msgid "Eg: contentStyle"
|
368 |
+
msgstr "Exemplu: contentStyle"
|
369 |
+
|
370 |
+
#: admin/class-italy-cookie-choices-admin.php:868
|
371 |
+
msgid "CSS class for div content (Default <code>contentStyle</code>)"
|
372 |
+
msgstr ""
|
373 |
+
"Clasă CSS pentru contenitorul div (Predefinit <code>contentStyle</code>)"
|
374 |
+
|
375 |
+
#: admin/class-italy-cookie-choices-admin.php:871
|
376 |
+
msgid "Eg: consentText"
|
377 |
+
msgstr "Exemplu: consentText"
|
378 |
+
|
379 |
+
#: admin/class-italy-cookie-choices-admin.php:873
|
380 |
+
msgid "CSS class for span content (Default <code>consentText</code>)"
|
381 |
+
msgstr ""
|
382 |
+
"Clasă CSS pentru contenitorul span (Predefinit <code>consentText</code>)"
|
383 |
+
|
384 |
+
#: admin/class-italy-cookie-choices-admin.php:876
|
385 |
+
msgid "Eg: infoClass"
|
386 |
+
msgstr "Exemplu: infoClass"
|
387 |
+
|
388 |
+
#: admin/class-italy-cookie-choices-admin.php:878
|
389 |
+
msgid "CSS class for Info link (Default <code>itaybtn</code>)"
|
390 |
+
msgstr "Clasă CSS pentru link-ul Info (Predefinit <code>itaybtn</code>)"
|
391 |
+
|
392 |
+
#: admin/class-italy-cookie-choices-admin.php:881
|
393 |
+
msgid "Eg: closeClass"
|
394 |
+
msgstr "Exemplu: closeClass"
|
395 |
+
|
396 |
+
#: admin/class-italy-cookie-choices-admin.php:883
|
397 |
+
msgid "CSS class for close link (Default <code>itaybtn</code>)"
|
398 |
+
msgstr ""
|
399 |
+
"Clasă CSS pentru link-ul de închidere (Predefinit <code>itaybtn</code>)"
|
400 |
+
|
401 |
+
#: admin/class-italy-cookie-choices-admin.php:886
|
402 |
+
msgid "Customize with your personal CSS class"
|
403 |
+
msgstr "Personalizează cu clasa ta CSS personală"
|
404 |
+
|
405 |
+
#: admin/class-italy-cookie-choices-admin.php:902
|
406 |
+
msgid "Customize your advanced settings"
|
407 |
+
msgstr "Personalizează setările avansate"
|
408 |
+
|
409 |
+
#: admin/class-italy-cookie-choices-admin.php:918
|
410 |
+
msgid "Insert your cookie name (Default: displayCookieConsent)"
|
411 |
+
msgstr "Introduceți numele Cookie-ului tău (Default: displayCookieConsent)"
|
412 |
+
|
413 |
+
#: admin/class-italy-cookie-choices-admin.php:937
|
414 |
+
msgid "Insert your cookie value (Default: y)"
|
415 |
+
msgstr "Introduceți valoarea Cookie-ului (Default: y)"
|
416 |
+
|
417 |
+
#: admin/class-italy-cookie-choices-admin.php:957
|
418 |
+
msgid "Open your cookie policy page in new one"
|
419 |
+
msgstr "Deschide pagina cookie-urilor în una noua"
|
420 |
+
|
421 |
+
#: admin/class-italy-cookie-choices-admin.php:981
|
422 |
+
msgid "Cookie from any embed in your content (Beta) (DEPRECATED)"
|
423 |
+
msgstr ""
|
424 |
+
"Cookie din orice conținut incorporat in conținutul paginii (Beta) (Deprecat)"
|
425 |
+
|
426 |
+
#: admin/class-italy-cookie-choices-admin.php:986
|
427 |
+
msgid "Cookie from any embed in your widget area (Beta) (DEPRECATED)"
|
428 |
+
msgstr "Cookie din orice conținut încorporat din area widget-ului (Deprecat)"
|
429 |
+
|
430 |
+
#: admin/class-italy-cookie-choices-admin.php:991
|
431 |
+
msgid "Cookie from any embed in all body, except head and footer (Beta)"
|
432 |
+
msgstr ""
|
433 |
+
"Cookie din orice conținut încorporat în orice conținut a paginii, mai puțin "
|
434 |
+
"partea înaltă si cea de jos a paginii"
|
435 |
+
|
436 |
+
#: admin/class-italy-cookie-choices-admin.php:1032
|
437 |
+
#: admin/class-italy-cookie-choices-admin.php:1058
|
438 |
+
msgid ""
|
439 |
+
"<script src="http://domain.com/widget-example.js"></"
|
440 |
+
"script>\n"
|
441 |
+
"<---------SEP--------->\n"
|
442 |
+
"<script src="http://otherdomain.com/script-example.js"></"
|
443 |
+
"script>\n"
|
444 |
+
"<---------SEP--------->\n"
|
445 |
+
"<script src="http://lastdomain.com/gadget-example.js"></"
|
446 |
+
"script>"
|
447 |
+
msgstr ""
|
448 |
+
"<script src="http://domain.com/widget-example.js"></"
|
449 |
+
"script>\n"
|
450 |
+
"<---------SEP--------->\n"
|
451 |
+
"<script src="http://otherdomain.com/script-example.js"></"
|
452 |
+
"script>\n"
|
453 |
+
"<---------SEP--------->\n"
|
454 |
+
"<script src="http://lastdomain.com/gadget-example.js"></"
|
455 |
+
"script>"
|
456 |
+
|
457 |
+
#: admin/class-italy-cookie-choices-admin.php:1036
|
458 |
+
msgid "View example"
|
459 |
+
msgstr "Vezi exemplu"
|
460 |
+
|
461 |
+
#: admin/class-italy-cookie-choices-admin.php:1039
|
462 |
+
#, fuzzy
|
463 |
+
msgid ""
|
464 |
+
"Scripts to be excluded from the automatic block.<br />Split each script with "
|
465 |
+
"<strong><em><---------SEP---------></em></strong><br>Use "
|
466 |
+
"<strong><---------SOMETHING---------></strong> for custom regex"
|
467 |
+
msgstr ""
|
468 |
+
"Script care va fi exclus din blocarea automatică.<br />Împarte fiecare "
|
469 |
+
"script cu <strong><em><---------SEP---------></em></strong>"
|
470 |
+
|
471 |
+
#: admin/class-italy-cookie-choices-admin.php:1042
|
472 |
+
#: admin/class-italy-cookie-choices-admin.php:1067
|
473 |
+
msgid "For more information see the documentation"
|
474 |
+
msgstr "Pentru mai multe informații, vezi documentația"
|
475 |
+
|
476 |
+
#: admin/class-italy-cookie-choices-admin.php:1064
|
477 |
+
#, fuzzy
|
478 |
+
msgid ""
|
479 |
+
"Scripts shown in the head and in the footer does not automatically blocked."
|
480 |
+
"<br />Split each script with <strong><em><---------SEP---------></em></"
|
481 |
+
"strong><br>Use <strong><---------SOMETHING---------></strong> for custom "
|
482 |
+
"regex"
|
483 |
+
msgstr ""
|
484 |
+
"Scripturile vizualizate in partea înalta si cea de jos a paginii nu sunt "
|
485 |
+
"blocate automat.<br />Împarte fiecare script cu <strong><em><---------"
|
486 |
+
"SEP---------></em></strong>"
|
487 |
+
|
488 |
+
#: admin/class-italy-cookie-choices-admin.php:1083
|
489 |
+
msgid "Your lock message for embedded contents inside posts, pages and widgets"
|
490 |
+
msgstr ""
|
491 |
+
"Mesajul tău de blocare pentru conținuturile încorporate în postări, pagini "
|
492 |
+
"și widget-uri"
|
493 |
+
|
494 |
+
#: admin/class-italy-cookie-choices-admin.php:1221
|
495 |
+
#: admin/class-italy-cookie-choices-sanitize.php:77
|
496 |
+
msgid "Cookie name field it can't be empty. Restored default name."
|
497 |
+
msgstr "Numele Cookie-ului nu poate fi lăsat gol. Resetat numele de default."
|
498 |
+
|
499 |
+
#: admin/class-italy-cookie-choices-admin.php:1228
|
500 |
+
#: admin/class-italy-cookie-choices-sanitize.php:84
|
501 |
+
msgid "Cookie value field it can't be empty. Restored default value."
|
502 |
+
msgstr ""
|
503 |
+
"Valoarea Cookie-ului nu poate fi lăsat gol. Resetată valoarea de default"
|
504 |
+
|
505 |
+
#: admin/template/code-example.php:7
|
506 |
+
msgid "Script inline example"
|
507 |
+
msgstr "Exemplu de script in/line"
|
508 |
+
|
509 |
+
#: italy-cookie-choices.php:139 italy-cookie-choices.php:149
|
510 |
+
msgid "Activation of Italy Cookie Choices in not possible"
|
511 |
+
msgstr "Activarea a Italy Cookie Choices nu este posibilă"
|
512 |
+
|
513 |
+
#: italy-cookie-choices.php:240
|
514 |
+
#, php-format
|
515 |
+
msgid ""
|
516 |
+
"Your server is running %s version %s but this plugin requires at least %s"
|
517 |
+
msgstr ""
|
518 |
+
"Server-ul tău folosește versiunea %s a %s dar acest plugin are nevoie de "
|
519 |
+
"măcar versiunea %s"
|
520 |
+
|
521 |
+
#~ msgid "e.g. your-policy-url.html"
|
522 |
+
#~ msgstr "ex: link-politica-ta.html"
|
523 |
+
|
524 |
+
#~ msgid ""
|
525 |
+
#~ "Insert your cookie policy page slug (e.g. your-policy-url), it will "
|
526 |
+
#~ "display only topbar in your cookie policy page"
|
527 |
+
#~ msgstr ""
|
528 |
+
#~ "Introduce slug-ul paginii tale pentru politica cookie-urilor (ex: link-"
|
529 |
+
#~ "politica-ta), acesta va vizualiza doar bara din sus în pagina despre "
|
530 |
+
#~ "politica cookie-urilor"
|
531 |
+
|
532 |
+
#~ msgid "Top Bar (Default, Display a top bar wth your message)"
|
533 |
+
#~ msgstr ""
|
534 |
+
#~ "Top Bar (Default, va fi vizualizată o bară în partea înaltă a paginii)"
|
535 |
+
|
536 |
+
#~ msgid "Refresh page after button click"
|
537 |
+
#~ msgstr "Actualizează pagina după click pe buton"
|
538 |
+
|
539 |
+
#~ msgid "Add a page top margin for info top bar"
|
540 |
+
#~ msgstr "Adăuga o margine în partea înaltă a paginii doar pentru bara înaltă"
|
541 |
+
|
542 |
+
#~ msgid "Cookie from any embed in your content (Beta)"
|
543 |
+
#~ msgstr "Cookie din orice conținut încorporat în pagina ta (Beta)"
|
544 |
+
|
545 |
+
#~ msgid "Cookie from any embed in your widget area (Beta)"
|
546 |
+
#~ msgstr "Cookie din orice conținut încorporat în zona widget-urilor"
|
lang/italy-cookie-choices.pot
ADDED
@@ -0,0 +1,515 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#, fuzzy
|
2 |
+
msgid ""
|
3 |
+
msgstr ""
|
4 |
+
"Project-Id-Version: Italy Cookie Choices\n"
|
5 |
+
"POT-Creation-Date: 2015-09-08 16:59+0200\n"
|
6 |
+
"PO-Revision-Date: 2015-05-21 20:22+0100\n"
|
7 |
+
"Last-Translator: Enea Overclokk <info@overclokk.net>\n"
|
8 |
+
"Language-Team: info@overclokk.net\n"
|
9 |
+
"Language: en\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 1.8.4\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SearchPathExcluded-0: node_modules\n"
|
20 |
+
"X-Poedit-SearchPathExcluded-1: .git\n"
|
21 |
+
|
22 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:66
|
23 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:80
|
24 |
+
msgid "Radio 1"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:67
|
28 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:81
|
29 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:96
|
30 |
+
msgid "The plugin is active and ready to start working."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:70
|
34 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:135
|
35 |
+
msgid "Next"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:95
|
39 |
+
msgid "Radio 2"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:99
|
43 |
+
msgid "Open Popup"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:108
|
47 |
+
msgid "Italy_Cookie_Choices_Pointer for Posts"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:109
|
51 |
+
msgid "One more pointer."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:116
|
55 |
+
msgid "Italy_Cookie_Choices_Pointer Pages"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:117
|
59 |
+
msgid "A pointer for pages."
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:123
|
63 |
+
msgid "Italy_Cookie_Choices_Pointer Users"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:124
|
67 |
+
msgid "A pointer for users."
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:130
|
71 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:148
|
72 |
+
msgid "Italy_Cookie_Choices_Pointer Help"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:131
|
76 |
+
msgid "A pointer with action."
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: admin/class-italy-cookie-choices-admin-pointer-init.php:149
|
80 |
+
msgid "A pointer for help tab.<br>Go to Posts, Pages or Users for other pointers."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:70
|
84 |
+
msgid "Italy_Cookie_Choices_Pointer Error: post_type is not an array!"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: admin/class-italy-cookie-choices-admin-pointer.php:93
|
88 |
+
msgid "Italy_Cookie_Choices_Pointer Error: pages is not an array!"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: admin/class-italy-cookie-choices-admin.php:147
|
92 |
+
msgid "Italy Cookie Choices Dashboard"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: admin/class-italy-cookie-choices-admin.php:161
|
96 |
+
msgid "You do not have sufficient permissions to access this page."
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: admin/class-italy-cookie-choices-admin.php:207
|
100 |
+
msgid "Italy Cookie Choices options page"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: admin/class-italy-cookie-choices-admin.php:217
|
104 |
+
msgid "Activate"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: admin/class-italy-cookie-choices-admin.php:229
|
108 |
+
msgid "Where display the banner"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: admin/class-italy-cookie-choices-admin.php:240
|
112 |
+
msgid "Mouse scroll event"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: admin/class-italy-cookie-choices-admin.php:251
|
116 |
+
msgid "Accept on second view"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: admin/class-italy-cookie-choices-admin.php:262
|
120 |
+
msgid "Refresh page"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: admin/class-italy-cookie-choices-admin.php:273
|
124 |
+
msgid "Text to display"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: admin/class-italy-cookie-choices-admin.php:284
|
128 |
+
msgid "URL for cookie policy"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: admin/class-italy-cookie-choices-admin.php:295
|
132 |
+
msgid "Cookie policy page slug"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: admin/class-italy-cookie-choices-admin.php:306
|
136 |
+
msgid "Anchor text for URL"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: admin/class-italy-cookie-choices-admin.php:317
|
140 |
+
msgid "Button text"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: admin/class-italy-cookie-choices-admin.php:328
|
144 |
+
msgid "Style settings"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: admin/class-italy-cookie-choices-admin.php:338
|
148 |
+
msgid "CookieChoices Template"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: admin/class-italy-cookie-choices-admin.php:349
|
152 |
+
msgid "HTML top margin"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: admin/class-italy-cookie-choices-admin.php:360
|
156 |
+
msgid "Banner Background color"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: admin/class-italy-cookie-choices-admin.php:371
|
160 |
+
msgid "Banner text color"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: admin/class-italy-cookie-choices-admin.php:382
|
164 |
+
msgid "Custom CSS"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: admin/class-italy-cookie-choices-admin.php:393
|
168 |
+
msgid "Custom CSS Class (Optional)"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: admin/class-italy-cookie-choices-admin.php:404
|
172 |
+
msgid "Advanced settings"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: admin/class-italy-cookie-choices-admin.php:414
|
176 |
+
msgid "Cookie name"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: admin/class-italy-cookie-choices-admin.php:425
|
180 |
+
msgid "Cookie value"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: admin/class-italy-cookie-choices-admin.php:436
|
184 |
+
msgid "Open policy in new page"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: admin/class-italy-cookie-choices-admin.php:447
|
188 |
+
msgid "Third part cookie block (beta)"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: admin/class-italy-cookie-choices-admin.php:458
|
192 |
+
msgid "Scripts allowed in body"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: admin/class-italy-cookie-choices-admin.php:469
|
196 |
+
msgid "Scripts to be blocked"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: admin/class-italy-cookie-choices-admin.php:480
|
200 |
+
msgid "Text message for locked embedded content"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: admin/class-italy-cookie-choices-admin.php:491
|
204 |
+
msgid "Button text to activate locked embedded content"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: admin/class-italy-cookie-choices-admin.php:516
|
208 |
+
msgid "Customize your banner for cookie law"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: admin/class-italy-cookie-choices-admin.php:531
|
212 |
+
msgid "Display banner for Cookie Law in front-end"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: admin/class-italy-cookie-choices-admin.php:551
|
216 |
+
msgid "Top Bar (Default, Display a top bar with your message)"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: admin/class-italy-cookie-choices-admin.php:559
|
220 |
+
msgid "Dialog (Display an overlay with your message)"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: admin/class-italy-cookie-choices-admin.php:567
|
224 |
+
msgid "Bottom Bar (Display a bar in the footer with your message)"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: admin/class-italy-cookie-choices-admin.php:587
|
228 |
+
msgid "Accepts disclosures on mouse scroll event"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: admin/class-italy-cookie-choices-admin.php:607
|
232 |
+
msgid "Activate accept on second view"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: admin/class-italy-cookie-choices-admin.php:625
|
236 |
+
msgid "Refresh page after button click (DEPRECATED)"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: admin/class-italy-cookie-choices-admin.php:658
|
240 |
+
msgid "Your short cookie policy"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: admin/class-italy-cookie-choices-admin.php:665
|
244 |
+
#: admin/class-italy-cookie-choices-admin.php:1156
|
245 |
+
msgid "People will see this notice only the first time that they enter your site"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: admin/class-italy-cookie-choices-admin.php:690
|
249 |
+
msgid "e.g. http://www.aboutcookies.org/"
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: admin/class-italy-cookie-choices-admin.php:693
|
253 |
+
msgid "Insert here the link to your policy page"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: admin/class-italy-cookie-choices-admin.php:693
|
257 |
+
msgid "otherwise create a new one and then add URL to this input"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: admin/class-italy-cookie-choices-admin.php:695
|
261 |
+
#: admin/class-italy-cookie-choices-admin.php:727
|
262 |
+
msgid "Start typing first two letters of the name of the policy page and then select it from the menu below the input"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: admin/class-italy-cookie-choices-admin.php:722
|
266 |
+
msgid "e.g. privacy-e-cookie"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: admin/class-italy-cookie-choices-admin.php:725
|
270 |
+
msgid "Insert your cookie policy page slug (e.g. for the page http://www.miodominio.it/privacy-e-cookie/ the slug is <strong>privacy-e-cookie</strong>).<br>In this way it will display only the topbar in your cookie policy page, the scroll and the second view will be deactivated in that page too."
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: admin/class-italy-cookie-choices-admin.php:741
|
274 |
+
msgid "e.g. More Info"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: admin/class-italy-cookie-choices-admin.php:744
|
278 |
+
msgid "Insert here anchor text for the link"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: admin/class-italy-cookie-choices-admin.php:758
|
282 |
+
#: admin/class-italy-cookie-choices-admin.php:1172
|
283 |
+
msgid "e.g. Close"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: admin/class-italy-cookie-choices-admin.php:761
|
287 |
+
#: admin/class-italy-cookie-choices-admin.php:1175
|
288 |
+
msgid "Insert here name of button (e.g. \"Close\") "
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: admin/class-italy-cookie-choices-admin.php:778
|
292 |
+
msgid "Customize your style settings"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: admin/class-italy-cookie-choices-admin.php:794
|
296 |
+
msgid "Add a page top margin for info top bar, only for default topbar stile"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: admin/class-italy-cookie-choices-admin.php:812
|
300 |
+
msgid "Default cookiechoices template (centered with text links)"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: admin/class-italy-cookie-choices-admin.php:814
|
304 |
+
msgid "Centered container with left aligned text and big buttons"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: admin/class-italy-cookie-choices-admin.php:816
|
308 |
+
msgid "Centered container with left aligned text and small buttons"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: admin/class-italy-cookie-choices-admin.php:818
|
312 |
+
msgid "My custom CSS"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: admin/class-italy-cookie-choices-admin.php:822
|
316 |
+
msgid "Select the template to use"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: admin/class-italy-cookie-choices-admin.php:843
|
320 |
+
msgid "Custom Background color for banner"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: admin/class-italy-cookie-choices-admin.php:863
|
324 |
+
msgid "Custom text color for banner"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: admin/class-italy-cookie-choices-admin.php:880
|
328 |
+
msgid "Your custom css"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: admin/class-italy-cookie-choices-admin.php:883
|
332 |
+
msgid "Inset here your custom CSS for banner"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: admin/class-italy-cookie-choices-admin.php:908
|
336 |
+
msgid "Eg: bannerStyle"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: admin/class-italy-cookie-choices-admin.php:910
|
340 |
+
msgid "CSS class for div container (Default <code>bannerStyle</code>)"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: admin/class-italy-cookie-choices-admin.php:913
|
344 |
+
msgid "Eg: contentStyle"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: admin/class-italy-cookie-choices-admin.php:915
|
348 |
+
msgid "CSS class for div content (Default <code>contentStyle</code>)"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: admin/class-italy-cookie-choices-admin.php:918
|
352 |
+
msgid "Eg: consentText"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: admin/class-italy-cookie-choices-admin.php:920
|
356 |
+
msgid "CSS class for span content (Default <code>consentText</code>)"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: admin/class-italy-cookie-choices-admin.php:923
|
360 |
+
msgid "Eg: infoClass"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: admin/class-italy-cookie-choices-admin.php:925
|
364 |
+
msgid "CSS class for Info link (Default <code>itaybtn</code>)"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: admin/class-italy-cookie-choices-admin.php:928
|
368 |
+
msgid "Eg: closeClass"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: admin/class-italy-cookie-choices-admin.php:930
|
372 |
+
msgid "CSS class for close link (Default <code>itaybtn</code>)"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: admin/class-italy-cookie-choices-admin.php:933
|
376 |
+
msgid "Customize with your personal CSS class"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: admin/class-italy-cookie-choices-admin.php:949
|
380 |
+
msgid "Customize your advanced settings"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: admin/class-italy-cookie-choices-admin.php:965
|
384 |
+
msgid "Insert your cookie name (Default: displayCookieConsent)"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: admin/class-italy-cookie-choices-admin.php:984
|
388 |
+
msgid "Insert your cookie value (Default: y)"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: admin/class-italy-cookie-choices-admin.php:1004
|
392 |
+
msgid "Open your cookie policy page in new one"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: admin/class-italy-cookie-choices-admin.php:1028
|
396 |
+
msgid "Cookie from any embed in your content (Beta) (DEPRECATED)"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: admin/class-italy-cookie-choices-admin.php:1033
|
400 |
+
msgid "Cookie from any embed in your widget area (Beta) (DEPRECATED)"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: admin/class-italy-cookie-choices-admin.php:1039
|
404 |
+
msgid "Cookie from any embed in all body, except head and footer (Beta)"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: admin/class-italy-cookie-choices-admin.php:1082
|
408 |
+
#: admin/class-italy-cookie-choices-admin.php:1108
|
409 |
+
msgid ""
|
410 |
+
"<script src="http://domain.com/widget-example.js"></script>\n"
|
411 |
+
"<---------SEP--------->\n"
|
412 |
+
"<script src="http://otherdomain.com/script-example.js"></script>\n"
|
413 |
+
"<---------SEP--------->\n"
|
414 |
+
"<script src="http://lastdomain.com/gadget-example.js"></script>"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: admin/class-italy-cookie-choices-admin.php:1086
|
418 |
+
msgid "View example"
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: admin/class-italy-cookie-choices-admin.php:1089
|
422 |
+
msgid "Scripts to be excluded from the automatic block.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex"
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: admin/class-italy-cookie-choices-admin.php:1092
|
426 |
+
#: admin/class-italy-cookie-choices-admin.php:1117
|
427 |
+
msgid "For more information see the documentation"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: admin/class-italy-cookie-choices-admin.php:1114
|
431 |
+
msgid "Scripts shown in the head and in the footer does not automatically blocked.<br />Split each script with <strong><em><---------SEP---------></em></strong><br>Use <strong><---------SOMETHING---------></strong> for custom regex"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: admin/class-italy-cookie-choices-admin.php:1152
|
435 |
+
msgid "Your lock message for embedded contents inside posts, pages and widgets"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: admin/class-italy-cookie-choices-admin.php:1306
|
439 |
+
#: admin/class-italy-cookie-choices-sanitize.php:77
|
440 |
+
msgid "Cookie name field it can't be empty. Restored default name."
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: admin/class-italy-cookie-choices-admin.php:1313
|
444 |
+
#: admin/class-italy-cookie-choices-sanitize.php:84
|
445 |
+
msgid "Cookie value field it can't be empty. Restored default value."
|
446 |
+
msgstr ""
|
447 |
+
|
448 |
+
#: admin/class-italy-cookie-choices-admin.php:1419
|
449 |
+
msgid "Settings"
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#: admin/class-italy-cookie-choices-admin.php:1421
|
453 |
+
msgid "Documentation"
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: admin/class-italy-cookie-choices-admin.php:1485
|
457 |
+
msgid "Please upload a valid .json file"
|
458 |
+
msgstr ""
|
459 |
+
|
460 |
+
#: admin/class-italy-cookie-choices-admin.php:1485
|
461 |
+
msgid "No valid json file"
|
462 |
+
msgstr ""
|
463 |
+
|
464 |
+
#: admin/class-italy-cookie-choices-admin.php:1491
|
465 |
+
msgid "The json file can't be empty"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: admin/class-italy-cookie-choices-admin.php:1491
|
469 |
+
msgid "Empty file"
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: admin/class-italy-cookie-choices-admin.php:1499
|
473 |
+
msgid "Please upload a file to import"
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: admin/class-italy-cookie-choices-admin.php:1499
|
477 |
+
msgid "No file import"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: admin/template/admin.php:30
|
481 |
+
msgid "Export Settings"
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: admin/template/admin.php:32
|
485 |
+
msgid "Export the plugin settings for this site as a .json file. This allows you to easily import the configuration into another site."
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: admin/template/admin.php:39
|
489 |
+
msgid "Export"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: admin/template/admin.php:46
|
493 |
+
msgid "Import Settings"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: admin/template/admin.php:48
|
497 |
+
msgid "Import the plugin settings from a .json file. This file can be obtained by exporting the settings on another site using the form above."
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: admin/template/admin.php:56
|
501 |
+
msgid "Import"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: admin/template/code-example.php:7
|
505 |
+
msgid "Script inline example"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: italy-cookie-choices.php:168 italy-cookie-choices.php:178
|
509 |
+
msgid "Activation of Italy Cookie Choices in not possible"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: italy-cookie-choices.php:279
|
513 |
+
#, php-format
|
514 |
+
msgid "Your server is running %s version %s but this plugin requires at least %s"
|
515 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: compliance, cookie law, cookies, eu cookie law, eu law, eu privacy directive, privacy, privacy directive, notification, privacy law, cookie law banner, implied consent, third party script, third party cookie
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,6 +115,13 @@ if it doesn't work activate standard theme and try
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= 2.4.5 =
|
119 |
Release Date: October 9th, 2016
|
120 |
|
4 |
Tags: compliance, cookie law, cookies, eu cookie law, eu law, eu privacy directive, privacy, privacy directive, notification, privacy law, cookie law banner, implied consent, third party script, third party cookie
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.5.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 2.5.0 =
|
119 |
+
Release Date: November 13th, 2016
|
120 |
+
|
121 |
+
Dev time: 4h
|
122 |
+
|
123 |
+
* Code refactoring for psr-4
|
124 |
+
|
125 |
= 2.4.5 =
|
126 |
Release Date: October 9th, 2016
|
127 |
|
vendor/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInitec597b0e5e5ebb90729915bd317b0a70::getLoader();
|
vendor/composer/ClassLoader.php
ADDED
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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iano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Autoload;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
+
*
|
18 |
+
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
+
*
|
20 |
+
* // register classes with namespaces
|
21 |
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
+
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
+
*
|
24 |
+
* // activate the autoloader
|
25 |
+
* $loader->register();
|
26 |
+
*
|
27 |
+
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
+
* $loader->setUseIncludePath(true);
|
29 |
+
*
|
30 |
+
* In this example, if you try to use a class in the Symfony\Component
|
31 |
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
+
* the autoloader will first look for the class under the component/
|
33 |
+
* directory, and it will then fallback to the framework/ directory if not
|
34 |
+
* found before giving up.
|
35 |
+
*
|
36 |
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
+
*
|
38 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
+
*/
|
43 |
+
class ClassLoader
|
44 |
+
{
|
45 |
+
// PSR-4
|
46 |
+
private $prefixLengthsPsr4 = array();
|
47 |
+
private $prefixDirsPsr4 = array();
|
48 |
+
private $fallbackDirsPsr4 = array();
|
49 |
+
|
50 |
+
// PSR-0
|
51 |
+
private $prefixesPsr0 = array();
|
52 |
+
private $fallbackDirsPsr0 = array();
|
53 |
+
|
54 |
+
private $useIncludePath = false;
|
55 |
+
private $classMap = array();
|
56 |
+
private $classMapAuthoritative = false;
|
57 |
+
private $missingClasses = array();
|
58 |
+
|
59 |
+
public function getPrefixes()
|
60 |
+
{
|
61 |
+
if (!empty($this->prefixesPsr0)) {
|
62 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
63 |
+
}
|
64 |
+
|
65 |
+
return array();
|
66 |
+
}
|
67 |
+
|
68 |
+
public function getPrefixesPsr4()
|
69 |
+
{
|
70 |
+
return $this->prefixDirsPsr4;
|
71 |
+
}
|
72 |
+
|
73 |
+
public function getFallbackDirs()
|
74 |
+
{
|
75 |
+
return $this->fallbackDirsPsr0;
|
76 |
+
}
|
77 |
+
|
78 |
+
public function getFallbackDirsPsr4()
|
79 |
+
{
|
80 |
+
return $this->fallbackDirsPsr4;
|
81 |
+
}
|
82 |
+
|
83 |
+
public function getClassMap()
|
84 |
+
{
|
85 |
+
return $this->classMap;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @param array $classMap Class to filename map
|
90 |
+
*/
|
91 |
+
public function addClassMap(array $classMap)
|
92 |
+
{
|
93 |
+
if ($this->classMap) {
|
94 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
95 |
+
} else {
|
96 |
+
$this->classMap = $classMap;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Registers a set of PSR-0 directories for a given prefix, either
|
102 |
+
* appending or prepending to the ones previously set for this prefix.
|
103 |
+
*
|
104 |
+
* @param string $prefix The prefix
|
105 |
+
* @param array|string $paths The PSR-0 root directories
|
106 |
+
* @param bool $prepend Whether to prepend the directories
|
107 |
+
*/
|
108 |
+
public function add($prefix, $paths, $prepend = false)
|
109 |
+
{
|
110 |
+
if (!$prefix) {
|
111 |
+
if ($prepend) {
|
112 |
+
$this->fallbackDirsPsr0 = array_merge(
|
113 |
+
(array) $paths,
|
114 |
+
$this->fallbackDirsPsr0
|
115 |
+
);
|
116 |
+
} else {
|
117 |
+
$this->fallbackDirsPsr0 = array_merge(
|
118 |
+
$this->fallbackDirsPsr0,
|
119 |
+
(array) $paths
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
$first = $prefix[0];
|
127 |
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
128 |
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
129 |
+
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
if ($prepend) {
|
133 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
134 |
+
(array) $paths,
|
135 |
+
$this->prefixesPsr0[$first][$prefix]
|
136 |
+
);
|
137 |
+
} else {
|
138 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
139 |
+
$this->prefixesPsr0[$first][$prefix],
|
140 |
+
(array) $paths
|
141 |
+
);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Registers a set of PSR-4 directories for a given namespace, either
|
147 |
+
* appending or prepending to the ones previously set for this namespace.
|
148 |
+
*
|
149 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
+
* @param array|string $paths The PSR-4 base directories
|
151 |
+
* @param bool $prepend Whether to prepend the directories
|
152 |
+
*
|
153 |
+
* @throws \InvalidArgumentException
|
154 |
+
*/
|
155 |
+
public function addPsr4($prefix, $paths, $prepend = false)
|
156 |
+
{
|
157 |
+
if (!$prefix) {
|
158 |
+
// Register directories for the root namespace.
|
159 |
+
if ($prepend) {
|
160 |
+
$this->fallbackDirsPsr4 = array_merge(
|
161 |
+
(array) $paths,
|
162 |
+
$this->fallbackDirsPsr4
|
163 |
+
);
|
164 |
+
} else {
|
165 |
+
$this->fallbackDirsPsr4 = array_merge(
|
166 |
+
$this->fallbackDirsPsr4,
|
167 |
+
(array) $paths
|
168 |
+
);
|
169 |
+
}
|
170 |
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
171 |
+
// Register directories for a new namespace.
|
172 |
+
$length = strlen($prefix);
|
173 |
+
if ('\\' !== $prefix[$length - 1]) {
|
174 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
175 |
+
}
|
176 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
177 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
178 |
+
} elseif ($prepend) {
|
179 |
+
// Prepend directories for an already registered namespace.
|
180 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
181 |
+
(array) $paths,
|
182 |
+
$this->prefixDirsPsr4[$prefix]
|
183 |
+
);
|
184 |
+
} else {
|
185 |
+
// Append directories for an already registered namespace.
|
186 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
187 |
+
$this->prefixDirsPsr4[$prefix],
|
188 |
+
(array) $paths
|
189 |
+
);
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Registers a set of PSR-0 directories for a given prefix,
|
195 |
+
* replacing any others previously set for this prefix.
|
196 |
+
*
|
197 |
+
* @param string $prefix The prefix
|
198 |
+
* @param array|string $paths The PSR-0 base directories
|
199 |
+
*/
|
200 |
+
public function set($prefix, $paths)
|
201 |
+
{
|
202 |
+
if (!$prefix) {
|
203 |
+
$this->fallbackDirsPsr0 = (array) $paths;
|
204 |
+
} else {
|
205 |
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Registers a set of PSR-4 directories for a given namespace,
|
211 |
+
* replacing any others previously set for this namespace.
|
212 |
+
*
|
213 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
214 |
+
* @param array|string $paths The PSR-4 base directories
|
215 |
+
*
|
216 |
+
* @throws \InvalidArgumentException
|
217 |
+
*/
|
218 |
+
public function setPsr4($prefix, $paths)
|
219 |
+
{
|
220 |
+
if (!$prefix) {
|
221 |
+
$this->fallbackDirsPsr4 = (array) $paths;
|
222 |
+
} else {
|
223 |
+
$length = strlen($prefix);
|
224 |
+
if ('\\' !== $prefix[$length - 1]) {
|
225 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
226 |
+
}
|
227 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
228 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Turns on searching the include path for class files.
|
234 |
+
*
|
235 |
+
* @param bool $useIncludePath
|
236 |
+
*/
|
237 |
+
public function setUseIncludePath($useIncludePath)
|
238 |
+
{
|
239 |
+
$this->useIncludePath = $useIncludePath;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Can be used to check if the autoloader uses the include path to check
|
244 |
+
* for classes.
|
245 |
+
*
|
246 |
+
* @return bool
|
247 |
+
*/
|
248 |
+
public function getUseIncludePath()
|
249 |
+
{
|
250 |
+
return $this->useIncludePath;
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Turns off searching the prefix and fallback directories for classes
|
255 |
+
* that have not been registered with the class map.
|
256 |
+
*
|
257 |
+
* @param bool $classMapAuthoritative
|
258 |
+
*/
|
259 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
260 |
+
{
|
261 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Should class lookup fail if not found in the current class map?
|
266 |
+
*
|
267 |
+
* @return bool
|
268 |
+
*/
|
269 |
+
public function isClassMapAuthoritative()
|
270 |
+
{
|
271 |
+
return $this->classMapAuthoritative;
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Registers this instance as an autoloader.
|
276 |
+
*
|
277 |
+
* @param bool $prepend Whether to prepend the autoloader or not
|
278 |
+
*/
|
279 |
+
public function register($prepend = false)
|
280 |
+
{
|
281 |
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Unregisters this instance as an autoloader.
|
286 |
+
*/
|
287 |
+
public function unregister()
|
288 |
+
{
|
289 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Loads the given class or interface.
|
294 |
+
*
|
295 |
+
* @param string $class The name of the class
|
296 |
+
* @return bool|null True if loaded, null otherwise
|
297 |
+
*/
|
298 |
+
public function loadClass($class)
|
299 |
+
{
|
300 |
+
if ($file = $this->findFile($class)) {
|
301 |
+
includeFile($file);
|
302 |
+
|
303 |
+
return true;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Finds the path to the file where the class is defined.
|
309 |
+
*
|
310 |
+
* @param string $class The name of the class
|
311 |
+
*
|
312 |
+
* @return string|false The path if found, false otherwise
|
313 |
+
*/
|
314 |
+
public function findFile($class)
|
315 |
+
{
|
316 |
+
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
317 |
+
if ('\\' == $class[0]) {
|
318 |
+
$class = substr($class, 1);
|
319 |
+
}
|
320 |
+
|
321 |
+
// class map lookup
|
322 |
+
if (isset($this->classMap[$class])) {
|
323 |
+
return $this->classMap[$class];
|
324 |
+
}
|
325 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
326 |
+
return false;
|
327 |
+
}
|
328 |
+
|
329 |
+
$file = $this->findFileWithExtension($class, '.php');
|
330 |
+
|
331 |
+
// Search for Hack files if we are running on HHVM
|
332 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
333 |
+
$file = $this->findFileWithExtension($class, '.hh');
|
334 |
+
}
|
335 |
+
|
336 |
+
if (false === $file) {
|
337 |
+
// Remember that this class does not exist.
|
338 |
+
$this->missingClasses[$class] = true;
|
339 |
+
}
|
340 |
+
|
341 |
+
return $file;
|
342 |
+
}
|
343 |
+
|
344 |
+
private function findFileWithExtension($class, $ext)
|
345 |
+
{
|
346 |
+
// PSR-4 lookup
|
347 |
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
348 |
+
|
349 |
+
$first = $class[0];
|
350 |
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
351 |
+
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
352 |
+
if (0 === strpos($class, $prefix)) {
|
353 |
+
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
354 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
355 |
+
return $file;
|
356 |
+
}
|
357 |
+
}
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
// PSR-4 fallback dirs
|
363 |
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
364 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
365 |
+
return $file;
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
// PSR-0 lookup
|
370 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
371 |
+
// namespaced class name
|
372 |
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
373 |
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
374 |
+
} else {
|
375 |
+
// PEAR-like class name
|
376 |
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
377 |
+
}
|
378 |
+
|
379 |
+
if (isset($this->prefixesPsr0[$first])) {
|
380 |
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
381 |
+
if (0 === strpos($class, $prefix)) {
|
382 |
+
foreach ($dirs as $dir) {
|
383 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
384 |
+
return $file;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
|
391 |
+
// PSR-0 fallback dirs
|
392 |
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
393 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
394 |
+
return $file;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
// PSR-0 include paths.
|
399 |
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
400 |
+
return $file;
|
401 |
+
}
|
402 |
+
|
403 |
+
return false;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Scope isolated include.
|
409 |
+
*
|
410 |
+
* Prevents access to $this/self from included files.
|
411 |
+
*/
|
412 |
+
function includeFile($file)
|
413 |
+
{
|
414 |
+
include $file;
|
415 |
+
}
|
vendor/composer/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
3 |
+
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
+
of this software and associated documentation files (the "Software"), to deal
|
6 |
+
in the Software without restriction, including without limitation the rights
|
7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
+
to do so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
+
THE SOFTWARE.
|
21 |
+
|
vendor/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
vendor/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_namespaces.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
vendor/composer/autoload_psr4.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_psr4.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Italy_Cookie_Choices\\Core\\' => array($baseDir . '/core'),
|
10 |
+
'Italy_Cookie_Choices\\Admin\\' => array($baseDir . '/admin'),
|
11 |
+
);
|
vendor/composer/autoload_real.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInitec597b0e5e5ebb90729915bd317b0a70
|
6 |
+
{
|
7 |
+
private static $loader;
|
8 |
+
|
9 |
+
public static function loadClassLoader($class)
|
10 |
+
{
|
11 |
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
+
require __DIR__ . '/ClassLoader.php';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function getLoader()
|
17 |
+
{
|
18 |
+
if (null !== self::$loader) {
|
19 |
+
return self::$loader;
|
20 |
+
}
|
21 |
+
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitec597b0e5e5ebb90729915bd317b0a70', 'loadClassLoader'), true, true);
|
23 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitec597b0e5e5ebb90729915bd317b0a70', 'loadClassLoader'));
|
25 |
+
|
26 |
+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
+
if ($useStaticLoader) {
|
28 |
+
require_once __DIR__ . '/autoload_static.php';
|
29 |
+
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitec597b0e5e5ebb90729915bd317b0a70::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$loader->register(true);
|
49 |
+
|
50 |
+
return $loader;
|
51 |
+
}
|
52 |
+
}
|
vendor/composer/autoload_static.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInitec597b0e5e5ebb90729915bd317b0a70
|
8 |
+
{
|
9 |
+
public static $prefixLengthsPsr4 = array (
|
10 |
+
'I' =>
|
11 |
+
array (
|
12 |
+
'Italy_Cookie_Choices\\Core\\' => 26,
|
13 |
+
'Italy_Cookie_Choices\\Admin\\' => 27,
|
14 |
+
),
|
15 |
+
);
|
16 |
+
|
17 |
+
public static $prefixDirsPsr4 = array (
|
18 |
+
'Italy_Cookie_Choices\\Core\\' =>
|
19 |
+
array (
|
20 |
+
0 => __DIR__ . '/../..' . '/core',
|
21 |
+
),
|
22 |
+
'Italy_Cookie_Choices\\Admin\\' =>
|
23 |
+
array (
|
24 |
+
0 => __DIR__ . '/../..' . '/admin',
|
25 |
+
),
|
26 |
+
);
|
27 |
+
|
28 |
+
public static function getInitializer(ClassLoader $loader)
|
29 |
+
{
|
30 |
+
return \Closure::bind(function () use ($loader) {
|
31 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitec597b0e5e5ebb90729915bd317b0a70::$prefixLengthsPsr4;
|
32 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitec597b0e5e5ebb90729915bd317b0a70::$prefixDirsPsr4;
|
33 |
+
|
34 |
+
}, null, ClassLoader::class);
|
35 |
+
}
|
36 |
+
}
|
vendor/composer/installed.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "overclokk/minimum-requirements",
|
4 |
+
"version": "dev-master",
|
5 |
+
"version_normalized": "9999999-dev",
|
6 |
+
"source": {
|
7 |
+
"type": "git",
|
8 |
+
"url": "https://github.com/overclokk/minimum-requirements.git",
|
9 |
+
"reference": "91ede8e75c28e4037a69c3001052150b53bad23f"
|
10 |
+
},
|
11 |
+
"dist": {
|
12 |
+
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/overclokk/minimum-requirements/zipball/91ede8e75c28e4037a69c3001052150b53bad23f",
|
14 |
+
"reference": "91ede8e75c28e4037a69c3001052150b53bad23f",
|
15 |
+
"shasum": ""
|
16 |
+
},
|
17 |
+
"require": {
|
18 |
+
"php": ">=5.2"
|
19 |
+
},
|
20 |
+
"require-dev": {
|
21 |
+
"lucatume/function-mocker": "^1.0",
|
22 |
+
"lucatume/wp-browser": "^1.10"
|
23 |
+
},
|
24 |
+
"time": "2016-03-21 09:12:00",
|
25 |
+
"type": "wordpress-plugin",
|
26 |
+
"installation-source": "source",
|
27 |
+
"notification-url": "https://packagist.org/downloads/",
|
28 |
+
"license": [
|
29 |
+
"GPL-2.0+"
|
30 |
+
],
|
31 |
+
"authors": [
|
32 |
+
{
|
33 |
+
"name": "overclokk",
|
34 |
+
"email": "info@overclokk.net",
|
35 |
+
"homepage": "http://www.overclokk.net",
|
36 |
+
"role": "Developer"
|
37 |
+
}
|
38 |
+
],
|
39 |
+
"description": "Check the minimum requirements for your WordPress theme or plugin",
|
40 |
+
"homepage": "https://github.com/overclokk/minimum-requirements",
|
41 |
+
"keywords": [
|
42 |
+
"plugin",
|
43 |
+
"wordpress",
|
44 |
+
"wordpress plugin"
|
45 |
+
]
|
46 |
+
}
|
47 |
+
]
|
vendor/overclokk/minimum-requirements/LICENSE.md
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The GNU General Public License, Version 2, June 1991 (GPLv2)
|
2 |
+
============================================================
|
3 |
+
|
4 |
+
> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
5 |
+
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
6 |
+
|
7 |
+
Everyone is permitted to copy and distribute verbatim copies of this license
|
8 |
+
document, but changing it is not allowed.
|
9 |
+
|
10 |
+
|
11 |
+
Preamble
|
12 |
+
--------
|
13 |
+
|
14 |
+
The licenses for most software are designed to take away your freedom to share
|
15 |
+
and change it. By contrast, the GNU General Public License is intended to
|
16 |
+
guarantee your freedom to share and change free software--to make sure the
|
17 |
+
software is free for all its users. This General Public License applies to most
|
18 |
+
of the Free Software Foundation's software and to any other program whose
|
19 |
+
authors commit to using it. (Some other Free Software Foundation software is
|
20 |
+
covered by the GNU Library General Public License instead.) You can apply it to
|
21 |
+
your programs, too.
|
22 |
+
|
23 |
+
When we speak of free software, we are referring to freedom, not price. Our
|
24 |
+
General Public Licenses are designed to make sure that you have the freedom to
|
25 |
+
distribute copies of free software (and charge for this service if you wish),
|
26 |
+
that you receive source code or can get it if you want it, that you can change
|
27 |
+
the software or use pieces of it in new free programs; and that you know you can
|
28 |
+
do these things.
|
29 |
+
|
30 |
+
To protect your rights, we need to make restrictions that forbid anyone to deny
|
31 |
+
you these rights or to ask you to surrender the rights. These restrictions
|
32 |
+
translate to certain responsibilities for you if you distribute copies of the
|
33 |
+
software, or if you modify it.
|
34 |
+
|
35 |
+
For example, if you distribute copies of such a program, whether gratis or for a
|
36 |
+
fee, you must give the recipients all the rights that you have. You must make
|
37 |
+
sure that they, too, receive or can get the source code. And you must show them
|
38 |
+
these terms so they know their rights.
|
39 |
+
|
40 |
+
We protect your rights with two steps: (1) copyright the software, and (2) offer
|
41 |
+
you this license which gives you legal permission to copy, distribute and/or
|
42 |
+
modify the software.
|
43 |
+
|
44 |
+
Also, for each author's protection and ours, we want to make certain that
|
45 |
+
everyone understands that there is no warranty for this free software. If the
|
46 |
+
software is modified by someone else and passed on, we want its recipients to
|
47 |
+
know that what they have is not the original, so that any problems introduced by
|
48 |
+
others will not reflect on the original authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software patents. We wish
|
51 |
+
to avoid the danger that redistributors of a free program will individually
|
52 |
+
obtain patent licenses, in effect making the program proprietary. To prevent
|
53 |
+
this, we have made it clear that any patent must be licensed for everyone's free
|
54 |
+
use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and modification
|
57 |
+
follow.
|
58 |
+
|
59 |
+
|
60 |
+
Terms And Conditions For Copying, Distribution And Modification
|
61 |
+
---------------------------------------------------------------
|
62 |
+
|
63 |
+
**0.** This License applies to any program or other work which contains a notice
|
64 |
+
placed by the copyright holder saying it may be distributed under the terms of
|
65 |
+
this General Public License. The "Program", below, refers to any such program or
|
66 |
+
work, and a "work based on the Program" means either the Program or any
|
67 |
+
derivative work under copyright law: that is to say, a work containing the
|
68 |
+
Program or a portion of it, either verbatim or with modifications and/or
|
69 |
+
translated into another language. (Hereinafter, translation is included without
|
70 |
+
limitation in the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not covered by
|
73 |
+
this License; they are outside its scope. The act of running the Program is not
|
74 |
+
restricted, and the output from the Program is covered only if its contents
|
75 |
+
constitute a work based on the Program (independent of having been made by
|
76 |
+
running the Program). Whether that is true depends on what the Program does.
|
77 |
+
|
78 |
+
**1.** You may copy and distribute verbatim copies of the Program's source code
|
79 |
+
as you receive it, in any medium, provided that you conspicuously and
|
80 |
+
appropriately publish on each copy an appropriate copyright notice and
|
81 |
+
disclaimer of warranty; keep intact all the notices that refer to this License
|
82 |
+
and to the absence of any warranty; and give any other recipients of the Program
|
83 |
+
a copy of this License along with the Program.
|
84 |
+
|
85 |
+
You may charge a fee for the physical act of transferring a copy, and you may at
|
86 |
+
your option offer warranty protection in exchange for a fee.
|
87 |
+
|
88 |
+
**2.** You may modify your copy or copies of the Program or any portion of it,
|
89 |
+
thus forming a work based on the Program, and copy and distribute such
|
90 |
+
modifications or work under the terms of Section 1 above, provided that you also
|
91 |
+
meet all of these conditions:
|
92 |
+
|
93 |
+
* **a)** You must cause the modified files to carry prominent notices stating
|
94 |
+
that you changed the files and the date of any change.
|
95 |
+
|
96 |
+
* **b)** You must cause any work that you distribute or publish, that in whole
|
97 |
+
or in part contains or is derived from the Program or any part thereof, to
|
98 |
+
be licensed as a whole at no charge to all third parties under the terms of
|
99 |
+
this License.
|
100 |
+
|
101 |
+
* **c)** If the modified program normally reads commands interactively when
|
102 |
+
run, you must cause it, when started running for such interactive use in the
|
103 |
+
most ordinary way, to print or display an announcement including an
|
104 |
+
appropriate copyright notice and a notice that there is no warranty (or
|
105 |
+
else, saying that you provide a warranty) and that users may redistribute
|
106 |
+
the program under these conditions, and telling the user how to view a copy
|
107 |
+
of this License. (Exception: if the Program itself is interactive but does
|
108 |
+
not normally print such an announcement, your work based on the Program is
|
109 |
+
not required to print an announcement.)
|
110 |
+
|
111 |
+
These requirements apply to the modified work as a whole. If identifiable
|
112 |
+
sections of that work are not derived from the Program, and can be reasonably
|
113 |
+
considered independent and separate works in themselves, then this License, and
|
114 |
+
its terms, do not apply to those sections when you distribute them as separate
|
115 |
+
works. But when you distribute the same sections as part of a whole which is a
|
116 |
+
work based on the Program, the distribution of the whole must be on the terms of
|
117 |
+
this License, whose permissions for other licensees extend to the entire whole,
|
118 |
+
and thus to each and every part regardless of who wrote it.
|
119 |
+
|
120 |
+
Thus, it is not the intent of this section to claim rights or contest your
|
121 |
+
rights to work written entirely by you; rather, the intent is to exercise the
|
122 |
+
right to control the distribution of derivative or collective works based on the
|
123 |
+
Program.
|
124 |
+
|
125 |
+
In addition, mere aggregation of another work not based on the Program with the
|
126 |
+
Program (or with a work based on the Program) on a volume of a storage or
|
127 |
+
distribution medium does not bring the other work under the scope of this
|
128 |
+
License.
|
129 |
+
|
130 |
+
**3.** You may copy and distribute the Program (or a work based on it, under
|
131 |
+
Section 2) in object code or executable form under the terms of Sections 1 and 2
|
132 |
+
above provided that you also do one of the following:
|
133 |
+
|
134 |
+
* **a)** Accompany it with the complete corresponding machine-readable source
|
135 |
+
code, which must be distributed under the terms of Sections 1 and 2 above on
|
136 |
+
a medium customarily used for software interchange; or,
|
137 |
+
|
138 |
+
* **b)** Accompany it with a written offer, valid for at least three years, to
|
139 |
+
give any third party, for a charge no more than your cost of physically
|
140 |
+
performing source distribution, a complete machine-readable copy of the
|
141 |
+
corresponding source code, to be distributed under the terms of Sections 1
|
142 |
+
and 2 above on a medium customarily used for software interchange; or,
|
143 |
+
|
144 |
+
* **c)** Accompany it with the information you received as to the offer to
|
145 |
+
distribute corresponding source code. (This alternative is allowed only for
|
146 |
+
noncommercial distribution and only if you received the program in object
|
147 |
+
code or executable form with such an offer, in accord with Subsection b
|
148 |
+
above.)
|
149 |
+
|
150 |
+
The source code for a work means the preferred form of the work for making
|
151 |
+
modifications to it. For an executable work, complete source code means all the
|
152 |
+
source code for all modules it contains, plus any associated interface
|
153 |
+
definition files, plus the scripts used to control compilation and installation
|
154 |
+
of the executable. However, as a special exception, the source code distributed
|
155 |
+
need not include anything that is normally distributed (in either source or
|
156 |
+
binary form) with the major components (compiler, kernel, and so on) of the
|
157 |
+
operating system on which the executable runs, unless that component itself
|
158 |
+
accompanies the executable.
|
159 |
+
|
160 |
+
If distribution of executable or object code is made by offering access to copy
|
161 |
+
from a designated place, then offering equivalent access to copy the source code
|
162 |
+
from the same place counts as distribution of the source code, even though third
|
163 |
+
parties are not compelled to copy the source along with the object code.
|
164 |
+
|
165 |
+
**4.** You may not copy, modify, sublicense, or distribute the Program except as
|
166 |
+
expressly provided under this License. Any attempt otherwise to copy, modify,
|
167 |
+
sublicense or distribute the Program is void, and will automatically terminate
|
168 |
+
your rights under this License. However, parties who have received copies, or
|
169 |
+
rights, from you under this License will not have their licenses terminated so
|
170 |
+
long as such parties remain in full compliance.
|
171 |
+
|
172 |
+
**5.** You are not required to accept this License, since you have not signed
|
173 |
+
it. However, nothing else grants you permission to modify or distribute the
|
174 |
+
Program or its derivative works. These actions are prohibited by law if you do
|
175 |
+
not accept this License. Therefore, by modifying or distributing the Program (or
|
176 |
+
any work based on the Program), you indicate your acceptance of this License to
|
177 |
+
do so, and all its terms and conditions for copying, distributing or modifying
|
178 |
+
the Program or works based on it.
|
179 |
+
|
180 |
+
**6.** Each time you redistribute the Program (or any work based on the
|
181 |
+
Program), the recipient automatically receives a license from the original
|
182 |
+
licensor to copy, distribute or modify the Program subject to these terms and
|
183 |
+
conditions. You may not impose any further restrictions on the recipients'
|
184 |
+
exercise of the rights granted herein. You are not responsible for enforcing
|
185 |
+
compliance by third parties to this License.
|
186 |
+
|
187 |
+
**7.** If, as a consequence of a court judgment or allegation of patent
|
188 |
+
infringement or for any other reason (not limited to patent issues), conditions
|
189 |
+
are imposed on you (whether by court order, agreement or otherwise) that
|
190 |
+
contradict the conditions of this License, they do not excuse you from the
|
191 |
+
conditions of this License. If you cannot distribute so as to satisfy
|
192 |
+
simultaneously your obligations under this License and any other pertinent
|
193 |
+
obligations, then as a consequence you may not distribute the Program at all.
|
194 |
+
For example, if a patent license would not permit royalty-free redistribution of
|
195 |
+
the Program by all those who receive copies directly or indirectly through you,
|
196 |
+
then the only way you could satisfy both it and this License would be to refrain
|
197 |
+
entirely from distribution of the Program.
|
198 |
+
|
199 |
+
If any portion of this section is held invalid or unenforceable under any
|
200 |
+
particular circumstance, the balance of the section is intended to apply and the
|
201 |
+
section as a whole is intended to apply in other circumstances.
|
202 |
+
|
203 |
+
It is not the purpose of this section to induce you to infringe any patents or
|
204 |
+
other property right claims or to contest validity of any such claims; this
|
205 |
+
section has the sole purpose of protecting the integrity of the free software
|
206 |
+
distribution system, which is implemented by public license practices. Many
|
207 |
+
people have made generous contributions to the wide range of software
|
208 |
+
distributed through that system in reliance on consistent application of that
|
209 |
+
system; it is up to the author/donor to decide if he or she is willing to
|
210 |
+
distribute software through any other system and a licensee cannot impose that
|
211 |
+
choice.
|
212 |
+
|
213 |
+
This section is intended to make thoroughly clear what is believed to be a
|
214 |
+
consequence of the rest of this License.
|
215 |
+
|
216 |
+
**8.** If the distribution and/or use of the Program is restricted in certain
|
217 |
+
countries either by patents or by copyrighted interfaces, the original copyright
|
218 |
+
holder who places the Program under this License may add an explicit
|
219 |
+
geographical distribution limitation excluding those countries, so that
|
220 |
+
distribution is permitted only in or among countries not thus excluded. In such
|
221 |
+
case, this License incorporates the limitation as if written in the body of this
|
222 |
+
License.
|
223 |
+
|
224 |
+
**9.** The Free Software Foundation may publish revised and/or new versions of
|
225 |
+
the General Public License from time to time. Such new versions will be similar
|
226 |
+
in spirit to the present version, but may differ in detail to address new
|
227 |
+
problems or concerns.
|
228 |
+
|
229 |
+
Each version is given a distinguishing version number. If the Program specifies
|
230 |
+
a version number of this License which applies to it and "any later version",
|
231 |
+
you have the option of following the terms and conditions either of that version
|
232 |
+
or of any later version published by the Free Software Foundation. If the
|
233 |
+
Program does not specify a version number of this License, you may choose any
|
234 |
+
version ever published by the Free Software Foundation.
|
235 |
+
|
236 |
+
**10.** If you wish to incorporate parts of the Program into other free programs
|
237 |
+
whose distribution conditions are different, write to the author to ask for
|
238 |
+
permission. For software which is copyrighted by the Free Software Foundation,
|
239 |
+
write to the Free Software Foundation; we sometimes make exceptions for this.
|
240 |
+
Our decision will be guided by the two goals of preserving the free status of
|
241 |
+
all derivatives of our free software and of promoting the sharing and reuse of
|
242 |
+
software generally.
|
243 |
+
|
244 |
+
|
245 |
+
No Warranty
|
246 |
+
-----------
|
247 |
+
|
248 |
+
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
249 |
+
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
250 |
+
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
251 |
+
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
252 |
+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
253 |
+
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
254 |
+
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
255 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
256 |
+
|
257 |
+
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
258 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
259 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
260 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
261 |
+
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
262 |
+
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
263 |
+
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
264 |
+
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
265 |
+
END OF TERMS AND CONDITIONS
|
266 |
+
---------------------------------------------------------------
|
267 |
+
How to Apply These Terms to Your New Programs
|
268 |
+
|
269 |
+
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
270 |
+
|
271 |
+
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
272 |
+
|
273 |
+
one line to give the program's name and an idea of what it does.
|
274 |
+
Copyright (C) yyyy name of author
|
275 |
+
|
276 |
+
This program is free software; you can redistribute it and/or
|
277 |
+
modify it under the terms of the GNU General Public License
|
278 |
+
as published by the Free Software Foundation; either version 2
|
279 |
+
of the License, or (at your option) any later version.
|
280 |
+
|
281 |
+
This program is distributed in the hope that it will be useful,
|
282 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
283 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
284 |
+
GNU General Public License for more details.
|
285 |
+
|
286 |
+
You should have received a copy of the GNU General Public License
|
287 |
+
along with this program; if not, write to the Free Software
|
288 |
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
289 |
+
|
290 |
+
Also add information on how to contact you by electronic and paper mail.
|
291 |
+
|
292 |
+
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
293 |
+
|
294 |
+
Gnomovision version 69, Copyright (C) year name of author
|
295 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
|
296 |
+
type `show w'. This is free software, and you are welcome
|
297 |
+
to redistribute it under certain conditions; type `show c'
|
298 |
+
for details.
|
299 |
+
|
300 |
+
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
301 |
+
|
302 |
+
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
303 |
+
|
304 |
+
Yoyodyne, Inc., hereby disclaims all copyright
|
305 |
+
interest in the program `Gnomovision'
|
306 |
+
(which makes passes at compilers) written
|
307 |
+
by James Hacker.
|
308 |
+
|
309 |
+
signature of Ty Coon, 1 April 1989
|
310 |
+
Ty Coon, President of Vice
|
311 |
+
|
312 |
+
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
|
vendor/overclokk/minimum-requirements/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Minimum requirements for WordPress Themes or Plugins (Beta Version)
|
2 |
+
Check the minimum requirements for your WordPress theme or plugin
|
3 |
+
|
4 |
+
## Installation
|
5 |
+
To install simply require the package in the `composer.json` file like
|
6 |
+
|
7 |
+
```json
|
8 |
+
"require":
|
9 |
+
{
|
10 |
+
"overclokk/minimum-requirements": "*"
|
11 |
+
}
|
12 |
+
```
|
13 |
+
|
14 |
+
and then use `composer install` or `composer update` to fetch the package.
|
15 |
+
|
16 |
+
### CLI
|
17 |
+
Or simply run
|
18 |
+
```shell
|
19 |
+
composer require overclokk/minimum-requirements
|
20 |
+
```
|
21 |
+
Or
|
22 |
+
```shell
|
23 |
+
php composer.phar require overclokk/minimum-requirements
|
24 |
+
```
|
25 |
+
|
26 |
+
## Example
|
27 |
+
|
28 |
+
```php
|
29 |
+
/**
|
30 |
+
* Require minimum-requirements class to load minimum compatibility theme/plugin
|
31 |
+
*/
|
32 |
+
require( YOUR_PLUGIN_PATH . 'minimum-requirements.php' );
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Instantiate the class
|
36 |
+
*
|
37 |
+
* @param string $php_ver The minimum PHP version.
|
38 |
+
* @param string $wp_ver The minimum WP version.
|
39 |
+
* @param string $name The name of the theme/plugin to check.
|
40 |
+
* @param array $plugins Required plugins format plugin_path/plugin_name.
|
41 |
+
*
|
42 |
+
* @var Minimum_Requirements
|
43 |
+
*/
|
44 |
+
$requirements = new Minimum_Requirements( '5.3', '3.5', 'YOUR PLUGIN NAME', array( 'plugin-a', 'plugin-b' ) );
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Check compatibility on install
|
48 |
+
* If is not compatible on install print an admin_notice
|
49 |
+
*/
|
50 |
+
register_activation_hook( __FILE__, array( $requirements, 'check_compatibility_on_install' ) );
|
51 |
+
|
52 |
+
/**
|
53 |
+
* If it is already installed and activated check if example new version is compatible, if is not don't load plugin code and prin admin_notice
|
54 |
+
* This part need more test
|
55 |
+
*/
|
56 |
+
if ( ! $requirements->is_compatible_version() ) {
|
57 |
+
|
58 |
+
add_action( 'admin_notices', array( $requirements, 'load_plugin_admin_notices' ) );
|
59 |
+
return;
|
60 |
+
|
61 |
+
}
|
62 |
+
/**
|
63 |
+
* If it is compatible load the rest of the theme/plugin code
|
64 |
+
*/
|
65 |
+
// Your stuff here
|
66 |
+
```
|
67 |
+
|
68 |
+
## Credits
|
69 |
+
|
70 |
+
The original code (only the part of cheking requirements) comes from [SZ-Google](https://wordpress.org/plugins/sz-google/) of Massimo della Rovere with my personal improvements and a little piece of code from [WordPress-Plugin-Boilerplate-Powered
|
71 |
+
](https://github.com/Mte90/WordPress-Plugin-Boilerplate-Powered) of Mte90 (the part that check the plugin needed).
|
72 |
+
|
73 |
+
Thanks to [Luca Tumedei](http://theaveragedev.com/) for his help for improving the code and writing test with [wp-browser](https://github.com/lucatume/wp-browser)
|
vendor/overclokk/minimum-requirements/codeception.dist.yml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
actor: Tester
|
2 |
+
paths:
|
3 |
+
tests: tests
|
4 |
+
log: tests/_output
|
5 |
+
data: tests/_data
|
6 |
+
helpers: tests/_support
|
7 |
+
settings:
|
8 |
+
bootstrap: _bootstrap.php
|
9 |
+
colors: true
|
10 |
+
memory_limit: 1024M
|
11 |
+
modules:
|
12 |
+
config:
|
13 |
+
Db:
|
14 |
+
dsn: 'mysql:host=127.0.0.1;dbname=wp-tests'
|
15 |
+
user: root
|
16 |
+
password: root
|
17 |
+
dump: tests/_data/dump.sql
|
18 |
+
WPBrowser:
|
19 |
+
url: 'http://wp.dev'
|
20 |
+
adminUsername: admin
|
21 |
+
adminPassword: admin
|
22 |
+
adminUrl: /wp-admin
|
23 |
+
WPDb:
|
24 |
+
dsn: 'mysql:host=127.0.0.1;dbname=wp-tests'
|
25 |
+
user: root
|
26 |
+
password: root
|
27 |
+
dump: tests/_data/dump.sql
|
28 |
+
populate: true
|
29 |
+
cleanup: true
|
30 |
+
url: 'http://wp.dev'
|
31 |
+
tablePrefix: wp_
|
32 |
+
WPLoader:
|
33 |
+
wpRootFolder: /Users/Luca/Sites/wp
|
34 |
+
dbName: wp-tests
|
35 |
+
dbHost: 127.0.0.1
|
36 |
+
dbUser: root
|
37 |
+
dbPassword: root
|
38 |
+
wpDebug: true
|
39 |
+
dbCharset: utf8
|
40 |
+
dbCollate: ''
|
41 |
+
tablePrefix: wpmr_
|
42 |
+
domain: wp.dev
|
43 |
+
adminEmail: admin@wp.dev
|
44 |
+
title: 'WP Minimum Requirements Tests'
|
45 |
+
phpBinary: php
|
46 |
+
language: ''
|
47 |
+
plugins:
|
48 |
+
- minimum-requirements/minimum-requirements.php
|
49 |
+
activatePlugins:
|
50 |
+
- minimum-requirements/minimum-requirements.php
|
51 |
+
WPWebDriver:
|
52 |
+
url: 'http://wp.dev'
|
53 |
+
browser: phantomjs
|
54 |
+
port: 4444
|
55 |
+
restart: true
|
56 |
+
wait: 2
|
57 |
+
adminUsername: admin
|
58 |
+
adminPassword: admin
|
59 |
+
adminUrl: /wp-admin
|
vendor/overclokk/minimum-requirements/composer.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "overclokk/minimum-requirements",
|
3 |
+
"description": "Check the minimum requirements for your WordPress theme or plugin",
|
4 |
+
"keywords": ["wordpress", "plugin", "wordpress plugin"],
|
5 |
+
"homepage": "https://github.com/overclokk/minimum-requirements",
|
6 |
+
"type": "wordpress-plugin",
|
7 |
+
"require": {
|
8 |
+
"php": ">=5.2"
|
9 |
+
},
|
10 |
+
"license": "GPL-2.0+",
|
11 |
+
"authors": [
|
12 |
+
{
|
13 |
+
"name": "overclokk",
|
14 |
+
"email": "info@overclokk.net",
|
15 |
+
"homepage": "http://www.overclokk.net",
|
16 |
+
"role": "Developer"
|
17 |
+
}
|
18 |
+
],
|
19 |
+
"require-dev": {
|
20 |
+
"lucatume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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"hash": "ea8393b36c060970d95b66e017b09b83",
|
8 |
+
"content-hash": "980bdf25ebb43b311becaa0970c1e89b",
|
9 |
+
"packages": [],
|
10 |
+
"packages-dev": [
|
11 |
+
{
|
12 |
+
"name": "antecedent/patchwork",
|
13 |
+
"version": "1.3.5",
|
14 |
+
"source": {
|
15 |
+
"type": "git",
|
16 |
+
"url": "https://github.com/antecedent/patchwork.git",
|
17 |
+
"reference": "908a233f8a374f02b02ff5e3d6ba687ca506d57d"
|
18 |
+
},
|
19 |
+
"dist": {
|
20 |
+
"type": "zip",
|
21 |
+
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/908a233f8a374f02b02ff5e3d6ba687ca506d57d",
|
22 |
+
"reference": "908a233f8a374f02b02ff5e3d6ba687ca506d57d",
|
23 |
+
"shasum": ""
|
24 |
+
},
|
25 |
+
"require": {
|
26 |
+
"php": ">=5.3.0"
|
27 |
+
},
|
28 |
+
"type": "library",
|
29 |
+
"notification-url": "https://packagist.org/downloads/",
|
30 |
+
"license": [
|
31 |
+
"MIT"
|
32 |
+
],
|
33 |
+
"authors": [
|
34 |
+
{
|
35 |
+
"name": "Ignas Rudaitis",
|
36 |
+
"email": "ignas.rudaitis@gmail.com"
|
37 |
+
}
|
38 |
+
],
|
39 |
+
"description": "A pure PHP library that lets you redefine user-defined functions at runtime.",
|
40 |
+
"homepage": "http://antecedent.github.io/patchwork/",
|
41 |
+
"keywords": [
|
42 |
+
"aop",
|
43 |
+
"aspect",
|
44 |
+
"interception",
|
45 |
+
"monkeypatching",
|
46 |
+
"redefinition",
|
47 |
+
"runkit",
|
48 |
+
"testing"
|
49 |
+
],
|
50 |
+
"time": "2015-10-09 18:20:06"
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"name": "bacon/bacon-string-utils",
|
54 |
+
"version": "1.0.3",
|
55 |
+
"source": {
|
56 |
+
"type": "git",
|
57 |
+
"url": "https://github.com/Bacon/BaconStringUtils.git",
|
58 |
+
"reference": "3810c78cdfe895cca9d6a2eea7712cb643186d05"
|
59 |
+
},
|
60 |
+
"dist": {
|
61 |
+
"type": "zip",
|
62 |
+
"url": "https://api.github.com/repos/Bacon/BaconStringUtils/zipball/3810c78cdfe895cca9d6a2eea7712cb643186d05",
|
63 |
+
"reference": "3810c78cdfe895cca9d6a2eea7712cb643186d05",
|
64 |
+
"shasum": ""
|
65 |
+
},
|
66 |
+
"require": {
|
67 |
+
"php": ">=5.3.3"
|
68 |
+
},
|
69 |
+
"suggest": {
|
70 |
+
"zendframework/zend-filter": "To use the Slugifier as a Zend\\Filter instance"
|
71 |
+
},
|
72 |
+
"type": "library",
|
73 |
+
"autoload": {
|
74 |
+
"psr-0": {
|
75 |
+
"BaconStringUtils": "src/"
|
76 |
+
},
|
77 |
+
"classmap": [
|
78 |
+
"./Module.php"
|
79 |
+
]
|
80 |
+
},
|
81 |
+
"notification-url": "https://packagist.org/downloads/",
|
82 |
+
"license": [
|
83 |
+
"BSD-2-Clause"
|
84 |
+
],
|
85 |
+
"authors": [
|
86 |
+
{
|
87 |
+
"name": "Ben Scholzen 'DASPRiD'",
|
88 |
+
"email": "mail@dasprids.de",
|
89 |
+
"homepage": "http://www.dasprids.de",
|
90 |
+
"role": "Developer"
|
91 |
+
}
|
92 |
+
],
|
93 |
+
"description": "BaconStringUtils contain utitilies to work with strings.",
|
94 |
+
"homepage": "https://github.com/Bacon/BaconStringUtils",
|
95 |
+
"time": "2013-10-11 13:59:45"
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"name": "codeception/codeception",
|
99 |
+
"version": "2.1.7",
|
100 |
+
"source": {
|
101 |
+
"type": "git",
|
102 |
+
"url": "https://github.com/Codeception/Codeception.git",
|
103 |
+
"reference": "65971b0dee4972710365b6102154cd412a9bf7b1"
|
104 |
+
},
|
105 |
+
"dist": {
|
106 |
+
"type": "zip",
|
107 |
+
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/65971b0dee4972710365b6102154cd412a9bf7b1",
|
108 |
+
"reference": "65971b0dee4972710365b6102154cd412a9bf7b1",
|
109 |
+
"shasum": ""
|
110 |
+
},
|
111 |
+
"require": {
|
112 |
+
"ext-json": "*",
|
113 |
+
"ext-mbstring": "*",
|
114 |
+
"facebook/webdriver": ">=1.0.1 <2.0",
|
115 |
+
"guzzlehttp/guzzle": ">=4.1.4 <7.0",
|
116 |
+
"guzzlehttp/psr7": "~1.0",
|
117 |
+
"php": ">=5.4.0 <8.0",
|
118 |
+
"phpunit/php-code-coverage": ">=2.1.3",
|
119 |
+
"phpunit/phpunit": ">4.8.20 <6.0",
|
120 |
+
"symfony/browser-kit": ">=2.5 <3.1",
|
121 |
+
"symfony/console": ">=2.5 <3.1",
|
122 |
+
"symfony/css-selector": ">=2.5 <3.1",
|
123 |
+
"symfony/dom-crawler": ">=2.5 <3.1",
|
124 |
+
"symfony/event-dispatcher": ">=2.5 <3.1",
|
125 |
+
"symfony/finder": ">=2.5 <3.1",
|
126 |
+
"symfony/yaml": ">=2.5 <3.1"
|
127 |
+
},
|
128 |
+
"require-dev": {
|
129 |
+
"codeception/specify": "~0.3",
|
130 |
+
"facebook/php-sdk-v4": "~5.0",
|
131 |
+
"flow/jsonpath": "~0.2",
|
132 |
+
"monolog/monolog": "~1.8",
|
133 |
+
"pda/pheanstalk": "~2.0",
|
134 |
+
"php-amqplib/php-amqplib": "~2.4"
|
135 |
+
},
|
136 |
+
"suggest": {
|
137 |
+
"codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests",
|
138 |
+
"codeception/specify": "BDD-style code blocks",
|
139 |
+
"codeception/verify": "BDD-style assertions",
|
140 |
+
"monolog/monolog": "Log test steps",
|
141 |
+
"phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module."
|
142 |
+
},
|
143 |
+
"bin": [
|
144 |
+
"codecept"
|
145 |
+
],
|
146 |
+
"type": "library",
|
147 |
+
"extra": {
|
148 |
+
"branch-alias": []
|
149 |
+
},
|
150 |
+
"autoload": {
|
151 |
+
"psr-4": {
|
152 |
+
"Codeception\\": "src\\Codeception",
|
153 |
+
"Codeception\\Extension\\": "ext"
|
154 |
+
}
|
155 |
+
},
|
156 |
+
"notification-url": "https://packagist.org/downloads/",
|
157 |
+
"license": [
|
158 |
+
"MIT"
|
159 |
+
],
|
160 |
+
"authors": [
|
161 |
+
{
|
162 |
+
"name": "Michael Bodnarchuk",
|
163 |
+
"email": "davert@mail.ua",
|
164 |
+
"homepage": "http://codegyre.com"
|
165 |
+
}
|
166 |
+
],
|
167 |
+
"description": "BDD-style testing framework",
|
168 |
+
"homepage": "http://codeception.com/",
|
169 |
+
"keywords": [
|
170 |
+
"BDD",
|
171 |
+
"TDD",
|
172 |
+
"acceptance testing",
|
173 |
+
"functional testing",
|
174 |
+
"unit testing"
|
175 |
+
],
|
176 |
+
"time": "2016-03-12 01:15:25"
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"name": "doctrine/inflector",
|
180 |
+
"version": "v1.1.0",
|
181 |
+
"source": {
|
182 |
+
"type": "git",
|
183 |
+
"url": "https://github.com/doctrine/inflector.git",
|
184 |
+
"reference": "90b2128806bfde671b6952ab8bea493942c1fdae"
|
185 |
+
},
|
186 |
+
"dist": {
|
187 |
+
"type": "zip",
|
188 |
+
"url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae",
|
189 |
+
"reference": "90b2128806bfde671b6952ab8bea493942c1fdae",
|
190 |
+
"shasum": ""
|
191 |
+
},
|
192 |
+
"require": {
|
193 |
+
"php": ">=5.3.2"
|
194 |
+
},
|
195 |
+
"require-dev": {
|
196 |
+
"phpunit/phpunit": "4.*"
|
197 |
+
},
|
198 |
+
"type": "library",
|
199 |
+
"extra": {
|
200 |
+
"branch-alias": {
|
201 |
+
"dev-master": "1.1.x-dev"
|
202 |
+
}
|
203 |
+
},
|
204 |
+
"autoload": {
|
205 |
+
"psr-0": {
|
206 |
+
"Doctrine\\Common\\Inflector\\": "lib/"
|
207 |
+
}
|
208 |
+
},
|
209 |
+
"notification-url": "https://packagist.org/downloads/",
|
210 |
+
"license": [
|
211 |
+
"MIT"
|
212 |
+
],
|
213 |
+
"authors": [
|
214 |
+
{
|
215 |
+
"name": "Roman Borschel",
|
216 |
+
"email": "roman@code-factory.org"
|
217 |
+
},
|
218 |
+
{
|
219 |
+
"name": "Benjamin Eberlei",
|
220 |
+
"email": "kontakt@beberlei.de"
|
221 |
+
},
|
222 |
+
{
|
223 |
+
"name": "Guilherme Blanco",
|
224 |
+
"email": "guilhermeblanco@gmail.com"
|
225 |
+
},
|
226 |
+
{
|
227 |
+
"name": "Jonathan Wage",
|
228 |
+
"email": "jonwage@gmail.com"
|
229 |
+
},
|
230 |
+
{
|
231 |
+
"name": "Johannes Schmitt",
|
232 |
+
"email": "schmittjoh@gmail.com"
|
233 |
+
}
|
234 |
+
],
|
235 |
+
"description": "Common String Manipulations with regard to casing and singular/plural rules.",
|
236 |
+
"homepage": "http://www.doctrine-project.org",
|
237 |
+
"keywords": [
|
238 |
+
"inflection",
|
239 |
+
"pluralize",
|
240 |
+
"singularize",
|
241 |
+
"string"
|
242 |
+
],
|
243 |
+
"time": "2015-11-06 14:35:42"
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"name": "doctrine/instantiator",
|
247 |
+
"version": "1.0.5",
|
248 |
+
"source": {
|
249 |
+
"type": "git",
|
250 |
+
"url": "https://github.com/doctrine/instantiator.git",
|
251 |
+
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
252 |
+
},
|
253 |
+
"dist": {
|
254 |
+
"type": "zip",
|
255 |
+
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
256 |
+
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
257 |
+
"shasum": ""
|
258 |
+
},
|
259 |
+
"require": {
|
260 |
+
"php": ">=5.3,<8.0-DEV"
|
261 |
+
},
|
262 |
+
"require-dev": {
|
263 |
+
"athletic/athletic": "~0.1.8",
|
264 |
+
"ext-pdo": "*",
|
265 |
+
"ext-phar": "*",
|
266 |
+
"phpunit/phpunit": "~4.0",
|
267 |
+
"squizlabs/php_codesniffer": "~2.0"
|
268 |
+
},
|
269 |
+
"type": "library",
|
270 |
+
"extra": {
|
271 |
+
"branch-alias": {
|
272 |
+
"dev-master": "1.0.x-dev"
|
273 |
+
}
|
274 |
+
},
|
275 |
+
"autoload": {
|
276 |
+
"psr-4": {
|
277 |
+
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
278 |
+
}
|
279 |
+
},
|
280 |
+
"notification-url": "https://packagist.org/downloads/",
|
281 |
+
"license": [
|
282 |
+
"MIT"
|
283 |
+
],
|
284 |
+
"authors": [
|
285 |
+
{
|
286 |
+
"name": "Marco Pivetta",
|
287 |
+
"email": "ocramius@gmail.com",
|
288 |
+
"homepage": "http://ocramius.github.com/"
|
289 |
+
}
|
290 |
+
],
|
291 |
+
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
292 |
+
"homepage": "https://github.com/doctrine/instantiator",
|
293 |
+
"keywords": [
|
294 |
+
"constructor",
|
295 |
+
"instantiate"
|
296 |
+
],
|
297 |
+
"time": "2015-06-14 21:17:01"
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"name": "facebook/webdriver",
|
301 |
+
"version": "1.1.1",
|
302 |
+
"source": {
|
303 |
+
"type": "git",
|
304 |
+
"url": "https://github.com/facebook/php-webdriver.git",
|
305 |
+
"reference": "1c98108ba3eb435b681655764de11502a0653705"
|
306 |
+
},
|
307 |
+
"dist": {
|
308 |
+
"type": "zip",
|
309 |
+
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705",
|
310 |
+
"reference": "1c98108ba3eb435b681655764de11502a0653705",
|
311 |
+
"shasum": ""
|
312 |
+
},
|
313 |
+
"require": {
|
314 |
+
"php": ">=5.3.19"
|
315 |
+
},
|
316 |
+
"require-dev": {
|
317 |
+
"phpunit/phpunit": "4.6.*"
|
318 |
+
},
|
319 |
+
"suggest": {
|
320 |
+
"phpdocumentor/phpdocumentor": "2.*"
|
321 |
+
},
|
322 |
+
"type": "library",
|
323 |
+
"autoload": {
|
324 |
+
"psr-4": {
|
325 |
+
"Facebook\\WebDriver\\": "lib/"
|
326 |
+
}
|
327 |
+
},
|
328 |
+
"notification-url": "https://packagist.org/downloads/",
|
329 |
+
"license": [
|
330 |
+
"Apache-2.0"
|
331 |
+
],
|
332 |
+
"description": "A PHP client for WebDriver",
|
333 |
+
"homepage": "https://github.com/facebook/php-webdriver",
|
334 |
+
"keywords": [
|
335 |
+
"facebook",
|
336 |
+
"php",
|
337 |
+
"selenium",
|
338 |
+
"webdriver"
|
339 |
+
],
|
340 |
+
"time": "2015-12-31 15:58:49"
|
341 |
+
},
|
342 |
+
{
|
343 |
+
"name": "guzzlehttp/guzzle",
|
344 |
+
"version": "6.1.1",
|
345 |
+
"source": {
|
346 |
+
"type": "git",
|
347 |
+
"url": "https://github.com/guzzle/guzzle.git",
|
348 |
+
"reference": "c6851d6e48f63b69357cbfa55bca116448140e0c"
|
349 |
+
},
|
350 |
+
"dist": {
|
351 |
+
"type": "zip",
|
352 |
+
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/c6851d6e48f63b69357cbfa55bca116448140e0c",
|
353 |
+
"reference": "c6851d6e48f63b69357cbfa55bca116448140e0c",
|
354 |
+
"shasum": ""
|
355 |
+
},
|
356 |
+
"require": {
|
357 |
+
"guzzlehttp/promises": "~1.0",
|
358 |
+
"guzzlehttp/psr7": "~1.1",
|
359 |
+
"php": ">=5.5.0"
|
360 |
+
},
|
361 |
+
"require-dev": {
|
362 |
+
"ext-curl": "*",
|
363 |
+
"phpunit/phpunit": "~4.0",
|
364 |
+
"psr/log": "~1.0"
|
365 |
+
},
|
366 |
+
"type": "library",
|
367 |
+
"extra": {
|
368 |
+
"branch-alias": {
|
369 |
+
"dev-master": "6.1-dev"
|
370 |
+
}
|
371 |
+
},
|
372 |
+
"autoload": {
|
373 |
+
"files": [
|
374 |
+
"src/functions_include.php"
|
375 |
+
],
|
376 |
+
"psr-4": {
|
377 |
+
"GuzzleHttp\\": "src/"
|
378 |
+
}
|
379 |
+
},
|
380 |
+
"notification-url": "https://packagist.org/downloads/",
|
381 |
+
"license": [
|
382 |
+
"MIT"
|
383 |
+
],
|
384 |
+
"authors": [
|
385 |
+
{
|
386 |
+
"name": "Michael Dowling",
|
387 |
+
"email": "mtdowling@gmail.com",
|
388 |
+
"homepage": "https://github.com/mtdowling"
|
389 |
+
}
|
390 |
+
],
|
391 |
+
"description": "Guzzle is a PHP HTTP client library",
|
392 |
+
"homepage": "http://guzzlephp.org/",
|
393 |
+
"keywords": [
|
394 |
+
"client",
|
395 |
+
"curl",
|
396 |
+
"framework",
|
397 |
+
"http",
|
398 |
+
"http client",
|
399 |
+
"rest",
|
400 |
+
"web service"
|
401 |
+
],
|
402 |
+
"time": "2015-11-23 00:47:50"
|
403 |
+
},
|
404 |
+
{
|
405 |
+
"name": "guzzlehttp/promises",
|
406 |
+
"version": "1.1.0",
|
407 |
+
"source": {
|
408 |
+
"type": "git",
|
409 |
+
"url": "https://github.com/guzzle/promises.git",
|
410 |
+
"reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8"
|
411 |
+
},
|
412 |
+
"dist": {
|
413 |
+
"type": "zip",
|
414 |
+
"url": "https://api.github.com/repos/guzzle/promises/zipball/bb9024c526b22f3fe6ae55a561fd70653d470aa8",
|
415 |
+
"reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8",
|
416 |
+
"shasum": ""
|
417 |
+
},
|
418 |
+
"require": {
|
419 |
+
"php": ">=5.5.0"
|
420 |
+
},
|
421 |
+
"require-dev": {
|
422 |
+
"phpunit/phpunit": "~4.0"
|
423 |
+
},
|
424 |
+
"type": "library",
|
425 |
+
"extra": {
|
426 |
+
"branch-alias": {
|
427 |
+
"dev-master": "1.0-dev"
|
428 |
+
}
|
429 |
+
},
|
430 |
+
"autoload": {
|
431 |
+
"psr-4": {
|
432 |
+
"GuzzleHttp\\Promise\\": "src/"
|
433 |
+
},
|
434 |
+
"files": [
|
435 |
+
"src/functions_include.php"
|
436 |
+
]
|
437 |
+
},
|
438 |
+
"notification-url": "https://packagist.org/downloads/",
|
439 |
+
"license": [
|
440 |
+
"MIT"
|
441 |
+
],
|
442 |
+
"authors": [
|
443 |
+
{
|
444 |
+
"name": "Michael Dowling",
|
445 |
+
"email": "mtdowling@gmail.com",
|
446 |
+
"homepage": "https://github.com/mtdowling"
|
447 |
+
}
|
448 |
+
],
|
449 |
+
"description": "Guzzle promises library",
|
450 |
+
"keywords": [
|
451 |
+
"promise"
|
452 |
+
],
|
453 |
+
"time": "2016-03-08 01:15:46"
|
454 |
+
},
|
455 |
+
{
|
456 |
+
"name": "guzzlehttp/psr7",
|
457 |
+
"version": "1.2.3",
|
458 |
+
"source": {
|
459 |
+
"type": "git",
|
460 |
+
"url": "https://github.com/guzzle/psr7.git",
|
461 |
+
"reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b"
|
462 |
+
},
|
463 |
+
"dist": {
|
464 |
+
"type": "zip",
|
465 |
+
"url": "https://api.github.com/repos/guzzle/psr7/zipball/2e89629ff057ebb49492ba08e6995d3a6a80021b",
|
466 |
+
"reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b",
|
467 |
+
"shasum": ""
|
468 |
+
},
|
469 |
+
"require": {
|
470 |
+
"php": ">=5.4.0",
|
471 |
+
"psr/http-message": "~1.0"
|
472 |
+
},
|
473 |
+
"provide": {
|
474 |
+
"psr/http-message-implementation": "1.0"
|
475 |
+
},
|
476 |
+
"require-dev": {
|
477 |
+
"phpunit/phpunit": "~4.0"
|
478 |
+
},
|
479 |
+
"type": "library",
|
480 |
+
"extra": {
|
481 |
+
"branch-alias": {
|
482 |
+
"dev-master": "1.0-dev"
|
483 |
+
}
|
484 |
+
},
|
485 |
+
"autoload": {
|
486 |
+
"psr-4": {
|
487 |
+
"GuzzleHttp\\Psr7\\": "src/"
|
488 |
+
},
|
489 |
+
"files": [
|
490 |
+
"src/functions_include.php"
|
491 |
+
]
|
492 |
+
},
|
493 |
+
"notification-url": "https://packagist.org/downloads/",
|
494 |
+
"license": [
|
495 |
+
"MIT"
|
496 |
+
],
|
497 |
+
"authors": [
|
498 |
+
{
|
499 |
+
"name": "Michael Dowling",
|
500 |
+
"email": "mtdowling@gmail.com",
|
501 |
+
"homepage": "https://github.com/mtdowling"
|
502 |
+
}
|
503 |
+
],
|
504 |
+
"description": "PSR-7 message implementation",
|
505 |
+
"keywords": [
|
506 |
+
"http",
|
507 |
+
"message",
|
508 |
+
"stream",
|
509 |
+
"uri"
|
510 |
+
],
|
511 |
+
"time": "2016-02-18 21:54:00"
|
512 |
+
},
|
513 |
+
{
|
514 |
+
"name": "hautelook/phpass",
|
515 |
+
"version": "0.3.3",
|
516 |
+
"source": {
|
517 |
+
"type": "git",
|
518 |
+
"url": "https://github.com/hautelook/phpass.git",
|
519 |
+
"reference": "9590c12bf7c92f67f646d7bf2cf6384e7292cc41"
|
520 |
+
},
|
521 |
+
"dist": {
|
522 |
+
"type": "zip",
|
523 |
+
"url": "https://api.github.com/repos/hautelook/phpass/zipball/9590c12bf7c92f67f646d7bf2cf6384e7292cc41",
|
524 |
+
"reference": "9590c12bf7c92f67f646d7bf2cf6384e7292cc41",
|
525 |
+
"shasum": ""
|
526 |
+
},
|
527 |
+
"require": {
|
528 |
+
"php": ">=5.3.3"
|
529 |
+
},
|
530 |
+
"type": "library",
|
531 |
+
"autoload": {
|
532 |
+
"psr-0": {
|
533 |
+
"Hautelook": "src/"
|
534 |
+
}
|
535 |
+
},
|
536 |
+
"notification-url": "https://packagist.org/downloads/",
|
537 |
+
"license": [
|
538 |
+
"Public Domain"
|
539 |
+
],
|
540 |
+
"authors": [
|
541 |
+
{
|
542 |
+
"name": "Solar Designer",
|
543 |
+
"email": "solar@openwall.com",
|
544 |
+
"homepage": "http://openwall.com/phpass/"
|
545 |
+
}
|
546 |
+
],
|
547 |
+
"description": "Portable PHP password hashing framework",
|
548 |
+
"homepage": "http://github.com/hautelook/phpass/",
|
549 |
+
"keywords": [
|
550 |
+
"blowfish",
|
551 |
+
"crypt",
|
552 |
+
"password",
|
553 |
+
"security"
|
554 |
+
],
|
555 |
+
"time": "2012-08-31 00:00:00"
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"name": "illuminate/contracts",
|
559 |
+
"version": "v5.2.21",
|
560 |
+
"source": {
|
561 |
+
"type": "git",
|
562 |
+
"url": "https://github.com/illuminate/contracts.git",
|
563 |
+
"reference": "eea3cf7ce90651e067a914d16383b019da45fcb5"
|
564 |
+
},
|
565 |
+
"dist": {
|
566 |
+
"type": "zip",
|
567 |
+
"url": "https://api.github.com/repos/illuminate/contracts/zipball/eea3cf7ce90651e067a914d16383b019da45fcb5",
|
568 |
+
"reference": "eea3cf7ce90651e067a914d16383b019da45fcb5",
|
569 |
+
"shasum": ""
|
570 |
+
},
|
571 |
+
"require": {
|
572 |
+
"php": ">=5.5.9"
|
573 |
+
},
|
574 |
+
"type": "library",
|
575 |
+
"extra": {
|
576 |
+
"branch-alias": {
|
577 |
+
"dev-master": "5.2-dev"
|
578 |
+
}
|
579 |
+
},
|
580 |
+
"autoload": {
|
581 |
+
"psr-4": {
|
582 |
+
"Illuminate\\Contracts\\": ""
|
583 |
+
}
|
584 |
+
},
|
585 |
+
"notification-url": "https://packagist.org/downloads/",
|
586 |
+
"license": [
|
587 |
+
"MIT"
|
588 |
+
],
|
589 |
+
"authors": [
|
590 |
+
{
|
591 |
+
"name": "Taylor Otwell",
|
592 |
+
"email": "taylorotwell@gmail.com"
|
593 |
+
}
|
594 |
+
],
|
595 |
+
"description": "The Illuminate Contracts package.",
|
596 |
+
"homepage": "http://laravel.com",
|
597 |
+
"time": "2016-02-22 09:18:57"
|
598 |
+
},
|
599 |
+
{
|
600 |
+
"name": "illuminate/support",
|
601 |
+
"version": "v5.2.21",
|
602 |
+
"source": {
|
603 |
+
"type": "git",
|
604 |
+
"url": "https://github.com/illuminate/support.git",
|
605 |
+
"reference": "6749fab3f3d38d8b15427536a8e7bbdc57497c9e"
|
606 |
+
},
|
607 |
+
"dist": {
|
608 |
+
"type": "zip",
|
609 |
+
"url": "https://api.github.com/repos/illuminate/support/zipball/6749fab3f3d38d8b15427536a8e7bbdc57497c9e",
|
610 |
+
"reference": "6749fab3f3d38d8b15427536a8e7bbdc57497c9e",
|
611 |
+
"shasum": ""
|
612 |
+
},
|
613 |
+
"require": {
|
614 |
+
"doctrine/inflector": "~1.0",
|
615 |
+
"ext-mbstring": "*",
|
616 |
+
"illuminate/contracts": "5.2.*",
|
617 |
+
"php": ">=5.5.9"
|
618 |
+
},
|
619 |
+
"suggest": {
|
620 |
+
"illuminate/filesystem": "Required to use the composer class (5.2.*).",
|
621 |
+
"jeremeamia/superclosure": "Required to be able to serialize closures (~2.2).",
|
622 |
+
"paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1).",
|
623 |
+
"symfony/polyfill-php56": "Required to use the hash_equals function on PHP 5.5 (~1.0).",
|
624 |
+
"symfony/process": "Required to use the composer class (2.8.*|3.0.*).",
|
625 |
+
"symfony/var-dumper": "Improves the dd function (2.8.*|3.0.*)."
|
626 |
+
},
|
627 |
+
"type": "library",
|
628 |
+
"extra": {
|
629 |
+
"branch-alias": {
|
630 |
+
"dev-master": "5.2-dev"
|
631 |
+
}
|
632 |
+
},
|
633 |
+
"autoload": {
|
634 |
+
"psr-4": {
|
635 |
+
"Illuminate\\Support\\": ""
|
636 |
+
},
|
637 |
+
"files": [
|
638 |
+
"helpers.php"
|
639 |
+
]
|
640 |
+
},
|
641 |
+
"notification-url": "https://packagist.org/downloads/",
|
642 |
+
"license": [
|
643 |
+
"MIT"
|
644 |
+
],
|
645 |
+
"authors": [
|
646 |
+
{
|
647 |
+
"name": "Taylor Otwell",
|
648 |
+
"email": "taylorotwell@gmail.com"
|
649 |
+
}
|
650 |
+
],
|
651 |
+
"description": "The Illuminate Support package.",
|
652 |
+
"homepage": "http://laravel.com",
|
653 |
+
"time": "2016-02-22 20:29:02"
|
654 |
+
},
|
655 |
+
{
|
656 |
+
"name": "lucatume/args",
|
657 |
+
"version": "0.1.10",
|
658 |
+
"source": {
|
659 |
+
"type": "git",
|
660 |
+
"url": "https://github.com/lucatume/args.git",
|
661 |
+
"reference": "0be8ba515ad238eb0bec6ddd1602da51c6c7171b"
|
662 |
+
},
|
663 |
+
"dist": {
|
664 |
+
"type": "zip",
|
665 |
+
"url": "https://api.github.com/repos/lucatume/args/zipball/0be8ba515ad238eb0bec6ddd1602da51c6c7171b",
|
666 |
+
"reference": "0be8ba515ad238eb0bec6ddd1602da51c6c7171b",
|
667 |
+
"shasum": ""
|
668 |
+
},
|
669 |
+
"require": {
|
670 |
+
"xrstf/composer-php52": "1.*"
|
671 |
+
},
|
672 |
+
"require-dev": {
|
673 |
+
"codeception/codeception": "*"
|
674 |
+
},
|
675 |
+
"type": "library",
|
676 |
+
"autoload": {
|
677 |
+
"psr-0": {
|
678 |
+
"Arg": "src/",
|
679 |
+
"tad_": "src/"
|
680 |
+
}
|
681 |
+
},
|
682 |
+
"notification-url": "https://packagist.org/downloads/",
|
683 |
+
"license": [
|
684 |
+
"GPL2"
|
685 |
+
],
|
686 |
+
"authors": [
|
687 |
+
{
|
688 |
+
"name": "Luca Tumedei",
|
689 |
+
"email": "luca@theaveragedev.com"
|
690 |
+
}
|
691 |
+
],
|
692 |
+
"description": "A PHP 5.2 compatible arguments handling library.",
|
693 |
+
"time": "2015-04-20 19:02:17"
|
694 |
+
},
|
695 |
+
{
|
696 |
+
"name": "lucatume/function-mocker",
|
697 |
+
"version": "1.0.4",
|
698 |
+
"source": {
|
699 |
+
"type": "git",
|
700 |
+
"url": "https://github.com/lucatume/function-mocker.git",
|
701 |
+
"reference": "f8ecf3eb786d9f18b7e35aa18f2546ef11e82103"
|
702 |
+
},
|
703 |
+
"dist": {
|
704 |
+
"type": "zip",
|
705 |
+
"url": "https://api.github.com/repos/lucatume/function-mocker/zipball/f8ecf3eb786d9f18b7e35aa18f2546ef11e82103",
|
706 |
+
"reference": "f8ecf3eb786d9f18b7e35aa18f2546ef11e82103",
|
707 |
+
"shasum": ""
|
708 |
+
},
|
709 |
+
"require": {
|
710 |
+
"antecedent/patchwork": "1.3.5",
|
711 |
+
"lucatume/args": "~0.1"
|
712 |
+
},
|
713 |
+
"require-dev": {
|
714 |
+
"phpspec/phpspec": "~2.1"
|
715 |
+
},
|
716 |
+
"type": "library",
|
717 |
+
"autoload": {
|
718 |
+
"psr-0": {
|
719 |
+
"tad\\FunctionMocker": "src"
|
720 |
+
}
|
721 |
+
},
|
722 |
+
"notification-url": "https://packagist.org/downloads/",
|
723 |
+
"license": [
|
724 |
+
"GPL-2.0+"
|
725 |
+
],
|
726 |
+
"authors": [
|
727 |
+
{
|
728 |
+
"name": "theAverageDev",
|
729 |
+
"email": "luca@theaveragedev.com"
|
730 |
+
}
|
731 |
+
],
|
732 |
+
"description": "Function mocking with Patchwork",
|
733 |
+
"time": "2016-03-16 17:50:23"
|
734 |
+
},
|
735 |
+
{
|
736 |
+
"name": "lucatume/wp-browser",
|
737 |
+
"version": "1.10.4",
|
738 |
+
"source": {
|
739 |
+
"type": "git",
|
740 |
+
"url": "https://github.com/lucatume/wp-browser.git",
|
741 |
+
"reference": "dde7f0fdc295a77d43069b9dc940465ac345cf8c"
|
742 |
+
},
|
743 |
+
"dist": {
|
744 |
+
"type": "zip",
|
745 |
+
"url": "https://api.github.com/repos/lucatume/wp-browser/zipball/dde7f0fdc295a77d43069b9dc940465ac345cf8c",
|
746 |
+
"reference": "dde7f0fdc295a77d43069b9dc940465ac345cf8c",
|
747 |
+
"shasum": ""
|
748 |
+
},
|
749 |
+
"require": {
|
750 |
+
"bacon/bacon-string-utils": "~1.0",
|
751 |
+
"codeception/codeception": "~2.0",
|
752 |
+
"mikemclin/laravel-wp-password": "~2.0.0",
|
753 |
+
"php": ">=5.4.0",
|
754 |
+
"symfony/filesystem": "^2.7",
|
755 |
+
"xamin/handlebars.php": "~0.10"
|
756 |
+
},
|
757 |
+
"require-dev": {
|
758 |
+
"codeception/codeception": "*",
|
759 |
+
"mikey179/vfsstream": "^1.6"
|
760 |
+
},
|
761 |
+
"bin": [
|
762 |
+
"wpcept"
|
763 |
+
],
|
764 |
+
"type": "library",
|
765 |
+
"autoload": {
|
766 |
+
"psr-4": {
|
767 |
+
"Codeception\\": "src\\Codeception",
|
768 |
+
"tad\\": "src\\tad"
|
769 |
+
}
|
770 |
+
},
|
771 |
+
"notification-url": "https://packagist.org/downloads/",
|
772 |
+
"license": [
|
773 |
+
"MIT"
|
774 |
+
],
|
775 |
+
"authors": [
|
776 |
+
{
|
777 |
+
"name": "theAverageDev (Luca Tumedei)",
|
778 |
+
"email": "luca@theaveragedev.com",
|
779 |
+
"homepage": "http://theaveragedev.com",
|
780 |
+
"role": "Developer"
|
781 |
+
}
|
782 |
+
],
|
783 |
+
"description": "WordPress extension of the PhpBrowser class.",
|
784 |
+
"homepage": "http://github.com/lucatume/wp-browser",
|
785 |
+
"keywords": [
|
786 |
+
"codeception",
|
787 |
+
"wordpress"
|
788 |
+
],
|
789 |
+
"time": "2016-02-23 10:50:00"
|
790 |
+
},
|
791 |
+
{
|
792 |
+
"name": "mikemclin/laravel-wp-password",
|
793 |
+
"version": "2.0.0",
|
794 |
+
"source": {
|
795 |
+
"type": "git",
|
796 |
+
"url": "https://github.com/mikemclin/laravel-wp-password.git",
|
797 |
+
"reference": "3460f1e38dea501c5d0cbe9bff67d043f6821724"
|
798 |
+
},
|
799 |
+
"dist": {
|
800 |
+
"type": "zip",
|
801 |
+
"url": "https://api.github.com/repos/mikemclin/laravel-wp-password/zipball/3460f1e38dea501c5d0cbe9bff67d043f6821724",
|
802 |
+
"reference": "3460f1e38dea501c5d0cbe9bff67d043f6821724",
|
803 |
+
"shasum": ""
|
804 |
+
},
|
805 |
+
"require": {
|
806 |
+
"hautelook/phpass": "0.3.3",
|
807 |
+
"illuminate/support": ">=4.0.0",
|
808 |
+
"php": ">=5.3.0"
|
809 |
+
},
|
810 |
+
"replace": {
|
811 |
+
"mikemclin/laravel-wp-password": "self.version"
|
812 |
+
},
|
813 |
+
"require-dev": {
|
814 |
+
"mockery/mockery": "~0.9",
|
815 |
+
"phpunit/phpunit": "~4.0",
|
816 |
+
"satooshi/php-coveralls": "dev-master"
|
817 |
+
},
|
818 |
+
"type": "laravel-package",
|
819 |
+
"autoload": {
|
820 |
+
"psr-4": {
|
821 |
+
"MikeMcLin\\WpPassword\\": "src/"
|
822 |
+
}
|
823 |
+
},
|
824 |
+
"notification-url": "https://packagist.org/downloads/",
|
825 |
+
"license": [
|
826 |
+
"MIT"
|
827 |
+
],
|
828 |
+
"authors": [
|
829 |
+
{
|
830 |
+
"name": "Mike McLin",
|
831 |
+
"email": "mike@mikemclin.com",
|
832 |
+
"homepage": "http://mikemclin.net"
|
833 |
+
}
|
834 |
+
],
|
835 |
+
"description": "Laravel package that checks and creates WordPress password hashes",
|
836 |
+
"homepage": "https://github.com/mikemclin/laravel-wp-password",
|
837 |
+
"keywords": [
|
838 |
+
"hashing",
|
839 |
+
"laravel",
|
840 |
+
"password",
|
841 |
+
"wordpress"
|
842 |
+
],
|
843 |
+
"time": "2015-02-12 03:09:57"
|
844 |
+
},
|
845 |
+
{
|
846 |
+
"name": "myclabs/deep-copy",
|
847 |
+
"version": "1.5.0",
|
848 |
+
"source": {
|
849 |
+
"type": "git",
|
850 |
+
"url": "https://github.com/myclabs/DeepCopy.git",
|
851 |
+
"reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc"
|
852 |
+
},
|
853 |
+
"dist": {
|
854 |
+
"type": "zip",
|
855 |
+
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc",
|
856 |
+
"reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc",
|
857 |
+
"shasum": ""
|
858 |
+
},
|
859 |
+
"require": {
|
860 |
+
"php": ">=5.4.0"
|
861 |
+
},
|
862 |
+
"require-dev": {
|
863 |
+
"doctrine/collections": "1.*",
|
864 |
+
"phpunit/phpunit": "~4.1"
|
865 |
+
},
|
866 |
+
"type": "library",
|
867 |
+
"autoload": {
|
868 |
+
"psr-4": {
|
869 |
+
"DeepCopy\\": "src/DeepCopy/"
|
870 |
+
}
|
871 |
+
},
|
872 |
+
"notification-url": "https://packagist.org/downloads/",
|
873 |
+
"license": [
|
874 |
+
"MIT"
|
875 |
+
],
|
876 |
+
"description": "Create deep copies (clones) of your objects",
|
877 |
+
"homepage": "https://github.com/myclabs/DeepCopy",
|
878 |
+
"keywords": [
|
879 |
+
"clone",
|
880 |
+
"copy",
|
881 |
+
"duplicate",
|
882 |
+
"object",
|
883 |
+
"object graph"
|
884 |
+
],
|
885 |
+
"time": "2015-11-07 22:20:37"
|
886 |
+
},
|
887 |
+
{
|
888 |
+
"name": "phpdocumentor/reflection-docblock",
|
889 |
+
"version": "2.0.4",
|
890 |
+
"source": {
|
891 |
+
"type": "git",
|
892 |
+
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
893 |
+
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
|
894 |
+
},
|
895 |
+
"dist": {
|
896 |
+
"type": "zip",
|
897 |
+
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
898 |
+
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
899 |
+
"shasum": ""
|
900 |
+
},
|
901 |
+
"require": {
|
902 |
+
"php": ">=5.3.3"
|
903 |
+
},
|
904 |
+
"require-dev": {
|
905 |
+
"phpunit/phpunit": "~4.0"
|
906 |
+
},
|
907 |
+
"suggest": {
|
908 |
+
"dflydev/markdown": "~1.0",
|
909 |
+
"erusev/parsedown": "~1.0"
|
910 |
+
},
|
911 |
+
"type": "library",
|
912 |
+
"extra": {
|
913 |
+
"branch-alias": {
|
914 |
+
"dev-master": "2.0.x-dev"
|
915 |
+
}
|
916 |
+
},
|
917 |
+
"autoload": {
|
918 |
+
"psr-0": {
|
919 |
+
"phpDocumentor": [
|
920 |
+
"src/"
|
921 |
+
]
|
922 |
+
}
|
923 |
+
},
|
924 |
+
"notification-url": "https://packagist.org/downloads/",
|
925 |
+
"license": [
|
926 |
+
"MIT"
|
927 |
+
],
|
928 |
+
"authors": [
|
929 |
+
{
|
930 |
+
"name": "Mike van Riel",
|
931 |
+
"email": "mike.vanriel@naenius.com"
|
932 |
+
}
|
933 |
+
],
|
934 |
+
"time": "2015-02-03 12:10:50"
|
935 |
+
},
|
936 |
+
{
|
937 |
+
"name": "phpspec/prophecy",
|
938 |
+
"version": "v1.6.0",
|
939 |
+
"source": {
|
940 |
+
"type": "git",
|
941 |
+
"url": "https://github.com/phpspec/prophecy.git",
|
942 |
+
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972"
|
943 |
+
},
|
944 |
+
"dist": {
|
945 |
+
"type": "zip",
|
946 |
+
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972",
|
947 |
+
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972",
|
948 |
+
"shasum": ""
|
949 |
+
},
|
950 |
+
"require": {
|
951 |
+
"doctrine/instantiator": "^1.0.2",
|
952 |
+
"php": "^5.3|^7.0",
|
953 |
+
"phpdocumentor/reflection-docblock": "~2.0",
|
954 |
+
"sebastian/comparator": "~1.1",
|
955 |
+
"sebastian/recursion-context": "~1.0"
|
956 |
+
},
|
957 |
+
"require-dev": {
|
958 |
+
"phpspec/phpspec": "~2.0"
|
959 |
+
},
|
960 |
+
"type": "library",
|
961 |
+
"extra": {
|
962 |
+
"branch-alias": {
|
963 |
+
"dev-master": "1.5.x-dev"
|
964 |
+
}
|
965 |
+
},
|
966 |
+
"autoload": {
|
967 |
+
"psr-0": {
|
968 |
+
"Prophecy\\": "src/"
|
969 |
+
}
|
970 |
+
},
|
971 |
+
"notification-url": "https://packagist.org/downloads/",
|
972 |
+
"license": [
|
973 |
+
"MIT"
|
974 |
+
],
|
975 |
+
"authors": [
|
976 |
+
{
|
977 |
+
"name": "Konstantin Kudryashov",
|
978 |
+
"email": "ever.zet@gmail.com",
|
979 |
+
"homepage": "http://everzet.com"
|
980 |
+
},
|
981 |
+
{
|
982 |
+
"name": "Marcello Duarte",
|
983 |
+
"email": "marcello.duarte@gmail.com"
|
984 |
+
}
|
985 |
+
],
|
986 |
+
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
987 |
+
"homepage": "https://github.com/phpspec/prophecy",
|
988 |
+
"keywords": [
|
989 |
+
"Double",
|
990 |
+
"Dummy",
|
991 |
+
"fake",
|
992 |
+
"mock",
|
993 |
+
"spy",
|
994 |
+
"stub"
|
995 |
+
],
|
996 |
+
"time": "2016-02-15 07:46:21"
|
997 |
+
},
|
998 |
+
{
|
999 |
+
"name": "phpunit/php-code-coverage",
|
1000 |
+
"version": "3.3.0",
|
1001 |
+
"source": {
|
1002 |
+
"type": "git",
|
1003 |
+
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
1004 |
+
"reference": "fe33716763b604ade4cb442c0794f5bd5ad73004"
|
1005 |
+
},
|
1006 |
+
"dist": {
|
1007 |
+
"type": "zip",
|
1008 |
+
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe33716763b604ade4cb442c0794f5bd5ad73004",
|
1009 |
+
"reference": "fe33716763b604ade4cb442c0794f5bd5ad73004",
|
1010 |
+
"shasum": ""
|
1011 |
+
},
|
1012 |
+
"require": {
|
1013 |
+
"php": "^5.6 || ^7.0",
|
1014 |
+
"phpunit/php-file-iterator": "~1.3",
|
1015 |
+
"phpunit/php-text-template": "~1.2",
|
1016 |
+
"phpunit/php-token-stream": "^1.4.2",
|
1017 |
+
"sebastian/code-unit-reverse-lookup": "~1.0",
|
1018 |
+
"sebastian/environment": "^1.3.2",
|
1019 |
+
"sebastian/version": "~1.0|~2.0"
|
1020 |
+
},
|
1021 |
+
"require-dev": {
|
1022 |
+
"ext-xdebug": ">=2.1.4",
|
1023 |
+
"phpunit/phpunit": "~5"
|
1024 |
+
},
|
1025 |
+
"suggest": {
|
1026 |
+
"ext-dom": "*",
|
1027 |
+
"ext-xdebug": ">=2.2.1",
|
1028 |
+
"ext-xmlwriter": "*"
|
1029 |
+
},
|
1030 |
+
"type": "library",
|
1031 |
+
"extra": {
|
1032 |
+
"branch-alias": {
|
1033 |
+
"dev-master": "3.3.x-dev"
|
1034 |
+
}
|
1035 |
+
},
|
1036 |
+
"autoload": {
|
1037 |
+
"classmap": [
|
1038 |
+
"src/"
|
1039 |
+
]
|
1040 |
+
},
|
1041 |
+
"notification-url": "https://packagist.org/downloads/",
|
1042 |
+
"license": [
|
1043 |
+
"BSD-3-Clause"
|
1044 |
+
],
|
1045 |
+
"authors": [
|
1046 |
+
{
|
1047 |
+
"name": "Sebastian Bergmann",
|
1048 |
+
"email": "sb@sebastian-bergmann.de",
|
1049 |
+
"role": "lead"
|
1050 |
+
}
|
1051 |
+
],
|
1052 |
+
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
1053 |
+
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
1054 |
+
"keywords": [
|
1055 |
+
"coverage",
|
1056 |
+
"testing",
|
1057 |
+
"xunit"
|
1058 |
+
],
|
1059 |
+
"time": "2016-03-03 08:49:08"
|
1060 |
+
},
|
1061 |
+
{
|
1062 |
+
"name": "phpunit/php-file-iterator",
|
1063 |
+
"version": "1.4.1",
|
1064 |
+
"source": {
|
1065 |
+
"type": "git",
|
1066 |
+
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
1067 |
+
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
|
1068 |
+
},
|
1069 |
+
"dist": {
|
1070 |
+
"type": "zip",
|
1071 |
+
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
1072 |
+
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
1073 |
+
"shasum": ""
|
1074 |
+
},
|
1075 |
+
"require": {
|
1076 |
+
"php": ">=5.3.3"
|
1077 |
+
},
|
1078 |
+
"type": "library",
|
1079 |
+
"extra": {
|
1080 |
+
"branch-alias": {
|
1081 |
+
"dev-master": "1.4.x-dev"
|
1082 |
+
}
|
1083 |
+
},
|
1084 |
+
"autoload": {
|
1085 |
+
"classmap": [
|
1086 |
+
"src/"
|
1087 |
+
]
|
1088 |
+
},
|
1089 |
+
"notification-url": "https://packagist.org/downloads/",
|
1090 |
+
"license": [
|
1091 |
+
"BSD-3-Clause"
|
1092 |
+
],
|
1093 |
+
"authors": [
|
1094 |
+
{
|
1095 |
+
"name": "Sebastian Bergmann",
|
1096 |
+
"email": "sb@sebastian-bergmann.de",
|
1097 |
+
"role": "lead"
|
1098 |
+
}
|
1099 |
+
],
|
1100 |
+
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
1101 |
+
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
1102 |
+
"keywords": [
|
1103 |
+
"filesystem",
|
1104 |
+
"iterator"
|
1105 |
+
],
|
1106 |
+
"time": "2015-06-21 13:08:43"
|
1107 |
+
},
|
1108 |
+
{
|
1109 |
+
"name": "phpunit/php-text-template",
|
1110 |
+
"version": "1.2.1",
|
1111 |
+
"source": {
|
1112 |
+
"type": "git",
|
1113 |
+
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
1114 |
+
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
1115 |
+
},
|
1116 |
+
"dist": {
|
1117 |
+
"type": "zip",
|
1118 |
+
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
1119 |
+
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
1120 |
+
"shasum": ""
|
1121 |
+
},
|
1122 |
+
"require": {
|
1123 |
+
"php": ">=5.3.3"
|
1124 |
+
},
|
1125 |
+
"type": "library",
|
1126 |
+
"autoload": {
|
1127 |
+
"classmap": [
|
1128 |
+
"src/"
|
1129 |
+
]
|
1130 |
+
},
|
1131 |
+
"notification-url": "https://packagist.org/downloads/",
|
1132 |
+
"license": [
|
1133 |
+
"BSD-3-Clause"
|
1134 |
+
],
|
1135 |
+
"authors": [
|
1136 |
+
{
|
1137 |
+
"name": "Sebastian Bergmann",
|
1138 |
+
"email": "sebastian@phpunit.de",
|
1139 |
+
"role": "lead"
|
1140 |
+
}
|
1141 |
+
],
|
1142 |
+
"description": "Simple template engine.",
|
1143 |
+
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
1144 |
+
"keywords": [
|
1145 |
+
"template"
|
1146 |
+
],
|
1147 |
+
"time": "2015-06-21 13:50:34"
|
1148 |
+
},
|
1149 |
+
{
|
1150 |
+
"name": "phpunit/php-timer",
|
1151 |
+
"version": "1.0.7",
|
1152 |
+
"source": {
|
1153 |
+
"type": "git",
|
1154 |
+
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
1155 |
+
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
|
1156 |
+
},
|
1157 |
+
"dist": {
|
1158 |
+
"type": "zip",
|
1159 |
+
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
1160 |
+
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
1161 |
+
"shasum": ""
|
1162 |
+
},
|
1163 |
+
"require": {
|
1164 |
+
"php": ">=5.3.3"
|
1165 |
+
},
|
1166 |
+
"type": "library",
|
1167 |
+
"autoload": {
|
1168 |
+
"classmap": [
|
1169 |
+
"src/"
|
1170 |
+
]
|
1171 |
+
},
|
1172 |
+
"notification-url": "https://packagist.org/downloads/",
|
1173 |
+
"license": [
|
1174 |
+
"BSD-3-Clause"
|
1175 |
+
],
|
1176 |
+
"authors": [
|
1177 |
+
{
|
1178 |
+
"name": "Sebastian Bergmann",
|
1179 |
+
"email": "sb@sebastian-bergmann.de",
|
1180 |
+
"role": "lead"
|
1181 |
+
}
|
1182 |
+
],
|
1183 |
+
"description": "Utility class for timing",
|
1184 |
+
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
1185 |
+
"keywords": [
|
1186 |
+
"timer"
|
1187 |
+
],
|
1188 |
+
"time": "2015-06-21 08:01:12"
|
1189 |
+
},
|
1190 |
+
{
|
1191 |
+
"name": "phpunit/php-token-stream",
|
1192 |
+
"version": "1.4.8",
|
1193 |
+
"source": {
|
1194 |
+
"type": "git",
|
1195 |
+
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
1196 |
+
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
|
1197 |
+
},
|
1198 |
+
"dist": {
|
1199 |
+
"type": "zip",
|
1200 |
+
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
1201 |
+
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
1202 |
+
"shasum": ""
|
1203 |
+
},
|
1204 |
+
"require": {
|
1205 |
+
"ext-tokenizer": "*",
|
1206 |
+
"php": ">=5.3.3"
|
1207 |
+
},
|
1208 |
+
"require-dev": {
|
1209 |
+
"phpunit/phpunit": "~4.2"
|
1210 |
+
},
|
1211 |
+
"type": "library",
|
1212 |
+
"extra": {
|
1213 |
+
"branch-alias": {
|
1214 |
+
"dev-master": "1.4-dev"
|
1215 |
+
}
|
1216 |
+
},
|
1217 |
+
"autoload": {
|
1218 |
+
"classmap": [
|
1219 |
+
"src/"
|
1220 |
+
]
|
1221 |
+
},
|
1222 |
+
"notification-url": "https://packagist.org/downloads/",
|
1223 |
+
"license": [
|
1224 |
+
"BSD-3-Clause"
|
1225 |
+
],
|
1226 |
+
"authors": [
|
1227 |
+
{
|
1228 |
+
"name": "Sebastian Bergmann",
|
1229 |
+
"email": "sebastian@phpunit.de"
|
1230 |
+
}
|
1231 |
+
],
|
1232 |
+
"description": "Wrapper around PHP's tokenizer extension.",
|
1233 |
+
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
1234 |
+
"keywords": [
|
1235 |
+
"tokenizer"
|
1236 |
+
],
|
1237 |
+
"time": "2015-09-15 10:49:45"
|
1238 |
+
},
|
1239 |
+
{
|
1240 |
+
"name": "phpunit/phpunit",
|
1241 |
+
"version": "5.2.12",
|
1242 |
+
"source": {
|
1243 |
+
"type": "git",
|
1244 |
+
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
1245 |
+
"reference": "6f0948bab32270352f97d1913d82a49338dcb0da"
|
1246 |
+
},
|
1247 |
+
"dist": {
|
1248 |
+
"type": "zip",
|
1249 |
+
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6f0948bab32270352f97d1913d82a49338dcb0da",
|
1250 |
+
"reference": "6f0948bab32270352f97d1913d82a49338dcb0da",
|
1251 |
+
"shasum": ""
|
1252 |
+
},
|
1253 |
+
"require": {
|
1254 |
+
"ext-dom": "*",
|
1255 |
+
"ext-json": "*",
|
1256 |
+
"ext-pcre": "*",
|
1257 |
+
"ext-reflection": "*",
|
1258 |
+
"ext-spl": "*",
|
1259 |
+
"myclabs/deep-copy": "~1.3",
|
1260 |
+
"php": "^5.6 || ^7.0",
|
1261 |
+
"phpspec/prophecy": "^1.3.1",
|
1262 |
+
"phpunit/php-code-coverage": "^3.3.0",
|
1263 |
+
"phpunit/php-file-iterator": "~1.4",
|
1264 |
+
"phpunit/php-text-template": "~1.2",
|
1265 |
+
"phpunit/php-timer": ">=1.0.6",
|
1266 |
+
"phpunit/phpunit-mock-objects": ">=3.0.5",
|
1267 |
+
"sebastian/comparator": "~1.1",
|
1268 |
+
"sebastian/diff": "~1.2",
|
1269 |
+
"sebastian/environment": "~1.3",
|
1270 |
+
"sebastian/exporter": "~1.2",
|
1271 |
+
"sebastian/global-state": "~1.0",
|
1272 |
+
"sebastian/resource-operations": "~1.0",
|
1273 |
+
"sebastian/version": "~1.0|~2.0",
|
1274 |
+
"symfony/yaml": "~2.1|~3.0"
|
1275 |
+
},
|
1276 |
+
"suggest": {
|
1277 |
+
"phpunit/php-invoker": "~1.1"
|
1278 |
+
},
|
1279 |
+
"bin": [
|
1280 |
+
"phpunit"
|
1281 |
+
],
|
1282 |
+
"type": "library",
|
1283 |
+
"extra": {
|
1284 |
+
"branch-alias": {
|
1285 |
+
"dev-master": "5.2.x-dev"
|
1286 |
+
}
|
1287 |
+
},
|
1288 |
+
"autoload": {
|
1289 |
+
"classmap": [
|
1290 |
+
"src/"
|
1291 |
+
]
|
1292 |
+
},
|
1293 |
+
"notification-url": "https://packagist.org/downloads/",
|
1294 |
+
"license": [
|
1295 |
+
"BSD-3-Clause"
|
1296 |
+
],
|
1297 |
+
"authors": [
|
1298 |
+
{
|
1299 |
+
"name": "Sebastian Bergmann",
|
1300 |
+
"email": "sebastian@phpunit.de",
|
1301 |
+
"role": "lead"
|
1302 |
+
}
|
1303 |
+
],
|
1304 |
+
"description": "The PHP Unit Testing framework.",
|
1305 |
+
"homepage": "https://phpunit.de/",
|
1306 |
+
"keywords": [
|
1307 |
+
"phpunit",
|
1308 |
+
"testing",
|
1309 |
+
"xunit"
|
1310 |
+
],
|
1311 |
+
"time": "2016-03-15 05:59:58"
|
1312 |
+
},
|
1313 |
+
{
|
1314 |
+
"name": "phpunit/phpunit-mock-objects",
|
1315 |
+
"version": "3.0.6",
|
1316 |
+
"source": {
|
1317 |
+
"type": "git",
|
1318 |
+
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
1319 |
+
"reference": "49bc700750196c04dd6bc2c4c99cb632b893836b"
|
1320 |
+
},
|
1321 |
+
"dist": {
|
1322 |
+
"type": "zip",
|
1323 |
+
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b",
|
1324 |
+
"reference": "49bc700750196c04dd6bc2c4c99cb632b893836b",
|
1325 |
+
"shasum": ""
|
1326 |
+
},
|
1327 |
+
"require": {
|
1328 |
+
"doctrine/instantiator": "^1.0.2",
|
1329 |
+
"php": ">=5.6",
|
1330 |
+
"phpunit/php-text-template": "~1.2",
|
1331 |
+
"sebastian/exporter": "~1.2"
|
1332 |
+
},
|
1333 |
+
"require-dev": {
|
1334 |
+
"phpunit/phpunit": "~5"
|
1335 |
+
},
|
1336 |
+
"suggest": {
|
1337 |
+
"ext-soap": "*"
|
1338 |
+
},
|
1339 |
+
"type": "library",
|
1340 |
+
"extra": {
|
1341 |
+
"branch-alias": {
|
1342 |
+
"dev-master": "3.0.x-dev"
|
1343 |
+
}
|
1344 |
+
},
|
1345 |
+
"autoload": {
|
1346 |
+
"classmap": [
|
1347 |
+
"src/"
|
1348 |
+
]
|
1349 |
+
},
|
1350 |
+
"notification-url": "https://packagist.org/downloads/",
|
1351 |
+
"license": [
|
1352 |
+
"BSD-3-Clause"
|
1353 |
+
],
|
1354 |
+
"authors": [
|
1355 |
+
{
|
1356 |
+
"name": "Sebastian Bergmann",
|
1357 |
+
"email": "sb@sebastian-bergmann.de",
|
1358 |
+
"role": "lead"
|
1359 |
+
}
|
1360 |
+
],
|
1361 |
+
"description": "Mock Object library for PHPUnit",
|
1362 |
+
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
1363 |
+
"keywords": [
|
1364 |
+
"mock",
|
1365 |
+
"xunit"
|
1366 |
+
],
|
1367 |
+
"time": "2015-12-08 08:47:06"
|
1368 |
+
},
|
1369 |
+
{
|
1370 |
+
"name": "psr/http-message",
|
1371 |
+
"version": "1.0",
|
1372 |
+
"source": {
|
1373 |
+
"type": "git",
|
1374 |
+
"url": "https://github.com/php-fig/http-message.git",
|
1375 |
+
"reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298"
|
1376 |
+
},
|
1377 |
+
"dist": {
|
1378 |
+
"type": "zip",
|
1379 |
+
"url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
|
1380 |
+
"reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
|
1381 |
+
"shasum": ""
|
1382 |
+
},
|
1383 |
+
"require": {
|
1384 |
+
"php": ">=5.3.0"
|
1385 |
+
},
|
1386 |
+
"type": "library",
|
1387 |
+
"extra": {
|
1388 |
+
"branch-alias": {
|
1389 |
+
"dev-master": "1.0.x-dev"
|
1390 |
+
}
|
1391 |
+
},
|
1392 |
+
"autoload": {
|
1393 |
+
"psr-4": {
|
1394 |
+
"Psr\\Http\\Message\\": "src/"
|
1395 |
+
}
|
1396 |
+
},
|
1397 |
+
"notification-url": "https://packagist.org/downloads/",
|
1398 |
+
"license": [
|
1399 |
+
"MIT"
|
1400 |
+
],
|
1401 |
+
"authors": [
|
1402 |
+
{
|
1403 |
+
"name": "PHP-FIG",
|
1404 |
+
"homepage": "http://www.php-fig.org/"
|
1405 |
+
}
|
1406 |
+
],
|
1407 |
+
"description": "Common interface for HTTP messages",
|
1408 |
+
"keywords": [
|
1409 |
+
"http",
|
1410 |
+
"http-message",
|
1411 |
+
"psr",
|
1412 |
+
"psr-7",
|
1413 |
+
"request",
|
1414 |
+
"response"
|
1415 |
+
],
|
1416 |
+
"time": "2015-05-04 20:22:00"
|
1417 |
+
},
|
1418 |
+
{
|
1419 |
+
"name": "sebastian/code-unit-reverse-lookup",
|
1420 |
+
"version": "1.0.0",
|
1421 |
+
"source": {
|
1422 |
+
"type": "git",
|
1423 |
+
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
|
1424 |
+
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
|
1425 |
+
},
|
1426 |
+
"dist": {
|
1427 |
+
"type": "zip",
|
1428 |
+
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
|
1429 |
+
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
|
1430 |
+
"shasum": ""
|
1431 |
+
},
|
1432 |
+
"require": {
|
1433 |
+
"php": ">=5.6"
|
1434 |
+
},
|
1435 |
+
"require-dev": {
|
1436 |
+
"phpunit/phpunit": "~5"
|
1437 |
+
},
|
1438 |
+
"type": "library",
|
1439 |
+
"extra": {
|
1440 |
+
"branch-alias": {
|
1441 |
+
"dev-master": "1.0.x-dev"
|
1442 |
+
}
|
1443 |
+
},
|
1444 |
+
"autoload": {
|
1445 |
+
"classmap": [
|
1446 |
+
"src/"
|
1447 |
+
]
|
1448 |
+
},
|
1449 |
+
"notification-url": "https://packagist.org/downloads/",
|
1450 |
+
"license": [
|
1451 |
+
"BSD-3-Clause"
|
1452 |
+
],
|
1453 |
+
"authors": [
|
1454 |
+
{
|
1455 |
+
"name": "Sebastian Bergmann",
|
1456 |
+
"email": "sebastian@phpunit.de"
|
1457 |
+
}
|
1458 |
+
],
|
1459 |
+
"description": "Looks up which function or method a line of code belongs to",
|
1460 |
+
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
|
1461 |
+
"time": "2016-02-13 06:45:14"
|
1462 |
+
},
|
1463 |
+
{
|
1464 |
+
"name": "sebastian/comparator",
|
1465 |
+
"version": "1.2.0",
|
1466 |
+
"source": {
|
1467 |
+
"type": "git",
|
1468 |
+
"url": "https://github.com/sebastianbergmann/comparator.git",
|
1469 |
+
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
|
1470 |
+
},
|
1471 |
+
"dist": {
|
1472 |
+
"type": "zip",
|
1473 |
+
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
|
1474 |
+
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
|
1475 |
+
"shasum": ""
|
1476 |
+
},
|
1477 |
+
"require": {
|
1478 |
+
"php": ">=5.3.3",
|
1479 |
+
"sebastian/diff": "~1.2",
|
1480 |
+
"sebastian/exporter": "~1.2"
|
1481 |
+
},
|
1482 |
+
"require-dev": {
|
1483 |
+
"phpunit/phpunit": "~4.4"
|
1484 |
+
},
|
1485 |
+
"type": "library",
|
1486 |
+
"extra": {
|
1487 |
+
"branch-alias": {
|
1488 |
+
"dev-master": "1.2.x-dev"
|
1489 |
+
}
|
1490 |
+
},
|
1491 |
+
"autoload": {
|
1492 |
+
"classmap": [
|
1493 |
+
"src/"
|
1494 |
+
]
|
1495 |
+
},
|
1496 |
+
"notification-url": "https://packagist.org/downloads/",
|
1497 |
+
"license": [
|
1498 |
+
"BSD-3-Clause"
|
1499 |
+
],
|
1500 |
+
"authors": [
|
1501 |
+
{
|
1502 |
+
"name": "Jeff Welch",
|
1503 |
+
"email": "whatthejeff@gmail.com"
|
1504 |
+
},
|
1505 |
+
{
|
1506 |
+
"name": "Volker Dusch",
|
1507 |
+
"email": "github@wallbash.com"
|
1508 |
+
},
|
1509 |
+
{
|
1510 |
+
"name": "Bernhard Schussek",
|
1511 |
+
"email": "bschussek@2bepublished.at"
|
1512 |
+
},
|
1513 |
+
{
|
1514 |
+
"name": "Sebastian Bergmann",
|
1515 |
+
"email": "sebastian@phpunit.de"
|
1516 |
+
}
|
1517 |
+
],
|
1518 |
+
"description": "Provides the functionality to compare PHP values for equality",
|
1519 |
+
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
1520 |
+
"keywords": [
|
1521 |
+
"comparator",
|
1522 |
+
"compare",
|
1523 |
+
"equality"
|
1524 |
+
],
|
1525 |
+
"time": "2015-07-26 15:48:44"
|
1526 |
+
},
|
1527 |
+
{
|
1528 |
+
"name": "sebastian/diff",
|
1529 |
+
"version": "1.4.1",
|
1530 |
+
"source": {
|
1531 |
+
"type": "git",
|
1532 |
+
"url": "https://github.com/sebastianbergmann/diff.git",
|
1533 |
+
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
|
1534 |
+
},
|
1535 |
+
"dist": {
|
1536 |
+
"type": "zip",
|
1537 |
+
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
|
1538 |
+
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
|
1539 |
+
"shasum": ""
|
1540 |
+
},
|
1541 |
+
"require": {
|
1542 |
+
"php": ">=5.3.3"
|
1543 |
+
},
|
1544 |
+
"require-dev": {
|
1545 |
+
"phpunit/phpunit": "~4.8"
|
1546 |
+
},
|
1547 |
+
"type": "library",
|
1548 |
+
"extra": {
|
1549 |
+
"branch-alias": {
|
1550 |
+
"dev-master": "1.4-dev"
|
1551 |
+
}
|
1552 |
+
},
|
1553 |
+
"autoload": {
|
1554 |
+
"classmap": [
|
1555 |
+
"src/"
|
1556 |
+
]
|
1557 |
+
},
|
1558 |
+
"notification-url": "https://packagist.org/downloads/",
|
1559 |
+
"license": [
|
1560 |
+
"BSD-3-Clause"
|
1561 |
+
],
|
1562 |
+
"authors": [
|
1563 |
+
{
|
1564 |
+
"name": "Kore Nordmann",
|
1565 |
+
"email": "mail@kore-nordmann.de"
|
1566 |
+
},
|
1567 |
+
{
|
1568 |
+
"name": "Sebastian Bergmann",
|
1569 |
+
"email": "sebastian@phpunit.de"
|
1570 |
+
}
|
1571 |
+
],
|
1572 |
+
"description": "Diff implementation",
|
1573 |
+
"homepage": "https://github.com/sebastianbergmann/diff",
|
1574 |
+
"keywords": [
|
1575 |
+
"diff"
|
1576 |
+
],
|
1577 |
+
"time": "2015-12-08 07:14:41"
|
1578 |
+
},
|
1579 |
+
{
|
1580 |
+
"name": "sebastian/environment",
|
1581 |
+
"version": "1.3.5",
|
1582 |
+
"source": {
|
1583 |
+
"type": "git",
|
1584 |
+
"url": "https://github.com/sebastianbergmann/environment.git",
|
1585 |
+
"reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf"
|
1586 |
+
},
|
1587 |
+
"dist": {
|
1588 |
+
"type": "zip",
|
1589 |
+
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf",
|
1590 |
+
"reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf",
|
1591 |
+
"shasum": ""
|
1592 |
+
},
|
1593 |
+
"require": {
|
1594 |
+
"php": ">=5.3.3"
|
1595 |
+
},
|
1596 |
+
"require-dev": {
|
1597 |
+
"phpunit/phpunit": "~4.4"
|
1598 |
+
},
|
1599 |
+
"type": "library",
|
1600 |
+
"extra": {
|
1601 |
+
"branch-alias": {
|
1602 |
+
"dev-master": "1.3.x-dev"
|
1603 |
+
}
|
1604 |
+
},
|
1605 |
+
"autoload": {
|
1606 |
+
"classmap": [
|
1607 |
+
"src/"
|
1608 |
+
]
|
1609 |
+
},
|
1610 |
+
"notification-url": "https://packagist.org/downloads/",
|
1611 |
+
"license": [
|
1612 |
+
"BSD-3-Clause"
|
1613 |
+
],
|
1614 |
+
"authors": [
|
1615 |
+
{
|
1616 |
+
"name": "Sebastian Bergmann",
|
1617 |
+
"email": "sebastian@phpunit.de"
|
1618 |
+
}
|
1619 |
+
],
|
1620 |
+
"description": "Provides functionality to handle HHVM/PHP environments",
|
1621 |
+
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
1622 |
+
"keywords": [
|
1623 |
+
"Xdebug",
|
1624 |
+
"environment",
|
1625 |
+
"hhvm"
|
1626 |
+
],
|
1627 |
+
"time": "2016-02-26 18:40:46"
|
1628 |
+
},
|
1629 |
+
{
|
1630 |
+
"name": "sebastian/exporter",
|
1631 |
+
"version": "1.2.1",
|
1632 |
+
"source": {
|
1633 |
+
"type": "git",
|
1634 |
+
"url": "https://github.com/sebastianbergmann/exporter.git",
|
1635 |
+
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
|
1636 |
+
},
|
1637 |
+
"dist": {
|
1638 |
+
"type": "zip",
|
1639 |
+
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
|
1640 |
+
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
|
1641 |
+
"shasum": ""
|
1642 |
+
},
|
1643 |
+
"require": {
|
1644 |
+
"php": ">=5.3.3",
|
1645 |
+
"sebastian/recursion-context": "~1.0"
|
1646 |
+
},
|
1647 |
+
"require-dev": {
|
1648 |
+
"phpunit/phpunit": "~4.4"
|
1649 |
+
},
|
1650 |
+
"type": "library",
|
1651 |
+
"extra": {
|
1652 |
+
"branch-alias": {
|
1653 |
+
"dev-master": "1.2.x-dev"
|
1654 |
+
}
|
1655 |
+
},
|
1656 |
+
"autoload": {
|
1657 |
+
"classmap": [
|
1658 |
+
"src/"
|
1659 |
+
]
|
1660 |
+
},
|
1661 |
+
"notification-url": "https://packagist.org/downloads/",
|
1662 |
+
"license": [
|
1663 |
+
"BSD-3-Clause"
|
1664 |
+
],
|
1665 |
+
"authors": [
|
1666 |
+
{
|
1667 |
+
"name": "Jeff Welch",
|
1668 |
+
"email": "whatthejeff@gmail.com"
|
1669 |
+
},
|
1670 |
+
{
|
1671 |
+
"name": "Volker Dusch",
|
1672 |
+
"email": "github@wallbash.com"
|
1673 |
+
},
|
1674 |
+
{
|
1675 |
+
"name": "Bernhard Schussek",
|
1676 |
+
"email": "bschussek@2bepublished.at"
|
1677 |
+
},
|
1678 |
+
{
|
1679 |
+
"name": "Sebastian Bergmann",
|
1680 |
+
"email": "sebastian@phpunit.de"
|
1681 |
+
},
|
1682 |
+
{
|
1683 |
+
"name": "Adam Harvey",
|
1684 |
+
"email": "aharvey@php.net"
|
1685 |
+
}
|
1686 |
+
],
|
1687 |
+
"description": "Provides the functionality to export PHP variables for visualization",
|
1688 |
+
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
1689 |
+
"keywords": [
|
1690 |
+
"export",
|
1691 |
+
"exporter"
|
1692 |
+
],
|
1693 |
+
"time": "2015-06-21 07:55:53"
|
1694 |
+
},
|
1695 |
+
{
|
1696 |
+
"name": "sebastian/global-state",
|
1697 |
+
"version": "1.1.1",
|
1698 |
+
"source": {
|
1699 |
+
"type": "git",
|
1700 |
+
"url": "https://github.com/sebastianbergmann/global-state.git",
|
1701 |
+
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
|
1702 |
+
},
|
1703 |
+
"dist": {
|
1704 |
+
"type": "zip",
|
1705 |
+
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
1706 |
+
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
1707 |
+
"shasum": ""
|
1708 |
+
},
|
1709 |
+
"require": {
|
1710 |
+
"php": ">=5.3.3"
|
1711 |
+
},
|
1712 |
+
"require-dev": {
|
1713 |
+
"phpunit/phpunit": "~4.2"
|
1714 |
+
},
|
1715 |
+
"suggest": {
|
1716 |
+
"ext-uopz": "*"
|
1717 |
+
},
|
1718 |
+
"type": "library",
|
1719 |
+
"extra": {
|
1720 |
+
"branch-alias": {
|
1721 |
+
"dev-master": "1.0-dev"
|
1722 |
+
}
|
1723 |
+
},
|
1724 |
+
"autoload": {
|
1725 |
+
"classmap": [
|
1726 |
+
"src/"
|
1727 |
+
]
|
1728 |
+
},
|
1729 |
+
"notification-url": "https://packagist.org/downloads/",
|
1730 |
+
"license": [
|
1731 |
+
"BSD-3-Clause"
|
1732 |
+
],
|
1733 |
+
"authors": [
|
1734 |
+
{
|
1735 |
+
"name": "Sebastian Bergmann",
|
1736 |
+
"email": "sebastian@phpunit.de"
|
1737 |
+
}
|
1738 |
+
],
|
1739 |
+
"description": "Snapshotting of global state",
|
1740 |
+
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
1741 |
+
"keywords": [
|
1742 |
+
"global state"
|
1743 |
+
],
|
1744 |
+
"time": "2015-10-12 03:26:01"
|
1745 |
+
},
|
1746 |
+
{
|
1747 |
+
"name": "sebastian/recursion-context",
|
1748 |
+
"version": "1.0.2",
|
1749 |
+
"source": {
|
1750 |
+
"type": "git",
|
1751 |
+
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
1752 |
+
"reference": "913401df809e99e4f47b27cdd781f4a258d58791"
|
1753 |
+
},
|
1754 |
+
"dist": {
|
1755 |
+
"type": "zip",
|
1756 |
+
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
|
1757 |
+
"reference": "913401df809e99e4f47b27cdd781f4a258d58791",
|
1758 |
+
"shasum": ""
|
1759 |
+
},
|
1760 |
+
"require": {
|
1761 |
+
"php": ">=5.3.3"
|
1762 |
+
},
|
1763 |
+
"require-dev": {
|
1764 |
+
"phpunit/phpunit": "~4.4"
|
1765 |
+
},
|
1766 |
+
"type": "library",
|
1767 |
+
"extra": {
|
1768 |
+
"branch-alias": {
|
1769 |
+
"dev-master": "1.0.x-dev"
|
1770 |
+
}
|
1771 |
+
},
|
1772 |
+
"autoload": {
|
1773 |
+
"classmap": [
|
1774 |
+
"src/"
|
1775 |
+
]
|
1776 |
+
},
|
1777 |
+
"notification-url": "https://packagist.org/downloads/",
|
1778 |
+
"license": [
|
1779 |
+
"BSD-3-Clause"
|
1780 |
+
],
|
1781 |
+
"authors": [
|
1782 |
+
{
|
1783 |
+
"name": "Jeff Welch",
|
1784 |
+
"email": "whatthejeff@gmail.com"
|
1785 |
+
},
|
1786 |
+
{
|
1787 |
+
"name": "Sebastian Bergmann",
|
1788 |
+
"email": "sebastian@phpunit.de"
|
1789 |
+
},
|
1790 |
+
{
|
1791 |
+
"name": "Adam Harvey",
|
1792 |
+
"email": "aharvey@php.net"
|
1793 |
+
}
|
1794 |
+
],
|
1795 |
+
"description": "Provides functionality to recursively process PHP variables",
|
1796 |
+
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
1797 |
+
"time": "2015-11-11 19:50:13"
|
1798 |
+
},
|
1799 |
+
{
|
1800 |
+
"name": "sebastian/resource-operations",
|
1801 |
+
"version": "1.0.0",
|
1802 |
+
"source": {
|
1803 |
+
"type": "git",
|
1804 |
+
"url": "https://github.com/sebastianbergmann/resource-operations.git",
|
1805 |
+
"reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
|
1806 |
+
},
|
1807 |
+
"dist": {
|
1808 |
+
"type": "zip",
|
1809 |
+
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
|
1810 |
+
"reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
|
1811 |
+
"shasum": ""
|
1812 |
+
},
|
1813 |
+
"require": {
|
1814 |
+
"php": ">=5.6.0"
|
1815 |
+
},
|
1816 |
+
"type": "library",
|
1817 |
+
"extra": {
|
1818 |
+
"branch-alias": {
|
1819 |
+
"dev-master": "1.0.x-dev"
|
1820 |
+
}
|
1821 |
+
},
|
1822 |
+
"autoload": {
|
1823 |
+
"classmap": [
|
1824 |
+
"src/"
|
1825 |
+
]
|
1826 |
+
},
|
1827 |
+
"notification-url": "https://packagist.org/downloads/",
|
1828 |
+
"license": [
|
1829 |
+
"BSD-3-Clause"
|
1830 |
+
],
|
1831 |
+
"authors": [
|
1832 |
+
{
|
1833 |
+
"name": "Sebastian Bergmann",
|
1834 |
+
"email": "sebastian@phpunit.de"
|
1835 |
+
}
|
1836 |
+
],
|
1837 |
+
"description": "Provides a list of PHP built-in functions that operate on resources",
|
1838 |
+
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
1839 |
+
"time": "2015-07-28 20:34:47"
|
1840 |
+
},
|
1841 |
+
{
|
1842 |
+
"name": "sebastian/version",
|
1843 |
+
"version": "2.0.0",
|
1844 |
+
"source": {
|
1845 |
+
"type": "git",
|
1846 |
+
"url": "https://github.com/sebastianbergmann/version.git",
|
1847 |
+
"reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5"
|
1848 |
+
},
|
1849 |
+
"dist": {
|
1850 |
+
"type": "zip",
|
1851 |
+
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
|
1852 |
+
"reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5",
|
1853 |
+
"shasum": ""
|
1854 |
+
},
|
1855 |
+
"require": {
|
1856 |
+
"php": ">=5.6"
|
1857 |
+
},
|
1858 |
+
"type": "library",
|
1859 |
+
"extra": {
|
1860 |
+
"branch-alias": {
|
1861 |
+
"dev-master": "2.0.x-dev"
|
1862 |
+
}
|
1863 |
+
},
|
1864 |
+
"autoload": {
|
1865 |
+
"classmap": [
|
1866 |
+
"src/"
|
1867 |
+
]
|
1868 |
+
},
|
1869 |
+
"notification-url": "https://packagist.org/downloads/",
|
1870 |
+
"license": [
|
1871 |
+
"BSD-3-Clause"
|
1872 |
+
],
|
1873 |
+
"authors": [
|
1874 |
+
{
|
1875 |
+
"name": "Sebastian Bergmann",
|
1876 |
+
"email": "sebastian@phpunit.de",
|
1877 |
+
"role": "lead"
|
1878 |
+
}
|
1879 |
+
],
|
1880 |
+
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
1881 |
+
"homepage": "https://github.com/sebastianbergmann/version",
|
1882 |
+
"time": "2016-02-04 12:56:52"
|
1883 |
+
},
|
1884 |
+
{
|
1885 |
+
"name": "symfony/browser-kit",
|
1886 |
+
"version": "v3.0.3",
|
1887 |
+
"source": {
|
1888 |
+
"type": "git",
|
1889 |
+
"url": "https://github.com/symfony/browser-kit.git",
|
1890 |
+
"reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3"
|
1891 |
+
},
|
1892 |
+
"dist": {
|
1893 |
+
"type": "zip",
|
1894 |
+
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/dde849a0485b70a24b36f826ed3fb95b904d80c3",
|
1895 |
+
"reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3",
|
1896 |
+
"shasum": ""
|
1897 |
+
},
|
1898 |
+
"require": {
|
1899 |
+
"php": ">=5.5.9",
|
1900 |
+
"symfony/dom-crawler": "~2.8|~3.0"
|
1901 |
+
},
|
1902 |
+
"require-dev": {
|
1903 |
+
"symfony/css-selector": "~2.8|~3.0",
|
1904 |
+
"symfony/process": "~2.8|~3.0"
|
1905 |
+
},
|
1906 |
+
"suggest": {
|
1907 |
+
"symfony/process": ""
|
1908 |
+
},
|
1909 |
+
"type": "library",
|
1910 |
+
"extra": {
|
1911 |
+
"branch-alias": {
|
1912 |
+
"dev-master": "3.0-dev"
|
1913 |
+
}
|
1914 |
+
},
|
1915 |
+
"autoload": {
|
1916 |
+
"psr-4": {
|
1917 |
+
"Symfony\\Component\\BrowserKit\\": ""
|
1918 |
+
},
|
1919 |
+
"exclude-from-classmap": [
|
1920 |
+
"/Tests/"
|
1921 |
+
]
|
1922 |
+
},
|
1923 |
+
"notification-url": "https://packagist.org/downloads/",
|
1924 |
+
"license": [
|
1925 |
+
"MIT"
|
1926 |
+
],
|
1927 |
+
"authors": [
|
1928 |
+
{
|
1929 |
+
"name": "Fabien Potencier",
|
1930 |
+
"email": "fabien@symfony.com"
|
1931 |
+
},
|
1932 |
+
{
|
1933 |
+
"name": "Symfony Community",
|
1934 |
+
"homepage": "https://symfony.com/contributors"
|
1935 |
+
}
|
1936 |
+
],
|
1937 |
+
"description": "Symfony BrowserKit Component",
|
1938 |
+
"homepage": "https://symfony.com",
|
1939 |
+
"time": "2016-01-27 11:34:55"
|
1940 |
+
},
|
1941 |
+
{
|
1942 |
+
"name": "symfony/console",
|
1943 |
+
"version": "v3.0.3",
|
1944 |
+
"source": {
|
1945 |
+
"type": "git",
|
1946 |
+
"url": "https://github.com/symfony/console.git",
|
1947 |
+
"reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04"
|
1948 |
+
},
|
1949 |
+
"dist": {
|
1950 |
+
"type": "zip",
|
1951 |
+
"url": "https://api.github.com/repos/symfony/console/zipball/2ed5e2706ce92313d120b8fe50d1063bcfd12e04",
|
1952 |
+
"reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04",
|
1953 |
+
"shasum": ""
|
1954 |
+
},
|
1955 |
+
"require": {
|
1956 |
+
"php": ">=5.5.9",
|
1957 |
+
"symfony/polyfill-mbstring": "~1.0"
|
1958 |
+
},
|
1959 |
+
"require-dev": {
|
1960 |
+
"psr/log": "~1.0",
|
1961 |
+
"symfony/event-dispatcher": "~2.8|~3.0",
|
1962 |
+
"symfony/process": "~2.8|~3.0"
|
1963 |
+
},
|
1964 |
+
"suggest": {
|
1965 |
+
"psr/log": "For using the console logger",
|
1966 |
+
"symfony/event-dispatcher": "",
|
1967 |
+
"symfony/process": ""
|
1968 |
+
},
|
1969 |
+
"type": "library",
|
1970 |
+
"extra": {
|
1971 |
+
"branch-alias": {
|
1972 |
+
"dev-master": "3.0-dev"
|
1973 |
+
}
|
1974 |
+
},
|
1975 |
+
"autoload": {
|
1976 |
+
"psr-4": {
|
1977 |
+
"Symfony\\Component\\Console\\": ""
|
1978 |
+
},
|
1979 |
+
"exclude-from-classmap": [
|
1980 |
+
"/Tests/"
|
1981 |
+
]
|
1982 |
+
},
|
1983 |
+
"notification-url": "https://packagist.org/downloads/",
|
1984 |
+
"license": [
|
1985 |
+
"MIT"
|
1986 |
+
],
|
1987 |
+
"authors": [
|
1988 |
+
{
|
1989 |
+
"name": "Fabien Potencier",
|
1990 |
+
"email": "fabien@symfony.com"
|
1991 |
+
},
|
1992 |
+
{
|
1993 |
+
"name": "Symfony Community",
|
1994 |
+
"homepage": "https://symfony.com/contributors"
|
1995 |
+
}
|
1996 |
+
],
|
1997 |
+
"description": "Symfony Console Component",
|
1998 |
+
"homepage": "https://symfony.com",
|
1999 |
+
"time": "2016-02-28 16:24:34"
|
2000 |
+
},
|
2001 |
+
{
|
2002 |
+
"name": "symfony/css-selector",
|
2003 |
+
"version": "v3.0.3",
|
2004 |
+
"source": {
|
2005 |
+
"type": "git",
|
2006 |
+
"url": "https://github.com/symfony/css-selector.git",
|
2007 |
+
"reference": "6605602690578496091ac20ec7a5cbd160d4dff4"
|
2008 |
+
},
|
2009 |
+
"dist": {
|
2010 |
+
"type": "zip",
|
2011 |
+
"url": "https://api.github.com/repos/symfony/css-selector/zipball/6605602690578496091ac20ec7a5cbd160d4dff4",
|
2012 |
+
"reference": "6605602690578496091ac20ec7a5cbd160d4dff4",
|
2013 |
+
"shasum": ""
|
2014 |
+
},
|
2015 |
+
"require": {
|
2016 |
+
"php": ">=5.5.9"
|
2017 |
+
},
|
2018 |
+
"type": "library",
|
2019 |
+
"extra": {
|
2020 |
+
"branch-alias": {
|
2021 |
+
"dev-master": "3.0-dev"
|
2022 |
+
}
|
2023 |
+
},
|
2024 |
+
"autoload": {
|
2025 |
+
"psr-4": {
|
2026 |
+
"Symfony\\Component\\CssSelector\\": ""
|
2027 |
+
},
|
2028 |
+
"exclude-from-classmap": [
|
2029 |
+
"/Tests/"
|
2030 |
+
]
|
2031 |
+
},
|
2032 |
+
"notification-url": "https://packagist.org/downloads/",
|
2033 |
+
"license": [
|
2034 |
+
"MIT"
|
2035 |
+
],
|
2036 |
+
"authors": [
|
2037 |
+
{
|
2038 |
+
"name": "Jean-François Simon",
|
2039 |
+
"email": "jeanfrancois.simon@sensiolabs.com"
|
2040 |
+
},
|
2041 |
+
{
|
2042 |
+
"name": "Fabien Potencier",
|
2043 |
+
"email": "fabien@symfony.com"
|
2044 |
+
},
|
2045 |
+
{
|
2046 |
+
"name": "Symfony Community",
|
2047 |
+
"homepage": "https://symfony.com/contributors"
|
2048 |
+
}
|
2049 |
+
],
|
2050 |
+
"description": "Symfony CssSelector Component",
|
2051 |
+
"homepage": "https://symfony.com",
|
2052 |
+
"time": "2016-01-27 05:14:46"
|
2053 |
+
},
|
2054 |
+
{
|
2055 |
+
"name": "symfony/dom-crawler",
|
2056 |
+
"version": "v3.0.3",
|
2057 |
+
"source": {
|
2058 |
+
"type": "git",
|
2059 |
+
"url": "https://github.com/symfony/dom-crawler.git",
|
2060 |
+
"reference": "981c8edb4538f88ba976ed44bdcaa683fce3d6c6"
|
2061 |
+
},
|
2062 |
+
"dist": {
|
2063 |
+
"type": "zip",
|
2064 |
+
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/981c8edb4538f88ba976ed44bdcaa683fce3d6c6",
|
2065 |
+
"reference": "981c8edb4538f88ba976ed44bdcaa683fce3d6c6",
|
2066 |
+
"shasum": ""
|
2067 |
+
},
|
2068 |
+
"require": {
|
2069 |
+
"php": ">=5.5.9",
|
2070 |
+
"symfony/polyfill-mbstring": "~1.0"
|
2071 |
+
},
|
2072 |
+
"require-dev": {
|
2073 |
+
"symfony/css-selector": "~2.8|~3.0"
|
2074 |
+
},
|
2075 |
+
"suggest": {
|
2076 |
+
"symfony/css-selector": ""
|
2077 |
+
},
|
2078 |
+
"type": "library",
|
2079 |
+
"extra": {
|
2080 |
+
"branch-alias": {
|
2081 |
+
"dev-master": "3.0-dev"
|
2082 |
+
}
|
2083 |
+
},
|
2084 |
+
"autoload": {
|
2085 |
+
"psr-4": {
|
2086 |
+
"Symfony\\Component\\DomCrawler\\": ""
|
2087 |
+
},
|
2088 |
+
"exclude-from-classmap": [
|
2089 |
+
"/Tests/"
|
2090 |
+
]
|
2091 |
+
},
|
2092 |
+
"notification-url": "https://packagist.org/downloads/",
|
2093 |
+
"license": [
|
2094 |
+
"MIT"
|
2095 |
+
],
|
2096 |
+
"authors": [
|
2097 |
+
{
|
2098 |
+
"name": "Fabien Potencier",
|
2099 |
+
"email": "fabien@symfony.com"
|
2100 |
+
},
|
2101 |
+
{
|
2102 |
+
"name": "Symfony Community",
|
2103 |
+
"homepage": "https://symfony.com/contributors"
|
2104 |
+
}
|
2105 |
+
],
|
2106 |
+
"description": "Symfony DomCrawler Component",
|
2107 |
+
"homepage": "https://symfony.com",
|
2108 |
+
"time": "2016-02-28 16:24:34"
|
2109 |
+
},
|
2110 |
+
{
|
2111 |
+
"name": "symfony/event-dispatcher",
|
2112 |
+
"version": "v3.0.3",
|
2113 |
+
"source": {
|
2114 |
+
"type": "git",
|
2115 |
+
"url": "https://github.com/symfony/event-dispatcher.git",
|
2116 |
+
"reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa"
|
2117 |
+
},
|
2118 |
+
"dist": {
|
2119 |
+
"type": "zip",
|
2120 |
+
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
|
2121 |
+
"reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
|
2122 |
+
"shasum": ""
|
2123 |
+
},
|
2124 |
+
"require": {
|
2125 |
+
"php": ">=5.5.9"
|
2126 |
+
},
|
2127 |
+
"require-dev": {
|
2128 |
+
"psr/log": "~1.0",
|
2129 |
+
"symfony/config": "~2.8|~3.0",
|
2130 |
+
"symfony/dependency-injection": "~2.8|~3.0",
|
2131 |
+
"symfony/expression-language": "~2.8|~3.0",
|
2132 |
+
"symfony/stopwatch": "~2.8|~3.0"
|
2133 |
+
},
|
2134 |
+
"suggest": {
|
2135 |
+
"symfony/dependency-injection": "",
|
2136 |
+
"symfony/http-kernel": ""
|
2137 |
+
},
|
2138 |
+
"type": "library",
|
2139 |
+
"extra": {
|
2140 |
+
"branch-alias": {
|
2141 |
+
"dev-master": "3.0-dev"
|
2142 |
+
}
|
2143 |
+
},
|
2144 |
+
"autoload": {
|
2145 |
+
"psr-4": {
|
2146 |
+
"Symfony\\Component\\EventDispatcher\\": ""
|
2147 |
+
},
|
2148 |
+
"exclude-from-classmap": [
|
2149 |
+
"/Tests/"
|
2150 |
+
]
|
2151 |
+
},
|
2152 |
+
"notification-url": "https://packagist.org/downloads/",
|
2153 |
+
"license": [
|
2154 |
+
"MIT"
|
2155 |
+
],
|
2156 |
+
"authors": [
|
2157 |
+
{
|
2158 |
+
"name": "Fabien Potencier",
|
2159 |
+
"email": "fabien@symfony.com"
|
2160 |
+
},
|
2161 |
+
{
|
2162 |
+
"name": "Symfony Community",
|
2163 |
+
"homepage": "https://symfony.com/contributors"
|
2164 |
+
}
|
2165 |
+
],
|
2166 |
+
"description": "Symfony EventDispatcher Component",
|
2167 |
+
"homepage": "https://symfony.com",
|
2168 |
+
"time": "2016-01-27 05:14:46"
|
2169 |
+
},
|
2170 |
+
{
|
2171 |
+
"name": "symfony/filesystem",
|
2172 |
+
"version": "v2.8.3",
|
2173 |
+
"source": {
|
2174 |
+
"type": "git",
|
2175 |
+
"url": "https://github.com/symfony/filesystem.git",
|
2176 |
+
"reference": "65cb36b6539b1d446527d60457248f30d045464d"
|
2177 |
+
},
|
2178 |
+
"dist": {
|
2179 |
+
"type": "zip",
|
2180 |
+
"url": "https://api.github.com/repos/symfony/filesystem/zipball/65cb36b6539b1d446527d60457248f30d045464d",
|
2181 |
+
"reference": "65cb36b6539b1d446527d60457248f30d045464d",
|
2182 |
+
"shasum": ""
|
2183 |
+
},
|
2184 |
+
"require": {
|
2185 |
+
"php": ">=5.3.9"
|
2186 |
+
},
|
2187 |
+
"type": "library",
|
2188 |
+
"extra": {
|
2189 |
+
"branch-alias": {
|
2190 |
+
"dev-master": "2.8-dev"
|
2191 |
+
}
|
2192 |
+
},
|
2193 |
+
"autoload": {
|
2194 |
+
"psr-4": {
|
2195 |
+
"Symfony\\Component\\Filesystem\\": ""
|
2196 |
+
},
|
2197 |
+
"exclude-from-classmap": [
|
2198 |
+
"/Tests/"
|
2199 |
+
]
|
2200 |
+
},
|
2201 |
+
"notification-url": "https://packagist.org/downloads/",
|
2202 |
+
"license": [
|
2203 |
+
"MIT"
|
2204 |
+
],
|
2205 |
+
"authors": [
|
2206 |
+
{
|
2207 |
+
"name": "Fabien Potencier",
|
2208 |
+
"email": "fabien@symfony.com"
|
2209 |
+
},
|
2210 |
+
{
|
2211 |
+
"name": "Symfony Community",
|
2212 |
+
"homepage": "https://symfony.com/contributors"
|
2213 |
+
}
|
2214 |
+
],
|
2215 |
+
"description": "Symfony Filesystem Component",
|
2216 |
+
"homepage": "https://symfony.com",
|
2217 |
+
"time": "2016-02-22 15:02:30"
|
2218 |
+
},
|
2219 |
+
{
|
2220 |
+
"name": "symfony/finder",
|
2221 |
+
"version": "v3.0.3",
|
2222 |
+
"source": {
|
2223 |
+
"type": "git",
|
2224 |
+
"url": "https://github.com/symfony/finder.git",
|
2225 |
+
"reference": "623bda0abd9aa29e529c8e9c08b3b84171914723"
|
2226 |
+
},
|
2227 |
+
"dist": {
|
2228 |
+
"type": "zip",
|
2229 |
+
"url": "https://api.github.com/repos/symfony/finder/zipball/623bda0abd9aa29e529c8e9c08b3b84171914723",
|
2230 |
+
"reference": "623bda0abd9aa29e529c8e9c08b3b84171914723",
|
2231 |
+
"shasum": ""
|
2232 |
+
},
|
2233 |
+
"require": {
|
2234 |
+
"php": ">=5.5.9"
|
2235 |
+
},
|
2236 |
+
"type": "library",
|
2237 |
+
"extra": {
|
2238 |
+
"branch-alias": {
|
2239 |
+
"dev-master": "3.0-dev"
|
2240 |
+
}
|
2241 |
+
},
|
2242 |
+
"autoload": {
|
2243 |
+
"psr-4": {
|
2244 |
+
"Symfony\\Component\\Finder\\": ""
|
2245 |
+
},
|
2246 |
+
"exclude-from-classmap": [
|
2247 |
+
"/Tests/"
|
2248 |
+
]
|
2249 |
+
},
|
2250 |
+
"notification-url": "https://packagist.org/downloads/",
|
2251 |
+
"license": [
|
2252 |
+
"MIT"
|
2253 |
+
],
|
2254 |
+
"authors": [
|
2255 |
+
{
|
2256 |
+
"name": "Fabien Potencier",
|
2257 |
+
"email": "fabien@symfony.com"
|
2258 |
+
},
|
2259 |
+
{
|
2260 |
+
"name": "Symfony Community",
|
2261 |
+
"homepage": "https://symfony.com/contributors"
|
2262 |
+
}
|
2263 |
+
],
|
2264 |
+
"description": "Symfony Finder Component",
|
2265 |
+
"homepage": "https://symfony.com",
|
2266 |
+
"time": "2016-01-27 05:14:46"
|
2267 |
+
},
|
2268 |
+
{
|
2269 |
+
"name": "symfony/polyfill-mbstring",
|
2270 |
+
"version": "v1.1.1",
|
2271 |
+
"source": {
|
2272 |
+
"type": "git",
|
2273 |
+
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
2274 |
+
"reference": "1289d16209491b584839022f29257ad859b8532d"
|
2275 |
+
},
|
2276 |
+
"dist": {
|
2277 |
+
"type": "zip",
|
2278 |
+
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
|
2279 |
+
"reference": "1289d16209491b584839022f29257ad859b8532d",
|
2280 |
+
"shasum": ""
|
2281 |
+
},
|
2282 |
+
"require": {
|
2283 |
+
"php": ">=5.3.3"
|
2284 |
+
},
|
2285 |
+
"suggest": {
|
2286 |
+
"ext-mbstring": "For best performance"
|
2287 |
+
},
|
2288 |
+
"type": "library",
|
2289 |
+
"extra": {
|
2290 |
+
"branch-alias": {
|
2291 |
+
"dev-master": "1.1-dev"
|
2292 |
+
}
|
2293 |
+
},
|
2294 |
+
"autoload": {
|
2295 |
+
"psr-4": {
|
2296 |
+
"Symfony\\Polyfill\\Mbstring\\": ""
|
2297 |
+
},
|
2298 |
+
"files": [
|
2299 |
+
"bootstrap.php"
|
2300 |
+
]
|
2301 |
+
},
|
2302 |
+
"notification-url": "https://packagist.org/downloads/",
|
2303 |
+
"license": [
|
2304 |
+
"MIT"
|
2305 |
+
],
|
2306 |
+
"authors": [
|
2307 |
+
{
|
2308 |
+
"name": "Nicolas Grekas",
|
2309 |
+
"email": "p@tchwork.com"
|
2310 |
+
},
|
2311 |
+
{
|
2312 |
+
"name": "Symfony Community",
|
2313 |
+
"homepage": "https://symfony.com/contributors"
|
2314 |
+
}
|
2315 |
+
],
|
2316 |
+
"description": "Symfony polyfill for the Mbstring extension",
|
2317 |
+
"homepage": "https://symfony.com",
|
2318 |
+
"keywords": [
|
2319 |
+
"compatibility",
|
2320 |
+
"mbstring",
|
2321 |
+
"polyfill",
|
2322 |
+
"portable",
|
2323 |
+
"shim"
|
2324 |
+
],
|
2325 |
+
"time": "2016-01-20 09:13:37"
|
2326 |
+
},
|
2327 |
+
{
|
2328 |
+
"name": "symfony/yaml",
|
2329 |
+
"version": "v3.0.3",
|
2330 |
+
"source": {
|
2331 |
+
"type": "git",
|
2332 |
+
"url": "https://github.com/symfony/yaml.git",
|
2333 |
+
"reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c"
|
2334 |
+
},
|
2335 |
+
"dist": {
|
2336 |
+
"type": "zip",
|
2337 |
+
"url": "https://api.github.com/repos/symfony/yaml/zipball/b5ba64cd67ecd6887f63868fa781ca094bd1377c",
|
2338 |
+
"reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c",
|
2339 |
+
"shasum": ""
|
2340 |
+
},
|
2341 |
+
"require": {
|
2342 |
+
"php": ">=5.5.9"
|
2343 |
+
},
|
2344 |
+
"type": "library",
|
2345 |
+
"extra": {
|
2346 |
+
"branch-alias": {
|
2347 |
+
"dev-master": "3.0-dev"
|
2348 |
+
}
|
2349 |
+
},
|
2350 |
+
"autoload": {
|
2351 |
+
"psr-4": {
|
2352 |
+
"Symfony\\Component\\Yaml\\": ""
|
2353 |
+
},
|
2354 |
+
"exclude-from-classmap": [
|
2355 |
+
"/Tests/"
|
2356 |
+
]
|
2357 |
+
},
|
2358 |
+
"notification-url": "https://packagist.org/downloads/",
|
2359 |
+
"license": [
|
2360 |
+
"MIT"
|
2361 |
+
],
|
2362 |
+
"authors": [
|
2363 |
+
{
|
2364 |
+
"name": "Fabien Potencier",
|
2365 |
+
"email": "fabien@symfony.com"
|
2366 |
+
},
|
2367 |
+
{
|
2368 |
+
"name": "Symfony Community",
|
2369 |
+
"homepage": "https://symfony.com/contributors"
|
2370 |
+
}
|
2371 |
+
],
|
2372 |
+
"description": "Symfony Yaml Component",
|
2373 |
+
"homepage": "https://symfony.com",
|
2374 |
+
"time": "2016-02-23 15:16:06"
|
2375 |
+
},
|
2376 |
+
{
|
2377 |
+
"name": "xamin/handlebars.php",
|
2378 |
+
"version": "v0.10.3",
|
2379 |
+
"source": {
|
2380 |
+
"type": "git",
|
2381 |
+
"url": "https://github.com/XaminProject/handlebars.php.git",
|
2382 |
+
"reference": "5e1db1d1c7969fae32eab331a3b4d9b93257a709"
|
2383 |
+
},
|
2384 |
+
"dist": {
|
2385 |
+
"type": "zip",
|
2386 |
+
"url": "https://api.github.com/repos/XaminProject/handlebars.php/zipball/5e1db1d1c7969fae32eab331a3b4d9b93257a709",
|
2387 |
+
"reference": "5e1db1d1c7969fae32eab331a3b4d9b93257a709",
|
2388 |
+
"shasum": ""
|
2389 |
+
},
|
2390 |
+
"require-dev": {
|
2391 |
+
"phpunit/phpunit": "~4.4",
|
2392 |
+
"squizlabs/php_codesniffer": "~1.5"
|
2393 |
+
},
|
2394 |
+
"type": "library",
|
2395 |
+
"autoload": {
|
2396 |
+
"psr-0": {
|
2397 |
+
"Handlebars": "src/"
|
2398 |
+
}
|
2399 |
+
},
|
2400 |
+
"notification-url": "https://packagist.org/downloads/",
|
2401 |
+
"license": [
|
2402 |
+
"MIT"
|
2403 |
+
],
|
2404 |
+
"authors": [
|
2405 |
+
{
|
2406 |
+
"name": "fzerorubigd",
|
2407 |
+
"email": "fzerorubigd@gmail.com"
|
2408 |
+
},
|
2409 |
+
{
|
2410 |
+
"name": "Behrooz Shabani (everplays)",
|
2411 |
+
"email": "everplays@gmail.com"
|
2412 |
+
}
|
2413 |
+
],
|
2414 |
+
"description": "Handlebars processor for php",
|
2415 |
+
"homepage": "https://github.com/XaminProject/handlebars.php",
|
2416 |
+
"time": "2015-08-06 22:16:36"
|
2417 |
+
},
|
2418 |
+
{
|
2419 |
+
"name": "xrstf/composer-php52",
|
2420 |
+
"version": "v1.0.19",
|
2421 |
+
"source": {
|
2422 |
+
"type": "hg",
|
2423 |
+
"url": "https://bitbucket.org/xrstf/composer-php52",
|
2424 |
+
"reference": "9a4a9c46d0347b39bf9159815301dc66fc25324e"
|
2425 |
+
},
|
2426 |
+
"dist": {
|
2427 |
+
"type": "zip",
|
2428 |
+
"url": "https://bitbucket.org/xrstf/composer-php52/get/9a4a9c46d0347b39bf9159815301dc66fc25324e.zip",
|
2429 |
+
"reference": "9a4a9c46d0347b39bf9159815301dc66fc25324e",
|
2430 |
+
"shasum": ""
|
2431 |
+
},
|
2432 |
+
"type": "library",
|
2433 |
+
"extra": {
|
2434 |
+
"branch-alias": {
|
2435 |
+
"dev-default": "1.x-dev"
|
2436 |
+
}
|
2437 |
+
},
|
2438 |
+
"autoload": {
|
2439 |
+
"psr-0": {
|
2440 |
+
"xrstf\\Composer52": "lib/"
|
2441 |
+
}
|
2442 |
+
},
|
2443 |
+
"notification-url": "https://packagist.org/downloads/",
|
2444 |
+
"license": [
|
2445 |
+
"MIT"
|
2446 |
+
],
|
2447 |
+
"homepage": "http://www.xrstf.de/",
|
2448 |
+
"time": "2015-10-01 14:11:58"
|
2449 |
+
}
|
2450 |
+
],
|
2451 |
+
"aliases": [],
|
2452 |
+
"minimum-stability": "stable",
|
2453 |
+
"stability-flags": [],
|
2454 |
+
"prefer-stable": false,
|
2455 |
+
"prefer-lowest": false,
|
2456 |
+
"platform": {
|
2457 |
+
"php": ">=5.2"
|
2458 |
+
},
|
2459 |
+
"platform-dev": []
|
2460 |
+
}
|
vendor/overclokk/minimum-requirements/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* May the force be with you
|
4 |
+
*/
|
vendor/overclokk/minimum-requirements/minimum-requirements.php
ADDED
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Minimum_Requirements for Theme and plugin
|
4 |
+
*
|
5 |
+
* @package WP_Requirements
|
6 |
+
* @author Enea Overclokk
|
7 |
+
* @license GPL-2.0+
|
8 |
+
*
|
9 |
+
* @wordpress-plugin
|
10 |
+
* Plugin Name: Minimum_Requirements for Theme and plugin
|
11 |
+
* Plugin URI: https://example.com/plugin-name
|
12 |
+
* Description: ONLY FOR DEVELOPERS - Use it if you want to check the minimum requirements for you theme and plugin, include it in your project.
|
13 |
+
* Version: 1.0.0beta
|
14 |
+
* Author: Enea Overclokk
|
15 |
+
* Author URI: https://www.italystrap.com
|
16 |
+
* Text Domain: minimum_requirements
|
17 |
+
* License: GPL-2.0+
|
18 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! class_exists( 'Minimum_Requirements' ) ) {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Class for the minimum plugin requirements
|
25 |
+
*/
|
26 |
+
class Minimum_Requirements {
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Minimum requirement PHP
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $php_ver;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Minimum requirement WordPress
|
37 |
+
*
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
private $wp_ver;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* The nema of the them/plugin ti verify requirements
|
44 |
+
*
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $name;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* The name of the required plugin
|
51 |
+
*
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
private $plugins;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The list of not found plugin
|
58 |
+
*
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
+
private $not_found = array();
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Init the constructor
|
65 |
+
*
|
66 |
+
* @param string $php_ver The minimum PHP version.
|
67 |
+
* @param string $wp_ver The minimum WP version.
|
68 |
+
* @param string $name The name of the theme/plugin to check.
|
69 |
+
* @param array $plugins Required plugins format plugin_path/plugin_name.php.
|
70 |
+
* @throws InvalidArgumentException Get error if is not a string.
|
71 |
+
*/
|
72 |
+
public function __construct( $php_ver, $wp_ver, $name = '', array $plugins = array() ) {
|
73 |
+
if ( ! is_string( $php_ver ) ) {
|
74 |
+
throw new InvalidArgumentException( 'PHP version must be a string' );
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( ! is_string( $wp_ver ) ) {
|
78 |
+
throw new InvalidArgumentException( 'WordPress version must be a string' );
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( ! is_string( $name ) ) {
|
82 |
+
throw new InvalidArgumentException( 'Plugin name must be a string' );
|
83 |
+
}
|
84 |
+
|
85 |
+
$this->php_ver = $php_ver;
|
86 |
+
|
87 |
+
$this->wp_ver = $wp_ver;
|
88 |
+
|
89 |
+
$this->name = $name;
|
90 |
+
|
91 |
+
$this->plugins = $plugins;
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Checking the compatibility of the plugin with the version of PHP
|
97 |
+
* In case of incompatibility still fully loaded plugin (return)
|
98 |
+
*
|
99 |
+
* @return boolean Check PHP compatibility
|
100 |
+
*/
|
101 |
+
public function is_compatible_php() {
|
102 |
+
|
103 |
+
if ( version_compare( phpversion(), $this->php_ver, '<' ) ) {
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
+
return true;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Checking the compatibility of the plugin with the version of Wordpress
|
112 |
+
* In case of incompatibility still fully loaded plugin (return)
|
113 |
+
*
|
114 |
+
* @return boolean Check WordPress compatibility
|
115 |
+
*/
|
116 |
+
public function is_compatible_wordpress() {
|
117 |
+
|
118 |
+
if ( version_compare( $GLOBALS['wp_version'], $this->wp_ver, '<' ) ) {
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
|
122 |
+
return true;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Check if the required plugin is active
|
127 |
+
*
|
128 |
+
* @return bool Return true if plugin is active
|
129 |
+
*/
|
130 |
+
public function are_required_plugins_active() {
|
131 |
+
|
132 |
+
if ( empty( $this->plugins ) ) {
|
133 |
+
return true;
|
134 |
+
}
|
135 |
+
|
136 |
+
$result = true;
|
137 |
+
|
138 |
+
$_active_plugins = wp_get_active_and_valid_plugins();
|
139 |
+
$active_plugins = array_filter( array_map( array( $this, 'get_plugin_name' ), $_active_plugins ) );
|
140 |
+
|
141 |
+
foreach ( $this->plugins as $plugin ) {
|
142 |
+
|
143 |
+
if ( ! in_array( $plugin, $active_plugins, true ) ) {
|
144 |
+
$result = false;
|
145 |
+
$this->not_found[] = $plugin;
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
return $result;
|
150 |
+
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Checking compatibility with installed versions of the plugin
|
155 |
+
* In case of incompatibility still fully loaded plugin (return)
|
156 |
+
*
|
157 |
+
* @return boolean Check if plugin is compatible
|
158 |
+
*/
|
159 |
+
public function is_compatible_version() {
|
160 |
+
|
161 |
+
if ( $this->is_compatible_php() && $this->is_compatible_wordpress() && $this->are_required_plugins_active() ) {
|
162 |
+
return true;
|
163 |
+
}
|
164 |
+
|
165 |
+
return false;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get the admin notice PHP
|
170 |
+
*
|
171 |
+
* @param bolean $wrap Is wrappable or not.
|
172 |
+
*
|
173 |
+
* @return string Return the admin notice for PHP
|
174 |
+
*/
|
175 |
+
public function get_admin_notices_php( $wrap ) {
|
176 |
+
|
177 |
+
return $this->get_admin_notices_text( $wrap, 'PHP', phpversion(), $this->php_ver );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get the admin notice WordPress
|
182 |
+
*
|
183 |
+
* @param bolean $wrap Is wrappable or not.
|
184 |
+
*
|
185 |
+
* @return string Return the admin notice for WordPress
|
186 |
+
*/
|
187 |
+
public function get_admin_notices_wordpress( $wrap ) {
|
188 |
+
|
189 |
+
return $this->get_admin_notices_text( $wrap, 'WordPress', $GLOBALS['wp_version'], $this->wp_ver );
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Get the admin notice for required plugin if is not activated
|
194 |
+
*
|
195 |
+
* @param bolean $wrap Is wrappable or not.
|
196 |
+
*
|
197 |
+
* @return string Return the admin notice
|
198 |
+
*/
|
199 |
+
public function get_admin_notices_required_plugins( $wrap ) {
|
200 |
+
|
201 |
+
$html = __( 'requires %s plugins to work', 'minimum_requirements' );
|
202 |
+
|
203 |
+
if ( false === $wrap ) {
|
204 |
+
$html = '<div>' . $html . '</div>';
|
205 |
+
} else {
|
206 |
+
$html = '<div class="error"><p><b>' . $this->name . '</b> - ' . $html . '</p></div>';
|
207 |
+
}
|
208 |
+
|
209 |
+
$plugins = implode( ', ', $this->not_found );
|
210 |
+
|
211 |
+
return sprintf( $html, $plugins );
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* A function that creates a generic error to be displayed during
|
216 |
+
* the activation function or on the bulletin board of directors.
|
217 |
+
*
|
218 |
+
* @param bolean $wrap Is wrappable or not.
|
219 |
+
* @param string $s1 PHP or WordPress.
|
220 |
+
* @param string $s2 Current version.
|
221 |
+
* @param string $s3 Required version.
|
222 |
+
*
|
223 |
+
* @return string Display errors
|
224 |
+
*/
|
225 |
+
public function get_admin_notices_text( $wrap, $s1, $s2, $s3 ) {
|
226 |
+
|
227 |
+
$html = __( 'Your server is running %s version %s but this plugin requires at least %s', 'minimum_requirements' );
|
228 |
+
|
229 |
+
if ( false === $wrap ) {
|
230 |
+
$html = '<div>' . $html . '</div>';
|
231 |
+
} else {
|
232 |
+
$html = '<div class="error"><p><b>' . $this->name . '</b> - ' . $html . '</p></div>';
|
233 |
+
}
|
234 |
+
|
235 |
+
return sprintf( $html, $s1, $s2, $s3 );
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Check if plugin is compatible, if it is not then it wont activate
|
240 |
+
* Show error message in case plugin is not compatible
|
241 |
+
*/
|
242 |
+
public function check_compatibility_on_install() {
|
243 |
+
|
244 |
+
if ( ! $this->is_compatible_version() ) {
|
245 |
+
|
246 |
+
$message = __( 'Activation of %s in not possible', 'minimum_requirements' );
|
247 |
+
|
248 |
+
$html = '<div>' . __( 'Activation of ' . $this->name . ' in not possible', 'minimum_requirements' ) . ':</div><ul>';
|
249 |
+
|
250 |
+
if ( ! $this->is_compatible_php() ) {
|
251 |
+
$html .= '<li>' . $this->get_admin_notices_php( false ) . '</li>';
|
252 |
+
}
|
253 |
+
|
254 |
+
if ( ! $this->is_compatible_wordpress() ) {
|
255 |
+
$html .= '<li>' . $this->get_admin_notices_wordpress( false ) . '</li>';
|
256 |
+
}
|
257 |
+
|
258 |
+
if ( ! $this->are_required_plugins_active() ) {
|
259 |
+
$html .= '<li>' . $this->get_admin_notices_required_plugins( false ) . '</li>';
|
260 |
+
}
|
261 |
+
|
262 |
+
$html .= '</ul>';
|
263 |
+
|
264 |
+
wp_die( $html, __( 'Activation of ' . $this->name . ' in not possible', 'minimum_requirements' ), array( 'back_link' => true ) ); // XSS ok.
|
265 |
+
};
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* If the plugin is active, but the minimum requirements are not met
|
270 |
+
* the function is called to add the details on the notice board error
|
271 |
+
* Print error message
|
272 |
+
*/
|
273 |
+
public function load_plugin_admin_notices() {
|
274 |
+
|
275 |
+
if ( ! $this->is_compatible_php() ) {
|
276 |
+
echo $this->get_admin_notices_php( true ); // XSS ok.
|
277 |
+
}
|
278 |
+
|
279 |
+
if ( ! $this->is_compatible_wordpress() ) {
|
280 |
+
echo $this->get_admin_notices_wordpress( true ); // XSS ok.
|
281 |
+
}
|
282 |
+
|
283 |
+
if ( ! $this->are_required_plugins_active() ) {
|
284 |
+
echo $this->get_admin_notices_required_plugins( true ); // XSS ok.
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Get the plugin name
|
290 |
+
*
|
291 |
+
* @param string $plugin The plguin_path/plugin_name.php.
|
292 |
+
*
|
293 |
+
* @return string The plugin name
|
294 |
+
*/
|
295 |
+
private function get_plugin_name( $plugin ) {
|
296 |
+
$plugin_data = get_plugin_data( $plugin );
|
297 |
+
if ( ! ( is_array( $plugin_data ) && isset( $plugin_data['Name'] ) ) ) {
|
298 |
+
return false;
|
299 |
+
}
|
300 |
+
|
301 |
+
return sanitize_title( $plugin_data['Name'] );
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_bootstrap.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// This is global bootstrap for autoloading
|
3 |
+
tad\FunctionMocker\FunctionMocker::init();
|
vendor/overclokk/minimum-requirements/tests/_data/dump.sql
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* Replace this file with actual dump of your database */
|
vendor/overclokk/minimum-requirements/tests/_support/AcceptanceTester.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Inherited Methods
|
6 |
+
* @method void wantToTest($text)
|
7 |
+
* @method void wantTo($text)
|
8 |
+
* @method void execute($callable)
|
9 |
+
* @method void expectTo($prediction)
|
10 |
+
* @method void expect($prediction)
|
11 |
+
* @method void amGoingTo($argumentation)
|
12 |
+
* @method void am($role)
|
13 |
+
* @method void lookForwardTo($achieveValue)
|
14 |
+
* @method void comment($description)
|
15 |
+
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
16 |
+
*
|
17 |
+
* @SuppressWarnings(PHPMD)
|
18 |
+
*/
|
19 |
+
class AcceptanceTester extends \Codeception\Actor
|
20 |
+
{
|
21 |
+
use _generated\AcceptanceTesterActions;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Define custom actions here
|
25 |
+
*/
|
26 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/FunctionalTester.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Inherited Methods
|
6 |
+
* @method void wantToTest($text)
|
7 |
+
* @method void wantTo($text)
|
8 |
+
* @method void execute($callable)
|
9 |
+
* @method void expectTo($prediction)
|
10 |
+
* @method void expect($prediction)
|
11 |
+
* @method void amGoingTo($argumentation)
|
12 |
+
* @method void am($role)
|
13 |
+
* @method void lookForwardTo($achieveValue)
|
14 |
+
* @method void comment($description)
|
15 |
+
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
16 |
+
*
|
17 |
+
* @SuppressWarnings(PHPMD)
|
18 |
+
*/
|
19 |
+
class FunctionalTester extends \Codeception\Actor
|
20 |
+
{
|
21 |
+
use _generated\FunctionalTesterActions;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Define custom actions here
|
25 |
+
*/
|
26 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/Helper/Acceptance.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Helper;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class Acceptance extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/Helper/Functional.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Helper;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class Functional extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/Helper/Unit.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Helper;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class Unit extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/Helper/Wpunit.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Helper;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class Wpunit extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/UnitTester.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Inherited Methods
|
6 |
+
* @method void wantToTest($text)
|
7 |
+
* @method void wantTo($text)
|
8 |
+
* @method void execute($callable)
|
9 |
+
* @method void expectTo($prediction)
|
10 |
+
* @method void expect($prediction)
|
11 |
+
* @method void amGoingTo($argumentation)
|
12 |
+
* @method void am($role)
|
13 |
+
* @method void lookForwardTo($achieveValue)
|
14 |
+
* @method void comment($description)
|
15 |
+
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
16 |
+
*
|
17 |
+
* @SuppressWarnings(PHPMD)
|
18 |
+
*/
|
19 |
+
class UnitTester extends \Codeception\Actor
|
20 |
+
{
|
21 |
+
use _generated\UnitTesterActions;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Define custom actions here
|
25 |
+
*/
|
26 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/WpunitTester.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Inherited Methods
|
6 |
+
* @method void wantToTest($text)
|
7 |
+
* @method void wantTo($text)
|
8 |
+
* @method void execute($callable)
|
9 |
+
* @method void expectTo($prediction)
|
10 |
+
* @method void expect($prediction)
|
11 |
+
* @method void amGoingTo($argumentation)
|
12 |
+
* @method void am($role)
|
13 |
+
* @method void lookForwardTo($achieveValue)
|
14 |
+
* @method void comment($description)
|
15 |
+
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
16 |
+
*
|
17 |
+
* @SuppressWarnings(PHPMD)
|
18 |
+
*/
|
19 |
+
class WpunitTester extends \Codeception\Actor
|
20 |
+
{
|
21 |
+
use _generated\WpunitTesterActions;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Define custom actions here
|
25 |
+
*/
|
26 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/_generated/AcceptanceTesterActions.php
ADDED
@@ -0,0 +1,2560 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] 10b18dcc7198f3d537a7583e5824ecea
|
2 |
+
namespace _generated;
|
3 |
+
|
4 |
+
// This class was automatically generated by build task
|
5 |
+
// You should not change it manually as it will be overwritten on next build
|
6 |
+
// @codingStandardsIgnoreFile
|
7 |
+
|
8 |
+
use Codeception\Module\WPBrowser;
|
9 |
+
use Helper\Acceptance;
|
10 |
+
|
11 |
+
trait AcceptanceTesterActions
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* @return \Codeception\Scenario
|
15 |
+
*/
|
16 |
+
abstract protected function getScenario();
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
21 |
+
*
|
22 |
+
* Returns all the cookies whose name matches a regex pattern.
|
23 |
+
*
|
24 |
+
* @param string $cookiePattern
|
25 |
+
*
|
26 |
+
* @return Cookie|null
|
27 |
+
* @see \Codeception\Module\WPBrowser::grabCookiesWithPattern()
|
28 |
+
*/
|
29 |
+
public function grabCookiesWithPattern($cookiePattern) {
|
30 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookiesWithPattern', func_get_args()));
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
36 |
+
*
|
37 |
+
* Sets the HTTP header to the passed value - which is used on
|
38 |
+
* subsequent HTTP requests through PhpBrowser.
|
39 |
+
*
|
40 |
+
* Example:
|
41 |
+
* ```php
|
42 |
+
* <?php
|
43 |
+
* $I->setHeader('X-Requested-With', 'Codeception');
|
44 |
+
* $I->amOnPage('test-headers.php');
|
45 |
+
* ?>
|
46 |
+
* ```
|
47 |
+
*
|
48 |
+
* @param string $name the name of the request header
|
49 |
+
* @param string $value the value to set it to for subsequent
|
50 |
+
* requests
|
51 |
+
* @see \Codeception\Module\PhpBrowser::setHeader()
|
52 |
+
*/
|
53 |
+
public function setHeader($name, $value) {
|
54 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('setHeader', func_get_args()));
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
60 |
+
*
|
61 |
+
* Deletes the header with the passed name. Subsequent requests
|
62 |
+
* will not have the deleted header in its request.
|
63 |
+
*
|
64 |
+
* Example:
|
65 |
+
* ```php
|
66 |
+
* <?php
|
67 |
+
* $I->setHeader('X-Requested-With', 'Codeception');
|
68 |
+
* $I->amOnPage('test-headers.php');
|
69 |
+
* // ...
|
70 |
+
* $I->deleteHeader('X-Requested-With');
|
71 |
+
* $I->amOnPage('some-other-page.php');
|
72 |
+
* ?>
|
73 |
+
* ```
|
74 |
+
*
|
75 |
+
* @param string $name the name of the header to delete.
|
76 |
+
* @see \Codeception\Module\PhpBrowser::deleteHeader()
|
77 |
+
*/
|
78 |
+
public function deleteHeader($name) {
|
79 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
85 |
+
*
|
86 |
+
* Authenticates user for HTTP_AUTH
|
87 |
+
*
|
88 |
+
* @param $username
|
89 |
+
* @param $password
|
90 |
+
* @see \Codeception\Module\PhpBrowser::amHttpAuthenticated()
|
91 |
+
*/
|
92 |
+
public function amHttpAuthenticated($username, $password) {
|
93 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
/**
|
98 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
99 |
+
*
|
100 |
+
* Open web page at the given absolute URL and sets its hostname as the base host.
|
101 |
+
*
|
102 |
+
* ``` php
|
103 |
+
* <?php
|
104 |
+
* $I->amOnUrl('http://codeception.com');
|
105 |
+
* $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
|
106 |
+
* ?>
|
107 |
+
* ```
|
108 |
+
* @see \Codeception\Module\PhpBrowser::amOnUrl()
|
109 |
+
*/
|
110 |
+
public function amOnUrl($url) {
|
111 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
/**
|
116 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
117 |
+
*
|
118 |
+
* Changes the subdomain for the 'url' configuration parameter.
|
119 |
+
* Does not open a page; use `amOnPage` for that.
|
120 |
+
*
|
121 |
+
* ``` php
|
122 |
+
* <?php
|
123 |
+
* // If config is: 'http://mysite.com'
|
124 |
+
* // or config is: 'http://www.mysite.com'
|
125 |
+
* // or config is: 'http://company.mysite.com'
|
126 |
+
*
|
127 |
+
* $I->amOnSubdomain('user');
|
128 |
+
* $I->amOnPage('/');
|
129 |
+
* // moves to http://user.mysite.com/
|
130 |
+
* ?>
|
131 |
+
* ```
|
132 |
+
*
|
133 |
+
* @param $subdomain
|
134 |
+
*
|
135 |
+
* @return mixed
|
136 |
+
* @see \Codeception\Module\PhpBrowser::amOnSubdomain()
|
137 |
+
*/
|
138 |
+
public function amOnSubdomain($subdomain) {
|
139 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
|
140 |
+
}
|
141 |
+
|
142 |
+
|
143 |
+
/**
|
144 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
145 |
+
*
|
146 |
+
* Low-level API method.
|
147 |
+
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
|
148 |
+
*
|
149 |
+
* Example:
|
150 |
+
*
|
151 |
+
* ``` php
|
152 |
+
* <?php
|
153 |
+
* $I->executeInGuzzle(function (\GuzzleHttp\Client $client) {
|
154 |
+
* $client->get('/get', ['query' => ['foo' => 'bar']]);
|
155 |
+
* });
|
156 |
+
* ?>
|
157 |
+
* ```
|
158 |
+
*
|
159 |
+
* It is not recommended to use this command on a regular basis.
|
160 |
+
* If Codeception lacks important Guzzle Client methods, implement them and submit patches.
|
161 |
+
*
|
162 |
+
* @param callable $function
|
163 |
+
* @see \Codeception\Module\PhpBrowser::executeInGuzzle()
|
164 |
+
*/
|
165 |
+
public function executeInGuzzle($function) {
|
166 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
|
167 |
+
}
|
168 |
+
|
169 |
+
|
170 |
+
/**
|
171 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
172 |
+
*
|
173 |
+
* Opens the page for the given relative URI.
|
174 |
+
*
|
175 |
+
* ``` php
|
176 |
+
* <?php
|
177 |
+
* // opens front page
|
178 |
+
* $I->amOnPage('/');
|
179 |
+
* // opens /register page
|
180 |
+
* $I->amOnPage('/register');
|
181 |
+
* ```
|
182 |
+
*
|
183 |
+
* @param $page
|
184 |
+
* @see \Codeception\Lib\InnerBrowser::amOnPage()
|
185 |
+
*/
|
186 |
+
public function amOnPage($page) {
|
187 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
|
188 |
+
}
|
189 |
+
|
190 |
+
|
191 |
+
/**
|
192 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
193 |
+
*
|
194 |
+
* Perform a click on a link or a button, given by a locator.
|
195 |
+
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
196 |
+
* For buttons, the "value" attribute, "name" attribute, and inner text are searched.
|
197 |
+
* For links, the link text is searched.
|
198 |
+
* For images, the "alt" attribute and inner text of any parent links are searched.
|
199 |
+
*
|
200 |
+
* The second parameter is a context (CSS or XPath locator) to narrow the search.
|
201 |
+
*
|
202 |
+
* Note that if the locator matches a button of type `submit`, the form will be submitted.
|
203 |
+
*
|
204 |
+
* ``` php
|
205 |
+
* <?php
|
206 |
+
* // simple link
|
207 |
+
* $I->click('Logout');
|
208 |
+
* // button of form
|
209 |
+
* $I->click('Submit');
|
210 |
+
* // CSS button
|
211 |
+
* $I->click('#form input[type=submit]');
|
212 |
+
* // XPath
|
213 |
+
* $I->click('//form/*[@type=submit]');
|
214 |
+
* // link in context
|
215 |
+
* $I->click('Logout', '#nav');
|
216 |
+
* // using strict locator
|
217 |
+
* $I->click(['link' => 'Login']);
|
218 |
+
* ?>
|
219 |
+
* ```
|
220 |
+
*
|
221 |
+
* @param $link
|
222 |
+
* @param $context
|
223 |
+
* @see \Codeception\Lib\InnerBrowser::click()
|
224 |
+
*/
|
225 |
+
public function click($link, $context = null) {
|
226 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args()));
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
/**
|
231 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
232 |
+
*
|
233 |
+
* Checks that the current page contains the given string (case insensitive).
|
234 |
+
*
|
235 |
+
* You can specify a specific HTML element (via CSS or XPath) as the second
|
236 |
+
* parameter to only search within that element.
|
237 |
+
*
|
238 |
+
* ``` php
|
239 |
+
* <?php
|
240 |
+
* $I->see('Logout'); // I can suppose user is logged in
|
241 |
+
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
242 |
+
* $I->see('Sign Up', '//body/h1'); // with XPath
|
243 |
+
* ```
|
244 |
+
*
|
245 |
+
* Note that the search is done after stripping all HTML tags from the body,
|
246 |
+
* so `$I->see('strong')` will return true for strings like:
|
247 |
+
*
|
248 |
+
* - `<p>I am Stronger than thou</p>`
|
249 |
+
* - `<script>document.createElement('strong');</script>`
|
250 |
+
*
|
251 |
+
* But will *not* be true for strings like:
|
252 |
+
*
|
253 |
+
* - `<strong>Home</strong>`
|
254 |
+
* - `<div class="strong">Home</strong>`
|
255 |
+
* - `<!-- strong -->`
|
256 |
+
*
|
257 |
+
* For checking the raw source code, use `seeInSource()`.
|
258 |
+
*
|
259 |
+
* @param $text
|
260 |
+
* @param null $selector
|
261 |
+
* Conditional Assertion: Test won't be stopped on fail
|
262 |
+
* @see \Codeception\Lib\InnerBrowser::see()
|
263 |
+
*/
|
264 |
+
public function canSee($text, $selector = null) {
|
265 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
|
266 |
+
}
|
267 |
+
/**
|
268 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
269 |
+
*
|
270 |
+
* Checks that the current page contains the given string (case insensitive).
|
271 |
+
*
|
272 |
+
* You can specify a specific HTML element (via CSS or XPath) as the second
|
273 |
+
* parameter to only search within that element.
|
274 |
+
*
|
275 |
+
* ``` php
|
276 |
+
* <?php
|
277 |
+
* $I->see('Logout'); // I can suppose user is logged in
|
278 |
+
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
279 |
+
* $I->see('Sign Up', '//body/h1'); // with XPath
|
280 |
+
* ```
|
281 |
+
*
|
282 |
+
* Note that the search is done after stripping all HTML tags from the body,
|
283 |
+
* so `$I->see('strong')` will return true for strings like:
|
284 |
+
*
|
285 |
+
* - `<p>I am Stronger than thou</p>`
|
286 |
+
* - `<script>document.createElement('strong');</script>`
|
287 |
+
*
|
288 |
+
* But will *not* be true for strings like:
|
289 |
+
*
|
290 |
+
* - `<strong>Home</strong>`
|
291 |
+
* - `<div class="strong">Home</strong>`
|
292 |
+
* - `<!-- strong -->`
|
293 |
+
*
|
294 |
+
* For checking the raw source code, use `seeInSource()`.
|
295 |
+
*
|
296 |
+
* @param $text
|
297 |
+
* @param null $selector
|
298 |
+
* @see \Codeception\Lib\InnerBrowser::see()
|
299 |
+
*/
|
300 |
+
public function see($text, $selector = null) {
|
301 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
|
302 |
+
}
|
303 |
+
|
304 |
+
|
305 |
+
/**
|
306 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
307 |
+
*
|
308 |
+
* Checks that the current page doesn't contain the text specified (case insensitive).
|
309 |
+
* Give a locator as the second parameter to match a specific region.
|
310 |
+
*
|
311 |
+
* ```php
|
312 |
+
* <?php
|
313 |
+
* $I->dontSee('Login'); // I can suppose user is already logged in
|
314 |
+
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
315 |
+
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
316 |
+
* ```
|
317 |
+
*
|
318 |
+
* Note that the search is done after stripping all HTML tags from the body,
|
319 |
+
* so `$I->dontSee('strong')` will fail on strings like:
|
320 |
+
*
|
321 |
+
* - `<p>I am Stronger than thou</p>`
|
322 |
+
* - `<script>document.createElement('strong');</script>`
|
323 |
+
*
|
324 |
+
* But will ignore strings like:
|
325 |
+
*
|
326 |
+
* - `<strong>Home</strong>`
|
327 |
+
* - `<div class="strong">Home</strong>`
|
328 |
+
* - `<!-- strong -->`
|
329 |
+
*
|
330 |
+
* For checking the raw source code, use `seeInSource()`.
|
331 |
+
*
|
332 |
+
* @param $text
|
333 |
+
* @param null $selector
|
334 |
+
* Conditional Assertion: Test won't be stopped on fail
|
335 |
+
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
336 |
+
*/
|
337 |
+
public function cantSee($text, $selector = null) {
|
338 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
|
339 |
+
}
|
340 |
+
/**
|
341 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
342 |
+
*
|
343 |
+
* Checks that the current page doesn't contain the text specified (case insensitive).
|
344 |
+
* Give a locator as the second parameter to match a specific region.
|
345 |
+
*
|
346 |
+
* ```php
|
347 |
+
* <?php
|
348 |
+
* $I->dontSee('Login'); // I can suppose user is already logged in
|
349 |
+
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
350 |
+
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
351 |
+
* ```
|
352 |
+
*
|
353 |
+
* Note that the search is done after stripping all HTML tags from the body,
|
354 |
+
* so `$I->dontSee('strong')` will fail on strings like:
|
355 |
+
*
|
356 |
+
* - `<p>I am Stronger than thou</p>`
|
357 |
+
* - `<script>document.createElement('strong');</script>`
|
358 |
+
*
|
359 |
+
* But will ignore strings like:
|
360 |
+
*
|
361 |
+
* - `<strong>Home</strong>`
|
362 |
+
* - `<div class="strong">Home</strong>`
|
363 |
+
* - `<!-- strong -->`
|
364 |
+
*
|
365 |
+
* For checking the raw source code, use `seeInSource()`.
|
366 |
+
*
|
367 |
+
* @param $text
|
368 |
+
* @param null $selector
|
369 |
+
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
370 |
+
*/
|
371 |
+
public function dontSee($text, $selector = null) {
|
372 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
|
373 |
+
}
|
374 |
+
|
375 |
+
|
376 |
+
/**
|
377 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
378 |
+
*
|
379 |
+
* Checks that the current page contains the given string in its
|
380 |
+
* raw source code.
|
381 |
+
*
|
382 |
+
* ``` php
|
383 |
+
* <?php
|
384 |
+
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
385 |
+
* ```
|
386 |
+
*
|
387 |
+
* @param $raw
|
388 |
+
* Conditional Assertion: Test won't be stopped on fail
|
389 |
+
* @see \Codeception\Lib\InnerBrowser::seeInSource()
|
390 |
+
*/
|
391 |
+
public function canSeeInSource($raw) {
|
392 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
|
393 |
+
}
|
394 |
+
/**
|
395 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
396 |
+
*
|
397 |
+
* Checks that the current page contains the given string in its
|
398 |
+
* raw source code.
|
399 |
+
*
|
400 |
+
* ``` php
|
401 |
+
* <?php
|
402 |
+
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
403 |
+
* ```
|
404 |
+
*
|
405 |
+
* @param $raw
|
406 |
+
* @see \Codeception\Lib\InnerBrowser::seeInSource()
|
407 |
+
*/
|
408 |
+
public function seeInSource($raw) {
|
409 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
|
410 |
+
}
|
411 |
+
|
412 |
+
|
413 |
+
/**
|
414 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
415 |
+
*
|
416 |
+
* Checks that the current page contains the given string in its
|
417 |
+
* raw source code.
|
418 |
+
*
|
419 |
+
* ```php
|
420 |
+
* <?php
|
421 |
+
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
422 |
+
* ```
|
423 |
+
*
|
424 |
+
* @param $raw
|
425 |
+
* Conditional Assertion: Test won't be stopped on fail
|
426 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
|
427 |
+
*/
|
428 |
+
public function cantSeeInSource($raw) {
|
429 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
|
430 |
+
}
|
431 |
+
/**
|
432 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
433 |
+
*
|
434 |
+
* Checks that the current page contains the given string in its
|
435 |
+
* raw source code.
|
436 |
+
*
|
437 |
+
* ```php
|
438 |
+
* <?php
|
439 |
+
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
440 |
+
* ```
|
441 |
+
*
|
442 |
+
* @param $raw
|
443 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
|
444 |
+
*/
|
445 |
+
public function dontSeeInSource($raw) {
|
446 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
|
447 |
+
}
|
448 |
+
|
449 |
+
|
450 |
+
/**
|
451 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
452 |
+
*
|
453 |
+
* Checks that there's a link with the specified text.
|
454 |
+
* Give a full URL as the second parameter to match links with that exact URL.
|
455 |
+
*
|
456 |
+
* ``` php
|
457 |
+
* <?php
|
458 |
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
459 |
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
460 |
+
* ?>
|
461 |
+
* ```
|
462 |
+
*
|
463 |
+
* @param $text
|
464 |
+
* @param null $url
|
465 |
+
* Conditional Assertion: Test won't be stopped on fail
|
466 |
+
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
467 |
+
*/
|
468 |
+
public function canSeeLink($text, $url = null) {
|
469 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
|
470 |
+
}
|
471 |
+
/**
|
472 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
473 |
+
*
|
474 |
+
* Checks that there's a link with the specified text.
|
475 |
+
* Give a full URL as the second parameter to match links with that exact URL.
|
476 |
+
*
|
477 |
+
* ``` php
|
478 |
+
* <?php
|
479 |
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
480 |
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
481 |
+
* ?>
|
482 |
+
* ```
|
483 |
+
*
|
484 |
+
* @param $text
|
485 |
+
* @param null $url
|
486 |
+
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
487 |
+
*/
|
488 |
+
public function seeLink($text, $url = null) {
|
489 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
|
490 |
+
}
|
491 |
+
|
492 |
+
|
493 |
+
/**
|
494 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
495 |
+
*
|
496 |
+
* Checks that the page doesn't contain a link with the given string.
|
497 |
+
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
498 |
+
*
|
499 |
+
* ``` php
|
500 |
+
* <?php
|
501 |
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
502 |
+
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
503 |
+
* ?>
|
504 |
+
* ```
|
505 |
+
*
|
506 |
+
* @param $text
|
507 |
+
* @param null $url
|
508 |
+
* Conditional Assertion: Test won't be stopped on fail
|
509 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
510 |
+
*/
|
511 |
+
public function cantSeeLink($text, $url = null) {
|
512 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
|
513 |
+
}
|
514 |
+
/**
|
515 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
516 |
+
*
|
517 |
+
* Checks that the page doesn't contain a link with the given string.
|
518 |
+
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
519 |
+
*
|
520 |
+
* ``` php
|
521 |
+
* <?php
|
522 |
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
523 |
+
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
524 |
+
* ?>
|
525 |
+
* ```
|
526 |
+
*
|
527 |
+
* @param $text
|
528 |
+
* @param null $url
|
529 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
530 |
+
*/
|
531 |
+
public function dontSeeLink($text, $url = null) {
|
532 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
|
533 |
+
}
|
534 |
+
|
535 |
+
|
536 |
+
/**
|
537 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
538 |
+
*
|
539 |
+
* Checks that current URI contains the given string.
|
540 |
+
*
|
541 |
+
* ``` php
|
542 |
+
* <?php
|
543 |
+
* // to match: /home/dashboard
|
544 |
+
* $I->seeInCurrentUrl('home');
|
545 |
+
* // to match: /users/1
|
546 |
+
* $I->seeInCurrentUrl('/users/');
|
547 |
+
* ?>
|
548 |
+
* ```
|
549 |
+
*
|
550 |
+
* @param $uri
|
551 |
+
* Conditional Assertion: Test won't be stopped on fail
|
552 |
+
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
553 |
+
*/
|
554 |
+
public function canSeeInCurrentUrl($uri) {
|
555 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
|
556 |
+
}
|
557 |
+
/**
|
558 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
559 |
+
*
|
560 |
+
* Checks that current URI contains the given string.
|
561 |
+
*
|
562 |
+
* ``` php
|
563 |
+
* <?php
|
564 |
+
* // to match: /home/dashboard
|
565 |
+
* $I->seeInCurrentUrl('home');
|
566 |
+
* // to match: /users/1
|
567 |
+
* $I->seeInCurrentUrl('/users/');
|
568 |
+
* ?>
|
569 |
+
* ```
|
570 |
+
*
|
571 |
+
* @param $uri
|
572 |
+
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
573 |
+
*/
|
574 |
+
public function seeInCurrentUrl($uri) {
|
575 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
|
576 |
+
}
|
577 |
+
|
578 |
+
|
579 |
+
/**
|
580 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
581 |
+
*
|
582 |
+
* Checks that the current URI doesn't contain the given string.
|
583 |
+
*
|
584 |
+
* ``` php
|
585 |
+
* <?php
|
586 |
+
* $I->dontSeeInCurrentUrl('/users/');
|
587 |
+
* ?>
|
588 |
+
* ```
|
589 |
+
*
|
590 |
+
* @param $uri
|
591 |
+
* Conditional Assertion: Test won't be stopped on fail
|
592 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
593 |
+
*/
|
594 |
+
public function cantSeeInCurrentUrl($uri) {
|
595 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
|
596 |
+
}
|
597 |
+
/**
|
598 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
599 |
+
*
|
600 |
+
* Checks that the current URI doesn't contain the given string.
|
601 |
+
*
|
602 |
+
* ``` php
|
603 |
+
* <?php
|
604 |
+
* $I->dontSeeInCurrentUrl('/users/');
|
605 |
+
* ?>
|
606 |
+
* ```
|
607 |
+
*
|
608 |
+
* @param $uri
|
609 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
610 |
+
*/
|
611 |
+
public function dontSeeInCurrentUrl($uri) {
|
612 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
|
613 |
+
}
|
614 |
+
|
615 |
+
|
616 |
+
/**
|
617 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
618 |
+
*
|
619 |
+
* Checks that the current URL is equal to the given string.
|
620 |
+
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
621 |
+
*
|
622 |
+
* ``` php
|
623 |
+
* <?php
|
624 |
+
* // to match root url
|
625 |
+
* $I->seeCurrentUrlEquals('/');
|
626 |
+
* ?>
|
627 |
+
* ```
|
628 |
+
*
|
629 |
+
* @param $uri
|
630 |
+
* Conditional Assertion: Test won't be stopped on fail
|
631 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
632 |
+
*/
|
633 |
+
public function canSeeCurrentUrlEquals($uri) {
|
634 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
|
635 |
+
}
|
636 |
+
/**
|
637 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
638 |
+
*
|
639 |
+
* Checks that the current URL is equal to the given string.
|
640 |
+
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
641 |
+
*
|
642 |
+
* ``` php
|
643 |
+
* <?php
|
644 |
+
* // to match root url
|
645 |
+
* $I->seeCurrentUrlEquals('/');
|
646 |
+
* ?>
|
647 |
+
* ```
|
648 |
+
*
|
649 |
+
* @param $uri
|
650 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
651 |
+
*/
|
652 |
+
public function seeCurrentUrlEquals($uri) {
|
653 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
|
654 |
+
}
|
655 |
+
|
656 |
+
|
657 |
+
/**
|
658 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
659 |
+
*
|
660 |
+
* Checks that the current URL doesn't equal the given string.
|
661 |
+
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
662 |
+
*
|
663 |
+
* ``` php
|
664 |
+
* <?php
|
665 |
+
* // current url is not root
|
666 |
+
* $I->dontSeeCurrentUrlEquals('/');
|
667 |
+
* ?>
|
668 |
+
* ```
|
669 |
+
*
|
670 |
+
* @param $uri
|
671 |
+
* Conditional Assertion: Test won't be stopped on fail
|
672 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
673 |
+
*/
|
674 |
+
public function cantSeeCurrentUrlEquals($uri) {
|
675 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
|
676 |
+
}
|
677 |
+
/**
|
678 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
679 |
+
*
|
680 |
+
* Checks that the current URL doesn't equal the given string.
|
681 |
+
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
682 |
+
*
|
683 |
+
* ``` php
|
684 |
+
* <?php
|
685 |
+
* // current url is not root
|
686 |
+
* $I->dontSeeCurrentUrlEquals('/');
|
687 |
+
* ?>
|
688 |
+
* ```
|
689 |
+
*
|
690 |
+
* @param $uri
|
691 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
692 |
+
*/
|
693 |
+
public function dontSeeCurrentUrlEquals($uri) {
|
694 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
|
695 |
+
}
|
696 |
+
|
697 |
+
|
698 |
+
/**
|
699 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
700 |
+
*
|
701 |
+
* Checks that the current URL matches the given regular expression.
|
702 |
+
*
|
703 |
+
* ``` php
|
704 |
+
* <?php
|
705 |
+
* // to match root url
|
706 |
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
707 |
+
* ?>
|
708 |
+
* ```
|
709 |
+
*
|
710 |
+
* @param $uri
|
711 |
+
* Conditional Assertion: Test won't be stopped on fail
|
712 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
713 |
+
*/
|
714 |
+
public function canSeeCurrentUrlMatches($uri) {
|
715 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
|
716 |
+
}
|
717 |
+
/**
|
718 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
719 |
+
*
|
720 |
+
* Checks that the current URL matches the given regular expression.
|
721 |
+
*
|
722 |
+
* ``` php
|
723 |
+
* <?php
|
724 |
+
* // to match root url
|
725 |
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
726 |
+
* ?>
|
727 |
+
* ```
|
728 |
+
*
|
729 |
+
* @param $uri
|
730 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
731 |
+
*/
|
732 |
+
public function seeCurrentUrlMatches($uri) {
|
733 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
|
734 |
+
}
|
735 |
+
|
736 |
+
|
737 |
+
/**
|
738 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
739 |
+
*
|
740 |
+
* Checks that current url doesn't match the given regular expression.
|
741 |
+
*
|
742 |
+
* ``` php
|
743 |
+
* <?php
|
744 |
+
* // to match root url
|
745 |
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
746 |
+
* ?>
|
747 |
+
* ```
|
748 |
+
*
|
749 |
+
* @param $uri
|
750 |
+
* Conditional Assertion: Test won't be stopped on fail
|
751 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
752 |
+
*/
|
753 |
+
public function cantSeeCurrentUrlMatches($uri) {
|
754 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
|
755 |
+
}
|
756 |
+
/**
|
757 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
758 |
+
*
|
759 |
+
* Checks that current url doesn't match the given regular expression.
|
760 |
+
*
|
761 |
+
* ``` php
|
762 |
+
* <?php
|
763 |
+
* // to match root url
|
764 |
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
765 |
+
* ?>
|
766 |
+
* ```
|
767 |
+
*
|
768 |
+
* @param $uri
|
769 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
770 |
+
*/
|
771 |
+
public function dontSeeCurrentUrlMatches($uri) {
|
772 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
|
773 |
+
}
|
774 |
+
|
775 |
+
|
776 |
+
/**
|
777 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
778 |
+
*
|
779 |
+
* Executes the given regular expression against the current URI and returns the first match.
|
780 |
+
* If no parameters are provided, the full URI is returned.
|
781 |
+
*
|
782 |
+
* ``` php
|
783 |
+
* <?php
|
784 |
+
* $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
|
785 |
+
* $uri = $I->grabFromCurrentUrl();
|
786 |
+
* ?>
|
787 |
+
* ```
|
788 |
+
*
|
789 |
+
* @param null $uri
|
790 |
+
*
|
791 |
+
* @return mixed
|
792 |
+
* @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
|
793 |
+
*/
|
794 |
+
public function grabFromCurrentUrl($uri = null) {
|
795 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
|
796 |
+
}
|
797 |
+
|
798 |
+
|
799 |
+
/**
|
800 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
801 |
+
*
|
802 |
+
* Checks that the specified checkbox is checked.
|
803 |
+
*
|
804 |
+
* ``` php
|
805 |
+
* <?php
|
806 |
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
807 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
808 |
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
809 |
+
* ?>
|
810 |
+
* ```
|
811 |
+
*
|
812 |
+
* @param $checkbox
|
813 |
+
* Conditional Assertion: Test won't be stopped on fail
|
814 |
+
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
815 |
+
*/
|
816 |
+
public function canSeeCheckboxIsChecked($checkbox) {
|
817 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
|
818 |
+
}
|
819 |
+
/**
|
820 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
821 |
+
*
|
822 |
+
* Checks that the specified checkbox is checked.
|
823 |
+
*
|
824 |
+
* ``` php
|
825 |
+
* <?php
|
826 |
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
827 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
828 |
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
829 |
+
* ?>
|
830 |
+
* ```
|
831 |
+
*
|
832 |
+
* @param $checkbox
|
833 |
+
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
834 |
+
*/
|
835 |
+
public function seeCheckboxIsChecked($checkbox) {
|
836 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
|
837 |
+
}
|
838 |
+
|
839 |
+
|
840 |
+
/**
|
841 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
842 |
+
*
|
843 |
+
* Check that the specified checkbox is unchecked.
|
844 |
+
*
|
845 |
+
* ``` php
|
846 |
+
* <?php
|
847 |
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
848 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
849 |
+
* ?>
|
850 |
+
* ```
|
851 |
+
*
|
852 |
+
* @param $checkbox
|
853 |
+
* Conditional Assertion: Test won't be stopped on fail
|
854 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
855 |
+
*/
|
856 |
+
public function cantSeeCheckboxIsChecked($checkbox) {
|
857 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
|
858 |
+
}
|
859 |
+
/**
|
860 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
861 |
+
*
|
862 |
+
* Check that the specified checkbox is unchecked.
|
863 |
+
*
|
864 |
+
* ``` php
|
865 |
+
* <?php
|
866 |
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
867 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
868 |
+
* ?>
|
869 |
+
* ```
|
870 |
+
*
|
871 |
+
* @param $checkbox
|
872 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
873 |
+
*/
|
874 |
+
public function dontSeeCheckboxIsChecked($checkbox) {
|
875 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
|
876 |
+
}
|
877 |
+
|
878 |
+
|
879 |
+
/**
|
880 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
881 |
+
*
|
882 |
+
* Checks that the given input field or textarea contains the given value.
|
883 |
+
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
884 |
+
*
|
885 |
+
* ``` php
|
886 |
+
* <?php
|
887 |
+
* $I->seeInField('Body','Type your comment here');
|
888 |
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
889 |
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
890 |
+
* $I->seeInField('#searchform input','Search');
|
891 |
+
* $I->seeInField('//form/*[@name=search]','Search');
|
892 |
+
* $I->seeInField(['name' => 'search'], 'Search');
|
893 |
+
* ?>
|
894 |
+
* ```
|
895 |
+
*
|
896 |
+
* @param $field
|
897 |
+
* @param $value
|
898 |
+
* Conditional Assertion: Test won't be stopped on fail
|
899 |
+
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
900 |
+
*/
|
901 |
+
public function canSeeInField($field, $value) {
|
902 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
|
903 |
+
}
|
904 |
+
/**
|
905 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
906 |
+
*
|
907 |
+
* Checks that the given input field or textarea contains the given value.
|
908 |
+
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
909 |
+
*
|
910 |
+
* ``` php
|
911 |
+
* <?php
|
912 |
+
* $I->seeInField('Body','Type your comment here');
|
913 |
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
914 |
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
915 |
+
* $I->seeInField('#searchform input','Search');
|
916 |
+
* $I->seeInField('//form/*[@name=search]','Search');
|
917 |
+
* $I->seeInField(['name' => 'search'], 'Search');
|
918 |
+
* ?>
|
919 |
+
* ```
|
920 |
+
*
|
921 |
+
* @param $field
|
922 |
+
* @param $value
|
923 |
+
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
924 |
+
*/
|
925 |
+
public function seeInField($field, $value) {
|
926 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
|
927 |
+
}
|
928 |
+
|
929 |
+
|
930 |
+
/**
|
931 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
932 |
+
*
|
933 |
+
* Checks that an input field or textarea doesn't contain the given value.
|
934 |
+
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
935 |
+
*
|
936 |
+
* ``` php
|
937 |
+
* <?php
|
938 |
+
* $I->dontSeeInField('Body','Type your comment here');
|
939 |
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
940 |
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
941 |
+
* $I->dontSeeInField('#searchform input','Search');
|
942 |
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
943 |
+
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
944 |
+
* ?>
|
945 |
+
* ```
|
946 |
+
*
|
947 |
+
* @param $field
|
948 |
+
* @param $value
|
949 |
+
* Conditional Assertion: Test won't be stopped on fail
|
950 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
951 |
+
*/
|
952 |
+
public function cantSeeInField($field, $value) {
|
953 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
|
954 |
+
}
|
955 |
+
/**
|
956 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
957 |
+
*
|
958 |
+
* Checks that an input field or textarea doesn't contain the given value.
|
959 |
+
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
960 |
+
*
|
961 |
+
* ``` php
|
962 |
+
* <?php
|
963 |
+
* $I->dontSeeInField('Body','Type your comment here');
|
964 |
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
965 |
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
966 |
+
* $I->dontSeeInField('#searchform input','Search');
|
967 |
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
968 |
+
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
969 |
+
* ?>
|
970 |
+
* ```
|
971 |
+
*
|
972 |
+
* @param $field
|
973 |
+
* @param $value
|
974 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
975 |
+
*/
|
976 |
+
public function dontSeeInField($field, $value) {
|
977 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
|
978 |
+
}
|
979 |
+
|
980 |
+
|
981 |
+
/**
|
982 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
983 |
+
*
|
984 |
+
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
985 |
+
* passed selector.
|
986 |
+
*
|
987 |
+
* ``` php
|
988 |
+
* <?php
|
989 |
+
* $I->seeInFormFields('form[name=myform]', [
|
990 |
+
* 'input1' => 'value',
|
991 |
+
* 'input2' => 'other value',
|
992 |
+
* ]);
|
993 |
+
* ?>
|
994 |
+
* ```
|
995 |
+
*
|
996 |
+
* For multi-select elements, or to check values of multiple elements with the same name, an
|
997 |
+
* array may be passed:
|
998 |
+
*
|
999 |
+
* ``` php
|
1000 |
+
* <?php
|
1001 |
+
* $I->seeInFormFields('.form-class', [
|
1002 |
+
* 'multiselect' => [
|
1003 |
+
* 'value1',
|
1004 |
+
* 'value2',
|
1005 |
+
* ],
|
1006 |
+
* 'checkbox[]' => [
|
1007 |
+
* 'a checked value',
|
1008 |
+
* 'another checked value',
|
1009 |
+
* ],
|
1010 |
+
* ]);
|
1011 |
+
* ?>
|
1012 |
+
* ```
|
1013 |
+
*
|
1014 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1015 |
+
*
|
1016 |
+
* ``` php
|
1017 |
+
* <?php
|
1018 |
+
* $I->seeInFormFields('#form-id', [
|
1019 |
+
* 'checkbox1' => true, // passes if checked
|
1020 |
+
* 'checkbox2' => false, // passes if unchecked
|
1021 |
+
* ]);
|
1022 |
+
* ?>
|
1023 |
+
* ```
|
1024 |
+
*
|
1025 |
+
* Pair this with submitForm for quick testing magic.
|
1026 |
+
*
|
1027 |
+
* ``` php
|
1028 |
+
* <?php
|
1029 |
+
* $form = [
|
1030 |
+
* 'field1' => 'value',
|
1031 |
+
* 'field2' => 'another value',
|
1032 |
+
* 'checkbox1' => true,
|
1033 |
+
* // ...
|
1034 |
+
* ];
|
1035 |
+
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
1036 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
1037 |
+
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
1038 |
+
* ?>
|
1039 |
+
* ```
|
1040 |
+
*
|
1041 |
+
* @param $formSelector
|
1042 |
+
* @param $params
|
1043 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1044 |
+
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
1045 |
+
*/
|
1046 |
+
public function canSeeInFormFields($formSelector, $params) {
|
1047 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
|
1048 |
+
}
|
1049 |
+
/**
|
1050 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1051 |
+
*
|
1052 |
+
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
1053 |
+
* passed selector.
|
1054 |
+
*
|
1055 |
+
* ``` php
|
1056 |
+
* <?php
|
1057 |
+
* $I->seeInFormFields('form[name=myform]', [
|
1058 |
+
* 'input1' => 'value',
|
1059 |
+
* 'input2' => 'other value',
|
1060 |
+
* ]);
|
1061 |
+
* ?>
|
1062 |
+
* ```
|
1063 |
+
*
|
1064 |
+
* For multi-select elements, or to check values of multiple elements with the same name, an
|
1065 |
+
* array may be passed:
|
1066 |
+
*
|
1067 |
+
* ``` php
|
1068 |
+
* <?php
|
1069 |
+
* $I->seeInFormFields('.form-class', [
|
1070 |
+
* 'multiselect' => [
|
1071 |
+
* 'value1',
|
1072 |
+
* 'value2',
|
1073 |
+
* ],
|
1074 |
+
* 'checkbox[]' => [
|
1075 |
+
* 'a checked value',
|
1076 |
+
* 'another checked value',
|
1077 |
+
* ],
|
1078 |
+
* ]);
|
1079 |
+
* ?>
|
1080 |
+
* ```
|
1081 |
+
*
|
1082 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1083 |
+
*
|
1084 |
+
* ``` php
|
1085 |
+
* <?php
|
1086 |
+
* $I->seeInFormFields('#form-id', [
|
1087 |
+
* 'checkbox1' => true, // passes if checked
|
1088 |
+
* 'checkbox2' => false, // passes if unchecked
|
1089 |
+
* ]);
|
1090 |
+
* ?>
|
1091 |
+
* ```
|
1092 |
+
*
|
1093 |
+
* Pair this with submitForm for quick testing magic.
|
1094 |
+
*
|
1095 |
+
* ``` php
|
1096 |
+
* <?php
|
1097 |
+
* $form = [
|
1098 |
+
* 'field1' => 'value',
|
1099 |
+
* 'field2' => 'another value',
|
1100 |
+
* 'checkbox1' => true,
|
1101 |
+
* // ...
|
1102 |
+
* ];
|
1103 |
+
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
1104 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
1105 |
+
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
1106 |
+
* ?>
|
1107 |
+
* ```
|
1108 |
+
*
|
1109 |
+
* @param $formSelector
|
1110 |
+
* @param $params
|
1111 |
+
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
1112 |
+
*/
|
1113 |
+
public function seeInFormFields($formSelector, $params) {
|
1114 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
|
1118 |
+
/**
|
1119 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1120 |
+
*
|
1121 |
+
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
1122 |
+
* the passed selector.
|
1123 |
+
*
|
1124 |
+
* ``` php
|
1125 |
+
* <?php
|
1126 |
+
* $I->dontSeeInFormFields('form[name=myform]', [
|
1127 |
+
* 'input1' => 'non-existent value',
|
1128 |
+
* 'input2' => 'other non-existent value',
|
1129 |
+
* ]);
|
1130 |
+
* ?>
|
1131 |
+
* ```
|
1132 |
+
*
|
1133 |
+
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1134 |
+
* as the value:
|
1135 |
+
*
|
1136 |
+
* ``` php
|
1137 |
+
* <?php
|
1138 |
+
* $I->dontSeeInFormFields('.form-class', [
|
1139 |
+
* 'fieldName' => [
|
1140 |
+
* 'This value shouldn\'t be set',
|
1141 |
+
* 'And this value shouldn\'t be set',
|
1142 |
+
* ],
|
1143 |
+
* ]);
|
1144 |
+
* ?>
|
1145 |
+
* ```
|
1146 |
+
*
|
1147 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1148 |
+
*
|
1149 |
+
* ``` php
|
1150 |
+
* <?php
|
1151 |
+
* $I->dontSeeInFormFields('#form-id', [
|
1152 |
+
* 'checkbox1' => true, // fails if checked
|
1153 |
+
* 'checkbox2' => false, // fails if unchecked
|
1154 |
+
* ]);
|
1155 |
+
* ?>
|
1156 |
+
* ```
|
1157 |
+
*
|
1158 |
+
* @param $formSelector
|
1159 |
+
* @param $params
|
1160 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1161 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1162 |
+
*/
|
1163 |
+
public function cantSeeInFormFields($formSelector, $params) {
|
1164 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
|
1165 |
+
}
|
1166 |
+
/**
|
1167 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1168 |
+
*
|
1169 |
+
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
1170 |
+
* the passed selector.
|
1171 |
+
*
|
1172 |
+
* ``` php
|
1173 |
+
* <?php
|
1174 |
+
* $I->dontSeeInFormFields('form[name=myform]', [
|
1175 |
+
* 'input1' => 'non-existent value',
|
1176 |
+
* 'input2' => 'other non-existent value',
|
1177 |
+
* ]);
|
1178 |
+
* ?>
|
1179 |
+
* ```
|
1180 |
+
*
|
1181 |
+
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1182 |
+
* as the value:
|
1183 |
+
*
|
1184 |
+
* ``` php
|
1185 |
+
* <?php
|
1186 |
+
* $I->dontSeeInFormFields('.form-class', [
|
1187 |
+
* 'fieldName' => [
|
1188 |
+
* 'This value shouldn\'t be set',
|
1189 |
+
* 'And this value shouldn\'t be set',
|
1190 |
+
* ],
|
1191 |
+
* ]);
|
1192 |
+
* ?>
|
1193 |
+
* ```
|
1194 |
+
*
|
1195 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1196 |
+
*
|
1197 |
+
* ``` php
|
1198 |
+
* <?php
|
1199 |
+
* $I->dontSeeInFormFields('#form-id', [
|
1200 |
+
* 'checkbox1' => true, // fails if checked
|
1201 |
+
* 'checkbox2' => false, // fails if unchecked
|
1202 |
+
* ]);
|
1203 |
+
* ?>
|
1204 |
+
* ```
|
1205 |
+
*
|
1206 |
+
* @param $formSelector
|
1207 |
+
* @param $params
|
1208 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1209 |
+
*/
|
1210 |
+
public function dontSeeInFormFields($formSelector, $params) {
|
1211 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
|
1215 |
+
/**
|
1216 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1217 |
+
*
|
1218 |
+
* Submits the given form on the page, optionally with the given form
|
1219 |
+
* values. Pass the form field's values as an array in the second
|
1220 |
+
* parameter.
|
1221 |
+
*
|
1222 |
+
* Although this function can be used as a short-hand version of
|
1223 |
+
* `fillField()`, `selectOption()`, `click()` etc. it has some important
|
1224 |
+
* differences:
|
1225 |
+
*
|
1226 |
+
* * Only field *names* may be used, not CSS/XPath selectors nor field labels
|
1227 |
+
* * If a field is sent to this function that does *not* exist on the page,
|
1228 |
+
* it will silently be added to the HTTP request. This is helpful for testing
|
1229 |
+
* some types of forms, but be aware that you will *not* get an exception
|
1230 |
+
* like you would if you called `fillField()` or `selectOption()` with
|
1231 |
+
* a missing field.
|
1232 |
+
*
|
1233 |
+
* Fields that are not provided will be filled by their values from the page,
|
1234 |
+
* or from any previous calls to `fillField()`, `selectOption()` etc.
|
1235 |
+
* You don't need to click the 'Submit' button afterwards.
|
1236 |
+
* This command itself triggers the request to form's action.
|
1237 |
+
*
|
1238 |
+
* You can optionally specify which button's value to include
|
1239 |
+
* in the request with the last parameter (as an alternative to
|
1240 |
+
* explicitly setting its value in the second parameter), as
|
1241 |
+
* button values are not otherwise included in the request.
|
1242 |
+
*
|
1243 |
+
* Examples:
|
1244 |
+
*
|
1245 |
+
* ``` php
|
1246 |
+
* <?php
|
1247 |
+
* $I->submitForm('#login', [
|
1248 |
+
* 'login' => 'davert',
|
1249 |
+
* 'password' => '123456'
|
1250 |
+
* ]);
|
1251 |
+
* // or
|
1252 |
+
* $I->submitForm('#login', [
|
1253 |
+
* 'login' => 'davert',
|
1254 |
+
* 'password' => '123456'
|
1255 |
+
* ], 'submitButtonName');
|
1256 |
+
*
|
1257 |
+
* ```
|
1258 |
+
*
|
1259 |
+
* For example, given this sample "Sign Up" form:
|
1260 |
+
*
|
1261 |
+
* ``` html
|
1262 |
+
* <form action="/sign_up">
|
1263 |
+
* Login:
|
1264 |
+
* <input type="text" name="user[login]" /><br/>
|
1265 |
+
* Password:
|
1266 |
+
* <input type="password" name="user[password]" /><br/>
|
1267 |
+
* Do you agree to our terms?
|
1268 |
+
* <input type="checkbox" name="user[agree]" /><br/>
|
1269 |
+
* Select pricing plan:
|
1270 |
+
* <select name="plan">
|
1271 |
+
* <option value="1">Free</option>
|
1272 |
+
* <option value="2" selected="selected">Paid</option>
|
1273 |
+
* </select>
|
1274 |
+
* <input type="submit" name="submitButton" value="Submit" />
|
1275 |
+
* </form>
|
1276 |
+
* ```
|
1277 |
+
*
|
1278 |
+
* You could write the following to submit it:
|
1279 |
+
*
|
1280 |
+
* ``` php
|
1281 |
+
* <?php
|
1282 |
+
* $I->submitForm(
|
1283 |
+
* '#userForm',
|
1284 |
+
* [
|
1285 |
+
* 'user' => [
|
1286 |
+
* 'login' => 'Davert',
|
1287 |
+
* 'password' => '123456',
|
1288 |
+
* 'agree' => true
|
1289 |
+
* ]
|
1290 |
+
* ],
|
1291 |
+
* 'submitButton'
|
1292 |
+
* );
|
1293 |
+
* ```
|
1294 |
+
* Note that "2" will be the submitted value for the "plan" field, as it is
|
1295 |
+
* the selected option.
|
1296 |
+
*
|
1297 |
+
* You can also emulate a JavaScript submission by not specifying any
|
1298 |
+
* buttons in the third parameter to submitForm.
|
1299 |
+
*
|
1300 |
+
* ```php
|
1301 |
+
* <?php
|
1302 |
+
* $I->submitForm(
|
1303 |
+
* '#userForm',
|
1304 |
+
* [
|
1305 |
+
* 'user' => [
|
1306 |
+
* 'login' => 'Davert',
|
1307 |
+
* 'password' => '123456',
|
1308 |
+
* 'agree' => true
|
1309 |
+
* ]
|
1310 |
+
* ]
|
1311 |
+
* );
|
1312 |
+
* ```
|
1313 |
+
*
|
1314 |
+
* This function works well when paired with `seeInFormFields()`
|
1315 |
+
* for quickly testing CRUD interfaces and form validation logic.
|
1316 |
+
*
|
1317 |
+
* ``` php
|
1318 |
+
* <?php
|
1319 |
+
* $form = [
|
1320 |
+
* 'field1' => 'value',
|
1321 |
+
* 'field2' => 'another value',
|
1322 |
+
* 'checkbox1' => true,
|
1323 |
+
* // ...
|
1324 |
+
* ];
|
1325 |
+
* $I->submitForm('#my-form', $form, 'submitButton');
|
1326 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
1327 |
+
* $I->seeInFormFields('#my-form', $form);
|
1328 |
+
* ```
|
1329 |
+
*
|
1330 |
+
* Parameter values can be set to arrays for multiple input fields
|
1331 |
+
* of the same name, or multi-select combo boxes. For checkboxes,
|
1332 |
+
* you can use either the string value or boolean `true`/`false` which will
|
1333 |
+
* be replaced by the checkbox's value in the DOM.
|
1334 |
+
*
|
1335 |
+
* ``` php
|
1336 |
+
* <?php
|
1337 |
+
* $I->submitForm('#my-form', [
|
1338 |
+
* 'field1' => 'value',
|
1339 |
+
* 'checkbox' => [
|
1340 |
+
* 'value of first checkbox',
|
1341 |
+
* 'value of second checkbox',
|
1342 |
+
* ],
|
1343 |
+
* 'otherCheckboxes' => [
|
1344 |
+
* true,
|
1345 |
+
* false,
|
1346 |
+
* false
|
1347 |
+
* ],
|
1348 |
+
* 'multiselect' => [
|
1349 |
+
* 'first option value',
|
1350 |
+
* 'second option value'
|
1351 |
+
* ]
|
1352 |
+
* ]);
|
1353 |
+
* ```
|
1354 |
+
*
|
1355 |
+
* Mixing string and boolean values for a checkbox's value is not supported
|
1356 |
+
* and may produce unexpected results.
|
1357 |
+
*
|
1358 |
+
* Field names ending in `[]` must be passed without the trailing square
|
1359 |
+
* bracket characters, and must contain an array for its value. This allows
|
1360 |
+
* submitting multiple values with the same name, consider:
|
1361 |
+
*
|
1362 |
+
* ```php
|
1363 |
+
* <?php
|
1364 |
+
* // This will NOT work correctly
|
1365 |
+
* $I->submitForm('#my-form', [
|
1366 |
+
* 'field[]' => 'value',
|
1367 |
+
* 'field[]' => 'another value', // 'field[]' is already a defined key
|
1368 |
+
* ]);
|
1369 |
+
* ```
|
1370 |
+
*
|
1371 |
+
* The solution is to pass an array value:
|
1372 |
+
*
|
1373 |
+
* ```php
|
1374 |
+
* <?php
|
1375 |
+
* // This way both values are submitted
|
1376 |
+
* $I->submitForm('#my-form', [
|
1377 |
+
* 'field' => [
|
1378 |
+
* 'value',
|
1379 |
+
* 'another value',
|
1380 |
+
* ]
|
1381 |
+
* ]);
|
1382 |
+
* ```
|
1383 |
+
*
|
1384 |
+
* @param $selector
|
1385 |
+
* @param $params
|
1386 |
+
* @param $button
|
1387 |
+
* @see \Codeception\Lib\InnerBrowser::submitForm()
|
1388 |
+
*/
|
1389 |
+
public function submitForm($selector, $params, $button = null) {
|
1390 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
|
1391 |
+
}
|
1392 |
+
|
1393 |
+
|
1394 |
+
/**
|
1395 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1396 |
+
*
|
1397 |
+
* Fills a text field or textarea with the given string.
|
1398 |
+
*
|
1399 |
+
* ``` php
|
1400 |
+
* <?php
|
1401 |
+
* $I->fillField("//input[@type='text']", "Hello World!");
|
1402 |
+
* $I->fillField(['name' => 'email'], 'jon@mail.com');
|
1403 |
+
* ?>
|
1404 |
+
* ```
|
1405 |
+
*
|
1406 |
+
* @param $field
|
1407 |
+
* @param $value
|
1408 |
+
* @see \Codeception\Lib\InnerBrowser::fillField()
|
1409 |
+
*/
|
1410 |
+
public function fillField($field, $value) {
|
1411 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
|
1415 |
+
/**
|
1416 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1417 |
+
*
|
1418 |
+
* Selects an option in a select tag or in radio button group.
|
1419 |
+
*
|
1420 |
+
* ``` php
|
1421 |
+
* <?php
|
1422 |
+
* $I->selectOption('form select[name=account]', 'Premium');
|
1423 |
+
* $I->selectOption('form input[name=payment]', 'Monthly');
|
1424 |
+
* $I->selectOption('//form/select[@name=account]', 'Monthly');
|
1425 |
+
* ?>
|
1426 |
+
* ```
|
1427 |
+
*
|
1428 |
+
* Provide an array for the second argument to select multiple options:
|
1429 |
+
*
|
1430 |
+
* ``` php
|
1431 |
+
* <?php
|
1432 |
+
* $I->selectOption('Which OS do you use?', array('Windows','Linux'));
|
1433 |
+
* ?>
|
1434 |
+
* ```
|
1435 |
+
*
|
1436 |
+
* @param $select
|
1437 |
+
* @param $option
|
1438 |
+
* @see \Codeception\Lib\InnerBrowser::selectOption()
|
1439 |
+
*/
|
1440 |
+
public function selectOption($select, $option) {
|
1441 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
|
1445 |
+
/**
|
1446 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1447 |
+
*
|
1448 |
+
* Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
|
1449 |
+
*
|
1450 |
+
* ``` php
|
1451 |
+
* <?php
|
1452 |
+
* $I->checkOption('#agree');
|
1453 |
+
* ?>
|
1454 |
+
* ```
|
1455 |
+
*
|
1456 |
+
* @param $option
|
1457 |
+
* @see \Codeception\Lib\InnerBrowser::checkOption()
|
1458 |
+
*/
|
1459 |
+
public function checkOption($option) {
|
1460 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
|
1461 |
+
}
|
1462 |
+
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1466 |
+
*
|
1467 |
+
* Unticks a checkbox.
|
1468 |
+
*
|
1469 |
+
* ``` php
|
1470 |
+
* <?php
|
1471 |
+
* $I->uncheckOption('#notify');
|
1472 |
+
* ?>
|
1473 |
+
* ```
|
1474 |
+
*
|
1475 |
+
* @param $option
|
1476 |
+
* @see \Codeception\Lib\InnerBrowser::uncheckOption()
|
1477 |
+
*/
|
1478 |
+
public function uncheckOption($option) {
|
1479 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
|
1483 |
+
/**
|
1484 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1485 |
+
*
|
1486 |
+
* Attaches a file relative to the Codeception data directory to the given file upload field.
|
1487 |
+
*
|
1488 |
+
* ``` php
|
1489 |
+
* <?php
|
1490 |
+
* // file is stored in 'tests/_data/prices.xls'
|
1491 |
+
* $I->attachFile('input[@type="file"]', 'prices.xls');
|
1492 |
+
* ?>
|
1493 |
+
* ```
|
1494 |
+
*
|
1495 |
+
* @param $field
|
1496 |
+
* @param $filename
|
1497 |
+
* @see \Codeception\Lib\InnerBrowser::attachFile()
|
1498 |
+
*/
|
1499 |
+
public function attachFile($field, $filename) {
|
1500 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
|
1504 |
+
/**
|
1505 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1506 |
+
*
|
1507 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1508 |
+
* This action sends a GET ajax request with specified params.
|
1509 |
+
*
|
1510 |
+
* See ->sendAjaxPostRequest for examples.
|
1511 |
+
*
|
1512 |
+
* @param $uri
|
1513 |
+
* @param $params
|
1514 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
|
1515 |
+
*/
|
1516 |
+
public function sendAjaxGetRequest($uri, $params = null) {
|
1517 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
|
1521 |
+
/**
|
1522 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1523 |
+
*
|
1524 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1525 |
+
* This action sends a POST ajax request with specified params.
|
1526 |
+
* Additional params can be passed as array.
|
1527 |
+
*
|
1528 |
+
* Example:
|
1529 |
+
*
|
1530 |
+
* Imagine that by clicking checkbox you trigger ajax request which updates user settings.
|
1531 |
+
* We emulate that click by running this ajax request manually.
|
1532 |
+
*
|
1533 |
+
* ``` php
|
1534 |
+
* <?php
|
1535 |
+
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
|
1536 |
+
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
|
1537 |
+
*
|
1538 |
+
* ```
|
1539 |
+
*
|
1540 |
+
* @param $uri
|
1541 |
+
* @param $params
|
1542 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
|
1543 |
+
*/
|
1544 |
+
public function sendAjaxPostRequest($uri, $params = null) {
|
1545 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
|
1546 |
+
}
|
1547 |
+
|
1548 |
+
|
1549 |
+
/**
|
1550 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1551 |
+
*
|
1552 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1553 |
+
* This action sends an ajax request with specified method and params.
|
1554 |
+
*
|
1555 |
+
* Example:
|
1556 |
+
*
|
1557 |
+
* You need to perform an ajax request specifying the HTTP method.
|
1558 |
+
*
|
1559 |
+
* ``` php
|
1560 |
+
* <?php
|
1561 |
+
* $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
|
1562 |
+
*
|
1563 |
+
* ```
|
1564 |
+
*
|
1565 |
+
* @param $method
|
1566 |
+
* @param $uri
|
1567 |
+
* @param $params
|
1568 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
|
1569 |
+
*/
|
1570 |
+
public function sendAjaxRequest($method, $uri, $params = null) {
|
1571 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
|
1572 |
+
}
|
1573 |
+
|
1574 |
+
|
1575 |
+
/**
|
1576 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1577 |
+
*
|
1578 |
+
* Finds and returns the text contents of the given element.
|
1579 |
+
* If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression.
|
1580 |
+
*
|
1581 |
+
* ``` php
|
1582 |
+
* <?php
|
1583 |
+
* $heading = $I->grabTextFrom('h1');
|
1584 |
+
* $heading = $I->grabTextFrom('descendant-or-self::h1');
|
1585 |
+
* $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
|
1586 |
+
* ?>
|
1587 |
+
* ```
|
1588 |
+
*
|
1589 |
+
* @param $cssOrXPathOrRegex
|
1590 |
+
*
|
1591 |
+
* @return mixed
|
1592 |
+
* @see \Codeception\Lib\InnerBrowser::grabTextFrom()
|
1593 |
+
*/
|
1594 |
+
public function grabTextFrom($cssOrXPathOrRegex) {
|
1595 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
|
1599 |
+
/**
|
1600 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1601 |
+
*
|
1602 |
+
* Grabs the value of the given attribute value from the given element.
|
1603 |
+
* Fails if element is not found.
|
1604 |
+
*
|
1605 |
+
* ``` php
|
1606 |
+
* <?php
|
1607 |
+
* $I->grabAttributeFrom('#tooltip', 'title');
|
1608 |
+
* ?>
|
1609 |
+
* ```
|
1610 |
+
*
|
1611 |
+
*
|
1612 |
+
* @param $cssOrXpath
|
1613 |
+
* @param $attribute
|
1614 |
+
*
|
1615 |
+
* @return mixed
|
1616 |
+
* @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
|
1617 |
+
*/
|
1618 |
+
public function grabAttributeFrom($cssOrXpath, $attribute) {
|
1619 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
|
1620 |
+
}
|
1621 |
+
|
1622 |
+
|
1623 |
+
/**
|
1624 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1625 |
+
*
|
1626 |
+
* Grabs either the text content, or attribute values, of nodes
|
1627 |
+
* matched by $cssOrXpath and returns them as an array.
|
1628 |
+
*
|
1629 |
+
* ```html
|
1630 |
+
* <a href="#first">First</a>
|
1631 |
+
* <a href="#second">Second</a>
|
1632 |
+
* <a href="#third">Third</a>
|
1633 |
+
* ```
|
1634 |
+
*
|
1635 |
+
* ```php
|
1636 |
+
* <?php
|
1637 |
+
* // would return ['First', 'Second', 'Third']
|
1638 |
+
* $aLinkText = $I->grabMultiple('a');
|
1639 |
+
*
|
1640 |
+
* // would return ['#first', '#second', '#third']
|
1641 |
+
* $aLinks = $I->grabMultiple('a', 'href');
|
1642 |
+
* ?>
|
1643 |
+
* ```
|
1644 |
+
*
|
1645 |
+
* @param $cssOrXpath
|
1646 |
+
* @param $attribute
|
1647 |
+
* @return string[]
|
1648 |
+
* @see \Codeception\Lib\InnerBrowser::grabMultiple()
|
1649 |
+
*/
|
1650 |
+
public function grabMultiple($cssOrXpath, $attribute = null) {
|
1651 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args()));
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
|
1655 |
+
/**
|
1656 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1657 |
+
*
|
1658 |
+
* @param $field
|
1659 |
+
*
|
1660 |
+
* @return array|mixed|null|string
|
1661 |
+
* @see \Codeception\Lib\InnerBrowser::grabValueFrom()
|
1662 |
+
*/
|
1663 |
+
public function grabValueFrom($field) {
|
1664 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
|
1668 |
+
/**
|
1669 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1670 |
+
*
|
1671 |
+
* Sets a cookie with the given name and value.
|
1672 |
+
* You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument.
|
1673 |
+
*
|
1674 |
+
* ``` php
|
1675 |
+
* <?php
|
1676 |
+
* $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
|
1677 |
+
* ?>
|
1678 |
+
* ```
|
1679 |
+
*
|
1680 |
+
* @param $name
|
1681 |
+
* @param $val
|
1682 |
+
* @param array $params
|
1683 |
+
*
|
1684 |
+
* @return mixed
|
1685 |
+
* @see \Codeception\Lib\InnerBrowser::setCookie()
|
1686 |
+
*/
|
1687 |
+
public function setCookie($name, $val, $params = null) {
|
1688 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
|
1689 |
+
}
|
1690 |
+
|
1691 |
+
|
1692 |
+
/**
|
1693 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1694 |
+
*
|
1695 |
+
* Grabs a cookie value.
|
1696 |
+
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1697 |
+
*
|
1698 |
+
* @param $cookie
|
1699 |
+
*
|
1700 |
+
* @param array $params
|
1701 |
+
* @return mixed
|
1702 |
+
* @see \Codeception\Lib\InnerBrowser::grabCookie()
|
1703 |
+
*/
|
1704 |
+
public function grabCookie($cookie, $params = null) {
|
1705 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
|
1709 |
+
/**
|
1710 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1711 |
+
*
|
1712 |
+
* Checks that a cookie with the given name is set.
|
1713 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1714 |
+
*
|
1715 |
+
* ``` php
|
1716 |
+
* <?php
|
1717 |
+
* $I->seeCookie('PHPSESSID');
|
1718 |
+
* ?>
|
1719 |
+
* ```
|
1720 |
+
*
|
1721 |
+
* @param $cookie
|
1722 |
+
* @param array $params
|
1723 |
+
* @return mixed
|
1724 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1725 |
+
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1726 |
+
*/
|
1727 |
+
public function canSeeCookie($cookie, $params = null) {
|
1728 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
|
1729 |
+
}
|
1730 |
+
/**
|
1731 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1732 |
+
*
|
1733 |
+
* Checks that a cookie with the given name is set.
|
1734 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1735 |
+
*
|
1736 |
+
* ``` php
|
1737 |
+
* <?php
|
1738 |
+
* $I->seeCookie('PHPSESSID');
|
1739 |
+
* ?>
|
1740 |
+
* ```
|
1741 |
+
*
|
1742 |
+
* @param $cookie
|
1743 |
+
* @param array $params
|
1744 |
+
* @return mixed
|
1745 |
+
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1746 |
+
*/
|
1747 |
+
public function seeCookie($cookie, $params = null) {
|
1748 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
|
1752 |
+
/**
|
1753 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1754 |
+
*
|
1755 |
+
* Checks that there isn't a cookie with the given name.
|
1756 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1757 |
+
*
|
1758 |
+
* @param $cookie
|
1759 |
+
*
|
1760 |
+
* @param array $params
|
1761 |
+
* @return mixed
|
1762 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1763 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1764 |
+
*/
|
1765 |
+
public function cantSeeCookie($cookie, $params = null) {
|
1766 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
|
1767 |
+
}
|
1768 |
+
/**
|
1769 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1770 |
+
*
|
1771 |
+
* Checks that there isn't a cookie with the given name.
|
1772 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1773 |
+
*
|
1774 |
+
* @param $cookie
|
1775 |
+
*
|
1776 |
+
* @param array $params
|
1777 |
+
* @return mixed
|
1778 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1779 |
+
*/
|
1780 |
+
public function dontSeeCookie($cookie, $params = null) {
|
1781 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
|
1782 |
+
}
|
1783 |
+
|
1784 |
+
|
1785 |
+
/**
|
1786 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1787 |
+
*
|
1788 |
+
* Unsets cookie with the given name.
|
1789 |
+
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1790 |
+
*
|
1791 |
+
* @param $cookie
|
1792 |
+
*
|
1793 |
+
* @param array $params
|
1794 |
+
* @return mixed
|
1795 |
+
* @see \Codeception\Lib\InnerBrowser::resetCookie()
|
1796 |
+
*/
|
1797 |
+
public function resetCookie($name, $params = null) {
|
1798 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
|
1802 |
+
/**
|
1803 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1804 |
+
*
|
1805 |
+
* Checks that the given element exists on the page and is visible.
|
1806 |
+
* You can also specify expected attributes of this element.
|
1807 |
+
*
|
1808 |
+
* ``` php
|
1809 |
+
* <?php
|
1810 |
+
* $I->seeElement('.error');
|
1811 |
+
* $I->seeElement('//form/input[1]');
|
1812 |
+
* $I->seeElement('input', ['name' => 'login']);
|
1813 |
+
* $I->seeElement('input', ['value' => '123456']);
|
1814 |
+
*
|
1815 |
+
* // strict locator in first arg, attributes in second
|
1816 |
+
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1817 |
+
* ?>
|
1818 |
+
* ```
|
1819 |
+
*
|
1820 |
+
* @param $selector
|
1821 |
+
* @param array $attributes
|
1822 |
+
* @return
|
1823 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1824 |
+
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1825 |
+
*/
|
1826 |
+
public function canSeeElement($selector, $attributes = null) {
|
1827 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
|
1828 |
+
}
|
1829 |
+
/**
|
1830 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1831 |
+
*
|
1832 |
+
* Checks that the given element exists on the page and is visible.
|
1833 |
+
* You can also specify expected attributes of this element.
|
1834 |
+
*
|
1835 |
+
* ``` php
|
1836 |
+
* <?php
|
1837 |
+
* $I->seeElement('.error');
|
1838 |
+
* $I->seeElement('//form/input[1]');
|
1839 |
+
* $I->seeElement('input', ['name' => 'login']);
|
1840 |
+
* $I->seeElement('input', ['value' => '123456']);
|
1841 |
+
*
|
1842 |
+
* // strict locator in first arg, attributes in second
|
1843 |
+
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1844 |
+
* ?>
|
1845 |
+
* ```
|
1846 |
+
*
|
1847 |
+
* @param $selector
|
1848 |
+
* @param array $attributes
|
1849 |
+
* @return
|
1850 |
+
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1851 |
+
*/
|
1852 |
+
public function seeElement($selector, $attributes = null) {
|
1853 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
|
1857 |
+
/**
|
1858 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1859 |
+
*
|
1860 |
+
* Checks that the given element is invisible or not present on the page.
|
1861 |
+
* You can also specify expected attributes of this element.
|
1862 |
+
*
|
1863 |
+
* ``` php
|
1864 |
+
* <?php
|
1865 |
+
* $I->dontSeeElement('.error');
|
1866 |
+
* $I->dontSeeElement('//form/input[1]');
|
1867 |
+
* $I->dontSeeElement('input', ['name' => 'login']);
|
1868 |
+
* $I->dontSeeElement('input', ['value' => '123456']);
|
1869 |
+
* ?>
|
1870 |
+
* ```
|
1871 |
+
*
|
1872 |
+
* @param $selector
|
1873 |
+
* @param array $attributes
|
1874 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1875 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1876 |
+
*/
|
1877 |
+
public function cantSeeElement($selector, $attributes = null) {
|
1878 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
|
1879 |
+
}
|
1880 |
+
/**
|
1881 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1882 |
+
*
|
1883 |
+
* Checks that the given element is invisible or not present on the page.
|
1884 |
+
* You can also specify expected attributes of this element.
|
1885 |
+
*
|
1886 |
+
* ``` php
|
1887 |
+
* <?php
|
1888 |
+
* $I->dontSeeElement('.error');
|
1889 |
+
* $I->dontSeeElement('//form/input[1]');
|
1890 |
+
* $I->dontSeeElement('input', ['name' => 'login']);
|
1891 |
+
* $I->dontSeeElement('input', ['value' => '123456']);
|
1892 |
+
* ?>
|
1893 |
+
* ```
|
1894 |
+
*
|
1895 |
+
* @param $selector
|
1896 |
+
* @param array $attributes
|
1897 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1898 |
+
*/
|
1899 |
+
public function dontSeeElement($selector, $attributes = null) {
|
1900 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
|
1901 |
+
}
|
1902 |
+
|
1903 |
+
|
1904 |
+
/**
|
1905 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1906 |
+
*
|
1907 |
+
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1908 |
+
*
|
1909 |
+
* ``` php
|
1910 |
+
* <?php
|
1911 |
+
* $I->seeNumberOfElements('tr', 10);
|
1912 |
+
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1913 |
+
* ?>
|
1914 |
+
* ```
|
1915 |
+
* @param $selector
|
1916 |
+
* @param mixed $expected :
|
1917 |
+
* - string: strict number
|
1918 |
+
* - array: range of numbers [0,10]
|
1919 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1920 |
+
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1921 |
+
*/
|
1922 |
+
public function canSeeNumberOfElements($selector, $expected) {
|
1923 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
|
1924 |
+
}
|
1925 |
+
/**
|
1926 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1927 |
+
*
|
1928 |
+
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1929 |
+
*
|
1930 |
+
* ``` php
|
1931 |
+
* <?php
|
1932 |
+
* $I->seeNumberOfElements('tr', 10);
|
1933 |
+
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1934 |
+
* ?>
|
1935 |
+
* ```
|
1936 |
+
* @param $selector
|
1937 |
+
* @param mixed $expected :
|
1938 |
+
* - string: strict number
|
1939 |
+
* - array: range of numbers [0,10]
|
1940 |
+
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1941 |
+
*/
|
1942 |
+
public function seeNumberOfElements($selector, $expected) {
|
1943 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
|
1944 |
+
}
|
1945 |
+
|
1946 |
+
|
1947 |
+
/**
|
1948 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1949 |
+
*
|
1950 |
+
* Checks that the given option is selected.
|
1951 |
+
*
|
1952 |
+
* ``` php
|
1953 |
+
* <?php
|
1954 |
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1955 |
+
* ?>
|
1956 |
+
* ```
|
1957 |
+
*
|
1958 |
+
* @param $selector
|
1959 |
+
* @param $optionText
|
1960 |
+
*
|
1961 |
+
* @return mixed
|
1962 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1963 |
+
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1964 |
+
*/
|
1965 |
+
public function canSeeOptionIsSelected($selector, $optionText) {
|
1966 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
|
1967 |
+
}
|
1968 |
+
/**
|
1969 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1970 |
+
*
|
1971 |
+
* Checks that the given option is selected.
|
1972 |
+
*
|
1973 |
+
* ``` php
|
1974 |
+
* <?php
|
1975 |
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1976 |
+
* ?>
|
1977 |
+
* ```
|
1978 |
+
*
|
1979 |
+
* @param $selector
|
1980 |
+
* @param $optionText
|
1981 |
+
*
|
1982 |
+
* @return mixed
|
1983 |
+
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1984 |
+
*/
|
1985 |
+
public function seeOptionIsSelected($selector, $optionText) {
|
1986 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
|
1990 |
+
/**
|
1991 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1992 |
+
*
|
1993 |
+
* Checks that the given option is not selected.
|
1994 |
+
*
|
1995 |
+
* ``` php
|
1996 |
+
* <?php
|
1997 |
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1998 |
+
* ?>
|
1999 |
+
* ```
|
2000 |
+
*
|
2001 |
+
* @param $selector
|
2002 |
+
* @param $optionText
|
2003 |
+
*
|
2004 |
+
* @return mixed
|
2005 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2006 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
2007 |
+
*/
|
2008 |
+
public function cantSeeOptionIsSelected($selector, $optionText) {
|
2009 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
|
2010 |
+
}
|
2011 |
+
/**
|
2012 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2013 |
+
*
|
2014 |
+
* Checks that the given option is not selected.
|
2015 |
+
*
|
2016 |
+
* ``` php
|
2017 |
+
* <?php
|
2018 |
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
2019 |
+
* ?>
|
2020 |
+
* ```
|
2021 |
+
*
|
2022 |
+
* @param $selector
|
2023 |
+
* @param $optionText
|
2024 |
+
*
|
2025 |
+
* @return mixed
|
2026 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
2027 |
+
*/
|
2028 |
+
public function dontSeeOptionIsSelected($selector, $optionText) {
|
2029 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
|
2030 |
+
}
|
2031 |
+
|
2032 |
+
|
2033 |
+
/**
|
2034 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2035 |
+
*
|
2036 |
+
* Asserts that current page has 404 response status code.
|
2037 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2038 |
+
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
2039 |
+
*/
|
2040 |
+
public function canSeePageNotFound() {
|
2041 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
|
2042 |
+
}
|
2043 |
+
/**
|
2044 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2045 |
+
*
|
2046 |
+
* Asserts that current page has 404 response status code.
|
2047 |
+
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
2048 |
+
*/
|
2049 |
+
public function seePageNotFound() {
|
2050 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
|
2054 |
+
/**
|
2055 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2056 |
+
*
|
2057 |
+
* Checks that response code is equal to value provided.
|
2058 |
+
*
|
2059 |
+
* @param $code
|
2060 |
+
*
|
2061 |
+
* @return mixed
|
2062 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2063 |
+
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
2064 |
+
*/
|
2065 |
+
public function canSeeResponseCodeIs($code) {
|
2066 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
|
2067 |
+
}
|
2068 |
+
/**
|
2069 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2070 |
+
*
|
2071 |
+
* Checks that response code is equal to value provided.
|
2072 |
+
*
|
2073 |
+
* @param $code
|
2074 |
+
*
|
2075 |
+
* @return mixed
|
2076 |
+
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
2077 |
+
*/
|
2078 |
+
public function seeResponseCodeIs($code) {
|
2079 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
|
2080 |
+
}
|
2081 |
+
|
2082 |
+
|
2083 |
+
/**
|
2084 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2085 |
+
*
|
2086 |
+
* Checks that the page title contains the given string.
|
2087 |
+
*
|
2088 |
+
* ``` php
|
2089 |
+
* <?php
|
2090 |
+
* $I->seeInTitle('Blog - Post #1');
|
2091 |
+
* ?>
|
2092 |
+
* ```
|
2093 |
+
*
|
2094 |
+
* @param $title
|
2095 |
+
*
|
2096 |
+
* @return mixed
|
2097 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2098 |
+
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
2099 |
+
*/
|
2100 |
+
public function canSeeInTitle($title) {
|
2101 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
|
2102 |
+
}
|
2103 |
+
/**
|
2104 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2105 |
+
*
|
2106 |
+
* Checks that the page title contains the given string.
|
2107 |
+
*
|
2108 |
+
* ``` php
|
2109 |
+
* <?php
|
2110 |
+
* $I->seeInTitle('Blog - Post #1');
|
2111 |
+
* ?>
|
2112 |
+
* ```
|
2113 |
+
*
|
2114 |
+
* @param $title
|
2115 |
+
*
|
2116 |
+
* @return mixed
|
2117 |
+
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
2118 |
+
*/
|
2119 |
+
public function seeInTitle($title) {
|
2120 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
|
2124 |
+
/**
|
2125 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2126 |
+
*
|
2127 |
+
* Checks that the page title does not contain the given string.
|
2128 |
+
*
|
2129 |
+
* @param $title
|
2130 |
+
*
|
2131 |
+
* @return mixed
|
2132 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2133 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
2134 |
+
*/
|
2135 |
+
public function cantSeeInTitle($title) {
|
2136 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
|
2137 |
+
}
|
2138 |
+
/**
|
2139 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2140 |
+
*
|
2141 |
+
* Checks that the page title does not contain the given string.
|
2142 |
+
*
|
2143 |
+
* @param $title
|
2144 |
+
*
|
2145 |
+
* @return mixed
|
2146 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
2147 |
+
*/
|
2148 |
+
public function dontSeeInTitle($title) {
|
2149 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
|
2153 |
+
/**
|
2154 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2155 |
+
*
|
2156 |
+
* Switch to iframe or frame on the page.
|
2157 |
+
*
|
2158 |
+
* Example:
|
2159 |
+
* ``` html
|
2160 |
+
* <iframe name="another_frame" src="http://example.com">
|
2161 |
+
* ```
|
2162 |
+
*
|
2163 |
+
* ``` php
|
2164 |
+
* <?php
|
2165 |
+
* # switch to iframe
|
2166 |
+
* $I->switchToIframe("another_frame");
|
2167 |
+
* ```
|
2168 |
+
*
|
2169 |
+
* @param string $name
|
2170 |
+
* @see \Codeception\Lib\InnerBrowser::switchToIframe()
|
2171 |
+
*/
|
2172 |
+
public function switchToIframe($name) {
|
2173 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args()));
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
|
2177 |
+
/**
|
2178 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2179 |
+
*
|
2180 |
+
* Moves back in history.
|
2181 |
+
*
|
2182 |
+
* @param int $numberOfSteps (default value 1)
|
2183 |
+
* @see \Codeception\Lib\InnerBrowser::moveBack()
|
2184 |
+
*/
|
2185 |
+
public function moveBack($numberOfSteps = null) {
|
2186 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
|
2187 |
+
}
|
2188 |
+
|
2189 |
+
|
2190 |
+
/**
|
2191 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2192 |
+
*
|
2193 |
+
* Goes to the login page and logs in as the site admin.
|
2194 |
+
*
|
2195 |
+
* @return void
|
2196 |
+
* @see \Codeception\Module\WPBrowser::loginAsAdmin()
|
2197 |
+
*/
|
2198 |
+
public function loginAsAdmin() {
|
2199 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('loginAsAdmin', func_get_args()));
|
2200 |
+
}
|
2201 |
+
|
2202 |
+
|
2203 |
+
/**
|
2204 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2205 |
+
*
|
2206 |
+
* Goes to the login page and logs in using the given credentials.
|
2207 |
+
*
|
2208 |
+
* @param string $username
|
2209 |
+
* @param string $password
|
2210 |
+
*
|
2211 |
+
* @return void
|
2212 |
+
* @see \Codeception\Module\WPBrowser::loginAs()
|
2213 |
+
*/
|
2214 |
+
public function loginAs($username, $password) {
|
2215 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('loginAs', func_get_args()));
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
|
2219 |
+
/**
|
2220 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2221 |
+
*
|
2222 |
+
* In the plugin administration screen activates a plugin clicking the "Activate" link.
|
2223 |
+
*
|
2224 |
+
* The method will presume the browser is in the plugin screen already.
|
2225 |
+
*
|
2226 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2227 |
+
*
|
2228 |
+
* @return void
|
2229 |
+
* @see \Codeception\Module\WPBrowser::activatePlugin()
|
2230 |
+
*/
|
2231 |
+
public function activatePlugin($pluginSlug) {
|
2232 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('activatePlugin', func_get_args()));
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
|
2236 |
+
/**
|
2237 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2238 |
+
*
|
2239 |
+
* In the plugin administration screen deactivates a plugin clicking the "Deactivate" link.
|
2240 |
+
*
|
2241 |
+
* The method will presume the browser is in the plugin screen already.
|
2242 |
+
*
|
2243 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2244 |
+
*
|
2245 |
+
* @return void
|
2246 |
+
* @see \Codeception\Module\WPBrowser::deactivatePlugin()
|
2247 |
+
*/
|
2248 |
+
public function deactivatePlugin($pluginSlug) {
|
2249 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('deactivatePlugin', func_get_args()));
|
2250 |
+
}
|
2251 |
+
|
2252 |
+
|
2253 |
+
/**
|
2254 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2255 |
+
*
|
2256 |
+
* Navigates the browser to the plugins administration screen.
|
2257 |
+
*
|
2258 |
+
* Makes no check about the user being logged in and authorized to do so.
|
2259 |
+
*
|
2260 |
+
* @return void
|
2261 |
+
* @see \Codeception\Module\WPBrowser::amOnPluginsPage()
|
2262 |
+
*/
|
2263 |
+
public function amOnPluginsPage() {
|
2264 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPluginsPage', func_get_args()));
|
2265 |
+
}
|
2266 |
+
|
2267 |
+
|
2268 |
+
/**
|
2269 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2270 |
+
*
|
2271 |
+
* Navigates the browser to the Pages administration screen.
|
2272 |
+
*
|
2273 |
+
* Makes no check about the user being logged in and authorized to do so.
|
2274 |
+
*
|
2275 |
+
* @return void
|
2276 |
+
* @see \Codeception\Module\WPBrowser::amOnPagesPage()
|
2277 |
+
*/
|
2278 |
+
public function amOnPagesPage() {
|
2279 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPagesPage', func_get_args()));
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
|
2283 |
+
/**
|
2284 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2285 |
+
*
|
2286 |
+
* Looks for a deactivated plugin in the plugin administration screen.
|
2287 |
+
*
|
2288 |
+
* Will not navigate to the plugin administration screen.
|
2289 |
+
*
|
2290 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2291 |
+
*
|
2292 |
+
* @return void
|
2293 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2294 |
+
* @see \Codeception\Module\WPBrowser::seePluginDeactivated()
|
2295 |
+
*/
|
2296 |
+
public function canSeePluginDeactivated($pluginSlug) {
|
2297 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePluginDeactivated', func_get_args()));
|
2298 |
+
}
|
2299 |
+
/**
|
2300 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2301 |
+
*
|
2302 |
+
* Looks for a deactivated plugin in the plugin administration screen.
|
2303 |
+
*
|
2304 |
+
* Will not navigate to the plugin administration screen.
|
2305 |
+
*
|
2306 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2307 |
+
*
|
2308 |
+
* @return void
|
2309 |
+
* @see \Codeception\Module\WPBrowser::seePluginDeactivated()
|
2310 |
+
*/
|
2311 |
+
public function seePluginDeactivated($pluginSlug) {
|
2312 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePluginDeactivated', func_get_args()));
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
|
2316 |
+
/**
|
2317 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2318 |
+
*
|
2319 |
+
* Looks for a plugin in the plugin administration screen.
|
2320 |
+
*
|
2321 |
+
* Will not navigate to the plugin administration screen.
|
2322 |
+
*
|
2323 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2324 |
+
*
|
2325 |
+
* @return void
|
2326 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2327 |
+
* @see \Codeception\Module\WPBrowser::seePluginInstalled()
|
2328 |
+
*/
|
2329 |
+
public function canSeePluginInstalled($pluginSlug) {
|
2330 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePluginInstalled', func_get_args()));
|
2331 |
+
}
|
2332 |
+
/**
|
2333 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2334 |
+
*
|
2335 |
+
* Looks for a plugin in the plugin administration screen.
|
2336 |
+
*
|
2337 |
+
* Will not navigate to the plugin administration screen.
|
2338 |
+
*
|
2339 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2340 |
+
*
|
2341 |
+
* @return void
|
2342 |
+
* @see \Codeception\Module\WPBrowser::seePluginInstalled()
|
2343 |
+
*/
|
2344 |
+
public function seePluginInstalled($pluginSlug) {
|
2345 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePluginInstalled', func_get_args()));
|
2346 |
+
}
|
2347 |
+
|
2348 |
+
|
2349 |
+
/**
|
2350 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2351 |
+
*
|
2352 |
+
* Looks for an activated plugin in the plugin administration screen.
|
2353 |
+
*
|
2354 |
+
* Will not navigate to the plugin administration screen.
|
2355 |
+
*
|
2356 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2357 |
+
*
|
2358 |
+
* @return void
|
2359 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2360 |
+
* @see \Codeception\Module\WPBrowser::seePluginActivated()
|
2361 |
+
*/
|
2362 |
+
public function canSeePluginActivated($pluginSlug) {
|
2363 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePluginActivated', func_get_args()));
|
2364 |
+
}
|
2365 |
+
/**
|
2366 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2367 |
+
*
|
2368 |
+
* Looks for an activated plugin in the plugin administration screen.
|
2369 |
+
*
|
2370 |
+
* Will not navigate to the plugin administration screen.
|
2371 |
+
*
|
2372 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2373 |
+
*
|
2374 |
+
* @return void
|
2375 |
+
* @see \Codeception\Module\WPBrowser::seePluginActivated()
|
2376 |
+
*/
|
2377 |
+
public function seePluginActivated($pluginSlug) {
|
2378 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePluginActivated', func_get_args()));
|
2379 |
+
}
|
2380 |
+
|
2381 |
+
|
2382 |
+
/**
|
2383 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2384 |
+
*
|
2385 |
+
* Looks for a missing plugin in the plugin administration screen.
|
2386 |
+
*
|
2387 |
+
* Will not navigate to the plugin administration screen.
|
2388 |
+
*
|
2389 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2390 |
+
*
|
2391 |
+
* @return void
|
2392 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2393 |
+
* @see \Codeception\Module\WPBrowser::dontSeePluginInstalled()
|
2394 |
+
*/
|
2395 |
+
public function cantSeePluginInstalled($pluginSlug) {
|
2396 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeePluginInstalled', func_get_args()));
|
2397 |
+
}
|
2398 |
+
/**
|
2399 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2400 |
+
*
|
2401 |
+
* Looks for a missing plugin in the plugin administration screen.
|
2402 |
+
*
|
2403 |
+
* Will not navigate to the plugin administration screen.
|
2404 |
+
*
|
2405 |
+
* @param string $pluginSlug The plugin slug, like "hello-dolly".
|
2406 |
+
*
|
2407 |
+
* @return void
|
2408 |
+
* @see \Codeception\Module\WPBrowser::dontSeePluginInstalled()
|
2409 |
+
*/
|
2410 |
+
public function dontSeePluginInstalled($pluginSlug) {
|
2411 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeePluginInstalled', func_get_args()));
|
2412 |
+
}
|
2413 |
+
|
2414 |
+
|
2415 |
+
/**
|
2416 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2417 |
+
*
|
2418 |
+
* In an administration screen will look for an error message.
|
2419 |
+
*
|
2420 |
+
* Allows for class-based error checking to decouple from internationalization.
|
2421 |
+
*
|
2422 |
+
* @param array $classes A list of classes the error notice should have.
|
2423 |
+
*
|
2424 |
+
* @return void
|
2425 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2426 |
+
* @see \Codeception\Module\WPBrowser::seeErrorMessage()
|
2427 |
+
*/
|
2428 |
+
public function canSeeErrorMessage($classes = null) {
|
2429 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeErrorMessage', func_get_args()));
|
2430 |
+
}
|
2431 |
+
/**
|
2432 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2433 |
+
*
|
2434 |
+
* In an administration screen will look for an error message.
|
2435 |
+
*
|
2436 |
+
* Allows for class-based error checking to decouple from internationalization.
|
2437 |
+
*
|
2438 |
+
* @param array $classes A list of classes the error notice should have.
|
2439 |
+
*
|
2440 |
+
* @return void
|
2441 |
+
* @see \Codeception\Module\WPBrowser::seeErrorMessage()
|
2442 |
+
*/
|
2443 |
+
public function seeErrorMessage($classes = null) {
|
2444 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeErrorMessage', func_get_args()));
|
2445 |
+
}
|
2446 |
+
|
2447 |
+
|
2448 |
+
/**
|
2449 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2450 |
+
*
|
2451 |
+
* Checks that the current page is a wp_die generated one.
|
2452 |
+
*
|
2453 |
+
* @return void
|
2454 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2455 |
+
* @see \Codeception\Module\WPBrowser::seeWpDiePage()
|
2456 |
+
*/
|
2457 |
+
public function canSeeWpDiePage() {
|
2458 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeWpDiePage', func_get_args()));
|
2459 |
+
}
|
2460 |
+
/**
|
2461 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2462 |
+
*
|
2463 |
+
* Checks that the current page is a wp_die generated one.
|
2464 |
+
*
|
2465 |
+
* @return void
|
2466 |
+
* @see \Codeception\Module\WPBrowser::seeWpDiePage()
|
2467 |
+
*/
|
2468 |
+
public function seeWpDiePage() {
|
2469 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeWpDiePage', func_get_args()));
|
2470 |
+
}
|
2471 |
+
|
2472 |
+
|
2473 |
+
/**
|
2474 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2475 |
+
*
|
2476 |
+
* In an administration screen will look for a message.
|
2477 |
+
*
|
2478 |
+
* Allows for class-based error checking to decouple from internationalization.
|
2479 |
+
*
|
2480 |
+
* @param array $classes A list of classes the message should have.
|
2481 |
+
*
|
2482 |
+
* @return void
|
2483 |
+
* Conditional Assertion: Test won't be stopped on fail
|
2484 |
+
* @see \Codeception\Module\WPBrowser::seeMessage()
|
2485 |
+
*/
|
2486 |
+
public function canSeeMessage($classes = null) {
|
2487 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeMessage', func_get_args()));
|
2488 |
+
}
|
2489 |
+
/**
|
2490 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2491 |
+
*
|
2492 |
+
* In an administration screen will look for a message.
|
2493 |
+
*
|
2494 |
+
* Allows for class-based error checking to decouple from internationalization.
|
2495 |
+
*
|
2496 |
+
* @param array $classes A list of classes the message should have.
|
2497 |
+
*
|
2498 |
+
* @return void
|
2499 |
+
* @see \Codeception\Module\WPBrowser::seeMessage()
|
2500 |
+
*/
|
2501 |
+
public function seeMessage($classes = null) {
|
2502 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeMessage', func_get_args()));
|
2503 |
+
}
|
2504 |
+
|
2505 |
+
|
2506 |
+
/**
|
2507 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2508 |
+
*
|
2509 |
+
* Returns WordPress default test cookie if present.
|
2510 |
+
*
|
2511 |
+
* @param null $pattern Optional, overrides the default cookie name.
|
2512 |
+
*
|
2513 |
+
* @return mixed Either a cookie or null.
|
2514 |
+
* @see \Codeception\Module\WPBrowser::grabWordPressTestCookie()
|
2515 |
+
*/
|
2516 |
+
public function grabWordPressTestCookie($pattern = null) {
|
2517 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabWordPressTestCookie', func_get_args()));
|
2518 |
+
}
|
2519 |
+
|
2520 |
+
|
2521 |
+
/**
|
2522 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2523 |
+
*
|
2524 |
+
* Returns WordPress default login cookie if present.
|
2525 |
+
*
|
2526 |
+
* @param null $pattern Optional, overrides the default cookie name.
|
2527 |
+
*
|
2528 |
+
* @return mixed Either a cookie or null.
|
2529 |
+
* @see \Codeception\Module\WPBrowser::grabWordPressLoginCookie()
|
2530 |
+
*/
|
2531 |
+
public function grabWordPressLoginCookie($pattern = null) {
|
2532 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabWordPressLoginCookie', func_get_args()));
|
2533 |
+
}
|
2534 |
+
|
2535 |
+
|
2536 |
+
/**
|
2537 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2538 |
+
*
|
2539 |
+
* Returns WordPress default auth cookie if present.
|
2540 |
+
*
|
2541 |
+
* @param null $pattern Optional, overrides the default cookie name.
|
2542 |
+
*
|
2543 |
+
* @return mixed Either a cookie or null.
|
2544 |
+
* @see \Codeception\Module\WPBrowser::grabWordPressAuthCookie()
|
2545 |
+
*/
|
2546 |
+
public function grabWordPressAuthCookie($pattern = null) {
|
2547 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabWordPressAuthCookie', func_get_args()));
|
2548 |
+
}
|
2549 |
+
|
2550 |
+
|
2551 |
+
/**
|
2552 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
2553 |
+
*
|
2554 |
+
*
|
2555 |
+
* @see \Codeception\Module\WPBrowser::amOnAdminPage()
|
2556 |
+
*/
|
2557 |
+
public function amOnAdminPage($path) {
|
2558 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnAdminPage', func_get_args()));
|
2559 |
+
}
|
2560 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/_generated/FunctionalTesterActions.php
ADDED
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] 122218524230b4673d45c4aaa0c93107
|
2 |
+
namespace _generated;
|
3 |
+
|
4 |
+
// This class was automatically generated by build task
|
5 |
+
// You should not change it manually as it will be overwritten on next build
|
6 |
+
// @codingStandardsIgnoreFile
|
7 |
+
|
8 |
+
use Codeception\Module\Filesystem;
|
9 |
+
use Codeception\Module\WPLoader;
|
10 |
+
use Helper\Functional;
|
11 |
+
|
12 |
+
trait FunctionalTesterActions
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @return \Codeception\Scenario
|
16 |
+
*/
|
17 |
+
abstract protected function getScenario();
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
22 |
+
*
|
23 |
+
* Enters a directory In local filesystem.
|
24 |
+
* Project root directory is used by default
|
25 |
+
*
|
26 |
+
* @param $path
|
27 |
+
* @see \Codeception\Module\Filesystem::amInPath()
|
28 |
+
*/
|
29 |
+
public function amInPath($path) {
|
30 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
36 |
+
*
|
37 |
+
* Opens a file and stores it's content.
|
38 |
+
*
|
39 |
+
* Usage:
|
40 |
+
*
|
41 |
+
* ``` php
|
42 |
+
* <?php
|
43 |
+
* $I->openFile('composer.json');
|
44 |
+
* $I->seeInThisFile('codeception/codeception');
|
45 |
+
* ?>
|
46 |
+
* ```
|
47 |
+
*
|
48 |
+
* @param $filename
|
49 |
+
* @see \Codeception\Module\Filesystem::openFile()
|
50 |
+
*/
|
51 |
+
public function openFile($filename) {
|
52 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
/**
|
57 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
58 |
+
*
|
59 |
+
* Deletes a file
|
60 |
+
*
|
61 |
+
* ``` php
|
62 |
+
* <?php
|
63 |
+
* $I->deleteFile('composer.lock');
|
64 |
+
* ?>
|
65 |
+
* ```
|
66 |
+
*
|
67 |
+
* @param $filename
|
68 |
+
* @see \Codeception\Module\Filesystem::deleteFile()
|
69 |
+
*/
|
70 |
+
public function deleteFile($filename) {
|
71 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
77 |
+
*
|
78 |
+
* Deletes directory with all subdirectories
|
79 |
+
*
|
80 |
+
* ``` php
|
81 |
+
* <?php
|
82 |
+
* $I->deleteDir('vendor');
|
83 |
+
* ?>
|
84 |
+
* ```
|
85 |
+
*
|
86 |
+
* @param $dirname
|
87 |
+
* @see \Codeception\Module\Filesystem::deleteDir()
|
88 |
+
*/
|
89 |
+
public function deleteDir($dirname) {
|
90 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
/**
|
95 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
96 |
+
*
|
97 |
+
* Copies directory with all contents
|
98 |
+
*
|
99 |
+
* ``` php
|
100 |
+
* <?php
|
101 |
+
* $I->copyDir('vendor','old_vendor');
|
102 |
+
* ?>
|
103 |
+
* ```
|
104 |
+
*
|
105 |
+
* @param $src
|
106 |
+
* @param $dst
|
107 |
+
* @see \Codeception\Module\Filesystem::copyDir()
|
108 |
+
*/
|
109 |
+
public function copyDir($src, $dst) {
|
110 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
/**
|
115 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
116 |
+
*
|
117 |
+
* Checks If opened file has `text` in it.
|
118 |
+
*
|
119 |
+
* Usage:
|
120 |
+
*
|
121 |
+
* ``` php
|
122 |
+
* <?php
|
123 |
+
* $I->openFile('composer.json');
|
124 |
+
* $I->seeInThisFile('codeception/codeception');
|
125 |
+
* ?>
|
126 |
+
* ```
|
127 |
+
*
|
128 |
+
* @param $text
|
129 |
+
* Conditional Assertion: Test won't be stopped on fail
|
130 |
+
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
131 |
+
*/
|
132 |
+
public function canSeeInThisFile($text) {
|
133 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
|
134 |
+
}
|
135 |
+
/**
|
136 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
137 |
+
*
|
138 |
+
* Checks If opened file has `text` in it.
|
139 |
+
*
|
140 |
+
* Usage:
|
141 |
+
*
|
142 |
+
* ``` php
|
143 |
+
* <?php
|
144 |
+
* $I->openFile('composer.json');
|
145 |
+
* $I->seeInThisFile('codeception/codeception');
|
146 |
+
* ?>
|
147 |
+
* ```
|
148 |
+
*
|
149 |
+
* @param $text
|
150 |
+
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
151 |
+
*/
|
152 |
+
public function seeInThisFile($text) {
|
153 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
159 |
+
*
|
160 |
+
* Checks If opened file has the `number` of new lines.
|
161 |
+
*
|
162 |
+
* Usage:
|
163 |
+
*
|
164 |
+
* ``` php
|
165 |
+
* <?php
|
166 |
+
* $I->openFile('composer.json');
|
167 |
+
* $I->seeNumberNewLines(5);
|
168 |
+
* ?>
|
169 |
+
* ```
|
170 |
+
*
|
171 |
+
* @param int $number New lines
|
172 |
+
* Conditional Assertion: Test won't be stopped on fail
|
173 |
+
* @see \Codeception\Module\Filesystem::seeNumberNewLines()
|
174 |
+
*/
|
175 |
+
public function canSeeNumberNewLines($number) {
|
176 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
|
177 |
+
}
|
178 |
+
/**
|
179 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
180 |
+
*
|
181 |
+
* Checks If opened file has the `number` of new lines.
|
182 |
+
*
|
183 |
+
* Usage:
|
184 |
+
*
|
185 |
+
* ``` php
|
186 |
+
* <?php
|
187 |
+
* $I->openFile('composer.json');
|
188 |
+
* $I->seeNumberNewLines(5);
|
189 |
+
* ?>
|
190 |
+
* ```
|
191 |
+
*
|
192 |
+
* @param int $number New lines
|
193 |
+
* @see \Codeception\Module\Filesystem::seeNumberNewLines()
|
194 |
+
*/
|
195 |
+
public function seeNumberNewLines($number) {
|
196 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
|
197 |
+
}
|
198 |
+
|
199 |
+
|
200 |
+
/**
|
201 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
202 |
+
*
|
203 |
+
* Checks the strict matching of file contents.
|
204 |
+
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
205 |
+
* Better to use with HEREDOC strings.
|
206 |
+
* Matching is done after removing "\r" chars from file content.
|
207 |
+
*
|
208 |
+
* ``` php
|
209 |
+
* <?php
|
210 |
+
* $I->openFile('process.pid');
|
211 |
+
* $I->seeFileContentsEqual('3192');
|
212 |
+
* ?>
|
213 |
+
* ```
|
214 |
+
*
|
215 |
+
* @param $text
|
216 |
+
* Conditional Assertion: Test won't be stopped on fail
|
217 |
+
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
218 |
+
*/
|
219 |
+
public function canSeeFileContentsEqual($text) {
|
220 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
|
221 |
+
}
|
222 |
+
/**
|
223 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
224 |
+
*
|
225 |
+
* Checks the strict matching of file contents.
|
226 |
+
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
227 |
+
* Better to use with HEREDOC strings.
|
228 |
+
* Matching is done after removing "\r" chars from file content.
|
229 |
+
*
|
230 |
+
* ``` php
|
231 |
+
* <?php
|
232 |
+
* $I->openFile('process.pid');
|
233 |
+
* $I->seeFileContentsEqual('3192');
|
234 |
+
* ?>
|
235 |
+
* ```
|
236 |
+
*
|
237 |
+
* @param $text
|
238 |
+
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
239 |
+
*/
|
240 |
+
public function seeFileContentsEqual($text) {
|
241 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
/**
|
246 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
247 |
+
*
|
248 |
+
* Checks If opened file doesn't contain `text` in it
|
249 |
+
*
|
250 |
+
* ``` php
|
251 |
+
* <?php
|
252 |
+
* $I->openFile('composer.json');
|
253 |
+
* $I->dontSeeInThisFile('codeception/codeception');
|
254 |
+
* ?>
|
255 |
+
* ```
|
256 |
+
*
|
257 |
+
* @param $text
|
258 |
+
* Conditional Assertion: Test won't be stopped on fail
|
259 |
+
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
260 |
+
*/
|
261 |
+
public function cantSeeInThisFile($text) {
|
262 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
|
263 |
+
}
|
264 |
+
/**
|
265 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
266 |
+
*
|
267 |
+
* Checks If opened file doesn't contain `text` in it
|
268 |
+
*
|
269 |
+
* ``` php
|
270 |
+
* <?php
|
271 |
+
* $I->openFile('composer.json');
|
272 |
+
* $I->dontSeeInThisFile('codeception/codeception');
|
273 |
+
* ?>
|
274 |
+
* ```
|
275 |
+
*
|
276 |
+
* @param $text
|
277 |
+
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
278 |
+
*/
|
279 |
+
public function dontSeeInThisFile($text) {
|
280 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
|
281 |
+
}
|
282 |
+
|
283 |
+
|
284 |
+
/**
|
285 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
286 |
+
*
|
287 |
+
* Deletes a file
|
288 |
+
* @see \Codeception\Module\Filesystem::deleteThisFile()
|
289 |
+
*/
|
290 |
+
public function deleteThisFile() {
|
291 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
|
292 |
+
}
|
293 |
+
|
294 |
+
|
295 |
+
/**
|
296 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
297 |
+
*
|
298 |
+
* Checks if file exists in path.
|
299 |
+
* Opens a file when it's exists
|
300 |
+
*
|
301 |
+
* ``` php
|
302 |
+
* <?php
|
303 |
+
* $I->seeFileFound('UserModel.php','app/models');
|
304 |
+
* ?>
|
305 |
+
* ```
|
306 |
+
*
|
307 |
+
* @param $filename
|
308 |
+
* @param string $path
|
309 |
+
* Conditional Assertion: Test won't be stopped on fail
|
310 |
+
* @see \Codeception\Module\Filesystem::seeFileFound()
|
311 |
+
*/
|
312 |
+
public function canSeeFileFound($filename, $path = null) {
|
313 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
|
314 |
+
}
|
315 |
+
/**
|
316 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
317 |
+
*
|
318 |
+
* Checks if file exists in path.
|
319 |
+
* Opens a file when it's exists
|
320 |
+
*
|
321 |
+
* ``` php
|
322 |
+
* <?php
|
323 |
+
* $I->seeFileFound('UserModel.php','app/models');
|
324 |
+
* ?>
|
325 |
+
* ```
|
326 |
+
*
|
327 |
+
* @param $filename
|
328 |
+
* @param string $path
|
329 |
+
* @see \Codeception\Module\Filesystem::seeFileFound()
|
330 |
+
*/
|
331 |
+
public function seeFileFound($filename, $path = null) {
|
332 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
|
333 |
+
}
|
334 |
+
|
335 |
+
|
336 |
+
/**
|
337 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
338 |
+
*
|
339 |
+
* Checks if file does not exist in path
|
340 |
+
*
|
341 |
+
* @param $filename
|
342 |
+
* @param string $path
|
343 |
+
* Conditional Assertion: Test won't be stopped on fail
|
344 |
+
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
345 |
+
*/
|
346 |
+
public function cantSeeFileFound($filename, $path = null) {
|
347 |
+
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
|
348 |
+
}
|
349 |
+
/**
|
350 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
351 |
+
*
|
352 |
+
* Checks if file does not exist in path
|
353 |
+
*
|
354 |
+
* @param $filename
|
355 |
+
* @param string $path
|
356 |
+
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
357 |
+
*/
|
358 |
+
public function dontSeeFileFound($filename, $path = null) {
|
359 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
|
360 |
+
}
|
361 |
+
|
362 |
+
|
363 |
+
/**
|
364 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
365 |
+
*
|
366 |
+
* Erases directory contents
|
367 |
+
*
|
368 |
+
* ``` php
|
369 |
+
* <?php
|
370 |
+
* $I->cleanDir('logs');
|
371 |
+
* ?>
|
372 |
+
* ```
|
373 |
+
*
|
374 |
+
* @param $dirname
|
375 |
+
* @see \Codeception\Module\Filesystem::cleanDir()
|
376 |
+
*/
|
377 |
+
public function cleanDir($dirname) {
|
378 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
/**
|
383 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
384 |
+
*
|
385 |
+
* Saves contents to file
|
386 |
+
*
|
387 |
+
* @param $filename
|
388 |
+
* @param $contents
|
389 |
+
* @see \Codeception\Module\Filesystem::writeToFile()
|
390 |
+
*/
|
391 |
+
public function writeToFile($filename, $contents) {
|
392 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
|
393 |
+
}
|
394 |
+
|
395 |
+
|
396 |
+
/**
|
397 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
398 |
+
*
|
399 |
+
*
|
400 |
+
* @see \Codeception\Module\WPLoader::ensureDbModuleCompat()
|
401 |
+
*/
|
402 |
+
public function ensureDbModuleCompat() {
|
403 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('ensureDbModuleCompat', func_get_args()));
|
404 |
+
}
|
405 |
+
|
406 |
+
|
407 |
+
/**
|
408 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
409 |
+
*
|
410 |
+
*
|
411 |
+
* @see \Codeception\Module\WPLoader::activatePlugins()
|
412 |
+
*/
|
413 |
+
public function activatePlugins() {
|
414 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('activatePlugins', func_get_args()));
|
415 |
+
}
|
416 |
+
|
417 |
+
|
418 |
+
/**
|
419 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
420 |
+
*
|
421 |
+
* Loads the plugins required by the test.
|
422 |
+
* @see \Codeception\Module\WPLoader::loadPlugins()
|
423 |
+
*/
|
424 |
+
public function loadPlugins() {
|
425 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('loadPlugins', func_get_args()));
|
426 |
+
}
|
427 |
+
|
428 |
+
|
429 |
+
/**
|
430 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
431 |
+
*
|
432 |
+
* Calls a list of user-defined actions needed in tests.
|
433 |
+
* @see \Codeception\Module\WPLoader::bootstrapActions()
|
434 |
+
*/
|
435 |
+
public function bootstrapActions() {
|
436 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('bootstrapActions', func_get_args()));
|
437 |
+
}
|
438 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/_generated/UnitTesterActions.php
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] 6f4d3327636d16498d984c179536c908
|
2 |
+
namespace _generated;
|
3 |
+
|
4 |
+
// This class was automatically generated by build task
|
5 |
+
// You should not change it manually as it will be overwritten on next build
|
6 |
+
// @codingStandardsIgnoreFile
|
7 |
+
|
8 |
+
use Codeception\Module\Asserts;
|
9 |
+
use Helper\Unit;
|
10 |
+
|
11 |
+
trait UnitTesterActions
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* @return \Codeception\Scenario
|
15 |
+
*/
|
16 |
+
abstract protected function getScenario();
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
21 |
+
*
|
22 |
+
* Checks that two variables are equal.
|
23 |
+
*
|
24 |
+
* @param $expected
|
25 |
+
* @param $actual
|
26 |
+
* @param string $message
|
27 |
+
* @see \Codeception\Module\Asserts::assertEquals()
|
28 |
+
*/
|
29 |
+
public function assertEquals($expected, $actual, $message = null) {
|
30 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
36 |
+
*
|
37 |
+
* Checks that two variables are not equal
|
38 |
+
*
|
39 |
+
* @param $expected
|
40 |
+
* @param $actual
|
41 |
+
* @param string $message
|
42 |
+
* @see \Codeception\Module\Asserts::assertNotEquals()
|
43 |
+
*/
|
44 |
+
public function assertNotEquals($expected, $actual, $message = null) {
|
45 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
/**
|
50 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
51 |
+
*
|
52 |
+
* Checks that two variables are same
|
53 |
+
*
|
54 |
+
* @param $expected
|
55 |
+
* @param $actual
|
56 |
+
* @param string $message
|
57 |
+
* @see \Codeception\Module\Asserts::assertSame()
|
58 |
+
*/
|
59 |
+
public function assertSame($expected, $actual, $message = null) {
|
60 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
66 |
+
*
|
67 |
+
* Checks that two variables are not same
|
68 |
+
*
|
69 |
+
* @param $expected
|
70 |
+
* @param $actual
|
71 |
+
* @param string $message
|
72 |
+
* @see \Codeception\Module\Asserts::assertNotSame()
|
73 |
+
*/
|
74 |
+
public function assertNotSame($expected, $actual, $message = null) {
|
75 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
/**
|
80 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
81 |
+
*
|
82 |
+
* Checks that actual is greater than expected
|
83 |
+
*
|
84 |
+
* @param $expected
|
85 |
+
* @param $actual
|
86 |
+
* @param string $message
|
87 |
+
* @see \Codeception\Module\Asserts::assertGreaterThan()
|
88 |
+
*/
|
89 |
+
public function assertGreaterThan($expected, $actual, $message = null) {
|
90 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
/**
|
95 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
96 |
+
*
|
97 |
+
* @deprecated
|
98 |
+
* @see \Codeception\Module\Asserts::assertGreaterThen()
|
99 |
+
*/
|
100 |
+
public function assertGreaterThen($expected, $actual, $message = null) {
|
101 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
/**
|
106 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
107 |
+
*
|
108 |
+
* Checks that actual is greater or equal than expected
|
109 |
+
*
|
110 |
+
* @param $expected
|
111 |
+
* @param $actual
|
112 |
+
* @param string $message
|
113 |
+
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
|
114 |
+
*/
|
115 |
+
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
|
116 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
/**
|
121 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
122 |
+
*
|
123 |
+
* @deprecated
|
124 |
+
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
|
125 |
+
*/
|
126 |
+
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
|
127 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
/**
|
132 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
133 |
+
*
|
134 |
+
* Checks that actual is less than expected
|
135 |
+
*
|
136 |
+
* @param $expected
|
137 |
+
* @param $actual
|
138 |
+
* @param string $message
|
139 |
+
* @see \Codeception\Module\Asserts::assertLessThan()
|
140 |
+
*/
|
141 |
+
public function assertLessThan($expected, $actual, $message = null) {
|
142 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
/**
|
147 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
148 |
+
*
|
149 |
+
* Checks that actual is less or equal than expected
|
150 |
+
*
|
151 |
+
* @param $expected
|
152 |
+
* @param $actual
|
153 |
+
* @param string $message
|
154 |
+
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
|
155 |
+
*/
|
156 |
+
public function assertLessThanOrEqual($expected, $actual, $message = null) {
|
157 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
/**
|
162 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
163 |
+
*
|
164 |
+
* Checks that haystack contains needle
|
165 |
+
*
|
166 |
+
* @param $needle
|
167 |
+
* @param $haystack
|
168 |
+
* @param string $message
|
169 |
+
* @see \Codeception\Module\Asserts::assertContains()
|
170 |
+
*/
|
171 |
+
public function assertContains($needle, $haystack, $message = null) {
|
172 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
|
173 |
+
}
|
174 |
+
|
175 |
+
|
176 |
+
/**
|
177 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
178 |
+
*
|
179 |
+
* Checks that haystack doesn't contain needle.
|
180 |
+
*
|
181 |
+
* @param $needle
|
182 |
+
* @param $haystack
|
183 |
+
* @param string $message
|
184 |
+
* @see \Codeception\Module\Asserts::assertNotContains()
|
185 |
+
*/
|
186 |
+
public function assertNotContains($needle, $haystack, $message = null) {
|
187 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
|
188 |
+
}
|
189 |
+
|
190 |
+
|
191 |
+
/**
|
192 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
193 |
+
*
|
194 |
+
* Checks that string match with pattern
|
195 |
+
*
|
196 |
+
* @param string $pattern
|
197 |
+
* @param string $string
|
198 |
+
* @param string $message
|
199 |
+
* @see \Codeception\Module\Asserts::assertRegExp()
|
200 |
+
*/
|
201 |
+
public function assertRegExp($pattern, $string, $message = null) {
|
202 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
|
203 |
+
}
|
204 |
+
|
205 |
+
|
206 |
+
/**
|
207 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
208 |
+
*
|
209 |
+
* Checks that string not match with pattern
|
210 |
+
*
|
211 |
+
* @param string $pattern
|
212 |
+
* @param string $string
|
213 |
+
* @param string $message
|
214 |
+
* @see \Codeception\Module\Asserts::assertNotRegExp()
|
215 |
+
*/
|
216 |
+
public function assertNotRegExp($pattern, $string, $message = null) {
|
217 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
/**
|
222 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
223 |
+
*
|
224 |
+
* Checks that variable is empty.
|
225 |
+
*
|
226 |
+
* @param $actual
|
227 |
+
* @param string $message
|
228 |
+
* @see \Codeception\Module\Asserts::assertEmpty()
|
229 |
+
*/
|
230 |
+
public function assertEmpty($actual, $message = null) {
|
231 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
|
232 |
+
}
|
233 |
+
|
234 |
+
|
235 |
+
/**
|
236 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
237 |
+
*
|
238 |
+
* Checks that variable is not empty.
|
239 |
+
*
|
240 |
+
* @param $actual
|
241 |
+
* @param string $message
|
242 |
+
* @see \Codeception\Module\Asserts::assertNotEmpty()
|
243 |
+
*/
|
244 |
+
public function assertNotEmpty($actual, $message = null) {
|
245 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
|
246 |
+
}
|
247 |
+
|
248 |
+
|
249 |
+
/**
|
250 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
251 |
+
*
|
252 |
+
* Checks that variable is NULL
|
253 |
+
*
|
254 |
+
* @param $actual
|
255 |
+
* @param string $message
|
256 |
+
* @see \Codeception\Module\Asserts::assertNull()
|
257 |
+
*/
|
258 |
+
public function assertNull($actual, $message = null) {
|
259 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
|
260 |
+
}
|
261 |
+
|
262 |
+
|
263 |
+
/**
|
264 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
265 |
+
*
|
266 |
+
* Checks that variable is not NULL
|
267 |
+
*
|
268 |
+
* @param $actual
|
269 |
+
* @param string $message
|
270 |
+
* @see \Codeception\Module\Asserts::assertNotNull()
|
271 |
+
*/
|
272 |
+
public function assertNotNull($actual, $message = null) {
|
273 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
|
274 |
+
}
|
275 |
+
|
276 |
+
|
277 |
+
/**
|
278 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
279 |
+
*
|
280 |
+
* Checks that condition is positive.
|
281 |
+
*
|
282 |
+
* @param $condition
|
283 |
+
* @param string $message
|
284 |
+
* @see \Codeception\Module\Asserts::assertTrue()
|
285 |
+
*/
|
286 |
+
public function assertTrue($condition, $message = null) {
|
287 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
/**
|
292 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
293 |
+
*
|
294 |
+
* Checks that condition is negative.
|
295 |
+
*
|
296 |
+
* @param $condition
|
297 |
+
* @param string $message
|
298 |
+
* @see \Codeception\Module\Asserts::assertFalse()
|
299 |
+
*/
|
300 |
+
public function assertFalse($condition, $message = null) {
|
301 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
|
302 |
+
}
|
303 |
+
|
304 |
+
|
305 |
+
/**
|
306 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
307 |
+
*
|
308 |
+
* Checks if file exists
|
309 |
+
*
|
310 |
+
* @param string $filename
|
311 |
+
* @param string $message
|
312 |
+
* @see \Codeception\Module\Asserts::assertFileExists()
|
313 |
+
*/
|
314 |
+
public function assertFileExists($filename, $message = null) {
|
315 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
|
316 |
+
}
|
317 |
+
|
318 |
+
|
319 |
+
/**
|
320 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
321 |
+
*
|
322 |
+
* Checks if file doesn't exist
|
323 |
+
*
|
324 |
+
* @param string $filename
|
325 |
+
* @param string $message
|
326 |
+
* @see \Codeception\Module\Asserts::assertFileNotExists()
|
327 |
+
*/
|
328 |
+
public function assertFileNotExists($filename, $message = null) {
|
329 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
|
330 |
+
}
|
331 |
+
|
332 |
+
|
333 |
+
/**
|
334 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
335 |
+
*
|
336 |
+
* Fails the test with message.
|
337 |
+
*
|
338 |
+
* @param $message
|
339 |
+
* @see \Codeception\Module\Asserts::fail()
|
340 |
+
*/
|
341 |
+
public function fail($message) {
|
342 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
|
343 |
+
}
|
344 |
+
}
|
vendor/overclokk/minimum-requirements/tests/_support/_generated/WpunitTesterActions.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] 61e6b71b4e38653032d8cba419bb8efe
|
2 |
+
namespace _generated;
|
3 |
+
|
4 |
+
// This class was automatically generated by build task
|
5 |
+
// You should not change it manually as it will be overwritten on next build
|
6 |
+
// @codingStandardsIgnoreFile
|
7 |
+
|
8 |
+
use Codeception\Module\WPLoader;
|
9 |
+
use Helper\Wpunit;
|
10 |
+
|
11 |
+
trait WpunitTesterActions
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* @return \Codeception\Scenario
|
15 |
+
*/
|
16 |
+
abstract protected function getScenario();
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @see \Codeception\Module\WPLoader::ensureDbModuleCompat()
|
24 |
+
*/
|
25 |
+
public function ensureDbModuleCompat() {
|
26 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('ensureDbModuleCompat', func_get_args()));
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
/**
|
31 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
32 |
+
*
|
33 |
+
*
|
34 |
+
* @see \Codeception\Module\WPLoader::activatePlugins()
|
35 |
+
*/
|
36 |
+
public function activatePlugins() {
|
37 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('activatePlugins', func_get_args()));
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
/**
|
42 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
43 |
+
*
|
44 |
+
* Loads the plugins required by the test.
|
45 |
+
* @see \Codeception\Module\WPLoader::loadPlugins()
|
46 |
+
*/
|
47 |
+
public function loadPlugins() {
|
48 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('loadPlugins', func_get_args()));
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
54 |
+
*
|
55 |
+
* Calls a list of user-defined actions needed in tests.
|
56 |
+
* @see \Codeception\Module\WPLoader::bootstrapActions()
|
57 |
+
*/
|
58 |
+
public function bootstrapActions() {
|
59 |
+
return $this->getScenario()->runStep(new \Codeception\Step\Action('bootstrapActions', func_get_args()));
|
60 |
+
}
|
61 |
+
}
|
vendor/overclokk/minimum-requirements/tests/acceptance.suite.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Codeception Test Suite Configuration
|
2 |
+
|
3 |
+
# suite for WordPress acceptance tests.
|
4 |
+
# perform tests in browser using WPBrowser or WPWebDriver modules.
|
5 |
+
class_name: AcceptanceTester
|
6 |
+
modules:
|
7 |
+
enabled:
|
8 |
+
- WPBrowser
|
9 |
+
- \Helper\Acceptance
|
vendor/overclokk/minimum-requirements/tests/acceptance/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
vendor/overclokk/minimum-requirements/tests/functional.suite.yml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Codeception Test Suite Configuration
|
2 |
+
|
3 |
+
# suite for WordPress functional tests.
|
4 |
+
# Emulate web requests and make application process them.
|
5 |
+
class_name: FunctionalTester
|
6 |
+
modules:
|
7 |
+
enabled: [Filesystem, WPLoader, \Helper\Functional]
|
vendor/overclokk/minimum-requirements/tests/functional/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
vendor/overclokk/minimum-requirements/tests/unit.suite.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Codeception Test Suite Configuration
|
2 |
+
#
|
3 |
+
# Suite for unit (internal) tests.
|
4 |
+
|
5 |
+
class_name: UnitTester
|
6 |
+
modules:
|
7 |
+
enabled:
|
8 |
+
- Asserts
|
9 |
+
- \Helper\Unit
|
vendor/overclokk/minimum-requirements/tests/unit/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
vendor/overclokk/minimum-requirements/tests/wpunit.suite.yml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Codeception Test Suite Configuration
|
2 |
+
|
3 |
+
# suite for WordPress unit tests.
|
4 |
+
# Load WordPress and unit test classes that rely on it.
|
5 |
+
class_name: WpunitTester
|
6 |
+
modules:
|
7 |
+
enabled: [WPLoader, \Helper\Wpunit]
|
vendor/overclokk/minimum-requirements/tests/wpunit/Minimum_RequirementsTest.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
use tad\FunctionMocker\FunctionMocker as Test;
|
3 |
+
|
4 |
+
class Minimum_RequirementsTest extends \Codeception\TestCase\WPTestCase {
|
5 |
+
|
6 |
+
public function setUp() {
|
7 |
+
// before
|
8 |
+
parent::setUp();
|
9 |
+
|
10 |
+
// your set up methods here
|
11 |
+
Test::setUp();
|
12 |
+
}
|
13 |
+
|
14 |
+
public function tearDown() {
|
15 |
+
// your tear down methods here
|
16 |
+
|
17 |
+
// then
|
18 |
+
parent::tearDown();
|
19 |
+
Test::tearDown();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @test
|
24 |
+
* it should be instantiatable
|
25 |
+
*/
|
26 |
+
public function it_should_be_instantiatable() {
|
27 |
+
$this->assertInstanceOf( 'Minimum_Requirements', new Minimum_Requirements( '5.2', '4.0' ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @test
|
32 |
+
* it should throw if php version is not a string
|
33 |
+
*/
|
34 |
+
public function it_should_throw_if_php_version_is_not_a_string() {
|
35 |
+
$this->setExpectedException( 'InvalidArgumentException' );
|
36 |
+
|
37 |
+
new Minimum_Requirements( 23, '4.0' );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @test
|
42 |
+
* it should throw if wp version is not a string
|
43 |
+
*/
|
44 |
+
public function it_should_throw_if_wp_version_is_not_a_string() {
|
45 |
+
$this->setExpectedException( 'InvalidArgumentException' );
|
46 |
+
|
47 |
+
new Minimum_Requirements( '5.2', 23 );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @test
|
52 |
+
* it should throw if name is not a string
|
53 |
+
*/
|
54 |
+
public function it_should_throw_if_name_is_not_a_string() {
|
55 |
+
$this->setExpectedException( 'InvalidArgumentException' );
|
56 |
+
|
57 |
+
new Minimum_Requirements( '5.2', '4.3', 23 );
|
58 |
+
}
|
59 |
+
|
60 |
+
public function php_versions() {
|
61 |
+
return [
|
62 |
+
[ '5', true ],
|
63 |
+
[ '5.2', true ],
|
64 |
+
[ '5.2.19', true ],
|
65 |
+
[ phpversion(), true ],
|
66 |
+
[ '7', false ],
|
67 |
+
[ '7.1', false ],
|
68 |
+
[ '7.2.3', false ],
|
69 |
+
];
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @test
|
74 |
+
* it should support semantic version of PHP
|
75 |
+
* @dataProvider php_versions
|
76 |
+
*/
|
77 |
+
public function it_should_support_semantic_version_of_php( $php_version, $expected ) {
|
78 |
+
$sut = new Minimum_Requirements( $php_version, '4.3', 'Some plugin' );
|
79 |
+
|
80 |
+
$out = $sut->is_compatible_php();
|
81 |
+
|
82 |
+
$this->assertEquals( $expected, $out );
|
83 |
+
}
|
84 |
+
|
85 |
+
public function wp_versions() {
|
86 |
+
return [
|
87 |
+
[ '3', true ],
|
88 |
+
[ '3.2', true ],
|
89 |
+
[ '3.2.3', true ],
|
90 |
+
[ '13', false ],
|
91 |
+
[ '13.2', false ],
|
92 |
+
[ '13.2.3', false ],
|
93 |
+
];
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @test
|
98 |
+
* it should support semantic versioning of WP
|
99 |
+
* @dataProvider wp_versions
|
100 |
+
*/
|
101 |
+
public function it_should_support_semantic_versioning_of_wp( $wp_version, $expected ) {
|
102 |
+
$sut = new Minimum_Requirements( '5.3', $wp_version, 'Some plugin' );
|
103 |
+
|
104 |
+
$out = $sut->is_compatible_wordpress();
|
105 |
+
|
106 |
+
$this->assertEquals( $expected, $out );
|
107 |
+
}
|
108 |
+
|
109 |
+
public function required_plugins() {
|
110 |
+
// a and b are active and installed
|
111 |
+
return [
|
112 |
+
[ [ ], true ],
|
113 |
+
[ [ 'plugin-a' ], true ],
|
114 |
+
[ [ 'plugin-a', 'plugin-b' ], true ],
|
115 |
+
[ [ 'plugin-b', 'plugin-c' ], false ],
|
116 |
+
[ [ 'plugin-c', 'plugin-d' ], false ],
|
117 |
+
[ [ 'plugin-d' ], false ],
|
118 |
+
];
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @test
|
123 |
+
* it should spot missing required plugins
|
124 |
+
* @dataProvider required_plugins
|
125 |
+
*/
|
126 |
+
public function it_should_spot_missing_required_plugins( $plugins, $expected ) {
|
127 |
+
Test::replace( 'wp_get_active_and_valid_plugins', [ WP_PLUGIN_DIR . '/plugin-a/plugin-a.php', WP_PLUGIN_DIR . '/plugin-b/plugin-b.php' ] );
|
128 |
+
Test::replace( 'get_plugin_data',
|
129 |
+
function ( $plugin ) {
|
130 |
+
$map = [
|
131 |
+
WP_PLUGIN_DIR . '/plugin-a/plugin-a.php' => [ 'Name' => 'Plugin A' ],
|
132 |
+
WP_PLUGIN_DIR . '/plugin-b/plugin-b.php' => [ 'Name' => 'Plugin B' ],
|
133 |
+
];
|
134 |
+
|
135 |
+
return isset( $map[ $plugin ] ) ? $map[ $plugin ] : \Patchwork\Interceptor\callOriginal( func_get_args() );
|
136 |
+
} );
|
137 |
+
$sut = new Minimum_Requirements( '5.2', '4.0', 'Some plugin', $plugins );
|
138 |
+
|
139 |
+
$out = $sut->are_required_plugins_active();
|
140 |
+
|
141 |
+
$this->assertEquals( $expected, $out );
|
142 |
+
}
|
143 |
+
}
|
vendor/overclokk/minimum-requirements/tests/wpunit/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|