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
terminus wp "search-replace 'old-url' 'new-url' --skip-plugins=plugin-file-name-here" --site=your-site-name --env=dev-or-test-or-live |
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
terminus wp "search-replace 'mysite.local' 'dev-mysite.pantheon.io'" --site=mysite |
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
function project_add_dashboard_widgets() { | |
wp_add_dashboard_widget( | |
'project_hint_dashboard_widget', // Widget slug. | |
'Title Here', // Title. | |
'project_hint_dashboard_widget_function' // Display function. | |
); | |
} | |
//this function matches the display function in the above code | |
function project_hint_dashboard_widget_function() { |
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_action( 'add_meta_boxes', 'add_side_instructions_box' ); | |
function add_side_instructions_box() { | |
foreach( array( 'custom_post_type', 'page' ) as $customPages ) { //list which posts you would like this to appear on | |
add_meta_box( | |
'project_side_instructions', //meta box id | |
__( 'Helpful Hints', 'site_domain' ), //meta box title | |
'inner_side_instructions_box', //callback to function with box content | |
$customPages, //which pages the box appears on | |
'side', //area of page where the box appears |
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
//EXPONENT FUNCTION | |
//https://css-tricks.com/snippets/sass/power-function/ | |
@function pow($number, $exponent) { | |
$value: 1; | |
@if $exponent > 0 { | |
@for $i from 1 through $exponent { | |
$value: $value * $number; | |
} |