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( 'acf/load_field/name=washu_ppi_map', array( self::$instance, 'set_default_google_maps_center' ) ); | |
... | |
public static function set_default_google_maps_center( $field ) { | |
$google_map_center = get_field( 'washu_ppi_places_map_center', 'option' ); | |
$field[ 'center_lat' ] = $google_map_center[ 'lat' ]; | |
$field[ 'center_lng' ] = $google_map_center[ 'lng' ]; | |
return $field; |
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
... | |
{ | |
"height": "", | |
"center_lat": "38.641265", | |
"center_lng": "-90.2881593", | |
"zoom": "", | |
"key": "field_58545be03c13a", | |
"label": "Location\/Map", | |
"name": "washu_ppi_map", | |
"type": "google_map", |
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
... | |
{ | |
"height": "", | |
"center_lat": "38.641265", | |
"center_lng": "-90.2881593", | |
"zoom": "", | |
"key": "field_5858518f3db94", | |
"label": "Map Center", | |
"name": "washu_ppi_places_map_center", | |
"type": "google_map", |
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 new styles to the TinyMCE "formats" menu dropdown | |
if ( ! function_exists( 'wusm_styles_dropdown' ) ) { | |
function wusm_styles_dropdown( $settings ) { | |
// Create array of new styles | |
// array of arrays, see example here: http://codex.wordpress.org/TinyMCE_Custom_Styles | |
$new_styles = array( | |
array( | |
'title' => 'Custom Styles', |
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
#!/bin/sh | |
# Standard WUSM version numbering: | |
# year.month.day.commit | |
# | |
# This script searches all files in the git repo | |
# and bumps the version number | |
new=$(date +"%y.%m.%d.0") | |
a=( ${new//./ } ) | |
file=$(grep -lir "Version:" *.php) |
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 style selector drop down | |
function my_mce_buttons_2( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); | |
// customize the MCE editor | |
function aah_customize_mce( $init ) { |
NewerOlder