Author URI: http://ipublicis.com/
Donate link: http://smsh.me/7kit
License: GNU GPL v3 or later
Copyright (C) 2010-2012 iPublicis!COM
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 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, see .
*/
/**
* Check if the framework plugin is active
*/
if( is_admin() ) {
$required_plugin = 'wordpress-plugin-framework-reloaded/wordpress-plugin-framework-reloaded.php';
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( ! is_plugin_active( $required_plugin ) ) {
deactivate_plugins( plugin_basename( __FILE__ ) );
$wpfr = 'Wordpress Plugin Framework Reloaded';
$dieMessage = sprintf( __( 'The %s plugin must be installed and active, so this plugin was also deactivated.', 'author-box-2' ), $wpfr );
$notice = "
Author Box Reloaded
\n".
"
".$dieMessage."
\n
\n";
add_action( 'admin_notices', create_function( '', "echo '$notice';" ) );
}
}
/**
* Load the framework file
*/
require_once( WP_PLUGIN_DIR . '/wordpress-plugin-framework-reloaded/wordpress-plugin-framework-reloaded.php' );
/**
* Where you put all your class code
*/
class authorBox extends WordpressPluginFrameworkReloaded {
/**
* @var authorBox - Static property to hold our singleton instance
*/
static $instance = false;
/**
* @array _known_sites - Author's social links defined by external plugins. Incl. plugins are for Twitter, Identi.ca, Facebook and Netlog
*/
protected function _init() {
include_once('authorbox-init.php');
}
protected function _postSettingsInit() {
if ( $this->_settings['ab2']['auto_insert'] == 'yes' ) {
add_filter('the_content', array( $this, 'authorbox_auto_display' ) );
} else {
add_shortcode( $this->_slug, array( $this, 'authorbox_display' ) );
}
}
public function addOptionsMetaBoxes() {
add_meta_box( $this->_slug . '-general-settings', __('General Settings', $this->_slug), array($this, 'generalSettingsMetaBox'), $this->_slug, 'main');
add_meta_box( $this->_slug . '-other-settings', __('Other Ways to Use It', $this->_slug), array($this, 'otherSettingsMetaBox'), $this->_slug, 'main');
add_meta_box( $this->_slug . '-visual-settings', __('Visual Settings', $this->_slug), array($this, 'visualSettingsMetaBox'), $this->_slug, 'main');
add_meta_box( $this->_slug . '-personal-settings', __('Personal Settings', $this->_slug), array($this, 'personalSettingsMetaBox'), $this->_slug, 'main');
}
public function generalSettingsMetaBox() {
?>
_slug); ?>
_settings['ab2']['auto_insert']) ?>>
_slug);?>
_slug);?>
_settings['ab2']['photo_align']) ?>>
_slug);?>
_slug);?>
don't support your modifications.", $this->_slug);?>
_slug);?>
_slug);?>
_slug);?>
_slug); ?><?php if (function_exists('wp_authorbox')) echo wp_authorbox(); ?>
' .'- ' . __("More at ", $this->_slug) . '
'
. $socialcontent
.'
' .'