* Account subscriptions keyed by slug (may be empty). * * @package Robotstxt_Manager */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Variables provided by Robotstxt_Manager_Admin::render_page(). * * @var list> $catalog * @var array $local * @var array> $manager_subscriptions * @var list $manager_notices * @var bool $manager_has_api_key * @var string $manager_store_url */ $client_configured = Robotstxt_Manager_Core_Client::from_options()->is_configured(); $refresh_url = add_query_arg( array( 'action' => 'robotstxt_manager_refresh_catalog', ), admin_url( 'admin-post.php' ) ); $refresh_url = wp_nonce_url( $refresh_url, 'robotstxt_manager_refresh_catalog' ); $refreshed = isset( $_GET['refreshed'] ) && '1' === $_GET['refreshed']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended // Action notice from an install/activate/update redirect. $notice_result = ''; $notice_message = ''; if ( isset( $_GET['robotstxt_manager_result'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- display-only, set by this plugin's own redirects. $raw_result = wp_unslash( $_GET['robotstxt_manager_result'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- sanitized on the next line. if ( is_string( $raw_result ) ) { $notice_result = sanitize_key( $raw_result ); } } if ( isset( $_GET['robotstxt_manager_message'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- display-only, set by this plugin's own redirects. $raw_message = wp_unslash( $_GET['robotstxt_manager_message'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- sanitized on the next line after decoding. if ( is_string( $raw_message ) ) { $notice_message = sanitize_text_field( rawurldecode( $raw_message ) ); } } $local_wp_version = (string) get_bloginfo( 'version' ); $local_php_version = (string) PHP_VERSION; $compat_warnings = 0; ?>

ROBOTSTXT store to get your personal API key. The key links your subscriptions to this site and unlocks premium plugins and updates.', 'robotstxt-manager' ), esc_url( $manager_store_url . '/wp-login.php?action=register' ) ) ); ?>

Set the Store URL and API key to see your plugin catalog.', 'robotstxt-manager' ), esc_url( admin_url( 'admin.php?page=' . Robotstxt_Manager_Settings::PAGE_SLUG ) ) ) ); ?>

0.0 || 'premium' === $kind ); $sub_row = $manager_subscriptions[ $slug ] ?? null; $raw_status = is_array( $sub_row ) ? ( $sub_row['status'] ?? '' ) : ''; $sub_status = is_string( $raw_status ) ? $raw_status : ''; $subscribed = in_array( $sub_status, array( 'active', 'payment_failed' ), true ); $raw_reqs = $entry['requires_plugins'] ?? ''; $req_slugs = array(); if ( is_string( $raw_reqs ) && '' !== trim( $raw_reqs ) ) { foreach ( explode( ',', $raw_reqs ) as $part ) { $dep = sanitize_key( trim( $part ) ); if ( '' !== $dep ) { $req_slugs[] = $dep; } } } $has_detail = $has_detail || array() !== $req_slugs; // Compatibility checks. $wp_ok = '' === $req_wp || version_compare( $local_wp_version, $req_wp, '>=' ); $php_ok = '' === $req_php || version_compare( $local_php_version, $req_php, '>=' ); if ( ! $wp_ok || ! $php_ok ) { ++$compat_warnings; } $raw_state = $local[ $slug ] ?? array( 'installed' => false, 'active' => false, 'version' => '', ); $l_installed = (bool) ( $raw_state['installed'] ?? false ); $l_active = (bool) ( $raw_state['active'] ?? false ); $raw_lv = $raw_state['version'] ?? ''; $l_version = is_string( $raw_lv ) ? $raw_lv : ''; $update_available = $l_installed && '' !== $remote_v && '' !== $l_version && version_compare( $l_version, $remote_v, '<' ); $row_class = ( ! $wp_ok || ! $php_ok ) ? ' robotstxt-manager-row--incompatible' : ''; ?>
= 0 && $days_left <= 14 ) { $sub_text = sprintf( /* translators: %d: days remaining. */ __( 'Subscribed — %d days left', 'robotstxt-manager' ), $days_left ); } else { $sub_text = __( 'Subscribed', 'robotstxt-manager' ); } } elseif ( 'payment_failed' === $sub_status ) { $sub_text = __( 'Payment failed', 'robotstxt-manager' ); } elseif ( 'cancelled' === $sub_status ) { $sub_text = __( 'Cancelled', 'robotstxt-manager' ); } elseif ( 'expired' === $sub_status ) { $sub_text = __( 'Expired', 'robotstxt-manager' ); } } if ( '' !== $sub_text ) { echo '
' . esc_html( $sub_text ) . ''; } } else { echo esc_html__( 'Free', 'robotstxt-manager' ); } ?>
' . esc_html__( 'Not installed', 'robotstxt-manager' ) . ''; } elseif ( ! $l_active ) { echo '' . esc_html__( 'Installed (inactive)', 'robotstxt-manager' ) . ''; } elseif ( $update_available ) { echo '' . esc_html( sprintf( /* translators: 1: installed version, 2: available version. */ __( 'Update available (v%1$s → v%2$s)', 'robotstxt-manager' ), $l_version, $remote_v ) ) . ''; } else { echo '' . esc_html__( 'Up to date', 'robotstxt-manager' ) . ''; } ?>

0 ) : ?>