function __construct($plugin_file_path) { parent::__construct($plugin_file_path); do_action('dreamspeed_init', $this); if (is_admin()) { do_action('dreamspeed_admin_init', $this); } add_action('admin_menu', array($this, 'admin_menu')); $this->plugin_permission = 'manage_options'; $this->plugin_vars = array('access_key_id', 'secret_access_key'); $this->plugin_title = __('DreamSpeed CDN', 'dreamspeed-cdn'); $this->plugin_menu_title = __('DreamSpeed', 'dreamspeed-cdn'); }
function __construct($plugin_file_path, $dos) { parent::__construct($plugin_file_path); $this->aws = $dos; add_action('aws_admin_menu', array($this, 'admin_menu')); $this->plugin_vars = array('bucket', 'virtual-host', 'expires', 'permissions', 'cloudfront', 'object-prefix', 'copy-to-s3', 'serve-from-s3', 'remove-local-file', 'force-ssl', 'fullspeed', 'hidpi-images', 'object-versioning'); $this->plugin_title = __('DreamSpeed CDN Configuration', 'dreamspeed-cdn'); $this->plugin_menu_title = __('CDN', 'dreamspeed-cdn'); $this->plugin_slug = 'dreamspeed-media'; add_action('wp_ajax_dreamspeed-create-bucket', array($this, 'ajax_create_bucket')); if ($this->is_plugin_setup() && $this->get_setting('copy-to-s3') == 1 && get_option('dreamspeed_importer') != 1 && !defined('WP_IMPORTING')) { add_filter('wp_get_attachment_url', array($this, 'wp_get_attachment_url'), 9, 2); add_filter('wp_generate_attachment_metadata', array($this, 'wp_generate_attachment_metadata'), 20, 2); add_filter('delete_attachment', array($this, 'delete_attachment'), 20); } add_filter('manage_media_columns', array($this, 'media_column')); add_action('manage_media_custom_column', array($this, 'media_column_content'), 10, 2); }