'https://wp-modula.com', 'slug' => 'modula', ) ); $wpchill_upsell = WPChill_Upsells::get_instance( $args ); // output wpchill lite vs pro page add_action( 'modula_lite_vs_premium_page', array( $wpchill_upsell, 'lite_vs_premium' ), 30, 1 ); add_filter( 'modula_uninstall_transients', array( $wpchill_upsell, 'smart_upsells_transients' ) , 15 ); $this->wpchill_upsells = $wpchill_upsell; } // Modula albums modal add_action( 'wp_ajax_modula_modal-albums_upgrade', array( $this, 'get_modal_albums_upgrade' ) ); // Albums Defaults modal add_action( 'wp_ajax_modula_modal-albums-defaults_upgrade', array( $this, 'get_modal_albums_defaults_upgrade' ) ); // Gallery Defaults modal add_action( 'wp_ajax_modula_modal-gallery-defaults_upgrade', array( $this, 'get_modal_gallery_defaults_upgrade' ) ); /* Hooks */ add_filter( 'modula_general_tab_content', array( $this, 'general_tab_upsell' ) ); add_filter( 'modula_hover-effect_tab_content', array( $this, 'hovereffects_tab_upsell' ), 15, 1 ); add_filter( 'modula_image-loaded-effects_tab_content', array( $this, 'loadingeffects_tab_upsell' ), 15, 1 ); add_filter( 'modula_video_tab_content', array( $this, 'video_tab_upsell' ) ); add_filter( 'modula_speedup_tab_content', array( $this, 'speedup_tab_upsell' ) ); add_filter( 'modula_filters_tab_content', array( $this, 'filters_tab_upsell' ) ); add_filter( 'modula_lightboxes_tab_content', array( $this, 'lightboxes_tab_upsell' ) ); add_filter( 'modula_misc_tab_content', array( $this, 'misc_tab_upsell' ) ); add_filter( 'modula_password_protect_tab_content', array( $this, 'password_protect_tab_upsell' ) ); add_filter( 'modula_watermark_tab_content', array( $this, 'watermark_tab_upsell' ) ); add_filter( 'modula_slideshow_tab_content', array( $this, 'slideshow_tab_upsell' ) ); add_filter( 'modula_download_tab_content', array( $this, 'download_tab_upsell' ) ); add_filter( 'modula_exif_tab_content', array( $this, 'exif_tab_upsell' ) ); add_filter( 'modula_zoom_tab_content', array( $this, 'zoom_tab_upsell' ) ); // Modula Advanced Shortcodes settings tab upsells add_action('modula_admin_tab_compression', array( $this, 'render_speedup_tab' ) ); add_action('modula_admin_tab_standalone', array( $this, 'render_albums_tab' ) ); add_action('modula_admin_tab_shortcodes', array( $this, 'render_advanced_shortcodes_tab' ) ); add_action('modula_admin_tab_watermark', array( $this, 'render_watermark_tab' ) ); add_action('modula_admin_tab_roles', array( $this, 'render_roles_tab' ) ); // Remove upsells badge if user's license includes the addon add_filter('modula_admin_page_tabs', array($this, 'remove_upsells_badge' ), 999 ); if ( $this->wpchill_upsells && $this->wpchill_upsells->is_upgradable_addon( 'modula-albums' ) ) { add_filter( 'modula_cpt_metaboxes', array( $this, 'albums_upsell_meta' ) ); } // Add modula whitelabel upsell if ( ! $this->wpchill_upsells || $this->wpchill_upsells->is_upgradable_addon( 'modula-whitelabel' ) ) { add_action( 'modula_side_admin_tab', array( $this, 'render_whitelabel_upsell' ) ); } if ( ! $this->wpchill_upsells || $this->wpchill_upsells->is_upgradable_addon('modula-roles') ) { add_action( 'modula_side_admin_tab', array( $this, 'render_roles_upsell' ) ); } /* Fire our meta box setup function on the post editor screen. */ add_action( 'load-post.php', array( $this, 'meta_boxes_setup' ) ); add_action( 'load-post-new.php', array( $this, 'meta_boxes_setup' ) ); $this->free_vs_pro_link = admin_url('edit.php?post_type=modula-gallery&page=modula-lite-vs-pro'); // Upgrade to PRO plugin action link add_filter( 'plugin_action_links_' . MODULA_FILE, array( $this, 'filter_action_links' ), 60 ); } public function generate_upsell_box( $title, $description, $tab, $features = array() ) { $upsell_box = '
" . esc_html( $feature['feature'] ) . "
"; } else { $upsell_box .= '' . esc_html( $feature['feature'] ); } $upsell_box .= '' . esc_html( $description ) . '
'; return $upsell_box; } public function general_tab_upsell( $tab_content ) { if ( $this->wpchill_upsells && ! $this->wpchill_upsells->is_upgradable_addon('modula') ) { return; } $upsell_title = esc_html__( 'Looking for even more control and even more powerful galleries?', 'modula-best-grid-gallery' ); $upsell_description = esc_html__( 'Upgrade to Modula Premium today to get access to Fancybox Lightbox extra options, max images count for desktop and mobile, extra styles and more...', 'modula-best-grid-gallery' ); $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'general' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'loadingeffects' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'hovereffects' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-video' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-speedup' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'filters' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'lightboxes' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'misc' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-password-protect' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-watermark' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-slideshow' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-zoom' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-exif' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= ''; $buttons = '' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-download' ); $tab_content .= $buttons; $tab_content .= '
'; $tab_content .= 'free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-pro' ); ?>
Easily create galleries with the same settings:
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-defaults' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-roles' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-whitelabel' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-whitelabel' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-speedup' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-advanced-shortcodes' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-albums' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-watermark' ); ?>
free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . ''; $buttons .= '' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . ''; echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-roles' ); ?>