芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/src/conditionals/robots-txt-conditional.php
front_end_conditional = $front_end_conditional; } /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return $this->front_end_conditional->is_met() || $this->is_file_editor_page(); } /** * Returns whether the current page is the file editor page. * * This checks for two locations: * - Multisite network admin file editor page * - Single site file editor page (under tools) * * @return bool */ protected function is_file_editor_page() { global $pagenow; if ( $pagenow !== 'admin.php' ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_files' && \is_multisite() && \is_network_admin() ) { return true; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( ! ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_tools' ) ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( isset( $_GET['tool'] ) && $_GET['tool'] === 'file-editor' ) { return true; } return false; } }