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
/** | |
* | |
* https://codex.wordpress.org/Post_Status_Transitions | |
* | |
* Send email to admin after user create new product from frontend form. | |
* Send emails on products publication | |
* @param WP_Post $post | |
* | |
* | |
*/ |
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 | |
/* Gravity Forms Word Count Script */ | |
function els_load_scripts() { | |
wp_enqueue_script('gravity-forms-word-count', get_stylesheet_directory_uri() . '/js/jquery.gravity_word_count.js', array('jquery'), '0.1', true); | |
} | |
add_action('wp_enqueue_scripts', 'els_load_scripts'); | |
/*Then in the form, for fields that need the word count, add the class ‘els-word-count[300].' Change [300] as needed for the maximum words that can be added to that particular field.*/ | |
/*Source http://www.gravityhelp.com/forums/topic/maximum-word-count#post-149331*/ |
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
npm install --save asset-builder browser-sync del gulp gulp-autoprefixer gulp-changed gulp-concat gulp-cssnano gulp-flatten gulp-if gulp-imagemin gulp-jshint gulp-less gulp-plumber gulp-rename gulp-rev gulp-sass gulp-sourcemaps gulp-uglify imagemin-pngcrush jshint jshint-stylish lazypipe merge-stream minimist run-sequence traverse wiredep gulp-util gulp-combine-mq critical gulp-rename gulp-penthouse |
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
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
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 | |
//send a welcome email when a user account is activated | |
add_action( 'bp_core_activated_user', 'yz_welcome_user_notification', 10, 3 ); | |
function yz_welcome_user_notification( $user_id, $key = false, $user = false ) { | |
if ( is_multisite() ) { | |
return ;// we don't need it for multisite | |
} | |
//send the welcome mail to user |
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
#!/bin/bash | |
# This file is designed to spin up a Wireguard VPN quickly and easily, | |
# including configuring a recursive local DNS server using Unbound | |
# | |
# Make sure to change the public/private keys before running the script | |
# Also change the IPs, IP ranges, and listening port if desired | |
# iptables-persistent currently requires user input | |
# add wireguard repo | |
sudo add-apt-repository ppa:wireguard/wireguard -y |
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
# Installation --- | |
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables. | |
# 2. Commit this file to your repo | |
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
# push everything and initial GitFTP) | |
# | |
# Usage --- | |
# - On each commit to master branch, it'll push all files to the $FTP_HOST | |
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises | |
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you |
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
add_filter( 'manage_edit-post_columns', 'aco_last_modified_admin_column' ); | |
// Create the last modified column | |
function aco_last_modified_admin_column( $columns ) { | |
$columns['modified-last'] =__( 'Last Modified', 'aco' ); | |
return $columns; | |
} | |
add_filter( 'manage_edit-post_sortable_columns', 'aco_sortable_last_modified_column' ); |
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
// @ref http://rachelcarden.com/2012/03/manage-wordpress-posts-using-bulk-edit-and-quick-edit/ | |
(function($) { | |
// we create a copy of the WP inline edit post function | |
var $wp_inline_edit = inlineEditPost.edit; | |
// and then we overwrite the function with our own code | |
inlineEditPost.edit = function( id ) { | |
// "call" the original WP edit function | |
// we don't want to leave WordPress hanging | |
$wp_inline_edit.apply( this, arguments ); |
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 | |
/** | |
* Plugin Name: NS inline edit | |
* Plugin URL: https://www.nuno-sarmento.com | |
* Description: Add excerpt to WordPress Posts Quick Edit | |
* Requires at least: 5.0 | |
* Tested up to: 5.4 | |
* Version: 0.1 | |
* Plugin Author: Nuno Sarmento | |
* Author URI: https://www.nuno-sarmento.com |
NewerOlder