array(
'org' => true, //WordPress.org environment
'com' => false, //WordPress.com environment
),
'primary' => array(
'adminstyles' => true,
'customizer' => true,
'fonts' => true,
'meta' => false,
'widgets' => true,
'suggest-plugins' => false
),
'comments' => array(
'posts' => true,
'pages' => false,
'portfolio' => false,
)
);
return apply_filters('themeora_theme_config_args', $args);
}
add_action('themeora_init', 'themeora_feature_setup');
} //END if ( !function_exists( 'themeora_feature_setup' ) )
// FEATURE SETUP RETURN
/* --------------------------------------------------------------------- */
function themeora_theme_supports( $group, $feature ) {
$setup = themeora_feature_setup();
if ( isset( $setup[$group][$feature] ) && $setup[$group][$feature] )
return true;
else {
}
}
/* LOAD FRAMEWORK
/* --------------------------------------------------------------------- */
function themeora_load_framework() {
/* Load specific functionality for .org or .com environments */
if ( themeora_theme_supports('wordpress', 'org') ) {
if( file_exists( get_template_directory() . '/inc/wporg.php' ) ) {
require_once( get_template_directory() . '/inc/wporg.php' );
}
}
if ( themeora_theme_supports('wordpress', 'com') ) {
if( file_exists( get_template_directory() . '/inc/wpcom.php' ) ) {
require_once( get_template_directory() . '/inc/wpcom.php' );
}
}
// Load Widgets
if ( themeora_theme_supports('primary', 'widgets') ) {
include( THEMEORA_WIDGETS_DIR . '/widget-video.php' );
}
// Theme customizer
if ( themeora_theme_supports('primary', 'customizer' )) {
require( THEMEORA_CUSTOMIZER_DIR . '/themeora-customizer.php' );
} //END if( themeora_theme_supports( 'primary', 'customizer' ))
// Load custom editor style
add_action( 'admin_enqueue_scripts', 'themeora_add_editor_styles' );
function themeora_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
}
add_action( 'themeora_init', 'themeora_load_framework' );
/* Run the init hook */
do_action( 'themeora_init' );
/**
* Adds the required text to the footer for WordPress.com
*/
function themeora_filter_footer_text() {
$theme_name = wp_get_theme();
//$output = '' . sprintf( __( 'Proudly powered by %s', 'oren' ), 'WordPress' ). '';
$output = sprintf( __( 'Proudly powered by %s', 'oren' ), 'WordPress' );
$output .= ' | ';
$output .= sprintf( __( 'Theme: %1$s by %2$s.', 'oren' ), $theme_name, 'Themeora' );
return $output;
}
add_filter( 'themeora_footer_text', 'themeora_filter_footer_text' );
/* end themeora framework */