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
// SAVE ACF FIELDS | |
add_action( 'personal_options_update', 'save_extra_profile_fields' ); | |
add_action( 'edit_user_profile_update', 'save_extra_profile_fields' ); | |
function save_extra_profile_fields( $user_id ) { | |
if ( !current_user_can( 'edit_user', $user_id ) ) | |
return false; | |
update_usermeta($user_id, 'user_partner_name', ( isset($_POST['user_partner_name']) ? $_POST['user_partner_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
<?php | |
/* place in theme's functions.php file */ | |
/* disable json api if api key not correct */ | |
add_action('init','json_api_apikey_check' , 1 ); | |
function json_api_apikey_check() | |
{ | |
$api_key = 'hello'; | |
$base = get_option('json_api_base', 'api'); | |
$this_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
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 | |
/* SLIDER CUSTOM FIELD FOR HOMEPAGE */ | |
$images = get_field('slider_photos'); | |
$count=0; | |
$count1=0; | |
if($images) : ?> | |
<div id="slider"> | |
<div id="carousel" class="carousel slide"> | |
<!-- Indicators --> |
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_filter('show_admin_bar', '__return_false'); | |
/* Remove admin bar style - top padding - Front-end */ | |
function remove_admin_bar_style_frontend() { | |
echo '<style type="text/css" media="screen"> | |
html { margin-top: 0px !important; } | |
* html body { margin-top: 0px !important; } | |
</style>'; | |
} |
This file has been truncated, but you can view the full file.
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
'use strict'; | |
var COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); | |
delete goog.implicitNamespaces_[a]; |
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
/* | |
Allows for ajax requests to be run synchronously in a queue | |
Usage:: | |
var queue = new $.AjaxQueue(); | |
queue.add({ | |
url: 'url', |
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_filter( 'pre_get_posts', 'cpt_search' ); | |
/** | |
* tgm_cpt_search function. | |
* | |
* This function modifies the main WordPress query to include an array of post types instead of the default 'post' post type. | |
* | |
* @param mixed $query The original query | |
* @return $query The amended query | |
* | |
*/ |
NewerOlder