Skip to content

Commit

Permalink
Merge pull request humanmade#2 from humanmade/readme
Browse files Browse the repository at this point in the history
Add Readme
  • Loading branch information
mattheu committed Jul 2, 2015
2 parents f50efb7 + 6e1971b commit 734506e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 114 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# MEXP-Resource-Space
WordPress Media Explorer ResourceSpace extension

## Setup

You must define the following settings. It is reccommended that this is added to your `wp-config.php` file.

````php
define( 'PJ_RESOURCE_SPACE_DOMAIN', 'http://HumanMade:[email protected]' );
define( 'PJ_RESOURCE_SPACE_KEY', 'T2B7dGlIdWFiaTY3NXcmImRgcTAzIWJhP3MicTRnLWA3IDIxZiBzJGM1' );
````

Additionally, if your resourcespace install is behind basic auth, add the following.

````php
define( 'PJ_RESOURCE_SPACE_AUTHL', 'HumanMade' );
define( 'PJ_RESOURCE_SPACE_AUTHP', 'errAnOadDeshCeyd' );
````
12 changes: 12 additions & 0 deletions inc/class-resource-space-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@ public static function get_instance() {
}

public function setup_actions() {

add_action( 'admin_menu', array( $this, 'admin_menu' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'ajax_query_attachments_args', array( $this, 'ajax_query_attachments_args' ) );

if ( ! defined( 'PJ_RESOURCE_SPACE_DOMAIN' ) || ! defined( 'PJ_RESOURCE_SPACE_KEY' ) ) {

add_action( 'admin_notices', function() { ?>
<div class="error">
<p><?php _e( 'You must define the resource space domain and API key in your wp-config.php. See readme for more details.', 'resourcespace' ); ?></p>
</div>
<?php } );

}

}

function admin_menu() {
Expand Down
114 changes: 0 additions & 114 deletions readme.txt

This file was deleted.

0 comments on commit 734506e

Please sign in to comment.