Ejemplo n.º 1
0
 public static function get_instance()
 {
     if (!isset(self::$instance) && !self::$instance instanceof Foobox_Free) {
         self::$instance = new Foobox_Free();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 function create_settings()
 {
     //region General Tab
     $tabs['general'] = __('General', 'foobox-free');
     $sections['attach'] = array('tab' => 'general', 'name' => __('What do you want to attach FooBox to?', 'foobox-free'));
     $settings[] = array('id' => 'enable_galleries', 'title' => __('WordPress Galleries', 'foobox-free'), 'desc' => __('Enable FooBox for all WordPress image galleries.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'section' => 'attach', 'tab' => 'general');
     $settings[] = array('id' => 'enable_captions', 'title' => __('WordPress Images With Captions', 'foobox-free'), 'desc' => __('Enable FooBox for all WordPress images that have captions.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'section' => 'attach', 'tab' => 'general');
     $settings[] = array('id' => 'enable_attachments', 'title' => __('Attachment Images', 'foobox-free'), 'desc' => __('Enable FooBox for all media images included in posts or pages.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'section' => 'attach', 'tab' => 'general');
     $sections['show_love'] = array('tab' => 'settings', 'name' => __('Show us some love! We would really appreciate your support.', 'foobox-free'));
     $settings[] = array('id' => 'powered_by_link', 'title' => __('Show "powered by" link', 'foobox-free'), 'desc' => __('Help support this free plugin by displaying a small "powered by foobox" link under the lightbox.', 'foobox-free') . '<br />' . __('View the demo on this page to see the "powered by" link in action.', 'foobox-free'), 'default' => 'off', 'type' => 'checkbox', 'section' => 'show_love', 'tab' => 'general');
     $become_affiliate_link = sprintf('<br /><a target="_blank" href="%s">%s</a> %s', Foobox_Free::BECOME_AFFILIATE_URL, __('Become an affiliate', 'foobox-free'), __(' and paste in your affiliate URL above.', 'foobox-free'));
     $settings[] = array('id' => 'powered_by_url', 'title' => __('Affiliate Link', 'foobox-free'), 'desc' => __('If you show the "powered by" link, you can promote FooBox and make a commission from sales. Everybody wins!', 'foobox-free') . $become_affiliate_link, 'type' => 'text', 'section' => 'show_love', 'tab' => 'general');
     $sections['settings'] = array('tab' => 'settings', 'name' => __('Display Settings', 'foobox-free'));
     $settings[] = array('id' => 'fit_to_screen', 'title' => __('Fit To Screen', 'foobox-free'), 'desc' => __('Force smaller images to fit the screen dimensions.', 'foobox-free'), 'default' => 'off', 'type' => 'checkbox', 'section' => 'settings', 'tab' => 'general');
     $settings[] = array('id' => 'hide_scrollbars', 'title' => __('Hide Page Scrollbars', 'foobox-free'), 'desc' => __('Hide the page\'s scrollbars when FooBox is visible.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'section' => 'settings', 'tab' => 'general');
     $settings[] = array('id' => 'show_count', 'title' => __('Show Counter', 'foobox-free'), 'desc' => __('Shows a counter under the FooBox modal when viewing a gallery of images.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'section' => 'settings', 'tab' => 'general');
     $settings[] = array('id' => 'captions_show_on_hover', 'title' => __('Show Captions On Hover', 'foobox-free'), 'desc' => __('Only show the caption when hovering over the image.', 'foobox-free'), 'type' => 'checkbox', 'section' => 'settings', 'tab' => 'general');
     $settings[] = array('id' => 'error_message', 'title' => __('Error Message', 'foobox-free'), 'desc' => __('The error message to display when an image has trouble loading.', 'foobox-free'), 'default' => __('Could not load the item', 'foobox-free'), 'type' => 'text', 'section' => 'settings', 'tab' => 'general');
     //endregion
     //region Advanced Tab
     $tabs['advanced'] = __('Advanced', 'foobox-free');
     $settings[] = array('id' => 'close_overlay_click', 'title' => __('Close On Overlay Click', 'foobox-free'), 'desc' => __('Should the FooBox lightbox close when the overlay is clicked.', 'foobox-free'), 'default' => 'on', 'type' => 'checkbox', 'tab' => 'advanced');
     $settings[] = array('id' => 'disable_others', 'title' => __('Disable Other Lightboxes', 'foobox-free'), 'desc' => __('Certain themes and plugins use a hard-coded lightbox, which make it very difficult to override.<br>By enabling this setting, we inject a small amount of javascript onto the page which attempts to get around this issue.<br>But please note this is not guaranteed, as we cannot account for every lightbox solution out there :)', 'foobox-free'), 'type' => 'checkbox', 'tab' => 'advanced');
     $settings[] = array('id' => 'enable_debug', 'title' => __('Enable Debug Mode', 'foobox-free'), 'desc' => __('Show an extra debug information tab to help debug any issues.', 'foobox-free'), 'type' => 'checkbox', 'tab' => 'advanced');
     //endregion
     //region Debug Tab
     $foobox_free = Foobox_Free::get_instance();
     if ($foobox_free->options()->is_checked('enable_debug', false)) {
         $tabs['debug'] = __('Debug', 'foobox-free');
         $settings[] = array('id' => 'debug_output', 'title' => __('Debug Information', 'foobox-free'), 'type' => 'debug_output', 'tab' => 'debug');
     }
     //endregion
     //region 'FooBot Says' tab
     $tabs['foobot_says'] = __('FooBot Says...', 'foobox-free');
     $settings[] = array('id' => 'upgrade', 'title' => '', 'type' => 'foobot_says', 'tab' => 'foobot_says');
     //endregion
     //region Upgrade tab
     $tabs['upgrade'] = __('Upgrade to PRO!', 'foobox-free');
     $link = sprintf('<p><a target="_blank" href="%s">%s</a></p><br>', FooBox_Free::FOOBOX_URL, __('Upgrade to the PRO version!', 'foobox-free'));
     $settings[] = array('id' => 'upgrade', 'title' => $link . __('There are tons of reasons...', 'foobox-free'), 'type' => 'upgrade', 'tab' => 'upgrade');
     //endregion
     return array('tabs' => $tabs, 'sections' => $sections, 'settings' => $settings);
 }
Ejemplo n.º 3
0
<?php

$instance = Foobox_Free::get_instance();
$info = $instance->get_plugin_info();
$title = sprintf(__('Welcome to FooBox FREE %s', 'foobox-image-lightbox'), $info['version']);
$tagline = sprintf(__('Thank you for choosing FooBox Image Lightbox! A great looking and responsive lightbox for your WordPress website!', 'foobox-image-lightbox'));
$settings_url = admin_url('options-general.php?page=foobox-free');
?>
<style>
	.about-wrap img.fooboxfree-settings-screenshot {
		float:right;
		margin-left: 20px;
	}

	.fooboxfree-badge-foobot {
		position: absolute;
		top: 15px;
		right: 0;
		background:url(<?php 
echo FOOBOXFREE_URL;
?>
assets/foobot.png) no-repeat;
		width:109px;
		height:200px;
	}
	.feature-section h2 {
		margin-top: 0;
	}

	.about-wrap h2.nav-tab-wrapper {
		margin-bottom: 20px;