/** * Add upload support for natively unsupported mimetypes used by this plugin * * @since 2.4.0.1 * @return array Updated array of allowed upload types */ function gde_upload_mimes($existing_mimes = array()) { $supported_exts = gde_supported_types(); foreach ($supported_exts as $ext => $mimetype) { if (!array_key_exists($ext, gde_mimes_expanded($existing_mimes))) { $existing_mimes[$ext] = $mimetype; } } return gde_mimes_collapsed($existing_mimes); }
/** * Returns array of all extensions supported by Google Doc Embedder plugin. * Should not be called before verifying has_google_embedder(). * * @return array - all exts supported by Google Doc Embedder plugin. */ public static function get_google_embedder_exts() { return array_keys(gde_supported_types()); }
* * @package google-document-embedder * @author Kevin Davis <*****@*****.**> * @copyright Copyright 2014 Kevin Davis * @license http://www.gnu.org/licenses/gpl.txt GPL 2.0 * @link https://wordpress.org/plugins/google-document-embedder/ */ // boring init junk $gde_ver = "2.6"; $gde_db_ver = "1.2"; // update also in gde_activate() require_once plugin_dir_path(__FILE__) . 'functions.php'; global $wp_version; $pdata = gde_get_plugin_data(); $gdeoptions = get_option('gde_options'); $gdetypes = gde_supported_types(); // check for db health $healthy = gde_debug_tables(); // add admin functions only if needed if (is_admin()) { require_once GDE_PLUGIN_DIR . 'functions-admin.php'; } // get global settings - not implemented in this release /* if ( is_multisite() ) { $gdeglobals = get_site_option( 'gde_globals' ); } */ // activate plugin, allow clear dx log on deactivate register_activation_hook(__FILE__, 'gde_activate'); register_deactivation_hook(__FILE__, 'gde_deactivate');