private function s3($S3_bucket = null) { if (isset(self::$s3)) { if (isset($S3_bucket) && self::$s3->current_bucket() !== $S3_bucket) { self::$s3->set_current_bucket($S3_bucket); } return self::$s3; } if (self::$options) { $s3 = S3_helper::get_instance(); $s3->init(isset(self::$options['access_key']) ? self::$options['access_key'] : null, isset(self::$options['secret_key']) ? self::$options['secret_key'] : null, isset(self::$options['region']) ? self::$options['region'] : null); if ($s3 && isset($S3_bucket)) { $s3->set_current_bucket($S3_bucket); } self::$s3 = $s3; return $s3; } return false; }
public function init() { self::$options = $this->get_option(); $this->plugin_basename = NephilaClavata::plugin_basename(); }
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ if (!class_exists('S3_helper')) { require dirname(__FILE__) . '/includes/class-S3_helper.php'; } if (!class_exists('NephilaClavata_Admin')) { require dirname(__FILE__) . '/includes/class-NephilaClavata_Admin.php'; } if (!class_exists('NephilaClavata')) { require dirname(__FILE__) . '/includes/class-NephilaClavata.php'; } load_plugin_textdomain(NephilaClavata::TEXT_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/languages/'); // Go Go Go! $nephila_clavata = NephilaClavata::get_instance(); $nephila_clavata->init(NephilaClavata_Admin::get_option()); $nephila_clavata->add_hook(); if (is_admin()) { $nephila_clavata_admin = NephilaClavata_Admin::get_instance(); $nephila_clavata_admin->init(); $nephila_clavata_admin->add_hook(); }