class-admin-notice-custom-css.php
4 weeks ago
class-admin-notices.php
4 weeks ago
class-admin.php
4 weeks ago
class-attachment-fields.php
4 weeks ago
class-columns.php
4 weeks ago
class-demo-content.php
4 weeks ago
class-extensions.php
4 weeks ago
class-gallery-attachment-modal.php
4 weeks ago
class-gallery-datasources.php
4 weeks ago
class-gallery-editor.php
4 weeks ago
class-gallery-metabox-fields.php
4 weeks ago
class-gallery-metabox-items.php
4 weeks ago
class-gallery-metabox-settings-helper.php
4 weeks ago
class-gallery-metabox-settings.php
4 weeks ago
class-gallery-metabox-template.php
4 weeks ago
class-gallery-metaboxes.php
4 weeks ago
class-menu.php
4 weeks ago
class-pro-promotion.php
4 weeks ago
class-settings.php
4 weeks ago
class-silent-installer-skin.php
4 weeks ago
class-trial-mode.php
4 weeks ago
demo-content-galleries.php
4 weeks ago
demo-content-images.php
4 weeks ago
index.php
4 weeks ago
pro-features.php
4 weeks ago
view-features.php
4 weeks ago
view-help-demos.php
4 weeks ago
view-help-getting-started.php
4 weeks ago
view-help-pro.php
4 weeks ago
view-help.php
4 weeks ago
view-system-info.php
4 weeks ago
view-help.php
197 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | $instance = FooGallery_Plugin::get_instance(); |
| 8 | $info = $instance->get_plugin_info(); |
| 9 | |
| 10 | $logo = FOOGALLERY_URL . 'assets/logo.png?v=2'; |
| 11 | |
| 12 | $plugin_name = foogallery_plugin_name(); |
| 13 | $fooplugins_url = foogallery_admin_url( 'https://fooplugins.com/', 'help' ); |
| 14 | $plugin_url = foogallery_admin_url( 'https://fooplugins.com/foogallery-wordpress-gallery-plugin/', 'help' ); |
| 15 | $support_url = foogallery_admin_url( 'https://fooplugins.link/support/', 'help' ); |
| 16 | $plans_url = foogallery_admin_url( 'https://fooplugins.com/foogallery-wordpress-gallery-plugin/compare-plans/', 'help' ); |
| 17 | $support_link = sprintf( '<a href="%s" target="_blank">%s</a>', $support_url, __( 'open a support ticket', 'foogallery' ) ); |
| 18 | /* translators: %s: Value inserted at runtime. */ |
| 19 | $support_text = sprintf( __('Still stuck? Please %s and we will help!', 'foogallery'), $support_link ); |
| 20 | |
| 21 | $fooplugins_link = sprintf( '<a href="%s" target="_blank">%s</a>', $fooplugins_url, __( 'FooPlugins', 'foogallery' ) ); |
| 22 | /* translators: %s: Value inserted at runtime. */ |
| 23 | $link = sprintf('<a href="%s" target="_blank">%s</a>', $plugin_url, sprintf( __( 'Visit the %s Homepage', 'foogallery' ), $plugin_name ) ); |
| 24 | /* translators: %s: Value inserted at runtime. */ |
| 25 | $tagline = sprintf( __( 'Thank you for choosing %s!<br />Better galleries for WordPress, that are faster, more flexible and beautiful!', 'foogallery' ), $plugin_name ); |
| 26 | |
| 27 | /* translators: %s: Value inserted at runtime. */ |
| 28 | $made_by = __( 'Made with ❤️ by %s', 'foogallery' ); |
| 29 | $footer_text = sprintf( $made_by, $fooplugins_link ); |
| 30 | |
| 31 | //allow the variables to be overwritten by other things! |
| 32 | $logo = apply_filters( 'foogallery_admin_help_logo_url', $logo ); |
| 33 | |
| 34 | $fs_instance = foogallery_fs(); |
| 35 | $foogallery_current_plan = $fs_instance->get_plan_name(); |
| 36 | $is_free = $fs_instance->is_free_plan(); |
| 37 | $is_trial = $fs_instance->is_trial(); |
| 38 | $show_trial_message = !$is_trial && $is_free && !$fs_instance->is_trial_utilized(); |
| 39 | $show_thanks_for_pro = foogallery_is_pro(); |
| 40 | |
| 41 | $upgrade_tab_text = __( 'Upgrade to PRO', 'foogallery' ); |
| 42 | $upgrade_button_text = __( 'Upgrade to PRO!', 'foogallery' ); |
| 43 | |
| 44 | if ( $show_thanks_for_pro ) { |
| 45 | $upgrade_tab_text = __( 'PRO Features', 'foogallery' ); |
| 46 | } else if ( $show_trial_message ) { |
| 47 | $upgrade_tab_text = __( 'Free Trial', 'foogallery' ); |
| 48 | $upgrade_button_text = __( 'Already convinced? Upgrade to PRO!', 'foogallery' ); |
| 49 | } |
| 50 | |
| 51 | $show_demos = apply_filters( 'foogallery_admin_help_show_demos', true ); |
| 52 | ?> |
| 53 | <script type="text/javascript"> |
| 54 | jQuery(document).ready(function($) { |
| 55 | $.foogallery_help_tabs = { |
| 56 | |
| 57 | init : function() { |
| 58 | $(".foogallery-admin-help nav a").click( function(e) { |
| 59 | e.preventDefault(); |
| 60 | |
| 61 | $this = $(this); |
| 62 | |
| 63 | $this.addClass("foogallery-admin-help-tab-active"); |
| 64 | |
| 65 | $(".foogallery-admin-help-tab-active").not($this).removeClass("foogallery-admin-help-tab-active"); |
| 66 | |
| 67 | $(".foogallery-admin-help-section:visible").hide(); |
| 68 | |
| 69 | var hash = $this.attr("href"); |
| 70 | |
| 71 | $(hash+'_section').show(); |
| 72 | |
| 73 | window.location.hash = hash; |
| 74 | } ); |
| 75 | |
| 76 | if (window.location.hash) { |
| 77 | $('.foogallery-admin-help nav a[href="' + window.location.hash + '"]').click(); |
| 78 | } |
| 79 | |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | }; //End of foogallery_help_tabs |
| 84 | |
| 85 | $.foogallery_help_tabs.init(); |
| 86 | |
| 87 | $.foogallery_import_data = { |
| 88 | init : function() { |
| 89 | $(".foogallery-admin-help-import-demos").click( function(e) { |
| 90 | e.preventDefault(); |
| 91 | |
| 92 | var $this = $(this), |
| 93 | data = { |
| 94 | 'action': $this.data( 'action' ), |
| 95 | '_wpnonce': $this.data( 'nonce' ) |
| 96 | }; |
| 97 | |
| 98 | $this.prop('disable', true).addClass("foogallery-admin-help-loading"); |
| 99 | $this.find('.fgah-create-demos-text:first').html( $this.data('working') ); |
| 100 | |
| 101 | $.ajax({ |
| 102 | type: 'POST', |
| 103 | url: ajaxurl, |
| 104 | data: data, |
| 105 | cache: false, |
| 106 | success: function( html ) { |
| 107 | $this.find('.fgah-create-demos-text:first').html( $this.data('complete') ); |
| 108 | $('.fgah-demo-result').html( html ); |
| 109 | }, |
| 110 | error: function() { |
| 111 | $this.find('.fgah-create-demos-text:first').html( $this.data('error') ); |
| 112 | } |
| 113 | }).always(function(){ |
| 114 | $this.removeClass("foogallery-admin-help-loading").prop('disable', false); |
| 115 | }); |
| 116 | } ); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | $.foogallery_import_data.init(); |
| 121 | |
| 122 | $.foogallery_demos = { |
| 123 | init : function() { |
| 124 | $(".foogallery-admin-help-demo").click( function(e) { |
| 125 | e.preventDefault(); |
| 126 | var $this = $(this), |
| 127 | $content = $( $this.attr('href') ); |
| 128 | |
| 129 | $('.foogallery-admin-help-demo').removeClass( 'foogallery-admin-help-button-active' ); |
| 130 | $this.addClass( 'foogallery-admin-help-button-active' ); |
| 131 | |
| 132 | $('.foogallery-admin-help-demo-content').hide(); |
| 133 | $content.show(); |
| 134 | } ); |
| 135 | } |
| 136 | }; |
| 137 | |
| 138 | $.foogallery_demos.init(); |
| 139 | }); |
| 140 | </script> |
| 141 | <div class="foogallery-admin-help"> |
| 142 | <div class="foogallery-admin-help-header"> |
| 143 | <div class="foogallery-admin-help-ribbon"><span><?php echo esc_html( FOOGALLERY_VERSION ); ?></span></div> |
| 144 | <img src="<?php echo esc_url( $logo ); ?>" width="200" alt="<?php echo esc_attr( $plugin_name ); ?>"> |
| 145 | </div> |
| 146 | <nav> |
| 147 | <a class="foogallery-admin-help-tab-active" href="#help"> |
| 148 | <?php esc_html_e( 'Welcome', 'foogallery' ); ?> |
| 149 | </a> |
| 150 | <a href="#pro"> |
| 151 | <?php esc_html_e( $upgrade_tab_text, 'foogallery' ); ?> |
| 152 | </a> |
| 153 | <a href="#demos"> |
| 154 | <?php esc_html_e( 'Demo', 'foogallery' ); ?> |
| 155 | </a> |
| 156 | <a href="#support"> |
| 157 | <?php esc_html_e( 'Support', 'foogallery' ); ?> |
| 158 | </a> |
| 159 | </nav> |
| 160 | <div class="foogallery-admin-help-content"> |
| 161 | |
| 162 | <?php include FOOGALLERY_PATH . 'includes/admin/view-help-getting-started.php'; ?> |
| 163 | |
| 164 | <?php include FOOGALLERY_PATH . 'includes/admin/view-help-pro.php'; ?> |
| 165 | |
| 166 | <?php include FOOGALLERY_PATH . 'includes/admin/view-help-demos.php'; ?> |
| 167 | |
| 168 | <div id="support_section" class="foogallery-admin-help-section" style="display: none"> |
| 169 | <section class="fgah-feature"> |
| 170 | <header> |
| 171 | <h3><?php esc_html_e( '🚑 Need help? We\'re here for you...' , 'foogallery' );?></h3> |
| 172 | </header> |
| 173 | <ul class="fgah-help-list"> |
| 174 | <li> |
| 175 | <a href="<?php echo esc_url( foogallery_admin_url( 'https://fooplugins.com/documentation/foogallery/', 'help') ); ?>" target="_blank"><?php esc_html_e('FooGallery Documentation','foogallery'); ?></a> |
| 176 | - <?php esc_html_e('Our documentation covers everything you need to know, from install instructions and account management, to troubleshooting common issues and extending the functionality.', 'foogallery'); ?> |
| 177 | </li> |
| 178 | <?php if ( $is_free ) { ?> |
| 179 | <li> |
| 180 | <a href="https://wordpress.org/support/plugin/foogallery/" target="_blank"><?php esc_html_e('FooGallery WordPress.org Support','foogallery'); ?></a> |
| 181 | - <?php esc_html_e('We actively monitor and answer all questions posted on WordPress.org for FooGallery.', 'foogallery'); ?> |
| 182 | </li> |
| 183 | <?php } else { ?> |
| 184 | <li> |
| 185 | <a href="<?php echo esc_url( $support_url ); ?>" target="_blank"><?php esc_html_e('Premium Support','foogallery'); ?></a> |
| 186 | - <?php esc_html_e('Open a support ticket and our dedicated support team will assist. This is the fasted way to get help!', 'foogallery'); ?> |
| 187 | </li> |
| 188 | <?php } ?> |
| 189 | </ul> |
| 190 | </section> |
| 191 | </div> |
| 192 | </div> |
| 193 | <div class="foogallery-admin-help-footer"> |
| 194 | <?php echo wp_kses_post( $footer_text ); ?> |
| 195 | </div> |
| 196 | </div> |
| 197 |