Tag: 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.
-
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.
-
Half Baked Idea: Limiting WordPress Image Upload Sizes
in WordPressLimit image upload size in WordPress media library by using the `wp_handle_upload_prefilter` filter. Implement a custom function to check and restrict the size of uploaded images. Utilize PHP code to set a maximum size limit and display an error message if the file exceeds it. Add this functionality to your WordPress site.