示例#1
0
function add_notify_create_wish()
{
    $complete = __('Your wish was created');
    $int_failed = __('You have some problems with creating your wish! Try again!');
    $void = __('The title, the sum and the content in the form must be filled');
    $goal = __('The sum must be integer and less than $1 000 000');
    $images_fail = __('There is an error in uploading the image or you have not permission to upload the image! But your wish was created!');
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'wish_completed') {
        rcl_notice_text($complete, 'success');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'wish_failed') {
        rcl_notice_text($int_failed, 'warning');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'wish_void') {
        rcl_notice_text($void, 'warning');
    }
    if (isset($_GET['int-message']) && sanitize_text_field($_GET['int-message']) == 'goal_failed') {
        rcl_notice_text($goal, 'warning');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'images_fail') {
        rcl_notice_text($images_fail, 'warning');
    }
}
示例#2
0
function rcl_notice_avatar_deleted()
{
    if (isset($_GET['rcl-avatar']) && $_GET['rcl-avatar'] == 'deleted') {
        rcl_notice_text(__('Your avatar has been removed', 'wp-recall'), 'success');
    }
}
示例#3
0
function rcl_new_group()
{
    global $user_ID, $wpdb;
    $name_group = sanitize_text_field($_POST['rcl_group']['name']);
    $group_id = rcl_create_group(array('name' => $name_group, 'admin_id' => $user_ID));
    if (!$group_id) {
        rcl_notice_text(__('Create a group failed', 'wp-recall'), 'error');
    } else {
        wp_redirect(get_term_link((int) $group_id, 'groups'));
        exit;
    }
}
function add_notify_rcl($text, $type = 'warning')
{
    _deprecated_function('add_notify_rcl', '4.2', 'rcl_notice_text');
    return rcl_notice_text($text, $type);
}
示例#5
0
function add_notify_update_profile()
{
    $complete = 'Transfer completed';
    $int_failed = 'The amount that can be transferred must be: integer, should be more than a zero, do not exceed the maximum amount possible for transfer.';
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'transfer_completed') {
        rcl_notice_text($complete, 'success');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'int_failed') {
        rcl_notice_text($int_failed, 'warning');
    }
}
示例#6
0
function rcl_deleted_post_notice()
{
    if (isset($_GET['public']) && $_GET['public'] == 'deleted') {
        rcl_notice_text(__('The publication has been successfully removed!', 'wp-recall'), 'warning');
    }
}
示例#7
0
function add_notify_update_wish()
{
    $complete = __('Updating completed');
    $goal = __('The sum must be integer and less than $1 000 000');
    $void = __('The title, the sum and the content in the form must be filled');
    $int_failed = 'The amount that can be transferred must be: integer, should be more than a zero, do not exceed the maximum amount possible for transfer.';
    $images_fail = __('There is an error in uploading the image or you have not permission to upload the image! But your wish was created!');
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'wish_updated') {
        rcl_notice_text($complete, 'success');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'int_failed') {
        rcl_notice_text($int_failed, 'warning');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'wish_void') {
        rcl_notice_text($void, 'warning');
    }
    if (isset($_GET['int-message']) && sanitize_text_field($_GET['int-message']) == 'goal_failed') {
        rcl_notice_text($goal, 'warning');
    }
    if (isset($_GET['kp-message']) && sanitize_text_field($_GET['kp-message']) == 'images_fail') {
        rcl_notice_text($images_fail, 'warning');
    }
}
function rcl_delete_file_notice()
{
    if (isset($_GET['file']) && ($_GET['file'] = 'deleted')) {
        rcl_notice_text(__('File has deleted', 'wp-recall'), 'success');
    }
}