Version Description
Download this release
Release Info
| Developer | cocreation |
| Plugin | |
| Version | 3.4.5 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.4 to 3.4.5
- .gitattributes +106 -0
- assets/templates/admin-notices/beta-tester.php +0 -8
- assets/templates/admin-notices/independence-day.php +0 -8
- assets/templates/admin-notices/rate-us.php +0 -8
- backwpup.php +17 -18
- codestyle.xml +198 -0
- inc/class-betatester-admin-notice.php +0 -115
- inc/class-cron.php +36 -30
- inc/class-destination-s3.php +5 -27
- inc/class-discount-widget.php +0 -159
- inc/class-encryption-openssl.php +37 -20
- inc/class-install.php +1 -3
- inc/class-job.php +51 -7
- inc/class-page-editjob.php +1 -1
- inc/class-php-admin-notice.php +0 -213
- readme.txt +8 -2
- ruleset.xml +70 -0
- vendor/inpsyde/phone-home-client/.gitignore +0 -2
.gitattributes
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## GITATTRIBUTES FOR WEB PROJECTS
|
| 2 |
+
#
|
| 3 |
+
# Details per file setting:
|
| 4 |
+
# text These files should be normalized (i.e. convert CRLF to LF).
|
| 5 |
+
# binary These files are binary and should be left untouched.
|
| 6 |
+
#
|
| 7 |
+
# Note that binary is a macro for -text -diff.
|
| 8 |
+
######################################################################
|
| 9 |
+
|
| 10 |
+
## AUTO-DETECT
|
| 11 |
+
## Handle line endings automatically for files detected as
|
| 12 |
+
## text and leave all files detected as binary untouched.
|
| 13 |
+
## This will handle all files NOT defined below.
|
| 14 |
+
* text=auto
|
| 15 |
+
|
| 16 |
+
## SOURCE CODE
|
| 17 |
+
*.css text
|
| 18 |
+
*.html text
|
| 19 |
+
*.js text
|
| 20 |
+
*.json text
|
| 21 |
+
*.php text
|
| 22 |
+
|
| 23 |
+
## DOCUMENTATION
|
| 24 |
+
*.md text
|
| 25 |
+
*.txt text
|
| 26 |
+
|
| 27 |
+
## CONFIGS
|
| 28 |
+
.gitattributes text
|
| 29 |
+
.gitconfig text
|
| 30 |
+
.gitignore text
|
| 31 |
+
|
| 32 |
+
## LANGUAGE
|
| 33 |
+
*.mo binary
|
| 34 |
+
*.po text
|
| 35 |
+
*.pot text
|
| 36 |
+
|
| 37 |
+
## GRAPHICS
|
| 38 |
+
*.ai binary
|
| 39 |
+
*.bmp binary
|
| 40 |
+
*.eps binary
|
| 41 |
+
*.gif binary
|
| 42 |
+
*.ico binary
|
| 43 |
+
*.jng binary
|
| 44 |
+
*.jp2 binary
|
| 45 |
+
*.jpg binary
|
| 46 |
+
*.jpeg binary
|
| 47 |
+
*.jpx binary
|
| 48 |
+
*.jxr binary
|
| 49 |
+
*.pdf binary
|
| 50 |
+
*.png binary
|
| 51 |
+
*.psb binary
|
| 52 |
+
*.psd binary
|
| 53 |
+
*.svg text
|
| 54 |
+
*.svgz binary
|
| 55 |
+
*.tif binary
|
| 56 |
+
*.tiff binary
|
| 57 |
+
*.wbmp binary
|
| 58 |
+
*.webp binary
|
| 59 |
+
|
| 60 |
+
## AUDIO
|
| 61 |
+
*.kar binary
|
| 62 |
+
*.m4a binary
|
| 63 |
+
*.mid binary
|
| 64 |
+
*.midi binary
|
| 65 |
+
*.mp3 binary
|
| 66 |
+
*.ogg binary
|
| 67 |
+
*.ra binary
|
| 68 |
+
|
| 69 |
+
## VIDEO
|
| 70 |
+
*.3gpp binary
|
| 71 |
+
*.3gp binary
|
| 72 |
+
*.as binary
|
| 73 |
+
*.asf binary
|
| 74 |
+
*.asx binary
|
| 75 |
+
*.fla binary
|
| 76 |
+
*.flv binary
|
| 77 |
+
*.m4v binary
|
| 78 |
+
*.mng binary
|
| 79 |
+
*.mov binary
|
| 80 |
+
*.mp4 binary
|
| 81 |
+
*.mpeg binary
|
| 82 |
+
*.mpg binary
|
| 83 |
+
*.swc binary
|
| 84 |
+
*.swf binary
|
| 85 |
+
*.webm binary
|
| 86 |
+
|
| 87 |
+
## ARCHIVES
|
| 88 |
+
*.7z binary
|
| 89 |
+
*.gz binary
|
| 90 |
+
*.rar binary
|
| 91 |
+
*.tar binary
|
| 92 |
+
*.zip binary
|
| 93 |
+
|
| 94 |
+
## FONTS
|
| 95 |
+
*.ttf binary
|
| 96 |
+
*.eot binary
|
| 97 |
+
*.otf binary
|
| 98 |
+
*.woff binary
|
| 99 |
+
*.woff2 binary
|
| 100 |
+
|
| 101 |
+
## OTHER
|
| 102 |
+
*.exe binary
|
| 103 |
+
*.md5 binary
|
| 104 |
+
*.pem binary
|
| 105 |
+
*.pyc binary
|
| 106 |
+
|
assets/templates/admin-notices/beta-tester.php
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
<p>
|
| 2 |
-
<?php
|
| 3 |
-
echo esc_html__(
|
| 4 |
-
'To ensure that our releases are as bug-free as possible, we need you as a beta tester!',
|
| 5 |
-
'backwpup'
|
| 6 |
-
);
|
| 7 |
-
?>
|
| 8 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/templates/admin-notices/independence-day.php
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
<p>
|
| 2 |
-
<?php
|
| 3 |
-
echo esc_html__(
|
| 4 |
-
'Get your 30% Independence Day discount for BackWPup Pro! Only available until July 5th, 2017.',
|
| 5 |
-
'backwpup'
|
| 6 |
-
);
|
| 7 |
-
?>
|
| 8 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/templates/admin-notices/rate-us.php
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
<p>
|
| 2 |
-
<?php
|
| 3 |
-
echo esc_html__(
|
| 4 |
-
'Are you happy with BackWPup? If you are satisfied with our free plugin and support, then please make us even happier and just take 30 seconds to leave a positive rating. :) We would really appreciate that and it will motivate our team to develop even more cool features for BackWPup!',
|
| 5 |
-
'backwpup'
|
| 6 |
-
);
|
| 7 |
-
?>
|
| 8 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backwpup.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: WordPress Backup Plugin
|
| 6 |
* Author: Inpsyde GmbH
|
| 7 |
* Author URI: http://inpsyde.com
|
| 8 |
-
* Version: 3.4.
|
| 9 |
* Text Domain: backwpup
|
| 10 |
* Domain Path: /languages/
|
| 11 |
* Network: true
|
|
@@ -120,22 +120,21 @@ if ( ! class_exists( 'BackWPup' ) ) {
|
|
| 120 |
}
|
| 121 |
|
| 122 |
// Phone Home
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
}
|
| 140 |
|
| 141 |
/**
|
|
@@ -251,7 +250,7 @@ if ( ! class_exists( 'BackWPup' ) ) {
|
|
| 251 |
require $filePath;
|
| 252 |
}
|
| 253 |
}
|
| 254 |
-
|
| 255 |
// Base32 autoloading
|
| 256 |
if ( strpos( $class, 'Base32' ) !== false ) {
|
| 257 |
require_once self::get_plugin_data( 'plugindir' ) . '/vendor/base32/src/Base32.php';
|
| 5 |
* Description: WordPress Backup Plugin
|
| 6 |
* Author: Inpsyde GmbH
|
| 7 |
* Author URI: http://inpsyde.com
|
| 8 |
+
* Version: 3.4.5
|
| 9 |
* Text Domain: backwpup
|
| 10 |
* Domain Path: /languages/
|
| 11 |
* Network: true
|
| 120 |
}
|
| 121 |
|
| 122 |
// Phone Home
|
| 123 |
+
if ( false === class_exists( 'BackWPup_Pro' ) ) {
|
| 124 |
+
require_once dirname( __FILE__ ) . '/vendor/inpsyde/phone-home-client/inc/autoload.php';
|
| 125 |
+
Inpsyde_PhoneHome_FrontController::initialize_for_network(
|
| 126 |
+
'BackWPup',
|
| 127 |
+
dirname( __FILE__ ) . '/assets/templates/phpnotice',
|
| 128 |
+
'backwpup',
|
| 129 |
+
array(
|
| 130 |
+
Inpsyde_PhoneHome_Configuration::ANONYMIZE => true,
|
| 131 |
+
Inpsyde_PhoneHome_Configuration::MINIMUM_CAPABILITY => 'manage_options',
|
| 132 |
+
Inpsyde_PhoneHome_Configuration::COLLECT_PHP => true,
|
| 133 |
+
Inpsyde_PhoneHome_Configuration::COLLECT_WP => true,
|
| 134 |
+
Inpsyde_PhoneHome_Configuration::SERVER_ADDRESS => 'https://backwpup.com/wp-json',
|
| 135 |
+
)
|
| 136 |
+
);
|
| 137 |
+
}
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
/**
|
| 250 |
require $filePath;
|
| 251 |
}
|
| 252 |
}
|
| 253 |
+
|
| 254 |
// Base32 autoloading
|
| 255 |
if ( strpos( $class, 'Base32' ) !== false ) {
|
| 256 |
require_once self::get_plugin_data( 'plugindir' ) . '/vendor/base32/src/Base32.php';
|
codestyle.xml
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<code_scheme name="Inpsyde-WordPress" version="173">
|
| 2 |
+
<option name="USE_SAME_INDENTS" value="true" />
|
| 3 |
+
<option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
|
| 4 |
+
<option name="OTHER_INDENT_OPTIONS">
|
| 5 |
+
<value>
|
| 6 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 7 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 8 |
+
<option name="SMART_TABS" value="true" />
|
| 9 |
+
</value>
|
| 10 |
+
</option>
|
| 11 |
+
<option name="LINE_SEPARATOR" value="
" />
|
| 12 |
+
<CssCodeStyleSettings>
|
| 13 |
+
<option name="HEX_COLOR_LOWER_CASE" value="true" />
|
| 14 |
+
<option name="HEX_COLOR_SHORT_FORMAT" value="true" />
|
| 15 |
+
<option name="VALUE_ALIGNMENT" value="2" />
|
| 16 |
+
</CssCodeStyleSettings>
|
| 17 |
+
<HTMLCodeStyleSettings>
|
| 18 |
+
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
|
| 19 |
+
<option name="HTML_TEXT_WRAP" value="0" />
|
| 20 |
+
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
| 21 |
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
| 22 |
+
</HTMLCodeStyleSettings>
|
| 23 |
+
<JSCodeStyleSettings>
|
| 24 |
+
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
|
| 25 |
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
| 26 |
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
| 27 |
+
</JSCodeStyleSettings>
|
| 28 |
+
<PHPCodeStyleSettings>
|
| 29 |
+
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
|
| 30 |
+
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
|
| 31 |
+
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
|
| 32 |
+
<option name="ALIGN_ASSIGNMENTS" value="true" />
|
| 33 |
+
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
|
| 34 |
+
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
|
| 35 |
+
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
|
| 36 |
+
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
|
| 37 |
+
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
|
| 38 |
+
<option name="LOWER_CASE_NULL_CONST" value="true" />
|
| 39 |
+
<option name="ELSE_IF_STYLE" value="COMBINE" />
|
| 40 |
+
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
|
| 41 |
+
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
|
| 42 |
+
<option name="SPACES_AROUND_VAR_WITHIN_BRACKETS" value="true" />
|
| 43 |
+
<option name="SPACE_BEFORE_UNARY_NOT" value="true" />
|
| 44 |
+
<option name="SPACE_AFTER_UNARY_NOT" value="true" />
|
| 45 |
+
<option name="SPACE_BETWEEN_TERNARY_QUEST_AND_COLON" value="true" />
|
| 46 |
+
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
|
| 47 |
+
</PHPCodeStyleSettings>
|
| 48 |
+
<XML>
|
| 49 |
+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
| 50 |
+
</XML>
|
| 51 |
+
<codeStyleSettings language="CSS">
|
| 52 |
+
<indentOptions>
|
| 53 |
+
<option name="INDENT_SIZE" value="2" />
|
| 54 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 55 |
+
</indentOptions>
|
| 56 |
+
</codeStyleSettings>
|
| 57 |
+
<codeStyleSettings language="CoffeeScript">
|
| 58 |
+
<indentOptions>
|
| 59 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 60 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 61 |
+
</indentOptions>
|
| 62 |
+
</codeStyleSettings>
|
| 63 |
+
<codeStyleSettings language="Gherkin">
|
| 64 |
+
<indentOptions>
|
| 65 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 66 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 67 |
+
</indentOptions>
|
| 68 |
+
</codeStyleSettings>
|
| 69 |
+
<codeStyleSettings language="HTML">
|
| 70 |
+
<indentOptions>
|
| 71 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 72 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 73 |
+
<option name="SMART_TABS" value="true" />
|
| 74 |
+
</indentOptions>
|
| 75 |
+
</codeStyleSettings>
|
| 76 |
+
<codeStyleSettings language="JSON">
|
| 77 |
+
<indentOptions>
|
| 78 |
+
<option name="INDENT_SIZE" value="4" />
|
| 79 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 80 |
+
</indentOptions>
|
| 81 |
+
</codeStyleSettings>
|
| 82 |
+
<codeStyleSettings language="JavaScript">
|
| 83 |
+
<option name="RIGHT_MARGIN" value="120" />
|
| 84 |
+
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
| 85 |
+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
| 86 |
+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
| 87 |
+
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
| 88 |
+
<option name="SPACE_WITHIN_METHOD_CALL_PARENTHESES" value="true" />
|
| 89 |
+
<option name="SPACE_WITHIN_METHOD_PARENTHESES" value="true" />
|
| 90 |
+
<option name="SPACE_WITHIN_IF_PARENTHESES" value="true" />
|
| 91 |
+
<option name="SPACE_WITHIN_WHILE_PARENTHESES" value="true" />
|
| 92 |
+
<option name="SPACE_WITHIN_FOR_PARENTHESES" value="true" />
|
| 93 |
+
<option name="SPACE_WITHIN_CATCH_PARENTHESES" value="true" />
|
| 94 |
+
<option name="SPACE_WITHIN_SWITCH_PARENTHESES" value="true" />
|
| 95 |
+
<option name="SPACE_WITHIN_BRACKETS" value="true" />
|
| 96 |
+
<option name="PARENTHESES_EXPRESSION_LPAREN_WRAP" value="true" />
|
| 97 |
+
<option name="PARENTHESES_EXPRESSION_RPAREN_WRAP" value="true" />
|
| 98 |
+
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
|
| 99 |
+
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
| 100 |
+
<option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
|
| 101 |
+
<option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
|
| 102 |
+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
|
| 103 |
+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
| 104 |
+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
|
| 105 |
+
<option name="IF_BRACE_FORCE" value="3" />
|
| 106 |
+
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
| 107 |
+
<option name="WHILE_BRACE_FORCE" value="3" />
|
| 108 |
+
<option name="FOR_BRACE_FORCE" value="3" />
|
| 109 |
+
<indentOptions>
|
| 110 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 111 |
+
<option name="SMART_TABS" value="true" />
|
| 112 |
+
</indentOptions>
|
| 113 |
+
</codeStyleSettings>
|
| 114 |
+
<codeStyleSettings language="LESS">
|
| 115 |
+
<indentOptions>
|
| 116 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 117 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 118 |
+
</indentOptions>
|
| 119 |
+
</codeStyleSettings>
|
| 120 |
+
<codeStyleSettings language="PHP">
|
| 121 |
+
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
| 122 |
+
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
| 123 |
+
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
|
| 124 |
+
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
| 125 |
+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
| 126 |
+
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
|
| 127 |
+
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
|
| 128 |
+
<option name="BLANK_LINES_AROUND_FIELD" value="1" />
|
| 129 |
+
<option name="BLANK_LINES_BEFORE_METHOD_BODY" value="1" />
|
| 130 |
+
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
|
| 131 |
+
<option name="CLASS_BRACE_STYLE" value="1" />
|
| 132 |
+
<option name="METHOD_BRACE_STYLE" value="1" />
|
| 133 |
+
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
| 134 |
+
<option name="SPECIAL_ELSE_IF_TREATMENT" value="true" />
|
| 135 |
+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
| 136 |
+
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
| 137 |
+
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
| 138 |
+
<option name="SPACE_AROUND_UNARY_OPERATOR" value="true" />
|
| 139 |
+
<option name="SPACE_WITHIN_PARENTHESES" value="true" />
|
| 140 |
+
<option name="SPACE_WITHIN_METHOD_CALL_PARENTHESES" value="true" />
|
| 141 |
+
<option name="SPACE_WITHIN_METHOD_PARENTHESES" value="true" />
|
| 142 |
+
<option name="SPACE_WITHIN_IF_PARENTHESES" value="true" />
|
| 143 |
+
<option name="SPACE_WITHIN_WHILE_PARENTHESES" value="true" />
|
| 144 |
+
<option name="SPACE_WITHIN_FOR_PARENTHESES" value="true" />
|
| 145 |
+
<option name="SPACE_WITHIN_CATCH_PARENTHESES" value="true" />
|
| 146 |
+
<option name="SPACE_WITHIN_SWITCH_PARENTHESES" value="true" />
|
| 147 |
+
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
|
| 148 |
+
<option name="SPACE_AFTER_TYPE_CAST" value="true" />
|
| 149 |
+
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
| 150 |
+
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
| 151 |
+
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
| 152 |
+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
| 153 |
+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
| 154 |
+
<option name="METHOD_CALL_CHAIN_WRAP" value="2" />
|
| 155 |
+
<option name="PARENTHESES_EXPRESSION_LPAREN_WRAP" value="true" />
|
| 156 |
+
<option name="PARENTHESES_EXPRESSION_RPAREN_WRAP" value="true" />
|
| 157 |
+
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
|
| 158 |
+
<option name="TERNARY_OPERATION_WRAP" value="1" />
|
| 159 |
+
<option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
|
| 160 |
+
<option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
|
| 161 |
+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
|
| 162 |
+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
| 163 |
+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
|
| 164 |
+
<option name="IF_BRACE_FORCE" value="3" />
|
| 165 |
+
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
| 166 |
+
<option name="WHILE_BRACE_FORCE" value="3" />
|
| 167 |
+
<option name="FOR_BRACE_FORCE" value="3" />
|
| 168 |
+
<indentOptions>
|
| 169 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 170 |
+
<option name="SMART_TABS" value="true" />
|
| 171 |
+
</indentOptions>
|
| 172 |
+
</codeStyleSettings>
|
| 173 |
+
<codeStyleSettings language="SASS">
|
| 174 |
+
<indentOptions>
|
| 175 |
+
<option name="INDENT_SIZE" value="4" />
|
| 176 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 177 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 178 |
+
<option name="SMART_TABS" value="true" />
|
| 179 |
+
</indentOptions>
|
| 180 |
+
</codeStyleSettings>
|
| 181 |
+
<codeStyleSettings language="SCSS">
|
| 182 |
+
<indentOptions>
|
| 183 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 184 |
+
</indentOptions>
|
| 185 |
+
</codeStyleSettings>
|
| 186 |
+
<codeStyleSettings language="SQL">
|
| 187 |
+
<indentOptions>
|
| 188 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 189 |
+
</indentOptions>
|
| 190 |
+
</codeStyleSettings>
|
| 191 |
+
<codeStyleSettings language="XML">
|
| 192 |
+
<indentOptions>
|
| 193 |
+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
| 194 |
+
<option name="USE_TAB_CHARACTER" value="true" />
|
| 195 |
+
<option name="SMART_TABS" value="true" />
|
| 196 |
+
</indentOptions>
|
| 197 |
+
</codeStyleSettings>
|
| 198 |
+
</code_scheme>
|
inc/class-betatester-admin-notice.php
DELETED
|
@@ -1,115 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
*
|
| 5 |
-
*/
|
| 6 |
-
class BackWPup_BetaTester_Admin_Notice {
|
| 7 |
-
|
| 8 |
-
const NOTICE_ID = 'beta_tester';
|
| 9 |
-
const MAIN_ADMIN_PAGE_IDS = 'toplevel_page_backwpup';
|
| 10 |
-
|
| 11 |
-
private static $main_admin_page_ids = array(
|
| 12 |
-
'toplevel_page_backwpup',
|
| 13 |
-
'toplevel_page_backwpup-network',
|
| 14 |
-
);
|
| 15 |
-
|
| 16 |
-
/**
|
| 17 |
-
* A flag set once per request that is true when the notice should be shown on the page
|
| 18 |
-
*
|
| 19 |
-
* @var bool
|
| 20 |
-
*/
|
| 21 |
-
private static $should_show;
|
| 22 |
-
|
| 23 |
-
/**
|
| 24 |
-
* Display a notice in BackWPup admin dashboard.
|
| 25 |
-
*/
|
| 26 |
-
public function dashboard_message() {
|
| 27 |
-
|
| 28 |
-
static $done;
|
| 29 |
-
$screen_id = get_current_screen()->id;
|
| 30 |
-
if ( ! $done && in_array( $screen_id, self::$main_admin_page_ids, true ) && $this->should_display() ) {
|
| 31 |
-
$done = true;
|
| 32 |
-
?>
|
| 33 |
-
<div class="metabox-holder postbox" id="backwpup_dismiss_beta_tester_notice">
|
| 34 |
-
<div class="inside">
|
| 35 |
-
<?php echo $this->widget_markup() ?>
|
| 36 |
-
</div>
|
| 37 |
-
</div>
|
| 38 |
-
<?php
|
| 39 |
-
}
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
/**
|
| 43 |
-
* Should we display the notice ?
|
| 44 |
-
*
|
| 45 |
-
* @return bool
|
| 46 |
-
*/
|
| 47 |
-
private function should_display() {
|
| 48 |
-
|
| 49 |
-
if ( ! is_bool( self::$should_show ) ) {
|
| 50 |
-
$option = new BackWPup_Dismissible_Notice_Option( true );
|
| 51 |
-
self::$should_show = ! $option->is_dismissed( self::NOTICE_ID );
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
return self::$should_show;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
/**
|
| 58 |
-
* The markup for the admin page message.
|
| 59 |
-
*
|
| 60 |
-
* @return string
|
| 61 |
-
*/
|
| 62 |
-
private function widget_markup() {
|
| 63 |
-
|
| 64 |
-
$dismiss_url = BackWPup_Dismissible_Notice_Option::dismiss_action_url(
|
| 65 |
-
self::NOTICE_ID,
|
| 66 |
-
BackWPup_Dismissible_Notice_Option::FOR_USER_FOR_GOOD_ACTION
|
| 67 |
-
);
|
| 68 |
-
|
| 69 |
-
$join_us = esc_html__( 'Join us as beta tester!', 'backwpup' );
|
| 70 |
-
$join_us_url = esc_html__( 'https://backwpup.com/become-backwpup-beta-tester/', 'backwpup' );
|
| 71 |
-
|
| 72 |
-
ob_start();
|
| 73 |
-
?>
|
| 74 |
-
<div>
|
| 75 |
-
<p>
|
| 76 |
-
<?php
|
| 77 |
-
echo esc_html__(
|
| 78 |
-
'To ensure that our releases are as bug-free as possible, we need you as a beta tester!',
|
| 79 |
-
'backwpup'
|
| 80 |
-
);
|
| 81 |
-
?>
|
| 82 |
-
</p>
|
| 83 |
-
<p>
|
| 84 |
-
<a
|
| 85 |
-
style="background: #9FC65D; border-color: #7ba617 #719c0d #719c0d; -webkit-box-shadow: 0 1px 0 #719c0d; box-shadow: 0 1px 0 #719c0d; text-shadow: 0 -1px 1px #719c0d, 1px 0 1px #719c0d, 0 1px 1px #719c0d, -1px 0 1px #719c0d;"
|
| 86 |
-
class="button button-primary"
|
| 87 |
-
href="<?php echo esc_url( $join_us_url ) ?>"
|
| 88 |
-
target="_blank">
|
| 89 |
-
<?php echo $join_us ?>
|
| 90 |
-
</a>
|
| 91 |
-
|
| 92 |
-
<a
|
| 93 |
-
class="button"
|
| 94 |
-
id="backwpup_dismiss_beta_tester"
|
| 95 |
-
href="<?php echo esc_url( $dismiss_url ) ?>">
|
| 96 |
-
<?php echo esc_html__( 'Don\'t show again', 'backwpup' ) ?>
|
| 97 |
-
</a>
|
| 98 |
-
</p>
|
| 99 |
-
</div>
|
| 100 |
-
<script>
|
| 101 |
-
(
|
| 102 |
-
function( $ ) {
|
| 103 |
-
$( '#backwpup_dismiss_beta_tester' ).on( 'click', function( e ) {
|
| 104 |
-
e.preventDefault();
|
| 105 |
-
$.post( $( this ).attr( 'href' ), { isAjax: 1 } );
|
| 106 |
-
$( '#backwpup_dismiss_beta_tester_notice' ).hide();
|
| 107 |
-
} );
|
| 108 |
-
}
|
| 109 |
-
)( jQuery );
|
| 110 |
-
</script>
|
| 111 |
-
<?php
|
| 112 |
-
|
| 113 |
-
return ob_get_clean();
|
| 114 |
-
}
|
| 115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-cron.php
CHANGED
|
@@ -81,7 +81,7 @@ class BackWPup_Cron {
|
|
| 81 |
//Compress old not compressed logs
|
| 82 |
try {
|
| 83 |
$dir = new BackWPup_Directory( $log_folder );
|
| 84 |
-
|
| 85 |
$jobids = BackWPup_Option::get_job_ids();
|
| 86 |
foreach ( $dir as $file ) {
|
| 87 |
if ( $file->isWritable() && '.html' == substr( $file->getFilename(), -5 ) ) {
|
|
@@ -125,43 +125,49 @@ class BackWPup_Cron {
|
|
| 125 |
}
|
| 126 |
|
| 127 |
}
|
| 128 |
-
|
| 129 |
/**
|
| 130 |
-
|
| 131 |
-
|
|
|
|
|
|
|
| 132 |
public static function update_message() {
|
|
|
|
| 133 |
// Fetch message from API
|
| 134 |
-
$api_request
|
| 135 |
$api_response = wp_remote_get( $api_request );
|
| 136 |
-
$api_data
|
| 137 |
-
|
| 138 |
-
//
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
$
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
}
|
| 152 |
-
|
| 153 |
-
// Encode $id so it will be unique
|
| 154 |
-
$id = Base32::encode( $id );
|
| 155 |
-
|
| 156 |
-
// Save in site options
|
| 157 |
-
update_site_option( "backwpup_message_id_$lang", $id );
|
| 158 |
-
update_site_option( "backwpup_message_content_$lang", $content );
|
| 159 |
-
update_site_option( "backwpup_message_button_text_$lang", $button );
|
| 160 |
-
update_site_option( "backwpup_message_url_$lang", $url );
|
| 161 |
}
|
| 162 |
}
|
| 163 |
|
| 164 |
-
|
| 165 |
/**
|
| 166 |
* Start job if in cron and run query args are set.
|
| 167 |
*/
|
| 81 |
//Compress old not compressed logs
|
| 82 |
try {
|
| 83 |
$dir = new BackWPup_Directory( $log_folder );
|
| 84 |
+
|
| 85 |
$jobids = BackWPup_Option::get_job_ids();
|
| 86 |
foreach ( $dir as $file ) {
|
| 87 |
if ( $file->isWritable() && '.html' == substr( $file->getFilename(), -5 ) ) {
|
| 125 |
}
|
| 126 |
|
| 127 |
}
|
| 128 |
+
|
| 129 |
/**
|
| 130 |
+
* Update the backend message.
|
| 131 |
+
*
|
| 132 |
+
* @return void
|
| 133 |
+
*/
|
| 134 |
public static function update_message() {
|
| 135 |
+
|
| 136 |
// Fetch message from API
|
| 137 |
+
$api_request = esc_url( 'http://backwpup.com/wp-json/inpsyde-messages/v1/message/' );
|
| 138 |
$api_response = wp_remote_get( $api_request );
|
| 139 |
+
$api_data = json_decode( wp_remote_retrieve_body( $api_response ), true );
|
| 140 |
+
|
| 141 |
+
// Check API response
|
| 142 |
+
if ( isset( $api_response ) && $api_response['response']['code'] === 200 ) {
|
| 143 |
+
|
| 144 |
+
// Add messages to options
|
| 145 |
+
foreach ( $api_data as $lang => $value ) {
|
| 146 |
+
$content = $value['content'];
|
| 147 |
+
$button = $value['button-text'];
|
| 148 |
+
$url = $value['url'];
|
| 149 |
+
|
| 150 |
+
// Calculate ID based on button text and URL
|
| 151 |
+
$id = "$button|$url";
|
| 152 |
+
// Padd to nearest 5 bytes for base32
|
| 153 |
+
$pad = strlen( $id );
|
| 154 |
+
if ( $pad % 5 > 0 ) {
|
| 155 |
+
$pad += 5 - ( $pad % 5 );
|
| 156 |
+
$id = str_pad( $id, $pad, '|' );
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
// Encode $id so it will be unique
|
| 160 |
+
$id = Base32::encode( $id );
|
| 161 |
+
|
| 162 |
+
// Save in site options
|
| 163 |
+
update_site_option( "backwpup_message_id_$lang", $id );
|
| 164 |
+
update_site_option( "backwpup_message_content_$lang", $content );
|
| 165 |
+
update_site_option( "backwpup_message_button_text_$lang", $button );
|
| 166 |
+
update_site_option( "backwpup_message_url_$lang", $url );
|
| 167 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
}
|
| 169 |
}
|
| 170 |
|
|
|
|
| 171 |
/**
|
| 172 |
* Start job if in cron and run query args are set.
|
| 173 |
*/
|
inc/class-destination-s3.php
CHANGED
|
@@ -15,7 +15,7 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 15 |
*/
|
| 16 |
public function option_defaults() {
|
| 17 |
|
| 18 |
-
return array( 's3accesskey' => '', 's3secretkey' => '', 's3bucket' => '', 's3region' => 'us-east-1', '
|
| 19 |
}
|
| 20 |
|
| 21 |
/**
|
|
@@ -51,12 +51,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 51 |
</select>
|
| 52 |
</td>
|
| 53 |
</tr>
|
| 54 |
-
<tr>
|
| 55 |
-
<th scope="row"><label for="s3base_url"><?php esc_html_e( 'Or a S3 Server URL', 'backwpup' ) ?></label></th>
|
| 56 |
-
<td>
|
| 57 |
-
<input id="s3base_url" name="s3base_url" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3base_url' ) );?>" class="regular-text" autocomplete="off" />
|
| 58 |
-
</td>
|
| 59 |
-
</tr>
|
| 60 |
</table>
|
| 61 |
|
| 62 |
<h3 class="title"><?php esc_html_e( 'S3 Access Keys', 'backwpup' ); ?></h3>
|
|
@@ -89,7 +83,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 89 |
's3accesskey' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 90 |
's3secretkey' => BackWPup_Encryption::decrypt(BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 91 |
's3bucketselected' => BackWPup_Option::get( $jobid, 's3bucket' ),
|
| 92 |
-
's3base_url' => BackWPup_Option::get( $jobid, 's3base_url' ),
|
| 93 |
's3region' => BackWPup_Option::get( $jobid, 's3region' )
|
| 94 |
) ); ?>
|
| 95 |
</td>
|
|
@@ -187,7 +180,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 187 |
$args[ 's3accesskey' ] = sanitize_text_field( $_POST[ 's3accesskey' ] );
|
| 188 |
$args[ 's3secretkey' ] = sanitize_text_field( $_POST[ 's3secretkey' ] );
|
| 189 |
$args[ 's3bucketselected' ] = sanitize_text_field( $_POST[ 's3bucketselected' ] );
|
| 190 |
-
$args[ 's3base_url' ] = esc_url_raw( $_POST[ 's3base_url' ] );
|
| 191 |
$args[ 's3region' ] = sanitize_text_field( $_POST[ 's3region' ] );
|
| 192 |
$ajax = TRUE;
|
| 193 |
}
|
|
@@ -198,7 +190,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 198 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => $args[ 's3accesskey' ],
|
| 199 |
'secret' => BackWPup_Encryption::decrypt( $args[ 's3secretkey' ] ),
|
| 200 |
'region' => $args[ 's3region' ],
|
| 201 |
-
'base_url' => $this->get_s3_base_url( $args[ 's3region' ], $args[ 's3base_url' ]),
|
| 202 |
'scheme' => 'https',
|
| 203 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' )
|
| 204 |
) );
|
|
@@ -246,13 +237,9 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 246 |
|
| 247 |
/**
|
| 248 |
* @param $s3region
|
| 249 |
-
* @param string $s3base_url
|
| 250 |
* @return string
|
| 251 |
*/
|
| 252 |
-
protected function get_s3_base_url( $s3region
|
| 253 |
-
|
| 254 |
-
if ( ! empty( $s3base_url ) )
|
| 255 |
-
return $s3base_url;
|
| 256 |
|
| 257 |
switch ( $s3region ) {
|
| 258 |
case 'us-east-1':
|
|
@@ -303,7 +290,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 303 |
|
| 304 |
BackWPup_Option::update( $jobid, 's3accesskey', sanitize_text_field( $_POST[ 's3accesskey' ] ) );
|
| 305 |
BackWPup_Option::update( $jobid, 's3secretkey', isset( $_POST[ 's3secretkey' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 's3secretkey' ] ) : '' );
|
| 306 |
-
BackWPup_Option::update( $jobid, 's3base_url', isset( $_POST[ 's3base_url' ] ) ? esc_url_raw( $_POST[ 's3base_url' ] ) : '' );
|
| 307 |
BackWPup_Option::update( $jobid, 's3region', sanitize_text_field( $_POST[ 's3region' ] ) );
|
| 308 |
BackWPup_Option::update( $jobid, 's3storageclass', sanitize_text_field( $_POST[ 's3storageclass' ] ) );
|
| 309 |
BackWPup_Option::update( $jobid, 's3ssencrypt', ( isset( $_POST[ 's3ssencrypt' ] ) && $_POST[ 's3ssencrypt' ] === 'AES256' ) ? 'AES256' : '' );
|
|
@@ -326,7 +312,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 326 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => sanitize_text_field( $_POST[ 's3accesskey' ] ),
|
| 327 |
'secret' => sanitize_text_field( $_POST[ 's3secretkey' ] ),
|
| 328 |
'region' => sanitize_text_field( $_POST[ 's3region' ] ),
|
| 329 |
-
'base_url' => $this->get_s3_base_url( sanitize_text_field( $_POST[ 's3region' ] ), esc_url_raw( $_POST[ 's3base_url' ] ) ),
|
| 330 |
'scheme' => 'https',
|
| 331 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 332 |
// set bucket creation region
|
|
@@ -372,7 +357,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 372 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 373 |
'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 374 |
'region' => BackWPup_Option::get( $jobid, 's3region' ),
|
| 375 |
-
'base_url' => $this->get_s3_base_url( BackWPup_Option::get( $jobid, 's3region' ), BackWPup_Option::get( $jobid, 's3base_url' ) ),
|
| 376 |
'scheme' => 'https',
|
| 377 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 378 |
|
|
@@ -406,7 +390,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 406 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 407 |
'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 408 |
'region' => BackWPup_Option::get( $jobid, 's3region' ),
|
| 409 |
-
'base_url' => $this->get_s3_base_url( BackWPup_Option::get( $jobid, 's3region' ), BackWPup_Option::get( $jobid, 's3base_url' ) ),
|
| 410 |
'scheme' => 'https',
|
| 411 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 412 |
|
|
@@ -463,7 +446,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 463 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => $job_object->job[ 's3accesskey' ],
|
| 464 |
'secret' => BackWPup_Encryption::decrypt( $job_object->job[ 's3secretkey' ] ),
|
| 465 |
'region' => $job_object->job[ 's3region' ],
|
| 466 |
-
'base_url' => $this->get_s3_base_url( $job_object->job[ 's3region' ], $job_object->job[ 's3base_url' ] ),
|
| 467 |
'scheme' => 'https',
|
| 468 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 469 |
|
|
@@ -601,7 +583,7 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 601 |
|
| 602 |
if ( $result->get( 'ContentLength' ) == filesize( $job_object->backup_folder . $job_object->backup_file ) ) {
|
| 603 |
$job_object->substeps_done = 1 + $job_object->backup_filesize;
|
| 604 |
-
$job_object->log( sprintf( __( 'Backup transferred to %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ]
|
| 605 |
if ( ! empty( $job_object->job[ 'jobid' ] ) )
|
| 606 |
BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloads3&file=' . $job_object->job[ 's3dir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
|
| 607 |
}
|
|
@@ -630,7 +612,7 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 630 |
$changetime = strtotime( $object[ 'LastModified' ] ) + ( get_option( 'gmt_offset' ) * 3600 );
|
| 631 |
if ( $job_object->is_backup_archive( $file ) && $job_object->owns_backup_archive( $file ) == true )
|
| 632 |
$backupfilelist[ $changetime ] = $file;
|
| 633 |
-
$files[ $filecounter ][ 'folder' ] = $this->get_s3_base_url( $job_object->job[ 's3region' ]
|
| 634 |
$files[ $filecounter ][ 'file' ] = $object[ 'Key' ];
|
| 635 |
$files[ $filecounter ][ 'filename' ] = basename( $object[ 'Key' ] );
|
| 636 |
if ( ! empty( $object[ 'StorageClass' ] ) )
|
|
@@ -660,7 +642,7 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 660 |
}
|
| 661 |
$numdeltefiles ++;
|
| 662 |
} else {
|
| 663 |
-
$job_object->log( sprintf( __( 'Cannot delete backup from %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ]
|
| 664 |
}
|
| 665 |
}
|
| 666 |
if ( $numdeltefiles > 0 )
|
|
@@ -710,7 +692,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 710 |
s3accesskey: $('input[name="s3accesskey"]').val(),
|
| 711 |
s3secretkey: $('input[name="s3secretkey"]').val(),
|
| 712 |
s3bucketselected: $('input[name="s3bucketselected"]').val(),
|
| 713 |
-
s3base_url: $('input[name="s3base_url"]').val(),
|
| 714 |
s3region: $('#s3region').val(),
|
| 715 |
_ajax_nonce: $('#backwpupajaxnonce').val()
|
| 716 |
};
|
|
@@ -727,9 +708,6 @@ class BackWPup_Destination_S3 extends BackWPup_Destinations {
|
|
| 727 |
$('input[name="s3secretkey"]').backwpupDelayKeyup(function () {
|
| 728 |
awsgetbucket();
|
| 729 |
});
|
| 730 |
-
$('input[name="s3base_url"]').backwpupDelayKeyup(function () {
|
| 731 |
-
awsgetbucket();
|
| 732 |
-
});
|
| 733 |
$('#s3region').change(function () {
|
| 734 |
awsgetbucket();
|
| 735 |
});
|
| 15 |
*/
|
| 16 |
public function option_defaults() {
|
| 17 |
|
| 18 |
+
return array( 's3accesskey' => '', 's3secretkey' => '', 's3bucket' => '', 's3region' => 'us-east-1', 's3ssencrypt' => '', 's3storageclass' => '', 's3dir' => trailingslashit( sanitize_file_name( get_bloginfo( 'name' ) ) ), 's3maxbackups' => 15, 's3syncnodelete' => TRUE, 's3multipart' => TRUE );
|
| 19 |
}
|
| 20 |
|
| 21 |
/**
|
| 51 |
</select>
|
| 52 |
</td>
|
| 53 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
</table>
|
| 55 |
|
| 56 |
<h3 class="title"><?php esc_html_e( 'S3 Access Keys', 'backwpup' ); ?></h3>
|
| 83 |
's3accesskey' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 84 |
's3secretkey' => BackWPup_Encryption::decrypt(BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 85 |
's3bucketselected' => BackWPup_Option::get( $jobid, 's3bucket' ),
|
|
|
|
| 86 |
's3region' => BackWPup_Option::get( $jobid, 's3region' )
|
| 87 |
) ); ?>
|
| 88 |
</td>
|
| 180 |
$args[ 's3accesskey' ] = sanitize_text_field( $_POST[ 's3accesskey' ] );
|
| 181 |
$args[ 's3secretkey' ] = sanitize_text_field( $_POST[ 's3secretkey' ] );
|
| 182 |
$args[ 's3bucketselected' ] = sanitize_text_field( $_POST[ 's3bucketselected' ] );
|
|
|
|
| 183 |
$args[ 's3region' ] = sanitize_text_field( $_POST[ 's3region' ] );
|
| 184 |
$ajax = TRUE;
|
| 185 |
}
|
| 190 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => $args[ 's3accesskey' ],
|
| 191 |
'secret' => BackWPup_Encryption::decrypt( $args[ 's3secretkey' ] ),
|
| 192 |
'region' => $args[ 's3region' ],
|
|
|
|
| 193 |
'scheme' => 'https',
|
| 194 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' )
|
| 195 |
) );
|
| 237 |
|
| 238 |
/**
|
| 239 |
* @param $s3region
|
|
|
|
| 240 |
* @return string
|
| 241 |
*/
|
| 242 |
+
protected function get_s3_base_url( $s3region ) {
|
|
|
|
|
|
|
|
|
|
| 243 |
|
| 244 |
switch ( $s3region ) {
|
| 245 |
case 'us-east-1':
|
| 290 |
|
| 291 |
BackWPup_Option::update( $jobid, 's3accesskey', sanitize_text_field( $_POST[ 's3accesskey' ] ) );
|
| 292 |
BackWPup_Option::update( $jobid, 's3secretkey', isset( $_POST[ 's3secretkey' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 's3secretkey' ] ) : '' );
|
|
|
|
| 293 |
BackWPup_Option::update( $jobid, 's3region', sanitize_text_field( $_POST[ 's3region' ] ) );
|
| 294 |
BackWPup_Option::update( $jobid, 's3storageclass', sanitize_text_field( $_POST[ 's3storageclass' ] ) );
|
| 295 |
BackWPup_Option::update( $jobid, 's3ssencrypt', ( isset( $_POST[ 's3ssencrypt' ] ) && $_POST[ 's3ssencrypt' ] === 'AES256' ) ? 'AES256' : '' );
|
| 312 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => sanitize_text_field( $_POST[ 's3accesskey' ] ),
|
| 313 |
'secret' => sanitize_text_field( $_POST[ 's3secretkey' ] ),
|
| 314 |
'region' => sanitize_text_field( $_POST[ 's3region' ] ),
|
|
|
|
| 315 |
'scheme' => 'https',
|
| 316 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 317 |
// set bucket creation region
|
| 357 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 358 |
'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 359 |
'region' => BackWPup_Option::get( $jobid, 's3region' ),
|
|
|
|
| 360 |
'scheme' => 'https',
|
| 361 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 362 |
|
| 390 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
|
| 391 |
'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
|
| 392 |
'region' => BackWPup_Option::get( $jobid, 's3region' ),
|
|
|
|
| 393 |
'scheme' => 'https',
|
| 394 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 395 |
|
| 446 |
$s3 = Aws\S3\S3Client::factory( array( 'signature' => 'v4', 'key' => $job_object->job[ 's3accesskey' ],
|
| 447 |
'secret' => BackWPup_Encryption::decrypt( $job_object->job[ 's3secretkey' ] ),
|
| 448 |
'region' => $job_object->job[ 's3region' ],
|
|
|
|
| 449 |
'scheme' => 'https',
|
| 450 |
'ssl.certificate_authority' => BackWPup::get_plugin_data( 'cacert' ) ) );
|
| 451 |
|
| 583 |
|
| 584 |
if ( $result->get( 'ContentLength' ) == filesize( $job_object->backup_folder . $job_object->backup_file ) ) {
|
| 585 |
$job_object->substeps_done = 1 + $job_object->backup_filesize;
|
| 586 |
+
$job_object->log( sprintf( __( 'Backup transferred to %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . $job_object->job[ 's3dir' ] . $job_object->backup_file ), E_USER_NOTICE );
|
| 587 |
if ( ! empty( $job_object->job[ 'jobid' ] ) )
|
| 588 |
BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloads3&file=' . $job_object->job[ 's3dir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
|
| 589 |
}
|
| 612 |
$changetime = strtotime( $object[ 'LastModified' ] ) + ( get_option( 'gmt_offset' ) * 3600 );
|
| 613 |
if ( $job_object->is_backup_archive( $file ) && $job_object->owns_backup_archive( $file ) == true )
|
| 614 |
$backupfilelist[ $changetime ] = $file;
|
| 615 |
+
$files[ $filecounter ][ 'folder' ] = $this->get_s3_base_url( $job_object->job[ 's3region' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . dirname( $object[ 'Key' ] );
|
| 616 |
$files[ $filecounter ][ 'file' ] = $object[ 'Key' ];
|
| 617 |
$files[ $filecounter ][ 'filename' ] = basename( $object[ 'Key' ] );
|
| 618 |
if ( ! empty( $object[ 'StorageClass' ] ) )
|
| 642 |
}
|
| 643 |
$numdeltefiles ++;
|
| 644 |
} else {
|
| 645 |
+
$job_object->log( sprintf( __( 'Cannot delete backup from %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . $job_object->job[ 's3dir' ] . $file ), E_USER_ERROR );
|
| 646 |
}
|
| 647 |
}
|
| 648 |
if ( $numdeltefiles > 0 )
|
| 692 |
s3accesskey: $('input[name="s3accesskey"]').val(),
|
| 693 |
s3secretkey: $('input[name="s3secretkey"]').val(),
|
| 694 |
s3bucketselected: $('input[name="s3bucketselected"]').val(),
|
|
|
|
| 695 |
s3region: $('#s3region').val(),
|
| 696 |
_ajax_nonce: $('#backwpupajaxnonce').val()
|
| 697 |
};
|
| 708 |
$('input[name="s3secretkey"]').backwpupDelayKeyup(function () {
|
| 709 |
awsgetbucket();
|
| 710 |
});
|
|
|
|
|
|
|
|
|
|
| 711 |
$('#s3region').change(function () {
|
| 712 |
awsgetbucket();
|
| 713 |
});
|
inc/class-discount-widget.php
DELETED
|
@@ -1,159 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
* Display widget advertising 40% off BackWPup pro.
|
| 5 |
-
*/
|
| 6 |
-
class BackWPup_Discount_Widget {
|
| 7 |
-
|
| 8 |
-
const NOTICE_ID = 'pro_discount';
|
| 9 |
-
const WIDGET_TITLE = 'Celebrate 4 Million Downloads with Us!';
|
| 10 |
-
|
| 11 |
-
/**
|
| 12 |
-
* A flag set once per request that is true when the widget should not be shown on the page
|
| 13 |
-
*
|
| 14 |
-
* @var bool
|
| 15 |
-
*/
|
| 16 |
-
private static $should_show;
|
| 17 |
-
|
| 18 |
-
private static $pages_to_skip = array(
|
| 19 |
-
'backwpup-pro_page_backwpup-phone-home-consent',
|
| 20 |
-
);
|
| 21 |
-
|
| 22 |
-
public function setup_widget() {
|
| 23 |
-
if ( defined( 'INPSYDE_DASHBOARD_WIDGET' ) && ! INPSYDE_DASHBOARD_WIDGET ) {
|
| 24 |
-
return;
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
if ( $this->should_display() ) {
|
| 28 |
-
wp_add_dashboard_widget(
|
| 29 |
-
'backwpup_pro_discount',
|
| 30 |
-
esc_html__( self::WIDGET_TITLE, 'backwpup' ),
|
| 31 |
-
array( $this, 'print_widget_markup' )
|
| 32 |
-
);
|
| 33 |
-
}
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
public function print_plugin_widget_markup() {
|
| 37 |
-
static $done;
|
| 38 |
-
if ( ! $done && $this->should_display() ) {
|
| 39 |
-
$done = true;
|
| 40 |
-
?>
|
| 41 |
-
<div class="metabox-holder postbox" id="backwpup_pro_discount">
|
| 42 |
-
<h3 class="hndle"><span><?php echo esc_html__( self::WIDGET_TITLE, 'backwpup' ) ?></span></h3>
|
| 43 |
-
<div class="inside">
|
| 44 |
-
<?php echo $this->widget_markup( 'left' ) ?>
|
| 45 |
-
</div>
|
| 46 |
-
</div>
|
| 47 |
-
<?php
|
| 48 |
-
}
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
public function print_widget_markup() {
|
| 52 |
-
if ( defined( 'INPSYDE_DASHBOARD_WIDGET' ) && ! INPSYDE_DASHBOARD_WIDGET ) {
|
| 53 |
-
return;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
static $done;
|
| 57 |
-
if ( ! $done && $this->should_display() ) {
|
| 58 |
-
$done = true;
|
| 59 |
-
echo $this->widget_markup();
|
| 60 |
-
}
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
/**
|
| 64 |
-
* We don't display widget if it was dismissed for good, or if it is after May 1, 2017.
|
| 65 |
-
*
|
| 66 |
-
* @return bool
|
| 67 |
-
*/
|
| 68 |
-
private function should_display() {
|
| 69 |
-
// If already checked, don't check again
|
| 70 |
-
if ( is_bool( self::$should_show ) ) {
|
| 71 |
-
return self::$should_show;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
$option = new BackWPup_Dismissible_Notice_Option( false );
|
| 75 |
-
|
| 76 |
-
// If notice is dismissed for good, don't show it
|
| 77 |
-
self::$should_show = ! $option->is_dismissed( self::NOTICE_ID );
|
| 78 |
-
|
| 79 |
-
$screen = get_current_screen();
|
| 80 |
-
$is_dashboard = $screen->id === 'dashboard';
|
| 81 |
-
$is_backwpup = $screen->id === 'toplevel_page_backwpup' || strpos( $screen->id, 'backwpup' ) === 0;
|
| 82 |
-
$pages_to_skip = in_array( $screen->id, self::$pages_to_skip, true );
|
| 83 |
-
|
| 84 |
-
// On pages explicitly skipped, don't show anything
|
| 85 |
-
if ( ! $is_dashboard && ( ! $is_backwpup || $pages_to_skip ) ) {
|
| 86 |
-
self::$should_show = false;
|
| 87 |
-
return self::$should_show;
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
$expiration_date = new DateTime('2017-05-02 00:00:00');
|
| 91 |
-
$now = new DateTime('now');
|
| 92 |
-
|
| 93 |
-
if ( $now >= $expiration_date ) {
|
| 94 |
-
self::$should_show = false;
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
return self::$should_show;
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
/**
|
| 101 |
-
* The markup for the admin notice.
|
| 102 |
-
*
|
| 103 |
-
* @param string $btn_float
|
| 104 |
-
*
|
| 105 |
-
* @return string
|
| 106 |
-
*/
|
| 107 |
-
private function widget_markup( $btn_float = 'right' ) {
|
| 108 |
-
$dismiss_url = BackWPup_Dismissible_Notice_Option::dismiss_action_url(
|
| 109 |
-
self::NOTICE_ID,
|
| 110 |
-
BackWPup_Dismissible_Notice_Option::FOR_USER_FOR_GOOD_ACTION
|
| 111 |
-
);
|
| 112 |
-
|
| 113 |
-
$discount_url = __(
|
| 114 |
-
'https://backwpup.com/?utm_source=BackWPup&utm_medium=Link&utm_campaign=4million#buy',
|
| 115 |
-
'backwpup'
|
| 116 |
-
);
|
| 117 |
-
|
| 118 |
-
ob_start();
|
| 119 |
-
?>
|
| 120 |
-
<div>
|
| 121 |
-
<p align="justify">
|
| 122 |
-
<?php
|
| 123 |
-
esc_html_e(
|
| 124 |
-
'We want to celebrate our 4 millionth download! And we want to say thank you! With an amazing 40% BackWPup discount on BackWPup PRO from April 25th to May 1st, 2017!',
|
| 125 |
-
'backwpup'
|
| 126 |
-
);
|
| 127 |
-
?>
|
| 128 |
-
</p>
|
| 129 |
-
<p>
|
| 130 |
-
<a
|
| 131 |
-
style="background: #8fba2b; border-color: #7ba617 #719c0d #719c0d; -webkit-box-shadow: 0 1px 0 #719c0d; box-shadow: 0 1px 0 #719c0d; text-shadow: 0 -1px 1px #719c0d, 1px 0 1px #719c0d, 0 1px 1px #719c0d, -1px 0 1px #719c0d;"
|
| 132 |
-
class="button button-large button-primary"
|
| 133 |
-
href="<?php echo esc_url( $discount_url ) ?>"
|
| 134 |
-
target="_blank">
|
| 135 |
-
<?php echo esc_html__( 'Get an amazing discount with coupon code "4million"', 'backwpup' ) ?>
|
| 136 |
-
</a>
|
| 137 |
-
|
| 138 |
-
<a class="button button-small" id="backwpup_dismiss_pro_discount" href="<?php echo esc_url( $dismiss_url ) ?>">
|
| 139 |
-
<?php echo esc_html__( 'Don\'t show again', 'backwpup' ) ?>
|
| 140 |
-
</a>
|
| 141 |
-
</p>
|
| 142 |
-
</div>
|
| 143 |
-
<script>
|
| 144 |
-
(
|
| 145 |
-
function( $ ) {
|
| 146 |
-
$( '#backwpup_dismiss_pro_discount' ).on( 'click', function( e ) {
|
| 147 |
-
e.preventDefault();
|
| 148 |
-
$.post( $( this ).attr( 'href' ), { isAjax: 1 } );
|
| 149 |
-
$( '#backwpup_pro_discount' ).hide();
|
| 150 |
-
$( '#backwpup_pro_discount-hide' ).click();
|
| 151 |
-
} );
|
| 152 |
-
}
|
| 153 |
-
)( jQuery );
|
| 154 |
-
</script>
|
| 155 |
-
<?php
|
| 156 |
-
|
| 157 |
-
return ob_get_clean();
|
| 158 |
-
}
|
| 159 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-encryption-openssl.php
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
<?php
|
|
|
|
| 2 |
/**
|
| 3 |
* Encrypt / decrypt data using Open SSL.
|
| 4 |
*
|
|
@@ -19,6 +20,7 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 19 |
* @return bool
|
| 20 |
*/
|
| 21 |
public static function supported() {
|
|
|
|
| 22 |
return
|
| 23 |
version_compare( PHP_VERSION, '5.3.0', '>=' )
|
| 24 |
&& function_exists( 'openssl_get_cipher_methods' )
|
|
@@ -42,7 +44,7 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 42 |
}
|
| 43 |
|
| 44 |
$preferred = array( 'AES-256-CTR', 'AES-128-CTR', 'AES-192-CTR' );
|
| 45 |
-
foreach( $preferred as $method ) {
|
| 46 |
if ( in_array( $method, $all_methods, true ) ) {
|
| 47 |
self::$cipher_method = $method;
|
| 48 |
|
|
@@ -60,6 +62,7 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 60 |
* @param string $key_type
|
| 61 |
*/
|
| 62 |
public function __construct( $enc_key, $key_type ) {
|
|
|
|
| 63 |
$this->key = md5( (string) $enc_key );
|
| 64 |
$this->key_type = (string) $key_type;
|
| 65 |
}
|
|
@@ -68,7 +71,7 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 68 |
*
|
| 69 |
* Encrypt a string using Open SSL lib with AES-256-CTR cypher
|
| 70 |
*
|
| 71 |
-
* @param string $string value to encrypt
|
| 72 |
*
|
| 73 |
* @return string encrypted string
|
| 74 |
*/
|
|
@@ -78,24 +81,33 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 78 |
return '';
|
| 79 |
}
|
| 80 |
|
| 81 |
-
$
|
| 82 |
-
|
| 83 |
-
$encrypted = openssl_encrypt(
|
| 84 |
$string,
|
| 85 |
self::cipher_method(),
|
| 86 |
$this->key,
|
| 87 |
OPENSSL_RAW_DATA,
|
| 88 |
-
$nonce
|
| 89 |
);
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
/**
|
| 95 |
*
|
| 96 |
* Decrypt a string using Open SSL lib with AES-256-CTR cypher
|
| 97 |
*
|
| 98 |
-
* @param string $string value to decrypt
|
| 99 |
*
|
| 100 |
* @return string decrypted string
|
| 101 |
*/
|
|
@@ -109,23 +121,28 @@ class BackWPup_Encryption_OpenSSL {
|
|
| 109 |
return '';
|
| 110 |
}
|
| 111 |
|
| 112 |
-
$no_prefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
$encrypted = base64_decode( $no_prefix, true );
|
| 115 |
if ( $encrypted === false ) {
|
| 116 |
return '';
|
| 117 |
}
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
|
| 123 |
-
|
| 124 |
-
$
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
$nonce
|
| 129 |
-
);
|
| 130 |
}
|
| 131 |
}
|
| 1 |
<?php
|
| 2 |
+
|
| 3 |
/**
|
| 4 |
* Encrypt / decrypt data using Open SSL.
|
| 5 |
*
|
| 20 |
* @return bool
|
| 21 |
*/
|
| 22 |
public static function supported() {
|
| 23 |
+
|
| 24 |
return
|
| 25 |
version_compare( PHP_VERSION, '5.3.0', '>=' )
|
| 26 |
&& function_exists( 'openssl_get_cipher_methods' )
|
| 44 |
}
|
| 45 |
|
| 46 |
$preferred = array( 'AES-256-CTR', 'AES-128-CTR', 'AES-192-CTR' );
|
| 47 |
+
foreach ( $preferred as $method ) {
|
| 48 |
if ( in_array( $method, $all_methods, true ) ) {
|
| 49 |
self::$cipher_method = $method;
|
| 50 |
|
| 62 |
* @param string $key_type
|
| 63 |
*/
|
| 64 |
public function __construct( $enc_key, $key_type ) {
|
| 65 |
+
|
| 66 |
$this->key = md5( (string) $enc_key );
|
| 67 |
$this->key_type = (string) $key_type;
|
| 68 |
}
|
| 71 |
*
|
| 72 |
* Encrypt a string using Open SSL lib with AES-256-CTR cypher
|
| 73 |
*
|
| 74 |
+
* @param string $string value to encrypt.
|
| 75 |
*
|
| 76 |
* @return string encrypted string
|
| 77 |
*/
|
| 81 |
return '';
|
| 82 |
}
|
| 83 |
|
| 84 |
+
$base64_encode = '';
|
| 85 |
+
$args = array(
|
|
|
|
| 86 |
$string,
|
| 87 |
self::cipher_method(),
|
| 88 |
$this->key,
|
| 89 |
OPENSSL_RAW_DATA,
|
|
|
|
| 90 |
);
|
| 91 |
|
| 92 |
+
if ( 1 === version_compare( PHP_VERSION, '5.3.2' ) ) {
|
| 93 |
+
$args[] = openssl_random_pseudo_bytes( openssl_cipher_iv_length( self::cipher_method() ) );
|
| 94 |
+
|
| 95 |
+
// Include nonce if possible.
|
| 96 |
+
$base64_encode .= end( $args );
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
$encrypted = call_user_func_array( 'openssl_encrypt', $args );
|
| 100 |
+
|
| 101 |
+
$base64_encode .= $encrypted;
|
| 102 |
+
|
| 103 |
+
return BackWPup_Encryption::PREFIX . self::PREFIX . $this->key_type . base64_encode( $base64_encode );
|
| 104 |
}
|
| 105 |
|
| 106 |
/**
|
| 107 |
*
|
| 108 |
* Decrypt a string using Open SSL lib with AES-256-CTR cypher
|
| 109 |
*
|
| 110 |
+
* @param string $string value to decrypt.
|
| 111 |
*
|
| 112 |
* @return string decrypted string
|
| 113 |
*/
|
| 121 |
return '';
|
| 122 |
}
|
| 123 |
|
| 124 |
+
$no_prefix = substr( $string, strlen( BackWPup_Encryption::PREFIX . self::PREFIX . $this->key_type ) );
|
| 125 |
+
$encrypted = base64_decode( $no_prefix, true );
|
| 126 |
+
$to_decrypt = $encrypted;
|
| 127 |
+
$args = array(
|
| 128 |
+
$to_decrypt,
|
| 129 |
+
self::cipher_method(),
|
| 130 |
+
$this->key,
|
| 131 |
+
OPENSSL_RAW_DATA,
|
| 132 |
+
);
|
| 133 |
|
|
|
|
| 134 |
if ( $encrypted === false ) {
|
| 135 |
return '';
|
| 136 |
}
|
| 137 |
|
| 138 |
+
if ( 1 === version_compare( PHP_VERSION, '5.3.2' ) ) {
|
| 139 |
+
$nonce_size = openssl_cipher_iv_length( self::cipher_method() );
|
| 140 |
+
$nonce = substr( $encrypted, 0, $nonce_size );
|
| 141 |
|
| 142 |
+
$args[0] = substr( $encrypted, $nonce_size );
|
| 143 |
+
$args[] = $nonce;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
return call_user_func_array( 'openssl_decrypt', $args );
|
|
|
|
|
|
|
| 147 |
}
|
| 148 |
}
|
inc/class-install.php
CHANGED
|
@@ -64,7 +64,7 @@ class BackWPup_Install {
|
|
| 64 |
if ( ! wp_next_scheduled( 'backwpup_check_cleanup' ) ) {
|
| 65 |
wp_schedule_event( time(), 'twicedaily', 'backwpup_check_cleanup' );
|
| 66 |
}
|
| 67 |
-
|
| 68 |
// Add schedule to update backend message
|
| 69 |
if ( ! wp_next_scheduled( 'backwpup_update_message' ) ) {
|
| 70 |
wp_schedule_event( time(), 'twicedaily', 'backwpup_update_message' );
|
|
@@ -229,7 +229,6 @@ class BackWPup_Install {
|
|
| 229 |
$jobvalue[ 's3bucket' ] = $jobvalue[ 'awsBucket' ];
|
| 230 |
//get aws region
|
| 231 |
$jobvalue[ 's3region' ] = 'us-east-1';
|
| 232 |
-
$jobvalue[ 's3base_url' ] = '';
|
| 233 |
$jobvalue[ 's3storageclass' ] = !empty( $jobvalue[ 'awsrrs' ] ) ? 'REDUCED_REDUNDANCY' : '';
|
| 234 |
$jobvalue[ 's3dir' ] = $jobvalue[ 'awsdir' ];
|
| 235 |
$jobvalue[ 's3maxbackups' ] = $jobvalue[ 'awsmaxbackups' ];
|
|
@@ -239,7 +238,6 @@ class BackWPup_Install {
|
|
| 239 |
$jobvalue[ 's3secretkey' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'GStorageSecret' ] );
|
| 240 |
$jobvalue[ 's3bucket' ] = $jobvalue[ 'GStorageBucket' ];
|
| 241 |
$jobvalue[ 's3region' ] = 'google-storage';
|
| 242 |
-
$jobvalue[ 's3base_url' ] = '';
|
| 243 |
$jobvalue[ 's3ssencrypt' ] = '';
|
| 244 |
$jobvalue[ 's3dir' ] = $jobvalue[ 'GStoragedir' ];
|
| 245 |
$jobvalue[ 's3maxbackups' ] = $jobvalue[ 'GStoragemaxbackups' ];
|
| 64 |
if ( ! wp_next_scheduled( 'backwpup_check_cleanup' ) ) {
|
| 65 |
wp_schedule_event( time(), 'twicedaily', 'backwpup_check_cleanup' );
|
| 66 |
}
|
| 67 |
+
|
| 68 |
// Add schedule to update backend message
|
| 69 |
if ( ! wp_next_scheduled( 'backwpup_update_message' ) ) {
|
| 70 |
wp_schedule_event( time(), 'twicedaily', 'backwpup_update_message' );
|
| 229 |
$jobvalue[ 's3bucket' ] = $jobvalue[ 'awsBucket' ];
|
| 230 |
//get aws region
|
| 231 |
$jobvalue[ 's3region' ] = 'us-east-1';
|
|
|
|
| 232 |
$jobvalue[ 's3storageclass' ] = !empty( $jobvalue[ 'awsrrs' ] ) ? 'REDUCED_REDUNDANCY' : '';
|
| 233 |
$jobvalue[ 's3dir' ] = $jobvalue[ 'awsdir' ];
|
| 234 |
$jobvalue[ 's3maxbackups' ] = $jobvalue[ 'awsmaxbackups' ];
|
| 238 |
$jobvalue[ 's3secretkey' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'GStorageSecret' ] );
|
| 239 |
$jobvalue[ 's3bucket' ] = $jobvalue[ 'GStorageBucket' ];
|
| 240 |
$jobvalue[ 's3region' ] = 'google-storage';
|
|
|
|
| 241 |
$jobvalue[ 's3ssencrypt' ] = '';
|
| 242 |
$jobvalue[ 's3dir' ] = $jobvalue[ 'GStoragedir' ];
|
| 243 |
$jobvalue[ 's3maxbackups' ] = $jobvalue[ 'GStoragemaxbackups' ];
|
inc/class-job.php
CHANGED
|
@@ -621,7 +621,7 @@ final class BackWPup_Job {
|
|
| 621 |
} else {
|
| 622 |
// New style, must parse
|
| 623 |
// Start at end of file since that's where it is by default
|
| 624 |
-
|
| 625 |
// Try 10-character chunks first for base 32 and most of base 36
|
| 626 |
for ( $i = strlen( $file ) - 10; $i >= 0; $i--) {
|
| 627 |
$data = BackWPup_Option::decode_hash( substr( $file, $i, 10 ) );
|
|
@@ -629,7 +629,7 @@ final class BackWPup_Job {
|
|
| 629 |
break;
|
| 630 |
}
|
| 631 |
}
|
| 632 |
-
|
| 633 |
// Try 9-character chunks for any left-over base 36
|
| 634 |
if ( ! $data ) {
|
| 635 |
for ( $i = strlen( $file ) - 9; $i >= 0; $i--) {
|
|
@@ -639,20 +639,20 @@ final class BackWPup_Job {
|
|
| 639 |
}
|
| 640 |
}
|
| 641 |
}
|
| 642 |
-
|
| 643 |
if ( ! $data ) {
|
| 644 |
return false;
|
| 645 |
}
|
| 646 |
}
|
| 647 |
-
|
| 648 |
if ( $data[0] != BackWPup::get_plugin_data( 'hash' ) ) {
|
| 649 |
return false;
|
| 650 |
}
|
| 651 |
-
|
| 652 |
if ( $data[1] != $this->job['jobid'] ) {
|
| 653 |
return false;
|
| 654 |
}
|
| 655 |
-
|
| 656 |
return true;
|
| 657 |
}
|
| 658 |
|
|
@@ -1730,7 +1730,7 @@ final class BackWPup_Job {
|
|
| 1730 |
|
| 1731 |
try {
|
| 1732 |
$dir = new BackWPup_Directory( $folder );
|
| 1733 |
-
|
| 1734 |
foreach ( $dir as $file ) {
|
| 1735 |
if ( $file->isDot() || $file->isDir() ) {
|
| 1736 |
continue;
|
|
@@ -2305,6 +2305,50 @@ final class BackWPup_Job {
|
|
| 2305 |
|
| 2306 |
}
|
| 2307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2308 |
/**
|
| 2309 |
* Delete some data on cloned objects
|
| 2310 |
*/
|
| 621 |
} else {
|
| 622 |
// New style, must parse
|
| 623 |
// Start at end of file since that's where it is by default
|
| 624 |
+
|
| 625 |
// Try 10-character chunks first for base 32 and most of base 36
|
| 626 |
for ( $i = strlen( $file ) - 10; $i >= 0; $i--) {
|
| 627 |
$data = BackWPup_Option::decode_hash( substr( $file, $i, 10 ) );
|
| 629 |
break;
|
| 630 |
}
|
| 631 |
}
|
| 632 |
+
|
| 633 |
// Try 9-character chunks for any left-over base 36
|
| 634 |
if ( ! $data ) {
|
| 635 |
for ( $i = strlen( $file ) - 9; $i >= 0; $i--) {
|
| 639 |
}
|
| 640 |
}
|
| 641 |
}
|
| 642 |
+
|
| 643 |
if ( ! $data ) {
|
| 644 |
return false;
|
| 645 |
}
|
| 646 |
}
|
| 647 |
+
|
| 648 |
if ( $data[0] != BackWPup::get_plugin_data( 'hash' ) ) {
|
| 649 |
return false;
|
| 650 |
}
|
| 651 |
+
|
| 652 |
if ( $data[1] != $this->job['jobid'] ) {
|
| 653 |
return false;
|
| 654 |
}
|
| 655 |
+
|
| 656 |
return true;
|
| 657 |
}
|
| 658 |
|
| 1730 |
|
| 1731 |
try {
|
| 1732 |
$dir = new BackWPup_Directory( $folder );
|
| 1733 |
+
|
| 1734 |
foreach ( $dir as $file ) {
|
| 1735 |
if ( $file->isDot() || $file->isDir() ) {
|
| 1736 |
continue;
|
| 2305 |
|
| 2306 |
}
|
| 2307 |
|
| 2308 |
+
/**
|
| 2309 |
+
* Check if mysqldump is installed in the server.
|
| 2310 |
+
*
|
| 2311 |
+
* @param string $dbdumpmysqlfolder Path to mysqldump binary
|
| 2312 |
+
*
|
| 2313 |
+
* @return bool
|
| 2314 |
+
*/
|
| 2315 |
+
public static function mysqldump_installed( $dbdumpmysqlfolder ) {
|
| 2316 |
+
|
| 2317 |
+
if( false === self::is_exec() ) {
|
| 2318 |
+
return false;
|
| 2319 |
+
}
|
| 2320 |
+
|
| 2321 |
+
if ( ! file_exists( $dbdumpmysqlfolder ) || ! is_executable( $dbdumpmysqlfolder ) ) {
|
| 2322 |
+
return false;
|
| 2323 |
+
}
|
| 2324 |
+
|
| 2325 |
+
return true;
|
| 2326 |
+
}
|
| 2327 |
+
|
| 2328 |
+
/**
|
| 2329 |
+
* Returns mysqldump error message.
|
| 2330 |
+
*
|
| 2331 |
+
* @param string $dbdumpmysqlfolder Path to mysqldump binary
|
| 2332 |
+
*
|
| 2333 |
+
* @return string
|
| 2334 |
+
*/
|
| 2335 |
+
public static function mysqldump_error_message( $dbdumpmysqlfolder ) {
|
| 2336 |
+
|
| 2337 |
+
$output = '';
|
| 2338 |
+
|
| 2339 |
+
if( false === self::is_exec() ) {
|
| 2340 |
+
$output = '<span style="color:#999;">'. __( 'exec command is not active.', 'backwpup' ) .'</span>';
|
| 2341 |
+
return $output;
|
| 2342 |
+
}
|
| 2343 |
+
|
| 2344 |
+
if ( ! file_exists( $dbdumpmysqlfolder ) || ! is_executable( $dbdumpmysqlfolder ) ) {
|
| 2345 |
+
$output = '<span style="color:#999;">'. __( 'mysqldump binary not found.', 'backwpup' ) .'</span>';
|
| 2346 |
+
return $output;
|
| 2347 |
+
}
|
| 2348 |
+
|
| 2349 |
+
return $output;
|
| 2350 |
+
}
|
| 2351 |
+
|
| 2352 |
/**
|
| 2353 |
* Delete some data on cloned objects
|
| 2354 |
*/
|
inc/class-page-editjob.php
CHANGED
|
@@ -472,7 +472,7 @@ class BackWPup_Page_Editjob {
|
|
| 472 |
echo '<p><label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" /> ' . esc_html__( 'Zip', 'backwpup' ) . '</label></p>';
|
| 473 |
} else {
|
| 474 |
echo '<p><label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" disabled="disabled" /> ' . esc_html__( 'Zip', 'backwpup' ) . '</label>';
|
| 475 |
-
echo '<br /><span class="description">' . esc_html(
|
| 476 |
}
|
| 477 |
echo '<p><label for="idarchiveformat-tar"><input class="radio" type="radio"' . checked( '.tar', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-tar" value=".tar" /> ' . esc_html__( 'Tar', 'backwpup' ) . '</label></p>';
|
| 478 |
if ( function_exists( 'gzopen' ) ) {
|
| 472 |
echo '<p><label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" /> ' . esc_html__( 'Zip', 'backwpup' ) . '</label></p>';
|
| 473 |
} else {
|
| 474 |
echo '<p><label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" disabled="disabled" /> ' . esc_html__( 'Zip', 'backwpup' ) . '</label>';
|
| 475 |
+
echo '<br /><span class="description">' . esc_html(__( 'ZipArchive PHP class is missing, so BackWPUp will use PclZip instead.', 'backwpup' )) . '</span></p>';
|
| 476 |
}
|
| 477 |
echo '<p><label for="idarchiveformat-tar"><input class="radio" type="radio"' . checked( '.tar', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-tar" value=".tar" /> ' . esc_html__( 'Tar', 'backwpup' ) . '</label></p>';
|
| 478 |
if ( function_exists( 'gzopen' ) ) {
|
inc/class-php-admin-notice.php
DELETED
|
@@ -1,213 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
*
|
| 5 |
-
*/
|
| 6 |
-
class BackWPup_Php_Admin_Notice {
|
| 7 |
-
|
| 8 |
-
const NOTICE_ID = 'php52';
|
| 9 |
-
const MAIN_ADMIN_PAGE_ID = 'toplevel_page_backwpup';
|
| 10 |
-
|
| 11 |
-
/**
|
| 12 |
-
* A flag set once per request that is true when the notice should be shown on the page
|
| 13 |
-
*
|
| 14 |
-
* @var bool
|
| 15 |
-
*/
|
| 16 |
-
private static $should_show;
|
| 17 |
-
|
| 18 |
-
/**
|
| 19 |
-
* Array of screen ids where we don't want to show any notice
|
| 20 |
-
*
|
| 21 |
-
* @var string[]
|
| 22 |
-
*/
|
| 23 |
-
private static $pages_to_skip = array(
|
| 24 |
-
'backwpup-pro_page_backwpupabout',
|
| 25 |
-
'backwpup-pro_page_backwpup-phone-home-consent',
|
| 26 |
-
);
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* For PHP 5.2 users, display an admin notice when not in any of the BackWPup admin pages.
|
| 30 |
-
* On BackWPup admin pages an "extended" version of the notice is shown, so no need of the notice.
|
| 31 |
-
*
|
| 32 |
-
* @wp-hook admin_notices
|
| 33 |
-
*/
|
| 34 |
-
public function admin_notice() {
|
| 35 |
-
if ( $this->should_display() ) {
|
| 36 |
-
echo $this->admin_notice_markup();
|
| 37 |
-
}
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* For PHP 5.2 users, display a notice in all the the BackWPup admin pages.
|
| 42 |
-
*/
|
| 43 |
-
public function admin_page_message() {
|
| 44 |
-
if ( get_current_screen()->id === self::MAIN_ADMIN_PAGE_ID && $this->should_display( true ) ) {
|
| 45 |
-
echo $this->admin_page_markup();
|
| 46 |
-
}
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
/**
|
| 50 |
-
* We don't display the notice if the PHP version is higher that PHP 5.3
|
| 51 |
-
* or if it was dismissed for good.
|
| 52 |
-
*
|
| 53 |
-
* @param bool $check_only_version
|
| 54 |
-
*
|
| 55 |
-
* @return bool
|
| 56 |
-
*/
|
| 57 |
-
private function should_display( $check_only_version = false ) {
|
| 58 |
-
|
| 59 |
-
// If already checked, don't check again
|
| 60 |
-
if ( is_bool( self::$should_show ) ) {
|
| 61 |
-
return self::$should_show;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
// By default, we don't show the notice to user with PHP 5.3+, but we make it filterable
|
| 65 |
-
$allowed_version = apply_filters( 'backwpup_php52_notice_allowed_version', '5.3' );
|
| 66 |
-
|
| 67 |
-
// If not PHP 5.2, don't do anything
|
| 68 |
-
if ( version_compare( PHP_VERSION, $allowed_version, '>=' ) ) {
|
| 69 |
-
self::$should_show = false;
|
| 70 |
-
|
| 71 |
-
return self::$should_show;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
$screen = get_current_screen();
|
| 75 |
-
$is_dashboard = $screen->id === 'dashboard';
|
| 76 |
-
$is_backwpup = $screen->id === 'toplevel_page_backwpup' || strpos( $screen->id, 'backwpup' ) === 0;
|
| 77 |
-
$pages_to_skip = in_array( $screen->id, self::$pages_to_skip, true );
|
| 78 |
-
|
| 79 |
-
// On pages explicitly skipped, don't show anything
|
| 80 |
-
if ( ! $is_dashboard && ( ! $is_backwpup || $pages_to_skip ) ) {
|
| 81 |
-
|
| 82 |
-
self::$should_show = false;
|
| 83 |
-
|
| 84 |
-
return self::$should_show;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
// On main admin page only show the extended notice
|
| 88 |
-
if ( $screen->id === self::MAIN_ADMIN_PAGE_ID && ! $check_only_version ) {
|
| 89 |
-
return false;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
// Notice on main admin page can't be dismissed for good
|
| 93 |
-
if ( $check_only_version ) {
|
| 94 |
-
self::$should_show = true;
|
| 95 |
-
|
| 96 |
-
return self::$should_show;
|
| 97 |
-
}
|
| 98 |
-
|
| 99 |
-
// If notice is dismissed for good, don't show it
|
| 100 |
-
$option = new BackWPup_Dismissible_Notice_Option( true );
|
| 101 |
-
|
| 102 |
-
self::$should_show = ! $option->is_dismissed( self::NOTICE_ID );
|
| 103 |
-
|
| 104 |
-
return self::$should_show;
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
/**
|
| 108 |
-
* The markup for the admin notice.
|
| 109 |
-
*
|
| 110 |
-
* @return string
|
| 111 |
-
*/
|
| 112 |
-
private function admin_notice_markup() {
|
| 113 |
-
|
| 114 |
-
ob_start();
|
| 115 |
-
$learn_more_url = $this->backwpup_admin_page_url();
|
| 116 |
-
$dismiss_url = BackWPup_Dismissible_Notice_Option::dismiss_action_url(
|
| 117 |
-
self::NOTICE_ID,
|
| 118 |
-
BackWPup_Dismissible_Notice_Option::FOR_GOOD_ACTION
|
| 119 |
-
);
|
| 120 |
-
?>
|
| 121 |
-
<div class="notice notice-warning is-dismissible">
|
| 122 |
-
<p>
|
| 123 |
-
<?php echo esc_html__( 'With the upcoming major release, BackWPup will be requiring PHP version 5.3 or higher.',
|
| 124 |
-
'backwpup' ) ?>
|
| 125 |
-
<?php echo esc_html__( 'Currently, you are running PHP version 5.2.', 'backwpup' ) ?>
|
| 126 |
-
<strong>
|
| 127 |
-
<a href="<?php echo $learn_more_url ?>"><?php echo esc_html__( 'Please urgently read here!', 'backwpup' ) ?></a>
|
| 128 |
-
</strong>
|
| 129 |
-
</p>
|
| 130 |
-
<p>
|
| 131 |
-
<a style="font-size:smaller;" id="backwpup_dismiss_php52_notice" href="<?php echo esc_url( $dismiss_url ) ?>">
|
| 132 |
-
<?php echo esc_html__( 'Don\'t show again.', 'backwpup' ) ?>
|
| 133 |
-
</a>
|
| 134 |
-
</p>
|
| 135 |
-
</div>
|
| 136 |
-
<script>
|
| 137 |
-
(
|
| 138 |
-
function( $ ) {
|
| 139 |
-
$( '#backwpup_dismiss_php52_notice' ).on( 'click', function( e ) {
|
| 140 |
-
e.preventDefault();
|
| 141 |
-
var $link = $( this );
|
| 142 |
-
$.post( $link.attr( 'href' ), { isAjax: 1 } );
|
| 143 |
-
$link.closest( '.notice' ).hide();
|
| 144 |
-
} );
|
| 145 |
-
}
|
| 146 |
-
)( jQuery );
|
| 147 |
-
</script>
|
| 148 |
-
<?php
|
| 149 |
-
|
| 150 |
-
return ob_get_clean();
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
/**
|
| 154 |
-
* The markup for the admin page message.
|
| 155 |
-
*
|
| 156 |
-
* @return string
|
| 157 |
-
*/
|
| 158 |
-
private function admin_page_markup() {
|
| 159 |
-
ob_start();
|
| 160 |
-
?>
|
| 161 |
-
<div class="notice notice-error is-dismissible">
|
| 162 |
-
<h3><?php echo esc_html__( 'Please urgently read here!', 'backwpup' ) ?></h3>
|
| 163 |
-
<p>
|
| 164 |
-
<?php echo esc_html__( 'BackWPup has determined, your installation is still running on the old PHP 5.2 version.', 'backwpup' ) ?>
|
| 165 |
-
</p>
|
| 166 |
-
<p>
|
| 167 |
-
<?php echo esc_html__( 'In order to ensure a fast and secure development for BackWPup, we will most likely not support PHP version 5.2 in our next version.', 'backwpup' ) ?>
|
| 168 |
-
<?php echo esc_html__( 'No need to worry, your host can update your PHP version relatively quickly and without any problems.', 'backwpup' ) ?>
|
| 169 |
-
<?php echo esc_html__( 'Otherwise you can continue to stay on this last version and do not update the plugin in the future!', 'backwpup' ) ?>
|
| 170 |
-
</p>
|
| 171 |
-
<p>
|
| 172 |
-
<strong><?php echo $this->contact_page_link() ?></strong><br>
|
| 173 |
-
<?php echo esc_html__( 'If the response from PHP 5.2 users is surprisingly high, we will eventually keep support for PHP 5.2 for a while.', 'backwpup' ) ?>
|
| 174 |
-
</p>
|
| 175 |
-
<p>
|
| 176 |
-
<?php echo esc_html__( 'Cheers!', 'backwpup' ) ?><br>
|
| 177 |
-
<?php echo esc_html__( 'Your BackWPup Team!', 'backwpup' ) ?>
|
| 178 |
-
</p>
|
| 179 |
-
</div>
|
| 180 |
-
<?php
|
| 181 |
-
|
| 182 |
-
return ob_get_clean();
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
/**
|
| 186 |
-
* Return the URL for the main admin page of BackWPup.
|
| 187 |
-
*
|
| 188 |
-
* @return string
|
| 189 |
-
*/
|
| 190 |
-
private function backwpup_admin_page_url() {
|
| 191 |
-
|
| 192 |
-
return add_query_arg(
|
| 193 |
-
array( 'page' => 'backwpup' ),
|
| 194 |
-
is_multisite() ? network_admin_url( '/admin.php' ) : admin_url( '/admin.php' )
|
| 195 |
-
);
|
| 196 |
-
}
|
| 197 |
-
|
| 198 |
-
/**
|
| 199 |
-
* Return a link to BackWPup contact page.
|
| 200 |
-
*
|
| 201 |
-
* @return string
|
| 202 |
-
*/
|
| 203 |
-
private function contact_page_link() {
|
| 204 |
-
/* Translators: This is the anchor text for an HTML link pointing to BackWPup contact page */
|
| 205 |
-
$contact_us = esc_html__( 'contact us', 'backwpup' );
|
| 206 |
-
/* Translators: %s is replaced by an HTML link with text "contact us" pointing to BackWPup contact page */
|
| 207 |
-
$contact_us_text = esc_html__( 'If you would like to have PHP 5.2 supported, please %s.', 'backwpup' );
|
| 208 |
-
$contact_us_url = esc_html__( 'https://backwpup.com/php52/', 'backwpup' );
|
| 209 |
-
$contact_us_link = sprintf( '<a href="%s" target="_blank">%s</a>', $contact_us_url, $contact_us );
|
| 210 |
-
|
| 211 |
-
return sprintf( $contact_us_text, $contact_us_link );
|
| 212 |
-
}
|
| 213 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
Contributors: inpsyde, cocreation, danielhuesken, Bueltge, nullbyte
|
| 3 |
Tags: Amazon, Amazon S3, back up, backup, chinese, cloud, cloud files, database, db backup, dropbox, dump, file, french, ftp, ftps, german, migrate, multisite, russian, schedule, sftp, storage, S3, time, upload, xml
|
| 4 |
Requires at least: 3.9
|
| 5 |
-
Tested up to: 4.9.
|
| 6 |
Requires PHP: 5.3
|
| 7 |
-
Stable tag: 3.4.
|
| 8 |
License: GPLv3
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -14,6 +14,7 @@ Schedule complete automatic backups of your WordPress installation. Decide which
|
|
| 14 |
|
| 15 |
The **backup plugin** **[BackWPup](https://backwpup.com/)** can be used to save your complete installation including /wp-content/ and push them to an external Backup Service, like **Dropbox**, **S3**, **FTP** and many more, see list below. With a single backup .zip file you are able to easily restore an installation. Please understand: this free version will not be supported as good as the [BackWPup Pro version](https://backwpup.com). With our premium version you get first class support and more features.
|
| 16 |
|
|
|
|
| 17 |
* Database Backup *(needs mysqli)*
|
| 18 |
* WordPress XML Export
|
| 19 |
* Generate a file with installed plugins
|
|
@@ -157,6 +158,11 @@ Yes. You need to have writing access to the wp-config.php file (usually residing
|
|
| 157 |
[You can find a detailed tutorial in the BackWPup documentation.](http://docs.backwpup.com/article/118-install-backwpup)
|
| 158 |
|
| 159 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
= Version 3.4.4 =
|
| 161 |
* Fixed: Security issue that created too many sessions.
|
| 162 |
* Fixed: Correct decryption of passwords when escaped.
|
| 2 |
Contributors: inpsyde, cocreation, danielhuesken, Bueltge, nullbyte
|
| 3 |
Tags: Amazon, Amazon S3, back up, backup, chinese, cloud, cloud files, database, db backup, dropbox, dump, file, french, ftp, ftps, german, migrate, multisite, russian, schedule, sftp, storage, S3, time, upload, xml
|
| 4 |
Requires at least: 3.9
|
| 5 |
+
Tested up to: 4.9.5
|
| 6 |
Requires PHP: 5.3
|
| 7 |
+
Stable tag: 3.4.5
|
| 8 |
License: GPLv3
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 14 |
|
| 15 |
The **backup plugin** **[BackWPup](https://backwpup.com/)** can be used to save your complete installation including /wp-content/ and push them to an external Backup Service, like **Dropbox**, **S3**, **FTP** and many more, see list below. With a single backup .zip file you are able to easily restore an installation. Please understand: this free version will not be supported as good as the [BackWPup Pro version](https://backwpup.com). With our premium version you get first class support and more features.
|
| 16 |
|
| 17 |
+
|
| 18 |
* Database Backup *(needs mysqli)*
|
| 19 |
* WordPress XML Export
|
| 20 |
* Generate a file with installed plugins
|
| 158 |
[You can find a detailed tutorial in the BackWPup documentation.](http://docs.backwpup.com/article/118-install-backwpup)
|
| 159 |
|
| 160 |
== Changelog ==
|
| 161 |
+
= Version 3.4.5 =
|
| 162 |
+
* Added: Support for PclZip.
|
| 163 |
+
* Fixed: Disable use of mysqldump if it is not available.
|
| 164 |
+
* Fixed: Invalid argument supplied for foreach() error.
|
| 165 |
+
|
| 166 |
= Version 3.4.4 =
|
| 167 |
* Fixed: Security issue that created too many sessions.
|
| 168 |
* Fixed: Correct decryption of passwords when escaped.
|
ruleset.xml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<ruleset name="Inpsyde">
|
| 3 |
+
|
| 4 |
+
<description>A custom set of code standard rules to check for Inpsyde Codex.</description>
|
| 5 |
+
|
| 6 |
+
<!-- Include the WordPress ruleset, with exclusions. -->
|
| 7 |
+
<rule ref="WordPress">
|
| 8 |
+
|
| 9 |
+
<exclude name="WordPress.PHP.YodaConditions"/>
|
| 10 |
+
|
| 11 |
+
<!-- Exclude to be able to adhere to PSR-4. -->
|
| 12 |
+
<exclude name="WordPress.Files.FileName"/>
|
| 13 |
+
|
| 14 |
+
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
|
| 15 |
+
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
|
| 16 |
+
<exclude name="Generic.PHP.DisallowShortOpenTag"/>
|
| 17 |
+
|
| 18 |
+
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
|
| 19 |
+
<exclude name="Squiz.Commenting.FileComment.Missing"/>
|
| 20 |
+
|
| 21 |
+
<exclude name="PEAR.Functions.FunctionCallSignature"/>
|
| 22 |
+
|
| 23 |
+
<!-- Remove spaces before types check. -->
|
| 24 |
+
<exclude name="Squiz.Commenting.VariableComment.VarIndent"/>
|
| 25 |
+
<exclude name="Squiz.Commenting.FunctionComment.SpacingBeforeParamType"/>
|
| 26 |
+
<exclude name="Squiz.Commenting.FunctionComment.SpacingBeforeParams"/>
|
| 27 |
+
|
| 28 |
+
<!-- Exclude Full Stops on inline comment. -->
|
| 29 |
+
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
|
| 30 |
+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
|
| 31 |
+
|
| 32 |
+
<!-- Remove empty line not required before block comment -->
|
| 33 |
+
<exclude name="Squiz.Commenting.BlockComment.HasEmptyLineBefore"/>
|
| 34 |
+
<!-- Remove rule for /** style for each var -->
|
| 35 |
+
<exclude name="Squiz.Commenting.VariableComment.WrongStyle"/>
|
| 36 |
+
<!-- Exclude to be able to include an encoding cookie. -->
|
| 37 |
+
<exclude name="Squiz.Commenting.FileComment.WrongStyle"/>
|
| 38 |
+
<exclude name="Squiz.Commenting.InlineComment.WrongStyle"/>
|
| 39 |
+
|
| 40 |
+
<!-- Exclude to be able to use variadic arguments. https://github.com/squizlabs/PHP_CodeSniffer/issues/1652 -->
|
| 41 |
+
<exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint"/>
|
| 42 |
+
|
| 43 |
+
<!-- Exclude to be able to use "@noinspection PhpUnusedParameterInspection" annotations. -->
|
| 44 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"/>
|
| 45 |
+
|
| 46 |
+
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect"/>
|
| 47 |
+
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions"/>
|
| 48 |
+
<exclude name="WordPress.Arrays.ArrayDeclaration.KeyNotAligned"/>
|
| 49 |
+
<!-- Remove spaces instead of tabs check -->
|
| 50 |
+
<exclude name="WordPress.Arrays.ArrayDeclaration.ValueNotAligned"/>
|
| 51 |
+
<exclude name="WordPress.Arrays.ArrayDeclaration.CloseBraceNotAligned"/>
|
| 52 |
+
|
| 53 |
+
<!-- Exclude to not be forced to use a space before return type colons. https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/547. -->
|
| 54 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis"/>
|
| 55 |
+
|
| 56 |
+
</rule>
|
| 57 |
+
|
| 58 |
+
<!-- Adapt to be able to use namespaced hooks in dot notation. -->
|
| 59 |
+
<rule ref="WordPress.NamingConventions.ValidHookName">
|
| 60 |
+
<properties>
|
| 61 |
+
<property name="additionalWordDelimiters" value="."/>
|
| 62 |
+
</properties>
|
| 63 |
+
</rule>
|
| 64 |
+
|
| 65 |
+
<exclude-pattern>/tests/php/*</exclude-pattern>
|
| 66 |
+
|
| 67 |
+
<!-- Check for cross-version support for PHP 5.3 and higher. -->
|
| 68 |
+
<config name="testVersion" value="5.3"/>
|
| 69 |
+
|
| 70 |
+
</ruleset>
|
vendor/inpsyde/phone-home-client/.gitignore
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
composer.phar
|
| 2 |
-
vendor/
|
|
|
|
|
|
