This file contains hidden or 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 | |
/** | |
* Set constants for Google Maps JS API key--used for ACF's backend map--and Google Maps | |
* Embed API Key, used for generating maps on the site front end. | |
* | |
* @link https://developers.google.com/maps/documentation/javascript/get-api-key | |
* @link https://developers.google.com/maps/documentation/embed/get-api-key | |
*/ | |
const GOOGLE_MAPS_JS_API_KEY = 'MAPS-JS-API-KEY'; |
This file contains hidden or 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: Convert ACF PHP to JSON | |
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
*/ | |
namespace ConvertAcfPhpToJson; | |
/** | |
* Add submenu item under 'Custom Fields' |
This file contains hidden or 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 | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, curl wget, rsync, git, subversion and composer. | |
# | |
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
This file contains hidden or 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 | |
/** | |
* Clean up pagination | |
*/ | |
add_filter( 'wp_pagenavi', __NAMESPACE__ . '\\gc_pagination', 10, 2 ); | |
function gc_pagination($html) { | |
$out = ''; | |
$out = str_replace('<div','',$html); | |
$out = str_replace('class=\'wp-pagenavi\'>','',$out); |
This file contains hidden or 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 | |
/* | |
For a better understanding of ics requirements and time formats | |
please check https://gist.github.com/jakebellacera/635416 | |
*/ | |
// UTILS | |
// Check if string is a timestamp |
This file contains hidden or 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( have_rows('faqs') ): ?> | |
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
<?php $i=1; while ( have_rows('faqs') ) : the_row(); ?> | |
<div class="panel panel-default"> | |
<div class="panel-heading" role="tab" id="heading-<?php echo $i; ?>"> | |
<h2 class="panel-title"> | |
<a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne"> | |
<?php the_sub_field('question'); ?> | |
</a> | |
</h2> |
This file contains hidden or 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 | |
// Do NOT include the opening php tag above | |
add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' ); | |
/* | |
* Modify TinyMCE editor to remove H1. | |
*/ | |
function tiny_mce_remove_unused_formats($init) { | |
// Add block format elements you want to show in dropdown | |
$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre'; |
This file contains hidden or 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: HowTo Plugin | |
Plugin URI: | |
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine | |
Author: Heiko, Frank | |
Author URI: http://bueltge.de | |
Version: 0.1 | |
License: |