Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/yapapaya/buddypress-media

  • Loading branch information...
commit 293274f137108de829a6accb942125d99a7337d3 2 parents c2871d1 + 043add6
@joshuaabenazer joshuaabenazer authored
View
31 BPMedia.php → BuddyPressMedia.php
@@ -10,23 +10,17 @@
if ( ! defined( 'ABSPATH' ) )
exit;
-class BPMedia {
+class BuddyPressMedia {
public $text_domain = 'bp-media';
public function __construct() {
- global $bp_text_domain;
- $bp_text_domain = $this->text_domain;
+ global $bpm_text_domain;
+ $bpm_text_domain = $this->text_domain;
}
public function constants() {
- if ( ! defined( 'BP_MEDIA_PATH' ) )
- define( 'BP_MEDIA_PATH', plugin_dir_path( __FILE__ ) );
-
- if ( ! defined( 'BP_MEDIA_URL' ) )
- define( 'BP_MEDIA_URL', plugin_dir_url( __FILE__ ) );
-
/* A constant that can be checked to see if the BP Media is installed or not. */
if ( ! defined( 'BP_MEDIA_IS_INSTALLED' ) )
define( 'BP_MEDIA_IS_INSTALLED', 1 );
@@ -64,19 +58,6 @@ public function constants() {
define( 'BP_MEDIA_AC_API_CATEGORY_ID', '224' );
}
- function __autoload( $class_name ) {
- $rtlibpath = array(
- BP_MEDIA_PATH . 'rtlib/' . $class_name . '.php',
- BP_MEDIA_PATH . 'admin/' . $class_name . '.php',
- BP_MEDIA_PATH . 'includes/' . $class_name . '.php',
- );
- foreach ( $rtlibpath as $i => $path ) {
- if ( file_exists( $path ) ) {
- include $path;
- break;
- }
- }
- }
private function init() {
@@ -90,8 +71,10 @@ private function deactivate() {
}
+ public function autoload_js_css(){
+
+ }
+
}
-global $bp_media;
-$bp_media = new BPMedia();
?>
View
37 index.php
@@ -0,0 +1,37 @@
+<?php
+/*
+Plugin Name: BuddyPress Media
+Plugin URI: http://rtcamp.com/buddypress-media/
+Description: This plugin adds missing media rich features like photos, videos and audios uploading to BuddyPress which are essential if you are building social network, seriously!
+Version: 2.3.2
+Author: rtCamp
+Author URI: http://rtcamp.com
+*/
+
+if ( ! defined( 'BP_MEDIA_PATH' ) )
+ define( 'BP_MEDIA_PATH', plugin_dir_path( __FILE__ ) );
+
+if ( ! defined( 'BP_MEDIA_URL' ) )
+ define( 'BP_MEDIA_URL', plugin_dir_url( __FILE__ ) );
+
+function buddypress_media_autoloader( $class_name ) {
+ $rtlibpath = array(
+ 'app/helper/' . $class_name . '.php',
+ 'app/admin/' . $class_name . '.php',
+ 'app/main/' . $class_name . '.php',
+ 'lib/rtlib/' . $class_name . '.php',
+ );
+ foreach ( $rtlibpath as $i => $path ) {
+ if ( file_exists( $path ) ) {
+ include $path;
+ break;
+ }
+ }
+}
+
+spl_autoload_register('buddypress_media_autoloader');
+
+global $bp_media, $bp_admin;
+$bp_admin = new BPMAdmin();
+$bp_media = new BuddyPressMedia();
+?>
View
9 loader.php
@@ -1,12 +1,5 @@
<?php
-/*
-Plugin Name: BuddyPress Media
-Plugin URI: http://rtcamp.com/buddypress-media/
-Description: This plugin adds missing media rich features like photos, videos and audios uploading to BuddyPress which are essential if you are building social network, seriously!
-Version: 2.3.2
-Author: rtCamp
-Author URI: http://rtcamp.com
-*/
+
/* A constant that can be checked to see if the BP Media is installed or not. */
define('BP_MEDIA_IS_INSTALLED', 1);
View
33 phpunit.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit backupGlobals="false"
- backupStaticAttributes="false"
- colors="true"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- processIsolation="false"
- stopOnFailure="false"
- syntaxCheck="false"
- bootstrap="tests/bootstrap.php"
- >
- <testsuites>
- <testsuite name="BuddyPress Media">
- <directory>./tests/</directory>
- </testsuite>
- </testsuites>
+<phpunit
+ backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="tests/bootstrap.php"
+>
+ <testsuites>
+ <testsuite name="BuddyPress Media">
+ <directory>./tests/</directory>
+ </testsuite>
+ </testsuites>
</phpunit>
Please sign in to comment.
Something went wrong with that request. Please try again.