On the WordPress Admin section how do I link to submenu pages created for a plugin?

admin_url() gets you the correct administration page URL (and network_admin_url() to get a network administration page URL) Optionally, you can use add_query_arg() to append arguments to an URL, using an associative array: $page=”edit_record_page”; $rec_id = 1; $record_url = add_query_arg(compact(‘page’, ‘rec_id’), admin_url(‘admin.php’));

How to call images from your plugins image folder?

Use plugin_dir_url() to get the public URI for the directory where the calling PHP file is. <img src=”https://wordpress.stackexchange.com/questions/60230/<?php echo plugin_dir_url( __FILE__ ) .”images/facebook.png’; ?>”> If the PHP file is in a sub directory of your plugin you have to go up: <img src=”https://wordpress.stackexchange.com/questions/60230/<?php echo plugin_dir_url( dirname( __FILE__ ) ) .”images/facebook.png’; ?>”>

How can I save a multiple select array with the settings API for a plug-in options page?

So, it looks like two things are going on here: echo “<select id=’$id’ style=”width:15em;height:10em;” class=”select$field_class” name=”” . $buddha_option_name . “[$id]” multiple>”; As noted by @Radek, you could have made the name of the select box an array by using [] – e.g. name=”my_option_name[]” – this will result in the filed $_POST[‘my_option_name’] being an array of … Read more

Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?

The flush_rewrite_rules function is reliable in some contexts like a theme or a plugin based on hooks but I’m not sure if it works for a mu-plugin My statement is based on the fact that WordPress is initialized in this way: call the wp-settings.php file call the do_action( ‘muplugins_loaded’ ); hook, here your plugin is … Read more

File not found.