42 reputation
7
bio website
location
age
visits member for 11 months
seen 2 days ago
stats profile views 5

Jun
3
accepted How to load dynamic option with ajax
Jun
2
comment How to load dynamic option with ajax
Sorry, if I wasn't clear. I meant adding more code than necessary... I'll have another look at wp_localize_script. Maybe the example I've seen wasn't clear enough or I didn't really understand it. At least now I know that seems to be the best way anyway. Thanks for your help.
Jun
2
comment How to load dynamic option with ajax
I find it cumbersome because in order to retrieve a relatively simple data I'll need to create a php function, use add_action and write some js as opposed to simple write some js and retrieve the data. This process will be repeated a few times. Both options have downsides: the wp_localize_script will pollute my application (I'll of course try to concatenate most of the functions together, but maybe not all) whilst creating multiple ajax calls will have a negative impact on performance. However this functionality is for WP admin area only, so won't be public facing.
Jun
2
asked How to load dynamic option with ajax
May
21
awarded  Popular Question
May
6
asked How to minimize WP dashboard menu programmatically?
May
5
awarded  Commentator
May
5
comment Full page (no WP admin menus and options) admin theme options
Ok, it seems getting rid of the admin menu might not be a good idea, but what about a page redirect using javascript? For instance, I could use onclick="window.location.href = http://localhost:8888/wordpress/my_page_here" to redirect the user to a custom page, however how could I include this page into my theme (either built in or self-created upon activating the theme)?
May
4
comment Full page (no WP admin menus and options) admin theme options
It does seems interesting, but what I meant was not fully full screen. I want to keep the browser window. I just don't want the wordpress admin menu items... Thanks for the tip anyway. It might be useful in the next project.
May
4
asked Full page (no WP admin menus and options) admin theme options
Apr
15
comment Using several add_action with parameters inside a class
Thanks dude! Your help was much appreciated indeed! I was struggling with this issue for a couple days now...
Apr
15
accepted Using several add_action with parameters inside a class
Apr
15
comment Using several add_action with parameters inside a class
I apologise! It does work! I must have mistyped something when I copied it initially. One question though, in my __construct, how should I add so many arrays? public function __construct( $enqueued = array(), $another_array = array(), so on so forth? )or should I create an array with nested arrays?
Apr
15
comment Using several add_action with parameters inside a class
This file is being included in the functions.php, so it follows the standard interpretation order, I suppose. I'll create a new file copying literally everything you wrote above and try again. I'll get back to you shortly. Thank you again for your help! Much appreciated
Apr
15
awarded  Editor
Apr
15
revised Using several add_action with parameters inside a class
Improved formatting and added remaining code to give a better understanding of the issue
Apr
15
comment Using several add_action with parameters inside a class
Thanks for your answer Johannes. However the reason I'm using do_action is because the I'm passing a parameter to the function which is enqueuing the scripts. Also, the method that enqueues the scripts is located inside the class, but the data (the array that contains which scripts to enqueue) is being passed only when the object is instantiated in a separate file. I've tried using your method, but it didn't work. I'm posting my full code so you can see what I've done and what might be wrong...
Apr
14
comment Using several add_action with parameters inside a class
The parameters are being created (as arrays with whatever configuration I required for that particular theme only) once the object is instantiated in a separate file. This way I can keep the main application logic separated from configuration data.
Apr
14
asked Using several add_action with parameters inside a class
Mar
16
awarded  Supporter