Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

add_user_dash_tile()

Parameters

ColumnTypeDefaultDescription
$user
$tile
$order_by
$reorder true

Location

include/dash_functions.php lines 924 to 937

Definition

 
function add_user_dash_tile($user,$tile,$order_by,$reorder=true)
    {
    if(!
is_numeric($user)||!is_numeric($tile)){return false;}
    if(!
is_numeric($order_by))
        {
        
$order_by=append_user_position($user);
        
$reorder=false;
        }
        
    
ps_query("INSERT INTO user_dash_tile (user,dash_tile,order_by) VALUES (?, ?, ?)  ON DUPLICATE KEY UPDATE order_by= ?", ['i'$user'i'$tile'i'$order_by'i'$order_by]);
        
    if(
$reorder){reorder_user_dash($user);}
    return 
true;
    }

This article was last updated 22nd July 2024 21:35 Europe/London time based on the source file dated 4th July 2024 10:05 Europe/London time.