dir = plugin_dir_path( __FILE__ ); $this->url = plugin_dir_url( __FILE__ ); require dirname( __FILE__ ) . "/inc/authors-table.php"; require dirname( __FILE__ ) . "/inc/query-manipulation.php"; $this->query_manipulation = new QueryManipulation( $this ); require dirname( __FILE__ ) . "/inc/meta-box.php"; $this->meta_box = new MetaBox( $this ); require dirname( __FILE__ ) . "/inc/user.php"; $this->user = new User( $this ); require dirname( __FILE__ ) . "/inc/render.php"; $this->render = new Render( $this ); require dirname( __FILE__ ) . "/inc/migrate.php"; $this->migrate = new Migrate( $this ); require dirname( __FILE__ ) . "/inc/update.php"; $this->update = new Update( $this ); /** * on activate or deactivate plugin */ register_activation_hook(__FILE__, array($this, "activation")); register_deactivation_hook(__FILE__, array($this, "deactivation")); } /** * get the additions authors user ids * * @param null|int $post_id * * @return array */ public function get_ids( $post_id = null ) { return Table\get_author_ids($post_id); } /** * Add an unguessable string to end * * @return string */ public function generateUnguessableString() { return bin2hex( openssl_random_pseudo_bytes( 20 ) ); } /** * generate a strong password * @return string */ public function generatePassword() { return wp_generate_password( 20, true ); } /** * on plugin activation */ function activation(){ install(); } /** * on plugin deactivation */ function deactivation(){ } } /** * init plugin and make it accessible */ Plugin::get_instance(); require_once dirname( __FILE__ ) . "/public-functions.php";