| @@ -106,9 +106,9 @@ | ||
| 106 | 106 | $success_ids = []; |
| 107 | 107 | |
| 108 | 108 | foreach ( $ids as $id ) { |
| 109 | 109 | try { |
| 110 | - $component = $this->get_component_for_edit( $id, $status ); | |
| 110 | + $component = $this->get_for_edit( $id, $status ); | |
| 111 | 111 | |
| 112 | 112 | if ( ! $component ) { |
| 113 | 113 | $failed_ids[] = $id; |
| 114 | 114 | continue; |
| @@ -127,9 +127,9 @@ | ||
| 127 | 127 | ]; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | public function update_title( int $component_id, string $title, string $status ): bool { |
| 131 | - $component = $this->get_component_for_edit( $component_id, $status ); | |
| 131 | + $component = $this->get_for_edit( $component_id, $status ); | |
| 132 | 132 | |
| 133 | 133 | if ( ! $component ) { |
| 134 | 134 | return false; |
| 135 | 135 | } |
| @@ -150,9 +150,9 @@ | ||
| 150 | 150 | |
| 151 | 151 | * If target status is publish: |
| 152 | 152 | * - Will return the main document. If it's an autosave, it will be published later by the publish_component method. |
| 153 | 153 | */ |
| 154 | - private function get_component_for_edit( int $component_id, string $target_status ): ?Component_Document { | |
| 154 | + public function get_for_edit( int $component_id, string $target_status ): ?Component_Document { | |
| 155 | 155 | $component = $this->get( $component_id ); |
| 156 | 156 | |
| 157 | 157 | if ( ! $component ) { |
| 158 | 158 | return null; |