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