Category: WordPress
-
How To Restrict User to Self Posts in WordPress
in WordPressTo secure our private site while using a third-party WordPress REST API integration, I restricted the plugin user to its own posts with user_has_cap and allowed access to its revisions. I also used posts_results to mark non-qualifying posts as private. Here’s a sample implementation for similar needs.
-
Silly Ideas: Cache WordPress Excerpts
in WordPressLet’s explore dumb ideas around caching parts of WordPress we shouldn’t.
-
Code Sweep: A Simple Approach to a Neater WordPress User List
in WordPressLearn how to efficiently manage WordPress users by using a PHP snippet to add a ‘Comments’ count column, helping you easily identify and remove spam accounts.
-
Meet The Plugin That Lists All Your Multisite’s Sites: Multisite Site List
in WordPressMeet the plugin that tackles the classic dilemma: showcasing all your multisite’s sites in one spot. It’s a slice of simplicity for your WordPress woes!
-
Stopping WordPress User Registration Spam
in WordPressCombatting the surge of user registration spam on WordPress, this guide introduces a code snippet to block registrations from specific email hostnames, offering an extra layer of protection against unwanted sign-ups.
-
Gathering database performance with WP-CLI
in WordPressDiscover how we employed WP-CLI to streamline the assessment of database server performance in WordPress, facilitating a more efficient profiling of SQL queries before and after crucial server upgrades.
-
Limiting Featured Image Dimensions in WordPress
Discover how to limit image sizes for featured images based on pixel dimensions using JavaScript in the WordPress block editor. Block large images from being uploaded and display error notifications, preventing publishing until the image size meets the specified criteria. Implement this feature by enqueuing a simple `add_action()` during the `enqueue_block_editor_assets` hook.