Active Plugins for current blog in WP Multisite Network? [duplicate]
Looks like get_option(‘active_plugins) does the trick. Also, this question has already been answered here, sorry for the duplicate: How to Check If A Plugin Is Enabled Through API?
Looks like get_option(‘active_plugins) does the trick. Also, this question has already been answered here, sorry for the duplicate: How to Check If A Plugin Is Enabled Through API?
Use custom clean URLs for a plug in
You have the same username as the plugin author? o.O The error comes from line 444: There’s two characters between ?> and the next <?php Change: add_action( ‘admin_menu’,’business_hours_menu’ ); ?> <?php add_action( ‘widgets_init’, ‘lordlinus_businesshour_load’ ); To: add_action( ‘admin_menu’,’business_hours_menu’ ); add_action( ‘widgets_init’, ‘lordlinus_businesshour_load’ );
I think you have to solve this with jQuery. If checked -> addClass, if not -> removeClass. Here’s how to enqueue your JS file: add_action(‘admin_menu’, ‘fwds_plugin_settings’); function fwds_plugin_settings() { $hook = add_menu_page( ‘Price Display’, ‘Price Display’, ‘add_users’, ‘fwds_settings’, ‘fwds_display_settings’ ); add_action( “admin_print_scripts-$hook”, ‘fwds_print_scripts’ ); } function fwds_print_scripts() { wp_register_script( ‘my-fx’ , plugin_dir_url( __FILE__ ) . … Read more
Your code should work (not how you expect but it should work), and probably the error was in something that you didn’t post. However… __FILE__ is a constant: you don’t have to use quotes when write it. Remove them like so: add_menu_page(‘Item Display’,’Item Display’,’administrator’, __FILE__, function(){ }); If you use the quotes, ‘__FILE__’ became a … Read more
I think you want a custom page template. Create a custom page template. In that page template paste your code. Create a “Page” from wp_admin->Pages and select your template file as the “Template” In your page template, you would have something like this: /* Template Name: My Custom HTML Page */ get_header(); get_footer(); Leave out … Read more
Plugin – including external javascript calling google maps
Does the code that imports to the external DB need to be on a different page? Adding a conditional that checks if the form is submitted, to your callback function would work as well. Then your form posts the data back to itself, checks if the form is submited and runs the import script instead … Read more
Use the Settings API or hook a function to admin_init that checks permissions and nonces, saves the updated values and redirects to your settings page.
What is the Object for WP_Error Class?