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 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 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
machine: | |
timezone: | |
Europe/Copenhagen | |
php: | |
version: 5.3.3 | |
# This will be added to the `/etc/hosts` file | |
hosts: | |
wordpress.dev: 127.0.0.1 |
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
<VirtualHost *:80> | |
LoadModule php7_module /opt/circleci/php/7.1.3/usr/lib/apache2/modules/libphp7.so | |
DocumentRoot "/home/ubuntu/wordpress" | |
ServerName wordpress.dev | |
ServerAlias *.dev | |
<FilesMatch \.php$> | |
SetHandler application/x-httpd-php | |
</FilesMatch> |
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
# 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 |
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 you've registered a custom taxonomy to assign to one of your custom post types, | |
* you'll want to add an additional paprameter to the $args array | |
* | |
*/ | |
// Register Custom Taxonomy | |
function custom_taxonomy() { |
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_action('init', 'prefix_add_user'); | |
function prefix_add_user() { | |
$username = 'username123'; | |
$password = 'azerty321'; | |
$email = 'example@example.com'; |
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 | |
/** | |
* Update an existing user by email address | |
* | |
* @author Code Parrots <support@codeparrots.com> | |
*/ | |
function update_user_password_by_email() { | |
$user = get_user_by( 'email', 'email@example.com' ); |
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 '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 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', |