Skip to content

Instantly share code, notes, and snippets.

View bogdan-mainwp's full-sized avatar

Bogdan Rapaić bogdan-mainwp

View GitHub Profile
@bogdan-mainwp
bogdan-mainwp / file-uploader-allow-filetypes.php
Last active August 30, 2023 07:00
Custom code snippet that allows you to allow and/or disallow filetyps for the File Uploader extension.
<?php
// Add the following code snippet to the PHP section of the MainWP Custom Dashboard Extension
add_filter('mainwp_file_uploader_allowed_file_types', 'mycustom_mainwp_file_uploader_allowed_file_types');
function mycustom_mainwp_file_uploader_allowed_file_types( $types ) {
$types[] = 'htaccess';
return $types;
}
@bogdan-mainwp
bogdan-mainwp / mainwp-hello-world-extension.php
Created September 11, 2023 16:37
Basic MainWP one-page extension demo
<?php
/**
* Plugin Name: MainWP Hello World Extension
* Plugin URI: https://yourwebsiteurl.com
* Description: MainWP Hello World Extension is used for the demo.
* Version: 1.0
* Author: Your Name
* Author URI: https://yourwebsiteurl.com
*/