Combining several CSS files into one for optimization
There are multiple plugins out there that can do this for you! For example Checkout JS & CSS Script Optimizer.
There are multiple plugins out there that can do this for you! For example Checkout JS & CSS Script Optimizer.
I fixed this with suggestion from here: https://buddypress.org/support/topic/how-can-i-hide-new-registered-member-update-from-activity-streams/ Adding this to functions.php removed one of the copies: remove_action( ‘bp_core_activated_user’, ‘bp_core_new_user_activity’ );
Using add_submenu_page function WordPress you can add multiple pages/menu In order to add a new top-level menu to WordPress administration dashboard, You can use add_menu_page() function. This function has the following syntax. //add plugin menu add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position); As you can see, The function accepts the following parameters. page_title: The page … Read more
This happens because of the order of execution of your WordPress page. In your code it goes like this: At init, which is early in the generation process of the page, you are registering the scripts. That is, you are telling WP that you want to use these later on. No html is generated. At … Read more
You should be able to back up your site through your hosting control panel. This is a better option than adding bloat to your WP install to duplicate functionality you already have elsewhere.
Folowing on Milo’s comment, do_shortcode expects the parameter to be exactly as if it is a shortcode inserted as part of the content, therefor your attempt to quote avatar_upload is just wrong and it should be do_shortcode(‘[avatar_upload]’); In addition it is probably better to just avoid using do_shortcode and call the relevant official API, if … Read more
Yes, Symfony components are licensed under MIT these days. They are compatible with GPL, which is a requirement of the official WP repository. Do note that as number of plugins using common PHP components is increasing, so does possibility of version and other conflicts between them. Since WP lacks dependency management, at some point you … Read more
$post isn’t set in an admin-ajax.php request because you’re not querying for any post or inside a loop. In your script that sends the ajax request you’ll need to send the post ID and retrieve a post object in the callback: function ajax_cart_send_mail(){ $post = get_post( $_POST[‘post_id’] ); $id = $post->ID; $name = $post->post_title; } … Read more
You could run a regex. Since they’re continuing this behavior, you will probably want to create a custom plugin and set up a cron job to trigger it periodically so it will continue stripping all inline styles. Your plugin will need to query all posts. From there, in a loop that checks each post’s content, … Read more
Better to avoid such a thing. The settings API has two “faces”, one the UI, and the other is handling the form submission. The form submission is handled on a different URL than the UI (/wp-admin/options.php) and therefor your “user action” depended code will not run and the handling of storing the setting in the … Read more