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
<table class="widefat fixed" cellspacing="0"> | |
<thead> | |
<tr> | |
<th id="cb" class="manage-column column-cb check-column" scope="col"></th> <!-- this column contains checkboxes --> | |
<th id="columnname" class="manage-column column-columnname" scope="col"></th> | |
<th id="columnname" class="manage-column column-columnname num" scope="col"></th> <!-- "num" added because the column contains numbers --> | |
</tr> | |
</thead> |
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 | |
/** | |
* Export Class to help export a given database table to CSV. | |
*/ | |
class TOOL_EXPORT_CLASS { | |
/* | |
* Export our forms | |
* @parameters | |
* @table_name the name of the table to export |
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_action( 'wp_enqueue_scripts', 'my_enqueue_assets' ); | |
function my_enqueue_assets() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'animate-css', get_stylesheet_directory_uri() . '/animate.min.css' ); | |
} |
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
/** | |
* Timeline Express Add Custom Metabox | |
* @param array $options Array of options for Timeline Express. | |
*/ | |
function define_custom_excerpt_metabox( $options ) { | |
$announcement_custom_metabox = new_cmb2_box( array( | |
'id' => 'custom_meta', | |
'title' => __( 'Additional Announcement Meta', 'text-domain' ), | |
'object_types' => array( 'te_announcements' ), // Post type | |
'context' => 'advanced', |
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 date/time picker field to Timeline Express announcements | |
* | |
* @param array $custom_field Array of custom fields to append to our announcements. | |
*/ | |
function add_custom_fields_to_announcements( $custom_fields ) { | |
$custom_fields[] = array( | |
'name' => esc_html__( 'Announcement Date & Time', 'text-domain' ), |
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 this line - this is here for syntax highlighting only | |
/** | |
* Alter the read more text on the timeline | |
* | |
* @param string $text The read more link text. | |
* @param integer $post_id The post ID. | |
* | |
* @return string The final read more link text. | |
*/ |
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
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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 | |
/** | |
* Update an existing user by email address | |
* | |
* @author Code Parrots <[email protected]> | |
*/ | |
function update_user_password_by_email() { | |
$user = get_user_by( 'email', '[email protected]' ); |
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
# This makes sure Chrome is always up to date in your test suite | |
# On average this adds about 10 seconds to your build suite | |
# Be sure to use Ubuntu 14.04 (Trusty) in the CircleCI's OS setting (Settings > Build Environment) | |
dependencies: | |
pre: | |
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
- sudo dpkg -i google-chrome.deb | |
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome | |
- rm google-chrome.deb |