'funnelfork', 'utm_medium' => 'plugin', 'utm_campaign' => $campaign, ), $url ); } /** * URL of the page in the admin. */ public static function page_url(): string { return admin_url( 'edit.php?post_type=' . Post_Type::POST_TYPE . '&page=' . self::PAGE ); } /** * Adds the page to the FunnelFork menu (not when Pro is active). */ public static function register_page(): void { if ( funnelfork_is_premium() ) { return; } $hook = add_submenu_page( 'edit.php?post_type=' . Post_Type::POST_TYPE, __( 'FunnelFork Pro', 'funnelfork' ), __( 'FunnelFork Pro', 'funnelfork' ), 'edit_posts', self::PAGE, array( __CLASS__, 'render_page' ) ); if ( $hook ) { add_action( 'admin_print_styles-' . $hook, static function () { wp_enqueue_style( 'funnelfork-fonts', FUNNELFORK_URL . 'assets/fonts/fonts.css', array(), FUNNELFORK_VERSION ); wp_enqueue_style( 'funnelfork-upgrade', FUNNELFORK_URL . 'assets/upgrade.css', array( 'funnelfork-fonts' ), FUNNELFORK_VERSION ); } ); } } /** * "Upgrade to Pro" on the Plugins screen (not when Pro is active). * * @param array $links Action links. */ public static function plugin_link( $links ): array { $links = (array) $links; if ( ! funnelfork_is_premium() ) { $links[] = sprintf( '%s', esc_url( self::page_url() ), esc_html__( 'Upgrade to Pro', 'funnelfork' ) ); } return $links; } /** * Rows of the comparison: [ label, in Free, in Pro ]. */ public static function features(): array { return array( array( __( 'Visual editor: draw the answer logic with lines', 'funnelfork' ), true, true ), array( __( 'Unlimited quickscans, questions and results', 'funnelfork' ), true, true ), array( __( 'Yes/no and multiple choice questions', 'funnelfork' ), true, true ), array( __( 'Flow mode and score mode', 'funnelfork' ), true, true ), array( __( 'Labels for personal advice on the result', 'funnelfork' ), true, true ), array( __( 'Block and shortcode', 'funnelfork' ), true, true ), array( __( 'Follows the colours and fonts of your theme', 'funnelfork' ), true, true ), array( __( 'Slide transition between questions', 'funnelfork' ), true, true ), array( __( 'Lead form before the scan (name, email, phone)', 'funnelfork' ), false, true ), array( __( 'Save responses, with a list and CSV export', 'funnelfork' ), false, true ), array( __( 'Email and webhook (Zapier, Make, n8n) for every lead and result', 'funnelfork' ), false, true ), array( __( 'Gravity Forms form on a result, filled with the answers', 'funnelfork' ), false, true ), array( __( 'Any shortcode on a result', 'funnelfork' ), false, true ), array( __( 'Images and icons for answers', 'funnelfork' ), false, true ), array( __( 'Your own styling: colours, buttons, corners and width', 'funnelfork' ), false, true ), array( __( 'Fade and flip transitions', 'funnelfork' ), false, true ), ); } /** * A ✓ or ✗ with text for screen readers. * * @param bool $included Whether the feature is included. */ private static function mark( bool $included ): string { return $included ? '' . esc_html__( 'Included', 'funnelfork' ) . '' : '' . esc_html__( 'Not included', 'funnelfork' ) . ''; } /** * Renders the page. */ public static function render_page(): void { $cta = self::pro_url( 'upgrade-page' ); $benefits = array( array( __( 'Turn visitors into leads', 'funnelfork' ), __( 'Ask for contact details before the first question, or show a Gravity Forms form on the result that is filled in with the answers.', 'funnelfork' ), ), array( __( 'Know what your visitors answer', 'funnelfork' ), __( 'Save every response with the result and score, view them per quickscan and export them to a spreadsheet.', 'funnelfork' ), ), array( __( 'Make it look like your brand', 'funnelfork' ), __( 'Your own colours and buttons, images or icons on the answers, and more transitions between the questions.', 'funnelfork' ), ), ); ?>