WP_LOCALIZE_SCRIPT doesn’t work

You have to use the correct handle: wp_localize_script(‘page_data’, ‘glr_dt’, $gallery_js_data_array); // Edit Your code is also wrong. What do you want to do in this line: ‘maxPages’ => ‘$gallery_max_load = $gallery->max_num_pages;’ You are assigning a string to maxPages. I guess you want it that way (or similar): ‘maxPages’ => $gallery->max_num_pages, Now, you can access the … Read more

How Can I setup WP CLI on Windows development machine running AMPPS?

Installing wp-cli through Composer is the way to go. For instance: $ cd C:\ $ composer create-project wp-cli/wp-cli –no-dev Copy the path to the bin directory inside the wp-cli directory (something along the lines of C:\wp-cli\bin) Add copied path to the Windows Path variable (tutorial) Exit all CMD’s (or git bash) and reopen them. Now … Read more