git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@90 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
60 lines
1.5 KiB
PHP
60 lines
1.5 KiB
PHP
<?php
|
|
/*
|
|
Plugin Name: BP Dedication
|
|
Plugin URI:
|
|
Description:
|
|
Version: 1.0
|
|
Author:
|
|
Author URI:
|
|
*/
|
|
define( 'BP_DEDICATION_VER', '1.0' );
|
|
define( 'BP_DEDICATION_DB_VER', '1.0' );
|
|
define( 'BP_DEDICATION_PLUGIN_DIR', dirname( __FILE__ ) );
|
|
|
|
if ( !defined( 'BP_DEDICATION_SLUG' ) )
|
|
define( 'BP_DEDICATION_SLUG', 'dedications' );
|
|
|
|
if ( !defined( 'DEDICATION_CATEGORY_SLUG' ) )
|
|
define( 'DEDICATION_CATEGORY_SLUG', 'dedication' );
|
|
|
|
|
|
register_activation_hook( __FILE__, 'bp_dedication_activation' );
|
|
|
|
/* Only load the BuddyPress plugin functions if BuddyPress is loaded and initialized. */
|
|
function bp_dedication_init() {
|
|
|
|
require( dirname( __FILE__ ) . '/functions.php' );
|
|
|
|
if ( function_exists( 'bp_is_active' ) ) {
|
|
require( dirname( __FILE__ ) . '/dedication.php' );
|
|
}
|
|
|
|
/*require( dirname( __FILE__ ) . '/by-email/by-email.php' );*/
|
|
|
|
/*if ( is_admin() )
|
|
require( dirname( __FILE__ ) . '/admin/admin-panel.php' );*/
|
|
}
|
|
add_action( 'bp_include', 'bp_dedication_init' );
|
|
|
|
function bp_dedication_locale_init () {
|
|
$plugin_dir = basename(dirname(__FILE__));
|
|
$locale = get_locale();
|
|
$mofile = plugins_url("languages/bp-dedication-$locale.mo",__FILE__);
|
|
|
|
if ( file_exists( $mofile ) )
|
|
load_textdomain( 'bp-dedication', $mofile );
|
|
}
|
|
add_action ('plugins_loaded', 'bp_dedication_locale_init');
|
|
|
|
function bp_dedication_activation() {
|
|
if ( !$iaoptions = get_option( 'bp_dedication' ) )
|
|
$iaoptions = array();
|
|
|
|
|
|
$iaoptions['version'] = BP_INVITE_ANYONE_VER;
|
|
|
|
update_option( 'bp_dedication', $iaoptions );
|
|
}
|
|
|
|
?>
|