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
// _object.scss | |
@mixin object($uid: object) { | |
$fit: ( | |
'-contain': contain, | |
'-cover': cover, | |
'-fill': fill, | |
'-none': none, | |
'-scale-down': scale-down | |
); | |
@each $prop, $value in $fit { |
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
// _margin.scss | |
@mixin margin($uid: margin, $unit: px, $step: 10, $from: 0, $through: 3) { | |
$base: ( | |
'': '', | |
't': '-top', | |
'r': '-right', | |
'b': '-bottom', | |
'l': '-left', | |
'x': ('-left', '-right'), | |
'y': ('-top', '-bottom') |
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
// _columns.scss | |
@mixin columns($uid: column, $gap: 16px, $columns: 12) { | |
@for $i from 1 through $columns { | |
.#{$uid}-#{$i} { | |
margin: 0 $gap; | |
width: 100% / $columns * $i; | |
} | |
.#{$uid}-offset-#{$i} { | |
margin-left: 100% / $columns * $i; | |
} |
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
<h1>License Key</h1> | |
<?php if ($error_message):?> | |
<div class="notice notice-error is-dismissible"> | |
<p><strong><?php echo $error_message;?></strong></p> | |
<button type="button" class="notice-dismiss"> | |
<span class="screen-reader-text">Dismiss this notice.</span> | |
</button> | |
</div> | |
<?php endif; ?> |
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 | |
require_once 'vendor/autoload.php'; | |
$http_client = new \GuzzleHttp\Client(); | |
$base_url = 'https://api.example.com/'; | |
$error_message = ''; | |
$success_message = ''; | |
$logged_in = false; |
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 | |
add_action('wp_mail_content_type', function() { | |
return "text/html"; | |
}, 10, 1); | |
add_action('retrieve_password_message', function($message, $reset_key, $user_login, $user_data) { | |
$logo_url = esc_url('https://cdn-domain-name.com/assets/img/logo.png'); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title><?php echo $email_custom_data['title'];?> - Company Name</title> | |
<style> | |
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; |
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 | |
/** | |
$email_custom_data = array( | |
'title' => '', | |
'content' => '', | |
'logo_url' => '', | |
'featured_image_url' => '', | |
'cta_button_url' => '', | |
'cta_button_text' => '', |
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 | |
/* 1. Generate initial license key data. */ | |
function generate_license_key(string $user_name, string $password, int $total_installs = 1) { | |
if (!strstr($user_name, '_license_key')) { | |
$user_name .= '_license_key'; | |
} | |
// Shouldn't be able to continue if there is license key found. |
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 | |
add_action('admin_enqueue_scripts', function() { | |
wp_add_inline_style('dashboard', ' | |
.plugin-box-container { | |
display: flex; | |
flex-wrap: wrap; | |
max-height: 288px; | |
overflow-y: auto; |