%s', esc_html__( 'Save changes', 'reactwoo-atomic' ) ); Shell::render( 'reactwoo-atomic-elements', __( 'Elements', 'reactwoo-atomic' ), __( 'Enable only what this site needs. Disabled elements register no frontend assets.', 'reactwoo-atomic' ), static function () use ( $notice ) { self::body( $notice ); }, $action ); } /** * @param string $notice Notice text. * @return void */ private static function body( $notice ) { $items = Catalog::all(); // WordPress.org: do not render Pro rows as locked or greyed-out controls. $wporg = Distribution::is_wporg() && ! Edition::is_pro(); if ( $wporg ) { $items = array_values( array_filter( $items, static function ( $item ) { return ! isset( $item['edition'] ) || 'pro' !== $item['edition']; } ) ); } $enabled = array_fill_keys( Enabled_Store::get_enabled_ids(), true ); $counts = array( 'all' => 0, 'activatable' => 0, 'enabled' => 0, 'free' => 0, 'pro' => 0, ); foreach ( $items as $item ) { ++$counts['all']; if ( 'pro' === $item['edition'] ) { ++$counts['pro']; } else { ++$counts['free']; } if ( Enabled_Store::is_activatable( $item['id'] ) ) { ++$counts['activatable']; if ( ! empty( $enabled[ $item['id'] ] ) ) { ++$counts['enabled']; } } } $payload = Enabled_Store::estimated_payload_kb(); $cats = Catalog::categories(); ?>

'reactwoo-atomic-elements', ), admin_url( 'admin.php' ) ), 'reactwoo_atomic_elements', 'saved' ); } }