This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function uploads from a URL. | |
* To upload from a local file path instead | |
* @see: https://gist.github.com/RadGH/3b544c827193927d1772 | |
* | |
* Example usage: Upload photo from URL, display the attachment as as html <img> | |
* $attachment_id = rs_upload_from_url( "http://example.com/images/photo.png" ); | |
* echo wp_get_attachment_image( $attachment_id, 'large' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre> | |
<?php | |
/** | |
* A simple PHP .htpasswd and .htaccess generator | |
* If already present, .htpasswd is overwrittern but .htaccess is prepended with Access clousure if not found | |
* | |
* @author Krzysztof Przygoda, 2018 | |
* @version 1.0 | |
*/ |