New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom flash_message messages #881

Sama34 opened this Issue Jul 5, 2014 · 0 comments


None yet
1 participant

Sama34 commented Jul 5, 2014

With the following modification plug-in aturhos would be able to add custom alerts as follows.

$plugins->add_hook('admin_page_output_header', 'helloworld_admin_page_output_header');

function helloworld_admin_page_output_header()
    global $helloworld, $page;

    $message = 'Hello World! is up-to-date. Congratulations!';
    $type = 'success';

    if($helloworld->requires_update == true)
        $message = 'Hello World! plug-in needs to be updated. Please click here to update the plug-in.';
        $type = 'error';

    $page->extra_messages['helloworld'] = array('message' => $message, 'type' => $type);


@Sama34 Sama34 added this to the 1.8 Beta 3 milestone Jul 5, 2014

@Sama34 Sama34 self-assigned this Jul 5, 2014

@Sama34 Sama34 added fixed and removed feedback labels Jul 9, 2014

@Sama34 Sama34 closed this Jul 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment