public function do_render()
 {
     $url = admin_url('admin.php?page=nelioab-add-experiment&experiment-type=');
     // LANDING PAGE
     $page_on_front = get_option('page_on_front');
     if ($page_on_front != 0) {
         $this->print_beautiful_box('landing-page', __('A/B Test Your Landing Page', 'nelioab'), array(&$this, 'print_new_exp_box', array('landing-page', $url . NelioABExperiment::PAGE_ALT_EXP . '&lp', __('<strong>Pure A/B Testing from the very beginning!</strong> Create one or more alternatives of your landing page and see which one converts better! If your website starts at your Landing Page, why shouldn\'t you start it first?', 'nelioab'))));
     }
     // PAGE
     $this->print_beautiful_box('page', __('New A/B Test for Pages', 'nelioab'), array(&$this, 'print_new_exp_box', array('page', $url . NelioABExperiment::PAGE_ALT_EXP, __('<strong>Pure A/B Testing!</strong> Create one or more alternatives of a page and <strong>change whatever you want</strong>: the colors, the text, the layout... and do it using your default WordPress editor! Then define the goals and you\'re ready!', 'nelioab'))));
     // POST
     $this->print_beautiful_box('post', __('New A/B Test for Posts', 'nelioab'), array(&$this, 'print_new_exp_box', array('post', $url . NelioABExperiment::POST_ALT_EXP, __('<strong>Pure A/B Testing!</strong> Create one or more alternatives of a post and <strong>change whatever you want</strong>: the colors, the text, the layout... and do it using your default WordPress editor! Then define the goals and you\'re ready!', 'nelioab'))));
     // WOOCOMMERCE PRODUCT SUMMARY
     if (NelioABWooCommerceSupport::is_plugin_active()) {
         $this->print_beautiful_box('wc-product-summary', __('WooCommerce Product Summary', 'nelioab'), array(&$this, 'print_new_exp_box', array('wc-product-summary', $url . NelioABExperiment::WC_PRODUCT_SUMMARY_ALT_EXP, __('<strong>Change the name, short description, and featured image of your product, and discover which combination leads to more sales</strong>. Every time the product appears in your website, it is counted as a visit. Once a purchase containing that product is completed, you have a new conversion. Easy, right?', 'nelioab'))));
     }
     // HEADLINE ONLY
     $this->print_beautiful_box('title', __('New A/B Test for Headlines', 'nelioab'), array(&$this, 'print_new_exp_box', array('title', $url . NelioABExperiment::HEADLINE_ALT_EXP, __('Headline Testing is perfect for Publishers. <strong>Try with different Titles, Featured Images, and Excerpts, and check which combination is more appealing</strong>. Every time the Headline is printed somewhere in your site, it is counted as a visit. If a visitor accesses the post, you have a conversion!', 'nelioab'))));
     // THEMES (enabled starting at version 3.4)
     if (NelioABWpHelper::is_at_least_version(3.4)) {
         $this->print_beautiful_box('theme', __('New A/B Theme Test ', 'nelioab'), array(&$this, 'print_new_exp_box', array('theme', $url . NelioABExperiment::THEME_ALT_EXP, __('Would you like to <strong>change your WordPress completely</strong>? Do you want to <strong>test small variations of two child themes</strong>? Then this gives you what you need! Just keep in mind to configure each theme individually before using this kind of experiment.', 'nelioab'))));
     }
     // HEATMAPS
     $this->print_beautiful_box('heatmap', __('New Heatmap Experiment for Pages or (Custom) Posts', 'nelioab'), array(&$this, 'print_new_exp_box', array('heatmap', $url . NelioABExperiment::HEATMAP_EXP, __('If you don\'t know how to get started with A/B Testing, run a Heatmap Experiment and <strong>discover how your users behave when navigating through your website</strong>! This is one of the easiest ways to get ideas on what to do next.', 'nelioab'))));
     // CSS
     $this->print_beautiful_box('css', __('New A/B CSS Test', 'nelioab'), array(&$this, 'print_new_exp_box', array('css', $url . NelioABExperiment::CSS_ALT_EXP, __('Do you want to <strong>change the appearence of your WordPress site, but tweaking only small elements here and there</strong>? Then CSS Tests is what you\'re looking for. Create one or more CSS fragments that will be applied to your website and discover which one offers the better results.', 'nelioab'))));
     // CUSTOM POST TYPES
     $this->print_beautiful_box('cpt', __('New Custom Post Type Test', 'nelioab'), array(&$this, 'print_new_exp_box', array('cpt', $url . NelioABExperiment::CPT_ALT_EXP, __('<strong>Pure A/B Testing!</strong> Create one or more alternatives of a custom post type and <strong>change whatever you want</strong>: the title, the text, the custom fields... and do it using your default WordPress editor! Then define the goals and you\'re ready!', 'nelioab'))));
     // WIDGET
     $this->print_beautiful_box('widget', __('New Widget Test', 'nelioab'), array(&$this, 'print_new_exp_box', array('widget', $url . NelioABExperiment::WIDGET_ALT_EXP, __('Do you want to <strong>arrange widgets in a different order, use different widget setups, or even introduce completely new widgets?</strong> Then Widget Tests is what you need. Select and arrange the widgets you need as a new alternative and discover which one offers the better results.', 'nelioab'))));
     // MENU
     $this->print_beautiful_box('menu', __('New Menu Test', 'nelioab'), array(&$this, 'print_new_exp_box', array('menu', $url . NelioABExperiment::MENU_ALT_EXP, __('Menus are one of the most important elements in your WordPress site, for they get a lot of attention from your visitors. <strong>Modify the labels of your menu items, rearrange them, or use a completely different menu</strong> and test which one helps you get more conversions!', 'nelioab'))));
 }
 /**
  * PHPDOC
  *
  * @return NelioABWooCommerceSupport PHPDOC
  *
  * @since 4.2.0
  */
 public static function get_instance()
 {
     if (self::$instance == NULL) {
         self::$instance = new NelioABWooCommerceSupport();
     }
     return self::$instance;
 }
