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 | |
// Only using server var to preg match. | |
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized | |
// phpcs:disable WordPress.VIP.SuperGlobalInputUsage.AccessDetected | |
// phpcs:disable WordPress.VIP.ValidatedSanitizedInput.InputNotSanitized | |
// phpcs:disable WordPress.VIP.ValidatedSanitizedInput.InputNotValidated | |
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotValidated | |
$url = $_SERVER['REQUEST_URI']; | |
// phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
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
[ | |
{ | |
"chain": "rio-olympics-quiz-2016", | |
"values": [ | |
{ | |
"title": "QUIZ: Rio Olympics 2016", | |
"notificationTemplate": { | |
"body": "Is your knowledge of the 2016 Olympic Games worthy of a gold, silver or bronze medal? Take our quiz and find out.", | |
"tag": "rio-olympics-quiz-2016", | |
"icon": "https://www.gdnmobilelab.com/images/olympics/rio-flag.png", |
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 | |
/** | |
* Plugin Name: Edit Flow - All post types in Story Budget | |
*/ | |
function post_type_as_any( $args ) { | |
$args['post_type'] = 'any'; | |
return $args; | |
} |
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
[ | |
{ | |
"command": "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
[ | |
{ | |
"command": "notification.show", | |
"options": { | |
"title": "May jobs report: Good news & bad ", | |
"options": { | |
"body": "The US economy added only 38,000 jobs this month. \n\nTAP below to explore the good news and the bad news. ", | |
"icon": "https://www.gdnmobilelab.com/images/mobilelab-logo-thick.png", | |
"tag": "jobs-report", | |
"data": { |
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 | |
/** | |
* Plugin Name: Edit Flow - Hide User On Calendar & Budget | |
*/ | |
class EF_HideUserCalendarBudget { | |
/** | |
* @var EF_HideUserCalendarBudget | |
**/ | |
private static $instance = null; |
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 | |
/** | |
* Plugin Name: Edit Flow - Allow Contributors to edit Notifications | |
*/ | |
function ef_allow_contributors_to_manage_notifications() { | |
global $wp_roles; | |
$role = 'contributor'; | |
$cap = 'edit_post_subscriptions'; |
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 | |
/** | |
* Plugin Name: Edit Flow - User Group's For All | |
*/ | |
function ef_show_all_users () { | |
return array( | |
'fields' => array( | |
'ID', | |
'display_name', | |
'user_email' |
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 | |
/** | |
* Plugin Name: Edit Flow - Autosubscribe Usergroup | |
*/ | |
function efx_auto_subscribe_usergroup( $new_status, $old_status, $post ) { | |
global $edit_flow; | |
// When the post is first created, you might want to automatically set | |
// all of the user's user groups as following the post | |
if ( 'pending' == $new_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
<?php | |
/** | |
* Plugin Name: Edit Flow - Attachment Upload Notifier | |
*/ | |
function send_notification_on_upload( $id ) { | |
global $edit_flow; | |
if ( $edit_flow->helpers->module_enabled( 'notifications' ) | |
&& $edit_flow->helpers->module_enabled('user_groups') ) { |
NewerOlder