Postsynaptic scaffolding protein that plays a critical role in synaptogenesis and synaptic plasticity by providing a platform for the postsynaptic clustering of crucial synaptic proteins. Interacts with the cytoplasmic tail of NMDA receptor subunits and shaker-type potassium channels. Required for synaptic plasticity associated with NMDA receptor signaling. Overexpression or depletion of DLG4 changes the ratio of excitatory to inhibitory synapses in hippocampal neurons. May reduce the amplitude of ASIC3 acid-evoked currents by retaining the channel intracellularly. May regulate the intracellular trafficking of ADR1B. Also regulates AMPA-type glutamate receptor (AMPAR) immobilization at postsynaptic density keeping the channels in an activated state in the presence of glutamate and preventing synaptic depression (By similarity). Under basal conditions, cooperates with FYN to stabilize palmitoyltransferase ZDHHC5 at the synaptic membrane through FYN-mediated phosphorylation of ZDHHC5 and its subsequent inhibition of association with endocytic proteins (PubMed:26334723). . This is the function of DLG4 (discs large MAGUK scaffold protein 4, Ensembl gene identifier ENSG00000132535).