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

delete_dash_tile()

Parameters

ColumnTypeDefaultDescription
$tile
$cascade true
$force false

Location

include/dash_functions.php lines 200 to 211

Definition

 
function delete_dash_tile($tile,$cascade=true,$force=false)
    {
    
#Force Delete ignores the allow_delete flag (This allows removal of config tiles)
    
$allow_delete $force"":"AND allow_delete=1";
    
ps_query("DELETE FROM dash_tile WHERE ref= ? ".$allow_delete, ['i'$tile]);
    if(
$cascade)
        {
        
ps_query("DELETE FROM user_dash_tile WHERE dash_tile= ?", ['i'$tile]);
        
ps_query("DELETE FROM usergroup_dash_tile WHERE dash_tile = ?", ['i'$tile]);
        }
    
hook('after_delete_dash_tile''', array($tile$cascade $force));
    }

This article was last updated 19th March 2024 07:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.