WordPress.org

Plugin Directory


Ignore:
Timestamp:
01/03/18 22:47:28 (3 weeks ago)
Author:
codepeople
Message:

The current update:

  • Implements the integration with the Gutenberg Editor, the editor that will be included with the next versions of WordPress.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • photoshow/trunk/photoshow.php

    r1624902 r1796740  
    1 <?php  
    2 /*   
     1<?php 
     2/* 
    33Plugin Name: Smart Image Gallery 
    4 Plugin URI: http://wordpress.dwbooster.com/galleries/smart-image-gallery 
    5 Version: 1.0.5 
     4Plugin URI: https://wordpress.dwbooster.com/galleries/smart-image-gallery 
     5Version: 1.0.6 
    66Author: CodePeople 
    7 Author URI: http://wordpress.dwbooster.com/galleries/smart-image-gallery 
     7Author URI: https://wordpress.dwbooster.com/galleries/smart-image-gallery 
    88Description: Smart Image Gallery allows to insert images, and pictures, in your blog, directly from the WordPress media library, or eternal images repositories (like: Flickr, Picasa, Instagram, Facebook or Google Images ). The images are searched, and inserted, from the article edition, without importing them to the WordPress media library. 
    99*/ 
     
    1414    function photoshow_get_site_url(){ 
    1515        $url_parts = parse_url(get_site_url()); 
    16         return rtrim(  
     16        return rtrim( 
    1717                        ((!empty($url_parts["scheme"])) ? $url_parts["scheme"] : "http")."://". 
    1818                        $_SERVER["HTTP_HOST"]. 
     
    3434{ 
    3535    $photoshow_obj = new CodePeoplePhotoshow( PHOTOSHOW_PATH.'/modules', PHOTOSHOW_PATH.'/galleries' ); 
    36      
    37     //Initialize the admin panel  
    38     if( !function_exists( "CodePeoplePhotoshow_ap" ) )  
    39     {  
    40         function CodePeoplePhotoshow_ap()  
    41         {  
    42             global $photoshow_obj;  
    43             if (!isset($photoshow_obj))  
    44             {  
    45                 return;  
    46             }  
    47              
    48             if (function_exists('add_options_page'))  
    49             {  
    50                 add_options_page( 'Smart Image Gallery', 'Smart Image Gallery', 'manage_options', basename( __FILE__ ), array( &$photoshow_obj, 'printAdminPage' ) );  
    51             }  
    52         }     
     36 
     37    //Initialize the admin panel 
     38    if( !function_exists( "CodePeoplePhotoshow_ap" ) ) 
     39    { 
     40        function CodePeoplePhotoshow_ap() 
     41        { 
     42            global $photoshow_obj; 
     43            if (!isset($photoshow_obj)) 
     44            { 
     45                return; 
     46            } 
     47 
     48            if (function_exists('add_options_page')) 
     49            { 
     50                add_options_page( 'Smart Image Gallery', 'Smart Image Gallery', 'manage_options', basename( __FILE__ ), array( &$photoshow_obj, 'printAdminPage' ) ); 
     51            } 
     52        } 
    5353    } 
    54      
     54 
    5555    if( isset( $photoshow_obj ) ) 
    5656    { 
    57      
     57 
    5858        // Plugin deactivation 
    5959        register_deactivation_hook( __FILE__, array( &$photoshow_obj, 'deactivePlugin' ) ); 
    60          
     60 
    6161        // Set Actions 
    6262        add_action( 'init', array( &$photoshow_obj, 'init' ), 1 ); 
    6363        add_action( 'admin_enqueue_scripts', array( &$photoshow_obj, 'adminScripts' ), 1 ); 
    6464        add_action( 'media_buttons', array( &$photoshow_obj, 'setPhotoshowButton' ), 100 ); 
     65        add_action( 'enqueue_block_editor_assets', array( &$photoshow_obj, 'gutenbergEditor' ) ); 
    6566        add_action( 'wp_enqueue_scripts', array( &$photoshow_obj, 'loadPhotoshowResources' ), 100 ); 
    6667        add_action( 'admin_menu', 'CodePeoplePhotoshow_ap'); 
    67          
     68 
    6869        // Set Filters 
    6970        $plugin = plugin_basename( __FILE__ ); 
    7071        add_filter( 'plugin_action_links_'.$plugin, array( &$photoshow_obj, 'customizationLink' ) ); 
    7172        add_filter( 'plugin_action_links_'.$plugin, array( &$photoshow_obj, 'settingsLink' ) ); 
    72          
     73 
    7374        // Define shortcode 
    7475        add_shortcode( PHOTOSHOW_SHORTCODE, array(&$photoshow_obj, 'replaceShortcode')); 
Note: See TracChangeset for help on using the changeset viewer.