minimum_capability,
'allioc-changelog',
array( $this, 'changelog_screen' )
);
// Getting Started Page
add_dashboard_page(
__( 'Getting started with Allio', 'Allio' ),
__( 'Getting started with Allio', 'Allio' ),
$this->minimum_capability,
'allioc-getting-started',
array( $this, 'getting_started_screen' )
);
// Credits Page
add_dashboard_page(
__( 'The people that build Allio', 'Allio' ),
__( 'The people that build Allio', 'Allio' ),
$this->minimum_capability,
'allioc-credits',
array( $this, 'credits_screen' )
);
// Now remove them from the menus so plugins that allow customizing the admin menu don't show them
remove_submenu_page( 'index.php', 'allioc-changelog' );
remove_submenu_page( 'index.php', 'allioc-getting-started' );
remove_submenu_page( 'index.php', 'allioc-credits' );
}
/**
* Hide Individual Dashboard Pages
*
* @access public
* @since 0.1
* @return void
*/
public function admin_head() {
?>
welcome_message();
$this->tabs();
?>
welcome_message();
$this->tabs();
?>
welcome_message();
$this->tabs();
?>
contributors();
?>
' . __( 'No valid changelog was found.', 'Allio' ) . '';
} else {
$readme = file_get_contents( $file );
$readme = nl2br( esc_html( $readme ) );
$readme = explode( '== Changelog ==', $readme );
$readme = end( $readme );
$readme = preg_replace( '/`(.*?)`/', '\\1', $readme );
$readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' \\1', $readme );
$readme = preg_replace( '/[\040]\*(.*?)\*/', ' \\1', $readme );
$readme = preg_replace( '/= (.*?) =/', '\\1
', $readme );
$readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '\\1', $readme );
}
return $readme;
}
/**
* Sends user to the Welcome page on first activation of ALLIOC as well as each
* time ALLIOC is upgraded to a new version
*
* @access public
* @since 1.4
* @return void
*/
public function welcome() {
// Bail if no activation redirect
if ( ! get_transient( '_allioc_activation_redirect' ) )
return;
// Delete the redirect transient
delete_transient( '_allioc_activation_redirect' );
// Bail if activating from network, or bulk
// if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
// return;
//$upgrade = get_option( 'allioc_version_upgraded_from' );
//if( ! $upgrade ) { // First time install
wp_safe_redirect( admin_url( 'index.php?page=allioc-getting-started' ) ); exit;
//} else { // Update
// wp_safe_redirect( admin_url( 'index.php?page=allioc-about' ) ); exit;
//}
}
}
new ALLIOC_Welcome();