Genesis', 'ss'), 'http://www.studiopress.com/themes/genesis' ) ); } if( version_compare( $theme_info['Version'], $latest, '<' ) ) { deactivate_plugins(plugin_basename(__FILE__)); // Deactivate ourself wp_die( sprintf( __('Sorry, you cannot activate without Genesis %s or greater', 'ss'), 'http://www.studiopress.com/support/showthread.php?t=19576', $latest ) ); } } /** * Hook into Genesis */ add_action( 'genesis_init', 'ss_genesis_init', 12 ); function ss_genesis_init() { // Define our constants define( 'SS_SETTINGS_FIELD', 'ss-settings' ); define( 'SS_PLUGIN_DIR', dirname( __FILE__ ) ); // required hooks add_action( 'get_header', 'ss_sidebars_init' ); add_action( 'widgets_init', 'ss_register_sidebars' ); if ( !is_admin() ) return; // Include admin files load_plugin_textdomain( 'ss', false, 'genesis-simple-sidebars/languages' ); require_once( SS_PLUGIN_DIR . '/admin.php' ); require_once( SS_PLUGIN_DIR . '/functions.php' ); require_once( SS_PLUGIN_DIR . '/inpost.php' ); require_once( SS_PLUGIN_DIR . '/term.php' ); // let the child theme hook the genesis_simple_sidebars_taxonomies filter before hooking term edit add_action( 'init', 'ss_term_edit_init' ); } /** * This function registers the created sidebars */ function ss_register_sidebars() { $_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) ); if ( !$_sidebars ) return; foreach ( (array)$_sidebars as $id => $info ) { register_sidebar(array( 'name' => esc_html( $info['name'] ), 'id' => $id, 'description' => esc_html( $info['description'] ), 'editable' => 1, 'before_widget' => '
\n", 'before_title' => '