How to call plugin path in JS?

Use wp_localize_script() to pass any kind of data to your loaded scripts, in this case we need plugins_url(): wp_enqueue_script(‘my-script’, get_stylesheet_directory_uri() . ‘/js/my-script.js’); wp_localize_script(‘my-script’, ‘myScript’, array( ‘pluginsUrl’ => plugins_url(), )); Now you will have access to myScript.pluginsUrl in your script file: var href = myScript.pluginsUrl + ‘/path/to/resource’;

Ship plugin with a custom theme

The user decides To answer your last question first: I tried adding the plugin inside the theme plugin folder […] What am I doing wrong? You are trying to bundle functionality into a theme. That is the wrong thing in the first place. Themes offer presentation – Plugins offers functionality. Aside from that, functionality should … Read more

Where can I propose a new plugin?

I’d suggest jobs.wordpress.net. It’s a job listing site for freelance WordPress development. Just be very clear that you aren’t offering any pay for the project. Alternatively, you can also suggest things in the official WordPress forums: Requests and Feedback. One third option is to mention it to someone on the WP-Hackers mailing list.

Using nextGen Gallery.. how can I call a list of all Gallery Names?

All your Galleries are stored a table called wp_ngg_gallery in your wordpress database. (For the sake of completeness: nextGen Gallery creates 2 more tables for albums and pictures, respectively) $gallery_ids = $wpdb->get_results( “SELECT gid FROM “.$wpdb->prefix.”ngg_gallery ORDER BY gid ASC”, ARRAY_A); fetches the IDs of all galleries into an array, ordered by ID from 1 … Read more

WordPress apply_filters() Arguments Missing

It’s missing the second argument because you didn’t tell WordPress you wanted it with your add_filter call. By default, actions and filters only get one argument. Try this: <?php add_filter(‘woocommerce_get_price’, ‘custom_price’, 10, 2); function custom_price($price, $product) { … }