mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 18:43:43 +03:00
Apply coding standards
This commit is contained in:
parent
82c8c9aec6
commit
53ae291a53
|
@ -182,7 +182,7 @@ function add_row_action( $actions, $post ) {
|
||||||
*/
|
*/
|
||||||
function handle_activation_action( $post_id ) {
|
function handle_activation_action( $post_id ) {
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
if ( ! in_array( $action, array( 'deactivate', 'reactivate' ) ) ) {
|
if ( ! in_array( $action, array( 'deactivate', 'reactivate' ), true ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,14 +206,14 @@ function handle_activation_action( $post_id ) {
|
||||||
|
|
||||||
if ( 'deactivate' === $action ) {
|
if ( 'deactivate' === $action ) {
|
||||||
deactivate( $post_id, false, 'Site admin deactivated via wp-admin list table.' );
|
deactivate( $post_id, false, 'Site admin deactivated via wp-admin list table.' );
|
||||||
wp_redirect( add_query_arg( 'deactivated', 1, $sendback ) );
|
wp_safe_redirect( add_query_arg( 'deactivated', 1, $sendback ) );
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
wp_update_post( array(
|
wp_update_post( array(
|
||||||
'ID' => $post_id,
|
'ID' => $post_id,
|
||||||
'post_status' => 'publish',
|
'post_status' => 'publish',
|
||||||
) );
|
) );
|
||||||
wp_redirect( add_query_arg( 'reactivated', 1, $sendback ) );
|
wp_safe_redirect( add_query_arg( 'reactivated', 1, $sendback ) );
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! $readonly ) :
|
if ( ! $readonly ) :
|
||||||
$data = [ 'pledge-contributors' => '' ];
|
$data = array( 'pledge-contributors' => '' );
|
||||||
require get_views_path() . 'inputs-pledge-contributors.php';
|
require get_views_path() . 'inputs-pledge-contributors.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue