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
// Currenet setup | |
.use('/images/', express.static( path.resolve(`${imagePath}/images/`)) ) | |
// New idea | |
.get('/' + 'images' + '/*', function (req, res) { | |
const imgUrl = `${imagePath}${req.url}` | |
console.log(`imgUrl: ${imgUrl}`) | |
const urlExists = url => new Promise( | |
(resolve, reject) => request.head(url) .on("response", res => resolve(res.statusCode.toString()[0] ==="2")) |
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
{"lastUpload":"2019-06-26T11:39:00.251Z","extensionVersion":"v3.3.0"} |
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 | |
$my_postid = 12;//This is page id or post id | |
$content_post = get_post($my_postid); | |
$content = $content_post->post_content; | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
?> |
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
<snippet> | |
<content> | |
<![CDATA[ | |
\$var = ( !empty( \$my_var ) ) ? \$my_var : 'default value'; | |
]]></content> | |
<tabTrigger>ternary</tabTrigger> | |
<scope>source.php</scope> | |
<description>ternary …</description> | |
</snippet> |