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 | |
/* | |
Plugin Name: Display Custom Id | |
Description: This plugin assigns a random custom id to each registered user, you can show your custom id by inserting a short code into your posts. | |
Author: Mahamad Sayed | |
*/ | |
// generste random customer ID | |
function generate_custom_id (){ | |
$new_id = rand(1, 1000); | |
return $new_id; |
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
/** | |
* Disable the emoji's | |
*/ | |
function disable_emojis() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); | |
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); |
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
gzip on; | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
gzip_vary on; | |
gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/javascript application/x-javascript; |
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
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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 | |
/** | |
* Display Divi Settings for all custom post types | |
* | |
* @package DiviColt | |
* @since 1.1 | |
*/ | |
add_action('add_meta_boxes', 'divicolt_add_meta_box'); | |
function divicolt_add_meta_box() |
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
function custom_style() { | |
if ( is_page( 'PAGE_ID' ) ) { | |
wp_enqueue_style( 'home', get_stylesheet_directory_uri() . '/home.css' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_style' ); |
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 | |
// Divi Builder on custom post types by https://wpcolt.com | |
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) | |
{ | |
foreach (get_post_types() as $post_type) { | |
if (!in_array($post_type, $post_types) and post_type_supports($post_type, 'editor')) { | |
$post_types[] = $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
/* | |
Theme Name: Twenty Sixteen Child | |
Template: twentysixteen | |
*/ |
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_action ( 'wp_enqueue_scripts', 'bootstrap_cdn_scripts_styles', 10 ); | |
function bootstrap_cdn_scripts_styles() { | |
wp_enqueue_style( 'bootstrap-css', '//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css', array(), '3.0.3', 'all' ); | |
wp_enqueue_script( 'bootstrap-js', '//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js', array(), '3.0.3', true ); | |
} |
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
function jlwp_register_mdlcss() { | |
wp_register_style( 'material.indigo-pink.min', get_stylesheet_directory_uri() .'/material.min.css', 'all' ); | |
wp_enqueue_style( 'material.indigo-pink.min' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'jlwp_register_mdlcss' ); |