label = $label; $this->url = $url; $this->files = $files; } /** * View. * * @since 3.5.0 * * Print the anchor link. */ public function view(): void { if (!current_user_can(self::$capability)) { return; } backwpup_template( (object) [ 'link' => $this->link(), 'label' => $this->label, ], '/restore/download-log.php' ); } /** * Build the link. * * @since 3.5.0 * * @return string The link url */ private function link() { return add_query_arg( [ self::NONCE_NAME => wp_create_nonce(self::NONCE_NAME), 'action' => self::NONCE_ACTION, ], $this->url ); } }