* 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 */ $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; ?>

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 ) ) ) ); ?>

=' ); $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.0 || 'premium' === $kind ) { echo esc_html( sprintf( /* translators: %s: formatted price number. */ __( '€%s / year', 'robotstxt-manager' ), number_format_i18n( $cost, 0 ) ) ); // Subscription pill for premium plugins. $sub_row = $manager_subscriptions[ $slug ] ?? null; $sub_text = ''; if ( is_array( $sub_row ) ) { $raw_sub_status = $sub_row['status'] ?? ''; $raw_sub_expiry = $sub_row['expires_at'] ?? ''; $sub_status = is_string( $raw_sub_status ) ? $raw_sub_status : ''; $sub_expiry = is_string( $raw_sub_expiry ) ? $raw_sub_expiry : ''; if ( 'active' === $sub_status && '' !== $sub_expiry ) { $days_left = (int) floor( ( (int) strtotime( $sub_expiry ) - time() ) / DAY_IN_SECONDS ); if ( $days_left >= 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 ) { $raw_pill_status = is_array( $sub_row ) ? ( $sub_row['status'] ?? '' ) : ''; $pill_status = is_string( $raw_pill_status ) ? $raw_pill_status : ''; echo '
' . esc_html( $sub_text ) . ''; } } else { echo esc_html__( 'Free', 'robotstxt-manager' ); } ?>
0.0 && '' !== $page_url ) : ?> 0.0 && '' !== $page_url ) ? 'button-secondary' : 'button-primary'; ?> ' . 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 ) : ?>