I have a jQuery function that is run from a WordPress parent, admin-theme. It looks like this:
jQuery(document).ready(function(){
var DIV_SIZE = [
['1/4','element1-4',1/4,['Column','Gallery','Content','Page']],
['1/3','element1-4',1/4,['Column','Gallery','Content','Page']],
];
}
I need to add an additional value: ,'blog'
like so but do it from the functions.php file in my child theme:
jQuery(document).ready(function(){
var DIV_SIZE = [
['1/4','element1-4',1/4,['Column','Gallery','Content','Page','blog']],
['1/4','element1-4',1/4,['Column','Gallery','Content','Page','blog']],
];
}
How can I append DIV_SIZE?
This js snippet will add ‘blog’ entry to each DIV_SIZE embeded array:
But still i don’t understand why you don’t just add it if its a static value directly when assigning DIV_SIZE variable.