Skip to content

Instantly share code, notes, and snippets.

View manhleo93's full-sized avatar

Đức Mạnh manhleo93

View GitHub Profile
// show notice if license is invalid
if ( ! $this->license_is_valid() ) {
if ( $this->get_license_key() == '' ) {
$message = __( '<b>Warning!</b> You didn\'t set your %s license key yet, which means you\'re missing out on updates and support! <a href="%s">Enter your license key</a> or <a href="%s" target="_blank">get a license here</a>.' );
} else {
$message = __( '<b>Warning!</b> Your %s license is inactive which means you\'re missing out on updates and support! <a href="%s">Activate your license</a> or <a href="%s" target="_blank">get a license here</a>.' );
}
?>
<div class="notice notice-error yoast-notice-error">
<p><?php printf( __( $message, $this->product->get_text_domain() ), $this->product->get_item_name(), $this->product->get_license_page_url(), $this->product->get_tracking_url( 'activate-license-notice' ) ); ?></p>
/* ## Comments by Vũ đức Mạnh
--------------------------------------------- */
.comment-respond,
.entry-pings,
.entry-comments {
color: #32373c;
padding: 20px 45px 40px 45px;
overflow: hidden;
background: #fff;
}
// Code to Display Featured Image with Caption on top of the post
add_action( 'genesis_before_entry', 'featured_post_image', 8 );
function featured_post_image() {
if ( ! is_singular( 'post' ) ) {
return;
}
$image = genesis_get_image( 'format=url&size=post-image' ); // get the URL of featured image.
.wp-caption-text {
font-size: 18px;
font-size: 1.8rem;
font-weight: 700;
margin: 0;
text-align: left;
background: #fff;
border-bottom: 1px solid #ddd;
padding: 17px 0 17px 24px;
line-height: 120%;
// Load Font Awesome
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' );
}
// Display Post Word Count in Genesis
// Note: Special Thanks to Victor Front: Ref: https://www.facebook.com/groups/genesiswp/permalink/1536463436404848/
// Print Post Word Count and Create a Shortcode
add_shortcode( 'word-count', 'post_word_count' );
function post_word_count() {
return sprintf( __( '%s Words', 'leaguewp' ), str_word_count( strip_tags( get_post_field( 'post_content', get_the_ID() ) ), 0 ) );
}
// Customize Post Info in Entry Header and Insert Short Code for Post Word Count
.entry-comments-link::before, .entry-time::after {
content: "\2014";
margin: 0 6px 0 2px;
}
/* Thêm cột vào Footer - Và thiết kế lại form eNews Extended trong genesis */
.footer-widgets-1 {
width: 100%;
}
.enews-widget input {
font-size: 17px;
margin-bottom: 12px;
width: 400px;
// Customize Lists in Recent Posts Widget
class Genesis_Widget_Recent_Posts extends WP_Widget {
function __construct() {
$widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "The most recent posts on your site") );
parent::__construct('recent-posts', __('Recent Posts'), $widget_ops);
$this->alt_option_name = 'widget_recent_entries';
add_action( 'save_post', array($this, 'flush_widget_cache') );
add_action( 'deleted_post', array($this, 'flush_widget_cache') );
li.custom-list {
padding-right: 0;
margin-left: 0;
list-style-type: none;
counter-increment: step-counter;
padding-bottom: 15px;
margin-top: 15px;
margin-bottom: 15px;
display: flex;
}