How to set plugin across network in multisite and modify it in one place?
How to set plugin across network in multisite and modify it in one place?
How to set plugin across network in multisite and modify it in one place?
Ok, problem solved be installing an older Woocommerce version (3.2.6). All the wrong categories are gone now and everything is back as it supposed to be.
Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
According to answer here: All logged in users use resources from wp-admin and plugins, not just admins. The cookies are for keeping track of the logged in user’s authorization to access each resource. If a visitor does not log in, no cookies are set at all by default. Themes or plugins may do so though.
I managed it by adding this conditional: if (performance.navigation.type >= 0) { api.previewer.previewUrl.set(api.settings.url.home + ‘?page_id=’ + pageID); } This takes care of all the navigation possibilities. It’s sort of a workaround but it does the trick. MDN Web Doc: PerformanceNavigation
How can I get the Post ID and Post Type within a Must Use Plugin?
I am not entirely sure why this is, but I had to go to Settings > Permalinks and then click “Save” without changing anything. I think the file had to be rewritten to account for the new post type? Regardless, it fixed the issue and I hope someone else can save a lot of time … Read more
Got it working like this: function print_admin_menu() { add_options_page( ‘Print Configuration’, ‘Print Configuration’, ‘manage_options’, ‘print_admin_config_page’, ‘my_callback’ ); } function my_callback(){ ?> <div class=”wrap”> <h2>Welcome To My Plugin</h2> </div> <?php }
<?php add_filter(‘pre_get_posts’, ‘my_current_author_posts’); function my_current_author_posts( $query ) { global $pagenow; // Check if you are on the right Admin page, do nothing if not if( ‘edit.php’ != $pagenow || ! isset( $_GET[‘post_type’] ) || ‘page’ != $_GET[‘post_type’] || ! is_admin() ) { return; } // get current user Object $current_user = wp_get_current_user(); // check user … Read more
Overwriting Plugin’s Ajax callback function from theme