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('widget_text', 'do_shortcode'); | |
add_shortcode('row', function($attributes, $content = null) { | |
return '<div class="row">' . do_shortcode($content) . '</div>'; | |
}); | |
add_shortcode('column', function($attributes, $content = null) { | |
extract(shortcode_atts( |
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
public function export() | |
{ | |
$acf_posts = $_POST['acf_posts']; | |
foreach($acf_posts as $k => $v) { | |
$acfs = get_posts(array( | |
'numberposts' => -1, | |
'post_type' => 'acf', | |
'orderby' => 'menu_order title', | |
'order' => 'asc', |
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 | |
/** | |
* Advanced Custom Fields: Import Export | |
* | |
* Import and export values created by ACF. | |
* | |
* @package ACF_Import_Export | |
* @author Donald Allen <[email protected]> | |
* @link http://donaldallen.com | |
* @copyright 2013 Donald Allen |
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 | |
/** | |
* Advanced Custom Fields: Import Export | |
* | |
* @package ACF_Import_Export | |
* @author Donald Allen <[email protected]> | |
* @link http://donaldallen.com | |
* @copyright 2013 Donald Allen | |
*/ |
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('the_content', function($content) { | |
$array = array ( | |
'<p>[' => '[', | |
']</p>' => ']', | |
']<br />' => ']', | |
']<br>' => ']' | |
); | |
return strtr($content, $array); | |
}); |
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 | |
global $post; | |
$parents = get_post_ancestors($post->ID); | |
$id = ($parents) ? $parents[count($parents)-1]: $post->ID; | |
$parent = get_page($id); | |
wp_nav_menu(array( | |
'menu' => 'Sub Menu', | |
'submenu' => ucfirst($parent->post_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
<nav class="contain-to-grid primary-sub-nav"> | |
<div class="row"> | |
<div class="large-12 columns"> | |
<?php | |
global $post; | |
$parents = get_post_ancestors($post->ID); | |
$id = ($parents) ? $parents[count($parents)-1]: $post->ID; | |
$parent = get_page($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
<?php | |
if ( ! class_exists('WP_List_Table')) { | |
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); | |
} | |
class Events_List_Table extends WP_List_Table | |
{ | |
function __construct() | |
{ | |
global $status, $page; |
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('login_enqueue_scripts', function() { | |
wp_enqueue_style('login_css', get_template_directory_uri() . '/assets/css/login.css', false); | |
}, 10); | |
add_filter('login_headerurl', function() { | |
return home_url(); | |
}); | |
add_filter('login_headertitle', function() { | |
return get_option('blogname'); |
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
$('form').on('submit', function(e) { | |
e.preventDefault(); | |
ga('send', 'event', 'buyers-guide', 'click', 'form-submitted'); | |
setTimeout(functio() { | |
$(this).submit(); | |
}, 300); | |
}); |