Plugin Directory

Changeset 1483841


Ignore:
Timestamp:
08/26/2016 09:10:46 AM (10 years ago)
Author:
Blrt
Message:

UPDATE VIA SCRIPT, VERSION 1.1.0

Location:
blrt-wp-embed
Files:
35 added
2 edited

Legend:

Unmodified
Added
Removed
  • blrt-wp-embed/trunk/blrt-wp-embed.php

    r1220553 r1483841  
    33* Plugin Name: Blrt WP Embed
    44* Plugin URI: http://www.blrt.com/wordpress-plugin
    5 * Description: Enable embedding Blrts in your pages and posts by simply pasting in the URL of a public or private Blrt - just like YouTube videos are embedded utilising oEmbed.
    6 * Version: 1.0.1
     5* Description: Enable Blrts and Blrt Galleries in your pages and posts - just like YouTube videos.
     6* Version: 1.1.0
    77* Author: Blrt
    88* Author URI: http://www.blrt.com
     
    1010*/
    1111
    12 /* Copyright 2015  Blrt Operations Pty Ltd  (email : support@blrt.com)
     12/* Copyright 2016  Blrt Operations Pty Ltd  (email : support@blrt.com)
    1313
    1414   This program is free software; you can redistribute it and/or modify
     
    2727
    2828defined( 'ABSPATH' ) or die( 'No direct access to this file' );
     29global $jal_db_version;
     30$jal_db_version = '1.0';//add version number for the table in case we need to update the structure of table later
    2931
    3032class BlrtWPEmbed {
    3133    public function __construct() {
    3234        add_action( 'init', array( $this, 'init' ) );
     35        add_action( 'admin_menu', array( $this, 'wpa_add_menu' ));
     36        add_action( 'admin_enqueue_scripts', array( $this, 'wpa_styles') );
     37        register_activation_hook( __FILE__, array( $this, 'wpa_install' ) );
     38        register_deactivation_hook( __FILE__, array( $this, 'wpa_uninstall' ) );
    3339    }
    3440   
    3541    public function init() {
    3642        $this->add_oembed_providers();
     43        include dirname( __FILE__ ).'/shortcode/shortcode.php';
     44    }
     45   
     46    function wpa_add_menu() {
     47
     48        add_menu_page( 'Blrt gallery', 'Blrt Gallery' , 'nosuchcapability', 'blrt-wp-gallery', null, '' ,'5.5');
     49
     50        add_submenu_page( 'blrt-wp-gallery', 'Blrt galllery', 'All Galleries', 'manage_options', 'blrt-wp-gallery-all', array(
     51                              __CLASS__,
     52                             'show_all'
     53                            ));
     54        add_submenu_page( 'blrt-wp-gallery', 'Blrt gallery', 'Add New', 'manage_options', 'blrt-wp-gallery-add', array(
     55                              __CLASS__,
     56                             'add_new'
     57                            ));
     58        // add_submenu_page( 'blrt-wp-gallery', 'Blrt gallery', 'Settings', 'manage_options', 'blrt-wp-gallery-settings', array(
     59        //                       __CLASS__,
     60        //                      'setting'
     61        //                     ));
     62       
     63    }
     64
     65    function wpa_styles(){
     66        wp_enqueue_script('jquery');
     67        wp_enqueue_style( 'blrt-wp-embed', plugins_url('css/blrt-wp-embed-style.css', __FILE__));
     68        wp_enqueue_script( 'blrt-wp-embed', plugins_url('js/blrt-wp-embed-script.js', __FILE__));
     69       
     70    }
     71   
     72    function show_all(){
     73        include dirname( __FILE__ ).'/includes/blrt-wp-gallery-all.php';
     74    }
     75   
     76    function add_new(){
     77        include dirname( __FILE__ ).'/includes/blrt-wp-gallery-add.php';
     78    }
     79   
     80    function setting(){
     81        include dirname( __FILE__ ).'/includes/blrt-wp-gallery-settings.php';
    3782    }
    3883   
     
    57102        ) );
    58103    }
     104   
     105    function wpa_install () {//intialise the table blrtwpembed
     106       global $wpdb;
     107       global $jal_db_version;
     108       
     109       $table_name = $wpdb->prefix . "blrtwpembed";
     110       
     111       $charset_collate = $wpdb->get_charset_collate();
     112       
     113       $sql = "CREATE TABLE $table_name (
     114          id mediumint(9) NOT NULL AUTO_INCREMENT,
     115          time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
     116          name tinytext NOT NULL,
     117          title tinytext,
     118          url text DEFAULT '' NOT NULL,
     119          UNIQUE KEY id (id)
     120        ) $charset_collate;";
     121       
     122        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     123        dbDelta( $sql );
     124        add_option( 'jal_db_version', $jal_db_version );
     125    }
     126   
     127    function wpa_uninstall(){
     128       
     129    }
     130   
    59131
    60132    private function get_convertible_short_servers() {
     
    67139        return apply_filters( 'blrt_wp_embed_oembed_server', 'e.blrt.com' );
    68140    }
     141   
     142   
    69143}
    70144
  • blrt-wp-embed/trunk/readme.txt

    r1220553 r1483841  
    33Tags: Blrt,Embed,oembed
    44Requires at least: 2.9
    5 Stable tag: 1.0.1
    6 Tested up to: 4.2
     5Stable tag: 1.1.0
     6Tested up to: 4.6
    77License: GPL2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1111
    1212== Description ==
    13 Enable embedding Blrts in your WordPress pages and posts by simply pasting in the URL of a public or private Blrt - just like YouTube videos are embedded utilising oEmbed.
     13<ul>
     14<li>Enable embedding Blrts in your WordPress pages and posts by simply pasting in the URL of a public or private Blrt - just like YouTube videos are embedded utilising oEmbed.
     15<li>Create Blrt Galleries with multiple Blrts and embed them in any web page.
     16</ul>
    1417
    15 Check out all things Blrt at https://www.blrt.com
    16 For support visit http://help.blrt.com
    17 Download Blrt for iOS at http://www.blrt.com/ios
    18 Download Blrt for Android at http://www.blrt.com/android
     18All things Blrt
     19<ul>
     20<li>Learn all about Blrt at https://www.blrt.com
     21<li>For support visit http://help.blrt.com
     22<li>Download Blrt for iOS at http://www.blrt.com/ios
     23<li>Download Blrt for Android at http://www.blrt.com/android
     24</ul>
    1925
    2026== Frequently Asked Questions ==
Note: See TracChangeset for help on using the changeset viewer.