Skip to content

Instantly share code, notes, and snippets.

if ( $bnfw->notifier->notification_exists( 'new-user', false ) ) {
$notifications = $bnfw->notifier->get_notifications( 'new-user' );
$password_url = '<a href="'.network_site_url( 'password/?somresetpass=true&somfrp_action=rp&key==' . $key . '&uid=' . rawurlencode( $user->ID ), 'login' ).'" target="_blank">'.network_site_url( 'password/?somresetpass=true&somfrp_action=rp&key==' . $key . '&uid=' . rawurlencode( $user->ID ), 'login' ).'</a>';
foreach ( $notifications as $notification ) {
$setting = $bnfw->notifier->read_settings( $notification->ID );
$trigger_notification = apply_filters( 'bnfw_trigger_new-user_notification', true, $setting, $user );
if ( $trigger_notification ) {
$bnfw->engine->send_registration_email( $setting, $user, $password_url );
/**
* Get posts via ajax and WP REST API.
* @param {object} options
*/
_blogLoaded = false;
function getAjaxPosts(args) {
var $wrapper = $("#postsWrapper"),
context = $wrapper.attr("data-context"),
options = typeof args === "undefined" ? SAGE_ARCHIVE_VARS : args,
function nl_amp_set_schema_type( $metadata, $post ) {
if ($post->post_type == 'recipe') {
$metadata['@type'] = 'Recipe';
$metadata['name'] = $post->post_title;
$metadata["recipeYield"] = get_field('new_serves', $post->ID);
$metadata['description'] = get_field('description', $post->ID);
// Prep Time
function cptui_register_my_taxes_sector() {
/**
* Taxonomy: Sector.
*/
$labels = [
"name" => __( "Sector", "custom-post-type-ui" ),
"singular_name" => __( "Sector", "custom-post-type-ui" ),
<?php
/*
Template Name: Delaware OPAL
*/
$customer_id = isset($_POST["customer_id"]) ? $_POST["customer_id"] : "";
$first_name = isset($_POST["first_name"]) ? $_POST["first_name"] : "";
$last_name = isset($_POST["last_name"]) ? $_POST["last_name"] : "";
$email = isset($_POST["email"]) ? $_POST["email"] : "";
$street_address1 = isset($_POST["street_address1"]) ? $_POST["street_address1"] : "";
<thead>
<tr>
<th class="highlight">
id
</th>
<th>
site_id
</th>
<th>
timestamp
UPDATE `<databasehere>`.`wp_options` SET `option_value` = '{"facets":[{"name":"resort_region","label":"Region","type":"checkboxes","source":"acf/field_5b60cc47aee2b","parent_term":"","hierarchical":"no","show_expanded":"no","ghosts":"yes","preserve_ghosts":"no","operator":"and","orderby":"display_value","count":"10","soft_limit":"5"},{"name":"resort_state","label":"State","type":"fselect","source":"","source_other":"","label_any":"Any","parent_term":"","multiple":"no","hierarchical":"no","ghosts":"no","preserve_ghosts":"no","operator":"and","orderby":"count","count":"10","show_expanded":"no"},{"name":"resort_type","label":"Resort Type","type":"checkboxes","source":"acf/field_5b60cbffaee2a","parent_term":"","hierarchical":"no","show_expanded":"no","ghosts":"yes","preserve_ghosts":"no","operator":"and","orderby":"count","count":"10","soft_limit":"5"},{"name":"resort_cost","label":"Cost","type":"checkboxes","source":"acf/field_5b60cc5aaee2c","parent_term":"","hierarchical":"no","show_expanded":"no","ghosts":"yes
/* Adding Rest API To person */
function golf_modify_custom_post_type( $args, $post_type ) {
if ( $post_type == 'golf_person' ) {
$args['show_in_rest'] = true;
$args['rest_base'] = 'custom';
}
return $args;
}
add_filter('register_post_type_args', 'golf_modify_custom_post_type', 10, 2);
<?
if (!class_exists("BP_Shortcodes"))
{
class BP_Shortcodes
{
public $call;
public function __construct()
{
<div id="stat-wrapper">
<?php if ( have_rows( 'stats' ) ) : ?>
<?php $count = 0; ?>
<div class="col">
<?php while ( have_rows( 'stats' ) ) : the_row(); ?>
<?php $count++; ?>
<div class="stat">
<?php if ( get_sub_field( 'stat_icon' ) ) { ?>
<img src="<?php the_sub_field( 'stat_icon' ); ?>" />
<?php } ?>