Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevalk committed Feb 22, 2017
2 parents 3b4488b + fb0ce5c commit 0d904a3
Show file tree
Hide file tree
Showing 27 changed files with 3,617 additions and 430 deletions.
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Standards for multi-platform colaboration

# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

composer.json export-ignore
composer.lock export-ignore
yarn.lock export-ignore
grunt export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.jscsrc export-ignore
.jshintrc export-ignore
Gruntfile.js export-ignore
package.json export-ignore
phpcs.xml export-ignore
CONTRIBUTING.md export-ignore
readme.md export-ignore
ISSUE_TEMPLATE.md export-ignore
2 changes: 2 additions & 0 deletions .removeable-files
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
phpcs.xml

30 changes: 18 additions & 12 deletions admin/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,11 @@ public function enqueue() {
* @link https://github.com/Yoast/i18n-module
*/
public function register_i18n_promo_class() {
new yoast_i18n(
new Yoast_I18n_WordPressOrg_v2(
array(
'textdomain' => 'yoast-comment-hacks',
'project_slug' => 'comment-hacks',
'plugin_name' => 'Yoast Comment Hacks',
'hook' => 'yoast_ch_admin_footer',
'glotpress_url' => 'http://translate.yoast.com/',
'glotpress_name' => 'Yoast Translate',
'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
'register_url' => 'http://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=wpseo-i18n-promo',
'textdomain' => 'yoast-comment-hacks',
'plugin_name' => 'Yoast Comment Hacks',
'hook' => 'yoast_ch_admin_footer',
)
);
}
Expand Down Expand Up @@ -163,9 +158,18 @@ public function update_comment_parent() {
$comment_parent = filter_input( INPUT_POST, 'yst_comment_parent', FILTER_VALIDATE_INT );
$comment_id = filter_input( INPUT_POST, 'comment_ID', FILTER_VALIDATE_INT );

check_admin_referer( 'update-comment_' . $comment_id );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX === true ) {
check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' );
}
else {
check_admin_referer( 'update-comment_' . $comment_id );
}

if ( ! isset( $comment_parent ) ) {
$comment_parent = 0;
}

if ( $comment_parent ) {
if ( $comment_id ) {
global $wpdb;
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_parent = %d WHERE comment_ID = %d", $comment_parent, $comment_id ) );
}
Expand All @@ -185,7 +189,8 @@ public function options_validate( $input ) {

$input['mincomlength'] = (int) $input['mincomlength'];
$input['redirect_page'] = (int) $input['redirect_page'];
$input['clean_emails'] = isset( $input['clean_emails'] );
$input['clean_emails'] = isset( $input['clean_emails'] ) ? 1 : 0;
$input['version'] = YOAST_COMMENT_HACKS_VERSION;

foreach ( array( 'email_subject', 'email_body', 'mass_email_body' ) as $key ) {
if ( '' === $input[ $key ] ) {
Expand All @@ -194,6 +199,7 @@ public function options_validate( $input ) {
}

if ( ( $this->absolute_min + 1 ) > $input['mincomlength'] || empty( $input['mincomlength'] ) ) {
/* translators: %d is replaced with the minimum number of characters */
add_settings_error( $this->option_name, 'min_length_invalid', sprintf( __( 'The minimum length you entered is invalid, please enter a minimum length above %d.', 'yoast-comment-hacks' ), $this->absolute_min ) );
$input['mincomlength'] = 15;
}
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
},
"require": {
"composer/installers": "~1.0",
"yoast/i18n-module": "dev-master",
"xrstf/composer-php52": "^1.0.17"
"yoast/i18n-module": "^2.0.1",
"xrstf/composer-php52": "^1.0.20"
},
"require-dev": {
"yoast/yoastcs": "dev-master"
"yoast/yoastcs": "0.3"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"classmap": [
"admin/",
Expand Down
Loading

0 comments on commit 0d904a3

Please sign in to comment.