Custom plugin breaks css.php on Multisite
Custom plugin breaks css.php on Multisite
Custom plugin breaks css.php on Multisite
Thanks for comments. I can manage to host two separate WordPress site on VirtualHost EC2 Linux AMI. My mistake is I have created the vhost.conf file in under /etc/httpd/conf.d. Correct way to enable VirtualHost on EC2 Linux AMI is as follow : go to /etc/httpd/conf open httpd.conf file go to end of file uncomment NameVirtualHost … Read more
This is a little tricky, and I don’t know if I got the best solution for this. However, it works. The trick is, I use the same hook as you do, wp_before_admin_bar_render. In there I get all the elements, and check them if they have the parent my-sites-list. If they do, I switch to the … Read more
How to redirect author subdomain pages to each author pages on www
Have you tried the action ‘wpmu_new_blog’ . The docstring for the function ‘wpmu_create_blog’ says: This function runs when a user self-registers a new site as well as when a Super Admin creates a new site. Hook to ‘wpmu_new_blog’ for events that should affect all new sites. wpmu_new_blog is called with the following parameters: do_action( ‘wpmu_new_blog’, … Read more
A bit of research on here and it seems I was trying too hard. I have found the following solution. Props to this answer. // Create admin page navigation listings function bf_carrier_admin_network() { $hook_suffix = add_submenu_page(‘settings.php’, ‘Carriers’, ‘BrightFire Carriers’, ‘edit_posts’, ‘ins-carrier-edit’, ‘carrier_admin_network’); add_action( “load-{$hook_suffix}”, ‘bfc_styles_scripts’ ); } add_action(‘network_admin_menu’, ‘bf_carrier_admin_network’); function bf_carrier_admin_display() { if (current_user_can(‘manage_options’)){ $hook_suffix … Read more
@Pat J: thank you for your answer. As an old developer as i am, that was one of the first reflex i had, i disabled plugins, and even custom functions. Nothing ever helped. I forgot to mention that out. But i found the solution, and that’s quite stupid, read that: $blog_id is somehow used in … Read more
You are asking a question that is specific to a plugin and not WordPress. How the plugin functions depends entirely on the plugin author’s design. Reading the article above, sure the plugin works in WP multsite, but as the author mentions extra works needs to be done to share that content among other mulisite sites. … Read more
At the top of the api.php page before the class JSON_API line add the following code: add_action( ‘wpmu_new_blog’, ‘wpse_set_defaults’ ); function wpse_set_defaults( $blog_id ) { global $json_api; switch_to_blog( $blog_id ); // set the default controllers here $required_controllers = explode(“,”, “categories,posts,user,attachments”); $id = ‘json_api_controllers’; $available_controllers = $json_api->get_controllers(); $active_controllers = explode(‘,’, get_option($id, ‘core’)); $action = “activate”; foreach … Read more
How to create default categories in new installs?