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
/** | |
* Disable changing the theme for anyone a part from the admin user | |
*/ | |
add_action('admin_init', 'disable_changing_theme_for_non_admin'); | |
function disable_changing_theme_for_non_admin() { | |
global $submenu, $userdata; | |
get_currentuserinfo(); | |
if ($userdata->ID != 1) { | |
unset($submenu['themes.php'][5]); | |
} |
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
Photo.find( | |
'_id' : {'$lte' : firstid}, | |
'url thumbnailUrl', | |
{ | |
skip : 0, | |
limit : 9, | |
sort : { 'created': -1 } | |
}, | |
function (err, photos) { | |
} |
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 | |
// define static var | |
define('DRUPAL_ROOT', getcwd()); | |
// include bootstrap | |
include_once('./includes/bootstrap.inc'); | |
// initialize stuff | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
// clear cache | |
drupal_flush_all_caches(); | |
?> |
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
define([ | |
'lodash' | |
], function () { | |
'use strict'; | |
var pluginName = 'backgroundImage', | |
version = '', | |
throttle = _.throttle, | |
defaults = {}, | |
BackgroundImage; |
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
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 984.01 617.55"> | |
<defs> | |
<style> | |
.cls-1 { | |
isolation: isolate; | |
} | |
.cls-2 { | |
fill: #154463; | |
} |
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
/* global module, __dirname */ | |
const Webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const ImageminPlugin = require('imagemin-webpack-plugin').default; | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const path = require('path'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin'); | |
const BundleTracker = require('webpack-bundle-tracker'); |
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
const regexEmail = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
export const validateEmail = (email) => { | |
let error = ''; | |
if (!email) { | |
error = 'Required'; | |
} else if (!regexEmail.test(email)) { | |
error = 'Invalid email address'; | |
} |
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
/(\s|^)(?:@{1})([\w-À-ÖØ-öø-ÿĀ-ňŊ-ſА-я-ゟ゠-ヿ-가-힣一-黿]*)/g |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |