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')))); }
public function add_custom_styles() { require_once NELIOAB_UTILS_DIR . '/wp-helper.php'; wp_register_style('nelioab_generic_css', nelioab_admin_asset_link('/css/nelioab-generic.min.css'), array(), NELIOAB_PLUGIN_VERSION); wp_enqueue_style('nelioab_generic_css'); if (NelioABWpHelper::is_at_least_version(3.8)) { wp_register_style('nelioab_new_icons_css', nelioab_admin_asset_link('/css/nelioab-new-icons.min.css'), array(), NELIOAB_PLUGIN_VERSION); wp_enqueue_style('nelioab_new_icons_css'); } }
/** * It initializes the controller. * * If Nelio's subscription has been deactivated, the plugin will do * nothing at all. * * @return void */ public function init() { // If the user has been disabled... get out of here try { NelioABAccountSettings::check_user_settings(); } catch (Exception $e) { // It is important we add the check here: if the user was deactivated, but it no // longer is, then it's important his settings are rechecked so that we can // re-enable it. if ($e->getCode() == NelioABErrCodes::DEACTIVATED_USER) { return; } } // Load the Visitor class so that all assigned alternatives are require_once NELIOAB_MODELS_DIR . '/visitor.php'; NelioABVisitor::load(); // Trick for proper THEME ALT EXP testing require_once NELIOAB_UTILS_DIR . '/wp-helper.php'; // Theme alt exp related if (NelioABWpHelper::is_at_least_version(3.4)) { $aux = $this->controllers['alt-exp']; add_filter('stylesheet', array(&$aux, 'modify_stylesheet')); add_filter('template', array(&$aux, 'modify_template')); add_filter('sidebars_widgets', array(&$aux, 'show_the_appropriate_widgets')); add_filter('option_stylesheet', array(&$aux, 'modify_option_stylesheet')); add_filter('option_current_theme', array(&$aux, 'modify_option_current_theme')); require_once NELIOAB_UTILS_DIR . '/theme-compatibility-layer.php'; NelioABThemeCompatibilityLayer::make_compat(); } add_action('init', array(&$this, 'do_init')); add_action('init', array(&$this, 'init_admin_stuff')); }