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
#!/bin/bash | |
INPUT=input_filename.csv | |
OLDIFS=$IFS | |
IFS=, | |
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
while read reviewer employee | |
do | |
f10=$(wp user get $reviewer --field=ID) | |
f11=$(wp user get $employee --field=ID) | |
f14=$(wp user meta get $employee user_meta_field_name) |
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
//Update after each step completion - probably executes too often for most use cases | |
add_action( 'gravityflow_step_complete', 'gravityflow_step_complete_post_publish', 10, 4 ); | |
function gravityflow_step_complete_post_publish( $step_id, $entry_id, $form_id, $status ) { | |
$entry = GFAPI::get_entry( $entry_id ); | |
$currentPost = get_post( rgar( $entry, 'post_id' ) ); | |
if("draft" == $currentPost->post_status) { |
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
(function (GravityFlowEntryDetail, $) { | |
$(document).ready(function () { | |
if( $('.gravityflow-step-user_input').length ) { | |
//User Input - Save Progress Button | |
if( $('#gravityflow_save_progress_button').length ) { | |
$('#gravityflow_save_progress_button')[0].onclick = null; | |
$('#gravityflow_save_progress_button').click(function() { | |
$('#action').val('update'); |
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 | |
add_action('admin_bar_menu', 'custom_toolbar_links', 10, 1); | |
function custom_toolbar_links($wp_admin_bar) { | |
$user = wp_get_current_user(); | |
if( in_array( "staff", $user->roles ) ): | |
$wp_admin_bar->add_node(array( | |
'id' => 'hotlinks', | |
'title' => 'Hotlinks', |
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
(function($) { | |
acf.add_action('ready', function( $el ){ | |
//Identify the field you want to check against. | |
//Use a class to handle scenarios involving repeater / flexible content where multiple instances exist | |
var $field = $('.example input'); | |
$field.on('change', function (evt) { |
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 | |
add_action( 'gform_after_submission_3', 'remove_entry_magic', 10, 2); | |
function remove_entry_magic( $entry ) { | |
GFAPI::delete_entry( $entry['id'] ); | |
} |
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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
• Changing running websites without the consent of their owners is just like putting your hand on the oven. | |
• Are you suggesting forced auto-updates to newer major versions? If so, then I think you’re setting yourself up for disaster. | |
• What happens if the outage causes financial issues to the owner? | |
• I would propose to drop this idea completely, for lack of realism. | |
• In the area of small businesses losing contact to the admin happens regularly, either because of distrust or because of the admin changing his professional focus or lack of money. This plan will put all of those site owners at risk, and more of them with every step up the update ladder. | |
• Put an alarm system into the next minor. | |
• Absence of an answer does not indicate consent. | |
• In reality, choices are never between a purely good thing and a purely bad thing; they’re always between competing tradeoffs. | |
• If you think that I’m going to miss even one opportunity to pick up half-a-knot boat speed, you’re absolutely out of your mind. When it cost |
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 | |
add_filter( 'gravityflow_search_criteria_status', 'jo_status_scenario_search_criteria', 10, 1 ); | |
function jo_status_scenario_search_criteria( $search_criteria ) { | |
if ( ! isset( $_SERVER['REQUEST_URI'] ) && strpos( strtolower( $_SERVER['REQUEST_URI'] ), '/status-check-64/' ) !== false ) { | |
return $search_criteria; | |
} | |
$current_user = wp_get_current_user(); |
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( 'admin_init', 'disable_tinymce_in_gf' ); | |
function disable_tinymce_in_gf() { | |
if (rgget('fid')){ | |
$step_id = rgget('fid'); | |
if ($step_id == 552) { | |
if ( RGForms::is_gravity_page() && | |
rgget( 'page' ) == 'gf_edit_forms' && | |
rgget( 'view' ) == 'settings' && | |
in_array( rgget( 'subview' ), array( 'notification', 'confirmation', 'gravityflow' ) ) | |
) { |