Esempio n. 3
0
        /**
         * This function prints the contents of a new card. It essentially contains
         * a small text for an empty card (which is hidden by JS when actions are
         * added) and the list of actions that contribute to the goal this card
         * represents.
         */
        public function print_new_card_content()
        {
            ?>
			<p><?php 
            _e('A conversion is counted for this goal whenever any of the following actions occur:', 'nelioab');
            ?>
</p>
			<div class="empty">
				<em><?php 
            _e('<strong>Add one or more conversion actions</strong> using the following buttons.', 'nelioab');
            ?>
</em>
			</div>
			<div class="actions sortable" style="display:none;">
			</div>
			<div class="new-actions">
				<div class="wrapper">
					<strong><?php 
            _e('Available Conversion Actions', 'nelioab');
            ?>
</strong><br>
					<small><?php 
            _e('(Hover over each action for help)', 'nelioab');
            ?>
</small><br>
					<?php 
            $pattern = '<a class="%1$s action" title="%2$s - %3$s" href="javascript:;"></a>';
            if (NelioABWooCommerceSupport::is_plugin_active()) {
                printf($pattern, 'wc-order-completed', esc_html(__('WooCommerce Order', 'nelioab')), esc_html(__('A WooCommerce order that contains a certain product is completed', 'nelioab')));
            }
            printf($pattern, 'page', esc_html(__('Page', 'nelioab')), esc_html(__('A visitor accesses a page in your WordPress site', 'nelioab')));
            printf($pattern, 'post', esc_html(__('Post', 'nelioab')), esc_html(__('A visitor accesses a post in your WordPress site', 'nelioab')));
            printf($pattern, 'external-page', esc_html(__('External Page', 'nelioab')), esc_html(__('A visitor tries to access an external page (either by clicking a link or by sutbmitting a form) specified using its URL', 'nelioab')));
            printf($pattern, 'click-element', esc_html(__('Click', 'nelioab')), esc_html(__('A visitor clicks on an element in your site (for instance, a button, a link, or an image)', 'nelioab')));
            $cf7 = is_plugin_active('contact-form-7/wp-contact-form-7.php');
            $gf = is_plugin_active('gravityforms/gravityforms.php');
            $cf7_action_lbl = __('Form Submit', 'nelioab');
            $gf_action_lbl = __('Form Submit', 'nelioab');
            if ($cf7 && $gf) {
                $cf7_action_lbl = esc_html(__('Contact Form 7', 'nelioab'));
                $gf_action_lbl = esc_html(__('Gravity Form', 'nelioab'));
            }
            if ($cf7) {
                printf($pattern, 'form-submit cf7', $cf7_action_lbl, esc_html(__('A visitor successfully submits a «Contact Form 7» form', 'nelioab')));
            }
            if ($gf) {
                printf($pattern, 'form-submit gf', $gf_action_lbl, esc_html(__('A visitor successfully submits a «Gravity Forms» form', 'nelioab')));
            }
            ?>
				</div>
			</div>
			<?php 
        }