v0.3.1
This commit is contained in:
parent
65a00cf6ab
commit
681147e8e3
11 changed files with 567 additions and 25 deletions
|
|
@ -68,7 +68,7 @@ class Robotstxt_Manager_Admin {
|
|||
$catalog = $client->get_catalog();
|
||||
$local = $this->resolve_local_state( $catalog );
|
||||
|
||||
require_once ROBOTSTXT_MANAGER_DIR . 'admin/views/page-catalog.php';
|
||||
require ROBOTSTXT_MANAGER_DIR . 'admin/views/page-catalog.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,6 +100,27 @@ class Robotstxt_Manager_Admin {
|
|||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a nonce-protected admin-post action URL for a plugin row.
|
||||
*
|
||||
* @param string $action One of 'install', 'activate', 'update'.
|
||||
* @param string $slug Plugin slug.
|
||||
*
|
||||
* @return string The action URL.
|
||||
*/
|
||||
public static function action_url( string $action, string $slug ): string {
|
||||
return wp_nonce_url(
|
||||
add_query_arg(
|
||||
array(
|
||||
'action' => 'robotstxt_manager_' . $action,
|
||||
'slug' => $slug,
|
||||
),
|
||||
admin_url( 'admin-post.php' )
|
||||
),
|
||||
'robotstxt_manager_' . $action . '_' . $slug
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves local install state for every catalog entry.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue