|
@@ 38-52 (lines=15) @@
|
| 35 |
|
|
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public function submit_auto_selected_posts() { |
| 39 |
|
|
| 40 |
|
if ( ! isset( $_REQUEST['link'] ) ) { |
| 41 |
|
wp_die( 'The `link` parameter is required.' ); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
$count = $this->batch_analysis_service->submit_auto_selected_posts( $_REQUEST['link'] ); |
| 45 |
|
|
| 46 |
|
// Clear any buffer. |
| 47 |
|
ob_clean(); |
| 48 |
|
|
| 49 |
|
// Send the response. |
| 50 |
|
wp_send_json_success( array( 'count' => $count ) ); |
| 51 |
|
|
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
public function submit() { |
| 55 |
|
|
|
@@ 70-84 (lines=15) @@
|
| 67 |
|
|
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
public function cancel() { |
| 71 |
|
|
| 72 |
|
if ( ! isset( $_REQUEST['post'] ) ) { |
| 73 |
|
wp_die( 'The `post` parameter is required.' ); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
$count = $this->batch_analysis_service->cancel( (array) $_REQUEST['post'] ); |
| 77 |
|
|
| 78 |
|
// Clear any buffer. |
| 79 |
|
ob_clean(); |
| 80 |
|
|
| 81 |
|
// Send the response. |
| 82 |
|
wp_send_json_success( array( 'count' => $count ) ); |
| 83 |
|
|
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public function clear_warning() { |
| 87 |
|
|
|
@@ 86-100 (lines=15) @@
|
| 83 |
|
|
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public function clear_warning() { |
| 87 |
|
|
| 88 |
|
if ( ! isset( $_REQUEST['post'] ) ) { |
| 89 |
|
wp_die( 'The `post` parameter is required.' ); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
$this->batch_analysis_service->clear_warning( (array) $_REQUEST['post'] ); |
| 93 |
|
|
| 94 |
|
// Clear any buffer. |
| 95 |
|
ob_clean(); |
| 96 |
|
|
| 97 |
|
// Send the response. |
| 98 |
|
wp_send_json_success(); |
| 99 |
|
|
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
} |
| 103 |
|
|