or different features. Specify the number of images to display in a single row in an gallery group. Additionally, you can customize thumbnail images by cropping, flipping and rotating them.", 'photo-gallery'), ), 3 => array( "title" => __("10 View Options", 'photo-gallery'), "description" => __("Photo Gallery plugin allows displaying galleries and gallery groups in 10 elegant and beautiful views:, Thumbnails, Masonry, Mosaic, Slideshow, Image Browser, Masonry Album, Compact Album, Extended Album, Blog Style Gallery, Ecommerce.", 'photo-gallery'), ), 4 => array( "title" => __("Audio and Video Support", 'photo-gallery'), "description" => __("You can include both videos and images within a single gallery. WordPress Photo Gallery Plugin supports YouTube and Vimeo videos within Galleries. It's also possible to add audio tracks for the image slideshow.", 'photo-gallery'), ) ), // user guide from web-dorado.com "user_guide" => array( 0 => array( "main_title" => __("Installing", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/installing.html", "titles" => array() ), 1 => array( "main_title" => __("Creating/Editing Galleries", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/creating-editing-galleries.html", "titles" => array( array( "title" => __("Instagram Gallery", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/creating-editing-galleries/instagram-gallery.html", ), ) ), 2 => array( "main_title" => __("Creating/Editing Tags", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/creating-editing-tag.html", "titles" => array() ), 3 => array( "main_title" => __("Creating/Editing Albums", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/creating-editing-albums.html", "titles" => array() ), 4 => array( "main_title" => __("Editing Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options.html", "titles" => array( array( "title" => __("Global Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/global-options.html", ), array( "title" => __("Watermark", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/watermark.html", ), array( "title" => __("Advertisement", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/advertisement.html", ), array( "title" => __("Lightbox", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/lightbox.html", ), array( "title" => __("Album Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/album-options.html", ), array( "title" => __("Slideshow", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/slideshow.html", ), array( "title" => __("Thumbnail Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/thumbnail-options.html", ), array( "title" => __("Image Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/image-options.html", ), array( "title" => __("Social Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/social-options.html", ), array( "title" => __("Carousel Options", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-options/carousel-options.html", ), ) ), 5 => array( "main_title" => __("Creating/Editing Themes", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes.html", "titles" => array( array( "title" => __("Thumbnails", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/thumbnails.html", ), array( "title" => __("Masonry", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/masonry.html", ), array( "title" => __("Mosaic", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/mosaic.html", ), array( "title" => __("Slideshow", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/slideshow.html", ), array( "title" => __("Image Browser", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/image-browser.html", ), array( "title" => __("Compact Album", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/compact-album.html", ), array( "title" => __("Masonry Album", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/masonry-album.html", ), array( "title" => __("Extended Album", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/extended-album.html", ), array( "title" => __("Blog Style", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/blog-style.html", ), array( "title" => __("Lightbox", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/lightbox.html", ), array( "title" => __("Page Navigation", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/page-navigation.html", ), array( "title" => __("Carousel", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/editing-themes/carousel.html", ), ) ), 6 => array( "main_title" => __("Generating Shortcode", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/shortcode-generating.html", "titles" => array() ), 7 => array( "main_title" => __("Editing Comments", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/comments-editing.html", "titles" => array() ), 8 => array( "main_title" => __("Editing Ratings", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/ratings-editing.html", "titles" => array() ), 9 => array( "main_title" => __("Publishing the Created Photo Gallery", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery.html", "titles" => array( array( "title" => __("General Parameters", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery/general-parameters.html", ), array( "title" => __("Lightbox Parameters", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery/lightbox-parameters.html", ), array( "title" => __("Advertisement", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery/advertisement.html", ), ) ), 10 => array( "main_title" => __("Publishing Photo Gallery Widgets", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery-widgets.html", "titles" => array( array( "title" => __("Tag Cloud", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery-widgets/tag-cloud.html", ), array( "title" => __("Photo Gallery Tags Cloud", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery-widgets/gallery-tags-cloud.html", ), array( "title" => __("Photo Gallery Slideshow", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery-widgets/gallery-slideshow.html", ), array( "title" => __("Photo Gallery Widget", 'photo-gallery'), "url" => "https://web-dorado.com/wordpress-gallery/publishing-gallery-widgets/gallery-widget.html", ), ) ), ), "video_youtube_id" => "4Mxg0FsFZZE", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o "plugin_wd_url" => BWG()->plugin_link . BWG()->utm_source, "plugin_wd_demo_link" => "https://demo.10web.io/photo-gallery/" . BWG()->utm_source, "plugin_wd_addons_link" => BWG()->plugin_link . BWG()->utm_source, "plugin_wd_docs_link" => "https://help.10web.io/hc/en-us/categories/4403736780306/" . BWG()->utm_source, "after_subscribe" => admin_url('admin.php?page=galleries_bwg'), // this can be plugin overview page or set up page "plugin_wizard_link" => '', "plugin_menu_title" => $this->nicename, "plugin_menu_icon" => BWG()->plugin_url . '/images/icons/icon.svg', "deactivate" => !$this->is_pro, "subscribe" => false, "custom_post" => '', "menu_position" => null, "display_overview" => false, ); ten_web_new_lib_init($bwg_options); } } /** * Create custom post types. */ public function create_post_types() { if (!isset(BWG()->options)) { BWG()->options = new WD_BWG_Options(); } if (BWG()->options->show_hide_post_meta == 1) { $show_hide_post_meta = array('editor', 'comments', 'thumbnail', 'title'); } else { $show_hide_post_meta = array('editor', 'thumbnail', 'title'); } if (BWG()->options->show_hide_custom_post == 0) { $show_hide_custom_post = false; } else { $show_hide_custom_post = true; } $args = array( 'label' => 'Gallery', 'public' => TRUE, 'exclude_from_search' => TRUE, 'publicly_queryable' => TRUE, 'show_ui' => $show_hide_custom_post, 'show_in_menu' => TRUE, 'show_in_nav_menus' => TRUE, 'permalink_epmask' => TRUE, 'rewrite' => TRUE, 'label' => __('Galleries', 'photo-gallery'), 'supports' => $show_hide_post_meta, ); register_post_type( 'bwg_gallery', $args ); $args = array( 'label'=> 'Gallery group', 'public' => TRUE, 'exclude_from_search' => TRUE, 'publicly_queryable' => TRUE, 'show_ui' => $show_hide_custom_post, 'show_in_menu' => TRUE, 'show_in_nav_menus' => TRUE, 'permalink_epmask' => TRUE, 'rewrite' => TRUE, 'label' => __('Albums', 'photo-gallery'), 'supports' => $show_hide_post_meta ); register_post_type( 'bwg_album', $args ); $args = array( 'label' => 'Gallery Tags', 'public' => TRUE, 'exclude_from_search' => TRUE, 'publicly_queryable' => TRUE, 'show_ui' => $show_hide_custom_post, 'show_in_menu' => TRUE, 'show_in_nav_menus' => TRUE, 'permalink_epmask' => TRUE, 'rewrite' => TRUE, 'label' => __('Gallery tags', 'photo-gallery'), 'supports' => $show_hide_post_meta ); register_post_type( 'bwg_tag', $args ); $args = array( 'label' => 'Gallery Share', 'public' => FALSE, 'publicly_queryable' => TRUE, 'exclude_from_search' => TRUE, /*'query_var' => 'share', 'rewrite' => array('slug' => 'share'),*/ ); register_post_type('bwg_share', $args); WDWLibrary::register_custom_taxonomies(); } /** * Change Share template. * * @param $single_template * * @return string */ public function share_template( $single_template ) { global $post; if ( isset($post) && isset($post->post_type) && $post->post_type == 'bwg_share' ) { $single_template = BWG()->plugin_dir . '/framework/WDWShare.php'; } return $single_template; } public function tag_cloud_widget_args($args) { if ($args['taxonomy'] == 'bwg_tag') { require_once BWG()->plugin_dir . "/frontend/models/BWGModelWidget.php"; $model = new BWGModelWidgetFrontEnd(); $model->get_tags_data(0); } return $args; } public function autoupdate_interval( $schedules ) { require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php'); $schedules['bwg_autoupdate_interval'] = array( 'interval' => 60 * BWG()->options->autoupdate_interval, 'display' => __('Photo gallery plugin autoupdate interval.', 'photo-gallery'), ); return $schedules; } public function social_galleries() { if ( BWG()->options->instagram_access_token != '' ) { $this->instagram_galleries(); wp_die(); } } public function instagram_galleries() { /* Check if instagram galleries exist and refresh them every hour.*/ require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php'); /* Array of IDs of instagram galleries.*/ $response = array(); $instagram_galleries = WDWLibraryEmbed::check_instagram_galleries(); if ( !empty($instagram_galleries[0]) ) { foreach ( $instagram_galleries as $gallery ) { array_push($response, WDWLibraryEmbed::refresh_social_gallery($gallery)); } } $instagram_embeds = WDWLibraryEmbed::bwg_get_instagram_embeds(); if ( !empty( $instagram_embeds ) ) { WDWLibraryEmbed::bwg_refresh_instagram_embed( $instagram_embeds ); } } /** * Plugins loaded actions. */ public function plugins_loaded() { // Initialize add-ons. if ( $this->is_pro ) { do_action('bwg_init_addons'); } } /** * Incompatibility message. * * @param $add_ons_notice */ function addons_compatibility_notice($add_ons_notice) { $addon_names = implode(', ', $add_ons_notice); $count = count($add_ons_notice); $single = __('Please update the %s add-on to start using.', 'photo-gallery'); $plural = __('Please update the %s add-ons to start using.', 'photo-gallery'); echo '

' . sprintf( _n($single, $plural, $count, 'photo-gallery'), $addon_names ) .'

'; } /** * Check add-ones version compatibility with Photo Gallery. */ function check_addons_compatibility() { $add_ons = array( 'photo-gallery-facebook' => array( 'version' => '1.1.0', 'file' => 'photo-gallery-facebook.php' ), 'photo-gallery-export' => array( 'version' => '1.0.3', 'file' => 'photo-gallery-export.php' ), 'photo-gallery-ecommerce' => array( 'version' => '1.0.17', 'file' => 'photo-gallery-ecommerce.php' ), 'photo-gallery-google-photos' => array( 'version' => '1.0.9', 'file' => 'photo-gallery-google-photos.php' ), ); $add_ons_notice = array(); include_once(BWG()->abspath . 'wp-admin/includes/plugin.php'); foreach ( $add_ons as $add_on_key => $add_on_value ) { $addon_path = plugin_dir_path(dirname(__FILE__)) . $add_on_key . '/' . $add_on_value['file']; if ( is_plugin_active($add_on_key . '/' . $add_on_value['file']) ) { $addon = get_plugin_data($addon_path); if ( version_compare($addon['Version'], $add_on_value['version'], '<=') ) { deactivate_plugins($addon_path); array_push($add_ons_notice, $addon['Name']); } } } if ( !empty($add_ons_notice) ) { $this->addons_compatibility_notice($add_ons_notice); } } /** * Add star rating to plugin meta links. * * @param $meta_fields * @param $file * * @return array */ function add_plugin_meta_links($meta_fields, $file) { if ( plugin_basename(__FILE__) == $file ) { $plugin_url = "https://wordpress.org/support/plugin/photo-gallery"; $prefix = $this->prefix; $meta_fields[] = "" . __('Ask a question', $prefix) . ""; $meta_fields[] = " " . "" . "" . "" . "" . "" . ""; $stars_color = "#ffb900"; echo ""; } return $meta_fields; } /** * Allowed upload mime_types. * * @param array $mimes * * @return array $mimes */ function allowed_upload_mime_types( $mimes ) { // Optional. allowed a mime type. $allowed = array( 'jpg|jpeg|jpe', 'gif', 'png', 'svg' ); foreach ( $mimes as $key => $val ) { if ( !in_array( $key, $allowed ) ) { unset( $mimes[ $key ] ); } } return $mimes; } /** * Prevent adding shortcode conflict with some builders. */ private function before_shortcode_add_builder_editor() { if ( defined('ELEMENTOR_VERSION') && did_action( 'elementor/loaded' ) ) { add_action('elementor/editor/footer', array( $this, 'global_script' )); } if ( class_exists('FLBuilder') ) { add_action('wp_enqueue_scripts', array( $this, 'global_script' )); } } public function enqueue_elementor_widget_scripts() { wp_enqueue_script(BWG()->prefix . 'elementor_widget_js', plugins_url('js/bwg_elementor_widget.js', __FILE__), array( 'jquery' )); } /* * Change image editors library. * * Changes the order of use of the image editor library. * First, "WP_Image_Editor_GD" is used. * */ function bwg_change_image_editors_library() { return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); } } /** * Main instance of BWG. * * @return BWG The main instance to prevent the need to use globals. */ function BWG() { return BWG::instance(); } BWG(); /** * Display gallery with function. * * @param $id Shortcode id. */ function photo_gallery( $id ) { echo BWG()->shortcode(array( 'id' => $id )); } require_once(WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)) . '/booster/main.php'); add_action('init', function() { new TenWebBoosterBWG(array( 'plugin_dir' => WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)) . '/booster', 'plugin_url' => plugins_url(plugin_basename(dirname(__FILE__))) . '/booster', 'submenu' => array( 'parent_slug' => 'galleries_bwg', ), 'page' => array( 'slug' => 'photo-gallery', ), )); }, 11); Mitgliedsantrag – FU Ortsverband