* indicates extensions currently in use
- Brackets Git by Martin Zagora *
- Brackets Snippets (by edc) by Edward Chu *
- Brackets Tab to space by David Deraedt *
- brackets-file-tree-exclude *
- Extensions Rating by Alex Bardanov *
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
<?php | |
function rkv_url_spamcheck( $approved , $commentdata ) { | |
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved; | |
} | |
add_filter( 'pre_comment_approved', 'rkv_url_spamcheck', 99, 2 ); |
<?php | |
/** | |
* Plugin Name: Cpt In Main Query By Meta | |
* Plugin URI: http://wordpress.stackexchange.com/questions/129236/ | |
* Description: Allow mixing a post type with another on main query, only if the second match some meta query args | |
* Author: Giuseppe Mazzapica | |
* Author URI: http://wordpress.stackexchange.com/users/35541/g-m | |
*/ | |
/* jshint node:true */ | |
module.exports = function(grunt) { | |
var path = require('path'), | |
SOURCE_DIR = 'src/', | |
BUILD_DIR = 'build/', | |
mediaConfig = {}, | |
mediaBuilds = ['audiovideo', 'grid', 'models', 'views']; | |
// Load tasks. | |
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks ); |
WORDPRESS 201 OUTLINE | |
TEMPLATE HIERARCHY | |
• https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
THE LOOP | |
• https://codex.wordpress.org/The_Loop | |
• Resetting the Loop | |
• Multiple Loops on one page | |
HOOKS, ACTIONS, FILTERS |
var project = 'slilccc', // Project name, used for build zip. | |
scssfolder = './wp-content/themes/' + project + '/SCSS', | |
workingdir = './wp-content/themes/' + project + '/', | |
cssdir = './wp-content/themes/' + project + '/css/', | |
buildir = './wp-content/themes/' + project + '_build/', | |
url = 'lccc.dev', // Local Development URL for BrowserSync. Change as-needed. | |
gulp = require('gulp'), | |
browserSync = require('browser-sync'), // Asynchronous browser loading on .scss file changes | |
reload = browserSync.reload, | |
autoprefixer = require('gulp-autoprefixer'), // Autoprefixing magic |
* indicates extensions currently in use
<?php | |
/** | |
* @author: Sohel Rana <[email protected]> | |
* @author URI: http://sohelrana.me | |
* @description: Create zip file and download in PHP | |
*/ | |
function createZipAndDownload($files, $filesPath, $zipFileName) | |
{ | |
// Create instance of ZipArchive. and open the zip folder. |
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
<?php | |
/** | |
* Search across all network blogs with elasticpress | |
* | |
* @param $scope string Search scope | |
* | |
* @return string | |
*/ | |
function motivast_ep_search_scope( $scope ) { |