On WordPress.org Plugin repository, Last Updated Date doesn’t match with Plugin Version Update Date

Please check the Category Posts Plugin’s Changelog on WordPress.org (on the Development tab). I’m providing the screenshot below: You’ll notice that version 4.9.13 was indeed updated on JULY 22 2021. 4.9.13 – JULY 22 2021 Fixed Line number with WordPress 5.8 However, on the right side it shows: Last updated: 1 month ago. This last … Read more

delete_term is not working properly with add_action()

AFAIK, slug is unique. So $post_cat_term = get_term_by( ‘slug’, $deleted_term->slug, ‘category’ ); shouldn’t return anything. Instead, you may try name. Also, delete_term callback gets 5 parameters, so it’s better to adjust that accordingly. See if the following works: function delete_similar_term( $term_id, $tt_id, $taxonomy, $deleted_term, $object_ids ) { if( $deleted_term->taxonomy === ‘movies_category’ ) { $post_cat_term = … Read more

The wpmu_blogs_columns filter is not working

I tested your code, fixing the $colum_name issue and it works ok for me. add_filter(‘wpmu_blogs_columns’, function ($site_columns) { $site_columns[‘expired_Date’] = ‘Expires’; return $site_columns; }); add_action(‘manage_sites_custom_column’, function ($column_name, $blog_id) { if ( ‘expired_Date’ === $column_name ){ $current_blog_details = get_blog_details(array(‘blog_id’ => $blog_id)); // do_action( ‘qm/debug’, [‘Details:’, $current_blog_details ] ); echo ucwords($current_blog_details->last_updated); } }, 10, 2); You have … Read more

Get related posts matching most of the provided tags using WP_Query

There is no direct way of getting posts matching most of these tags using WP_Query. The usual documented methods: If you want posts matching any of these tags, you may use: $args = array( ‘post_type’ => ‘post’, ‘tag_slug__in’ => array( ‘poetry’, ‘motivational’, ‘attitude’, ‘rules’, ‘lines’, ‘sigma’, ‘inspirations’ ) ); $query = new WP_Query( $args ); … Read more

Auto updating JavaScript dependancy in functions.php

If I understood your question correctly, you have two JavaScript files: ads.js and banner.js. You want the site to load the updated version of both of these files, whenever any of these files are changed. If this understanding is correct, then you may do the following: function my_custom_theme_scripts() { $ads_version = filemtime( get_stylesheet_directory() . ‘/js/ads.js’ … Read more

Bulk post approval and publishing doesn’t work

The problem I can immediately see is, you’ve set: ‘post_status’ => ‘published’ This should be: ‘post_status’ => ‘publish’ Also, since you are only updating the post status, it’s less error prone and more appropriate to use wp_publish_post function instead of wp_update_post function. With this change, your karma_approve_all_posts() function will look like this: function karma_approve_all_posts( $posts … Read more

Disable “Quick edit” for roles in WP dashboard

I hope you need to disable “Edit” and “Quick Edit” for non-admin roles. So you can modify your code as follows function remove_quick_edit( $actions ) { unset($actions[‘edit’]); unset($actions[‘inline hide-if-no-js’]); return $actions; } if ( ! current_user_can(‘manage_options’) ) { add_filter(‘post_row_actions’,’remove_quick_edit’,10,1); }

WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2

This is not actually an error, rather a deprecation notice. Which means, future versions of PHP will remove some old language features, so the developers should be aware of it. Info. for WordPress: WordPress developers are well aware of it and future versions of WordPress will be changed and this deprecation notice will no longer … Read more