$docs, 'support' => $org, 'review' => 'https://wordpress.org/support/plugin/admin-powerups-for-woocommerce/reviews/#new-post', 'bug' => $org, 'author' => 'https://smartwpplugins.com/', ) ); } /** * Site-wide system facts shown in the sidebar and copied for support (cached for everyone by * SystemStatus, so nothing here depends on the user; see power_ups_on() for the per-user line). * * @since 1.0.0 * @param Registry $registry Module registry. * @return array Label => value. */ public static function system_info( Registry $registry ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found -- public signature kept for callers. $hpos = class_exists( OrderUtil::class ) && OrderUtil::custom_orders_table_usage_is_enabled(); return array( __( 'Plugin', 'admin-powerups-for-woocommerce' ) => APWC_VERSION, __( 'WordPress', 'admin-powerups-for-woocommerce' ) => get_bloginfo( 'version' ) . ( is_multisite() ? ' ' . __( '(multisite)', 'admin-powerups-for-woocommerce' ) : '' ), __( 'WooCommerce', 'admin-powerups-for-woocommerce' ) => defined( 'WC_VERSION' ) ? WC_VERSION : '—', __( 'PHP', 'admin-powerups-for-woocommerce' ) => PHP_VERSION, __( 'Order storage', 'admin-powerups-for-woocommerce' ) => $hpos ? __( 'High-performance', 'admin-powerups-for-woocommerce' ) : __( 'Legacy (posts)', 'admin-powerups-for-woocommerce' ), ); } /** * "Power-ups on: X of Y" over the power-ups the current user may see, worked out when the card * is drawn (no query: switch states are already loaded). Kept out of the site-wide cache so a * store manager's card never counts admin-only power-ups. * * @since 1.0.0 * @param Registry $registry Module registry. * @return array Label => value. */ public static function power_ups_on( Registry $registry ) { $modules = $registry->visible(); $on = array_filter( $modules, static fn( $m ) => $m->is_enabled() ); return array( /* translators: 1: number on, 2: total number. */ __( 'Power-ups on', 'admin-powerups-for-woocommerce' ) => sprintf( __( '%1$d of %2$d', 'admin-powerups-for-woocommerce' ), count( $on ), count( $modules ) ), ); } /** * Screen-reader note for links that open in a new tab. * * @since 1.0.0 * @return void */ private static function new_tab() { echo '' . esc_html__( '(opens in a new tab)', 'admin-powerups-for-woocommerce' ) . ''; } /** * Render the sidebar. * * @since 1.0.0 * @param Registry $registry Module registry. * @return void */ public static function render( Registry $registry ) { $links = self::links(); ?> $value ) { $copy .= $label . ': ' . $value . "\n"; } $copy .= sprintf( "Background jobs: %s (overdue %d, pending %d, failed 7d %d, WP-Cron %s)\n", $jobs['label'], $jobs['overdue'], $jobs['pending'], $jobs['failed'], $jobs['cron_disabled'] ? 'off' : 'on' ); $copy .= __( 'Power-ups', 'admin-powerups-for-woocommerce' ) . ': ' . implode( ', ', array_map( static fn( $m ) => $m->id(), array_filter( $registry->visible(), static fn( $m ) => $m->is_enabled() ) ) ) . "\n"; /* translators: %s: e.g. "Checked 5 minutes ago". */ $copy .= sprintf( '(%s)', $checked ); ?>

$value ) : ?>

store()->keep_data() ); ?> />