How do I add a checkmark to my-sites save settings hook

It sounds as though have altered the page to submit your data. Assuming that that code work properly: my-sites.php loads admin.php 10 require_once( dirname( __FILE__ ) . ‘/admin.php’ ); Which fires the load-{pagenow} hook 330 /** 331 * Fires before a particular screen is loaded. 332 * 333 * The load-* hook fires in a … Read more

wp_upload_bits Upload Specific Sizes Only

This is how you can limit the image upload size function fineima() { if (isset($_POST[‘submit’])) { wp_upload_bits($_FILES[‘fileToUpload’][‘name’], null, file_get_contents($_FILES[‘fileToUpload’][‘tmp_name’])); } echo ‘<form action=”” method=”post” enctype=”multipart/form-data”> <input type=”file” name=”fileToUpload” id=”fileToUpload”> <input type=”submit” value=”Upload Image” name=”submit”> </form> ‘; } function fineFileUploaderRenderer() { ob_start(); fineimageUpload(); return ob_get_clean(); } add_shortcode(‘your_file_uploader’, ‘fineFileUploaderRenderer’);

Filter out comments with certain meta key/s in the admin backend

1. You can use pre_get_comments hook: add_action(‘pre_get_comments’, function($query) { global $pagenow; if ( is_admin() && (‘your-custom-page’ === $pagenow) ) { $query->query_vars[‘meta_query’] = [ ‘relation’ => ‘AND’, [ ‘key’ => ‘key1’, ‘value’ => ‘meta1’ ], [ ‘key’ => ‘key2’, ‘value’ => ‘meta2’ ] ]; } }); 2. You need to learn how to create an admin … Read more