- Site List: terminus taoti:site:list
- Multidev
- Create: terminus multidev:create --
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
$date = get_field('date_published', false, false); | |
$event_date = new DateTime($date); | |
$new_time = $event_date->format('ga'); | |
$first_date = $event_date->format('F j, Y'); | |
<?= $first_date; ?> |
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 | |
add_filter( 'gform_field_choice_markup_pre_render', function ( $choice_markup, $choice, $field, $value ) { | |
if ( $field->get_input_type() == 'radio') { | |
return str_replace( "<label", "<span class='faux-radio'></span><label", $choice_markup ); | |
} | |
if ( $field->get_input_type() == 'checkbox') { | |
return str_replace( "<label", "<span class='faux-checkbox'></span><label", $choice_markup ); | |
} |
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 | |
### This file provides an API for rebuilding metaboxes | |
### See https://rudrastyh.com/wordpress/tag-metabox-like-categories.html | |
### for inspiration on content. | |
### See wp-admin/meta-boxes.php for source-code. | |
// add_action( 'admin_menu', 'taoti_post_taxonomy_metabox_remove' ); | |
// add_action( 'admin_menu', 'taoti_add_autosorting_taxonomy_metabox' ); | |
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 | |
/** | |
* Create Post Example | |
* | |
*. Note: See https://www.advancedcustomfields.com/resources/update_field/ for notes. | |
*/ | |
// Create new post. | |
$post_data = array( |
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
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
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 | |
/** | |
* Note: If using Timber, a generated anchor is avaiable via {{ block.id }} | |
* This approach requires creating a custom 'anchor_id' field and/or using PHP to custom-generate one. | |
*/ | |
$anchor_id = get_sub_field( 'anchor_id' ); | |
?> | |
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
function custom_columns( $columns ) { | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'featured_image' => 'Image', | |
'title' => 'Title', | |
'comments' => '<span class="vers"><div title="Comments" class="comment-grey-bubble"></div></span>', | |
'date' => 'Date' | |
); | |
return $columns; | |
} |