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 | |
/** | |
* DevKit related tweaks | |
* https://dplugins.com/downloads/devkit/ | |
* | |
* Must be included in functions.php | |
* | |
* @package GenerateChild | |
*/ | |
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 | |
/** | |
* Remove this opening PHP tag when adding to your theme's functions.php | |
* It's included here for proper syntax highlighting in the gist. | |
*/ | |
/** | |
* Displays an grid of the GeneratePress global color palette with color blocks. | |
* Built to use on website style guides with Beaver Builder but can be used anywhere. | |
* Global Colors must be set in the GP Customiser |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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
/* form placeholder overrides - have to use !important or this doesn't work | |
--------------------------------------------- */ | |
::-webkit-input-placeholder { /* Chrome */ | |
color: #1E1F22 !important; | |
} | |
:-ms-input-placeholder { /* IE 10+ */ | |
color: #1E1F22 !important; | |
} | |
::-moz-placeholder { /* Firefox 19+ */ | |
color: #1E1F22 !important; |
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 | |
// filter the Gravity Forms button type | |
add_filter("gform_submit_button", "form_submit_button", 10, 2); | |
function form_submit_button($button, $form){ | |
// The following line is from the Gravity Forms documentation - it doesn't include your custom button text | |
// return "<button class='button' id='gform_submit_button_{$form["id"]}'>'Submit'</button>"; | |
// This includes your custom button text: | |
return "<button class='button' id='gform_submit_button_{$form["id"]}'>{$form['button']['text']}</button>"; | |
} | |
// Oops this strips important stuff |
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
/* Automatically set the image Title, Alt-Text, Caption & Description upon upload | |
--------------------------------------------------------------------------------------*/ | |
add_action( 'add_attachment', 'my_set_image_meta_upon_image_upload' ); | |
function my_set_image_meta_upon_image_upload( $post_ID ) { | |
// Check if uploaded file is an image, else do nothing | |
if ( wp_attachment_is_image( $post_ID ) ) { | |
$my_image_title = get_post( $post_ID )->post_title; |
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
if ( ! function_exists('cpt_projects') ) { | |
// Register Custom Post Type | |
function cpt_projects() { | |
$labels = array( | |
'name' => 'project', | |
'singular_name' => 'Project', | |
'menu_name' => 'Camel Projects', | |
'name_admin_bar' => 'Post Type', |
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
/** | |
* Change Row Background Image to Background Color for mobile devices | |
* assign pro-row-bg-1 class to the row | |
* | |
* @author Davinder Singh Kainth | |
* @link http://probeaver.com/?p=348 | |
* | |
*/ | |
@media only screen and (max-width: 768px) { |
NewerOlder