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 | |
/** | |
ENABLE CUSTOM POST TYPES WITHIN DIVI BUILDER | |
@author Nagdy at wpcolt.com | |
@see https://wpcolt.com/enable-divi-visual-builder-on-custom-post-types/ | |
*/ | |
add_filter('et_builder_post_types', 'divicolt_post_types'); | |
add_filter('et_fb_post_types','divicolt_post_types' ); // Enable Divi Visual Builder on the custom post types | |
function divicolt_post_types($post_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
/** | |
* Don’t Overthink It (Flexbox) Grids | |
* @author Chris Coyer | |
* @example https://css-tricks.com/dont-overthink-flexbox-grids/ | |
*/ | |
body { | |
padding: 20px; | |
} | |
.flex-grid, |
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
/** | |
* JAVASCRIPT FEATURE DETECTION | |
* | |
* @author [Rob W] [http://stackoverflow.com/users/938089/rob-w] | |
* @version 13 2/8/17 | |
* @see http://stackoverflow.com/posts/9851769/revisions | |
* @example http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser/9851769#9851769 | |
* @example https://jsfiddle.net/finstah/zcj4xtcq/ | |
*/ | |
// Opera 8.0+ |
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 | |
if ( version_compare(PHP_VERSION, '5.5', '<') ) { | |
wp_die('PHP 5.5 is required.'); | |
}; | |
?> |
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 | |
/** | |
* == About this Gist == | |
* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
* // This is a gist, copied here for convenience, but please see source down for the maintainer and give the credit to them. // | |
* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings |
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
/** | |
* Twenty Fifteen only works in WordPress 4.1 or later. | |
*/ | |
if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { | |
require get_template_directory() . '/inc/back-compat.php'; | |
} |
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
/** | |
* http://wordpress.stackexchange.com/questions/131814/if-current-user-is-admin-or-editor | |
* set wpadminbar to position fixed to work with UD Theme 8/29/15 CL | |
*/ | |
$user = wp_get_current_user(); | |
$allowed_roles = array('editor', 'administrator', 'author'); | |
if( array_intersect($allowed_roles, $user->roles ) ) | |
$custom_css = | |
"@media screen and (max-width:600px) {#wpadminbar {position: fixed !important;}}".'/n'; |
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 | |
/** | |
* page information | |
* | |
* options-general.php?page=sb_bar | |
* pagenow = 'settings_page_sb_bar', | |
* adminpage = 'settings_page_sb_bar', | |
*/ | |
/** | |
* Slug of the plugin screen. |
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
Show hidden characters
{ | |
"added_words": | |
[ | |
"uninstalled", | |
"plugin", | |
"admin" | |
], | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, // fix for CSS3 package | |
"auto_complete_delay": 100, |
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 | |
/** | |
* https://ikreativ.com/combine-minify-css-with-php/ | |
* http://stackoverflow.com/questions/9862904/css-merging-with-php | |
*/ | |
header('Content-type: text/css'); | |
ob_start("compress"); | |
function compress($buffer) { | |
/* remove comments */ | |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); |