| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 4 |
namespace Yoast\WP\SEO\Bulk_Editor\User_Interface; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\Bulk_Editor\Domain\Updates\Update_Type; |
| 7 |
|
| 8 |
/** |
| 9 |
* Registers the route that applies social appearance (Open Graph title and description) updates. |
| 10 |
*/ |
| 11 |
class Social_Bulk_Update_Route extends Abstract_Bulk_Update_Route { |
| 12 |
|
| 13 |
/** |
| 14 |
* The prefix for this route. |
| 15 |
* |
| 16 |
* @var string |
| 17 |
*/ |
| 18 |
public const ROUTE_PREFIX = '/bulk_editor/update_social'; |
| 19 |
|
| 20 |
/** |
| 21 |
* Gets the appearance this route updates. |
| 22 |
* |
| 23 |
* @return Update_Type The social appearance. |
| 24 |
*/ |
| 25 |
protected function get_update_type(): Update_Type { |
| 26 |
return Update_Type::social(); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Gets the prefix for this route. |
| 31 |
* |
| 32 |
* @return string The prefix for this route. |
| 33 |
*/ |
| 34 |
protected function get_route_prefix(): string { |
| 35 |
return self::ROUTE_PREFIX; |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Gets the name of the title argument in the request. |
| 40 |
* |
| 41 |
* @return string The name of the title argument. |
| 42 |
*/ |
| 43 |
protected function get_title_arg_name(): string { |
| 44 |
return 'social_title'; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Gets the name of the description argument in the request. |
| 49 |
* |
| 50 |
* @return string The name of the description argument. |
| 51 |
*/ |
| 52 |
protected function get_description_arg_name(): string { |
| 53 |
return 'social_description'; |
| 54 |
} |
| 55 |
} |
| 56 |
|