Beispiel #1
0
 /**
  * Initializes the plugin object and returns its instance
  *
  * @param string $__FILE__ the main plugin file's __FILE__ value
  * @return object the plugin object instance
  */
 public static function get_instance($__FILE__ = null)
 {
     if (!isset(self::$instance)) {
         self::$instance = new self($__FILE__);
     }
     return self::$instance;
 }
Beispiel #2
0
 public function plugins_loaded()
 {
     if (!$this->passes()) {
         remove_action('init', array(GifDrop_Plugin::get_instance(), 'init'));
         if (current_user_can('activate_plugins')) {
             add_action('admin_init', array($this, 'admin_init'));
             add_action('admin_notices', array($this, 'admin_notices'));
         }
     }
 }
Beispiel #3
0
	<title><?php 
echo esc_html(GifDrop_Plugin::get_instance()->get_site_name());
?>
</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<?php 
wp_print_scripts(array('gifdrop'));
?>
	<?php 
wp_print_styles(array('gifdrop'));
?>
</head>
<body>
	<div id="outer-wrapper">
		<noscript><?php 
_e('JavaScript needs to be enabled.');
?>
</noscript>
	</div>
	<div id="modal"></div>
	<div id="upload-overlay"><i class="dashicons dashicons-update"></i></div>
	<?php 
include GifDrop_Plugin::get_instance()->get_path() . 'templates/backbone.php';
?>
	<script>gifdropApp.init();</script>
	<?php 
do_action('gifdrop_post_init');
?>
</body>
</html>
Beispiel #4
0
 function plugin()
 {
     return GifDrop_Plugin::get_instance();
 }
Beispiel #5
0
Description: Creates a repository page for all your animated gifs.
Version: 0.9.0-beta-2
Author: Mark Jaquith and Andrew Norcross
Author URI: http://gifdrop.com/
Text Domain: gifdrop
Domain Path: /languages
*/
/*
Copyright 2014 Mark Jaquith, Andrew Norcross

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
defined('WPINC') or die;
// Pull in the plugin classes and initialize
include dirname(__FILE__) . '/classes/plugin.php';
GifDrop_Plugin::get_instance(__FILE__);
// Pull in the version checker and initialize
include dirname(__FILE__) . '/classes/version-check.php';
GifDrop_Version_Check::get_instance();
Beispiel #6
0
<?php

defined('WPINC') or die;
?>

<script type="text/html" id="tmpl-gif">
<img data-original="{{data.static}}" width="{{data.imgWidth}}" height="{{data.imgHeight}}" />
</script>

<script type="text/html" id="tmpl-nav">
<h1><?php 
echo esc_html(GifDrop_Plugin::get_instance()->get_site_name());
?>
</h1>
<input class="search" type="text" placeholder="<?php 
_e('Search&hellip;', 'gifdrop');
?>
" />
</script>

<script type="text/html" id="tmpl-empty">
<p><?php 
_e('Drag gifs here to add them to your collection', 'gifdrop');
?>
</p>
</script>

<script type="text/html" id="tmpl-single">
	<a href="#" class="dashicons dashicons-dismiss"></a>
	<div class="modal-content-inner">
		<div data-clipboard-text="{{data.src}}" class="copy-to-clipboard" style="width:{{data.width}}px">