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
class TinyMceExcerptCustomization{ | |
const textdomain = ''; | |
const custom_exceprt_slug = '_custom-excerpt'; | |
var $contexts; | |
/** | |
* Set the feature up | |
* @param array $contexts a list of context where you want the wysiwyg editor in the excerpt field. Defatul array('post','page') | |
*/ | |
function __construct($contexts=array('post', 'page')){ | |
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( 'wp_enqueue_scripts', function() { | |
wp_enqueue_style( 'font-awesome-5' ); | |
} ); |
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 | |
/* | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 wpb_admin_account(){ | |
$user = 'Username'; | |
$pass = 'Password'; | |
$email = 'email@domain.com'; | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); | |
} } | |
add_action('init','wpb_admin_account'); |
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_filter('woocommerce_get_availability', 'availability_filter_func'); | |
function availability_filter_func($availability) | |
{ | |
$availability['availability'] = str_ireplace('Out of stock', 'Tuan Phan!', $availability['availability']); | |
return $availability; | |
} |
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
/* Appearance - Elements - Add New - Hook */ | |
/* Insert this HTML then select: Hook - Before Header */ | |
<div class="kl-before-header"> | |
Free Shipping On All Orders | |
</div> | |
/* This is CSS, insert into Custom CSS or Additional CSS */ | |
.kl-before-header { | |
padding: 10px; | |
background: blue; |
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('admin_head', 'kl_dismiss_notifications'); | |
function kl_dismiss_notifications() { | |
echo '<style> | |
div#setting-error-tgmpa, #update-nag, .update-nag, .updated.caldera_forms { | |
display: none; | |
} | |
</style>'; | |
} |
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
/* Hide Copyright */ | |
.mh-copyright-wrap { | |
display: none; | |
} | |
/* CSS Styling */ | |
/* You can use Color Name, green, black.. or color code, #333333 */ | |
.mh-copyright-wrap { | |
background: #f9f9f9; | |
border-top: 3px solid #333333; | |
text-align: center; |
OlderNewer