This file contains 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
add_action('acf/init', function() { | |
if( function_exists('acf_register_block') ) { | |
// Look into views/blocks | |
$dir = new \DirectoryIterator(\locate_template("views/blocks/")); | |
// Loop through found blocks | |
foreach ($dir as $fileinfo) { | |
if (!$fileinfo->isDot()) { | |
$slug = str_replace('.blade.php', '', $fileinfo->getFilename()); | |
// Get infos from file | |
$file_path = \locate_template("views/blocks/${slug}.blade.php"); |
This file contains 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
string = new Promise(function(resolve) { | |
// original code was just: | |
// resolve(ctx.processString(contents, relativePath)); | |
// | |
// I want to emulate that and also invalidate cache in catch() | |
try { | |
resolve(ctx.processString(contents, relativePath)); | |
} catch(e) { | |
return cache.remove(key).then(function(){ |
This file contains 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
REST_FRAMEWORK = { | |
'DEFAULT_PERMISSION_CLASSES': ( | |
'rest_framework.permissions.IsAuthenticated', | |
), | |
'DEFAULT_AUTHENTICATION_CLASSES': ( | |
'rest_framework.authentication.SessionAuthentication', | |
'rest_framework.authentication.BasicAuthentication', | |
'rest_framework_jwt.authentication.JSONWebTokenAuthentication', | |
'rest_framework.authentication.TokenAuthentication', | |
), |
This file contains 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
.bla { | |
font: { | |
size: 1em; | |
weight: 400; | |
}; | |
} |
This file contains 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 | |
$subs = ninja_forms_get_all_subs( 1 ); | |
$fields = ninja_forms_get_fields_by_form_id( 1 ); | |
$json_data = []; | |
foreach ($subs as $sub_id => $sub) { | |
$submission_data = array(); | |
$data = unserialize($sub['data']); | |
$user_values = array(); | |
foreach ($data as $key => $value) { |
This file contains 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
div {width:350px; height:100px; background:lightgray; position:relative; margin:20px;} | |
div:after{content:''; width:160px; height:2px; background:gray; position:absolute; bottom:-2px; left: 100px} |
This file contains 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
div {width:350px; height:100px; background:lightgray; position:relative; margin:20px;} | |
div:after{content:''; width:60px; height:4px; background:gray; position:absolute; bottom:-4px;} |
This file contains 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
div {width:350px; height:100px; background:lightgray; position:relative; margin:20px;} | |
div:after{content:''; width:60px; height:4px; background:gray; position:absolute; bottom:-4px;} |