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 post_thumbnail_html ($html, $post_id, $post_thumbnail_id, $size, $attr) { | |
global $ce_config, $post; | |
// if($size !== '') return $html; | |
if( $post && $post->post_type !== 'ad' ) return $html; | |
$list_view = isset($_COOKIE['ce_list_view']) ? $_COOKIE['ce_list_view'] : $ce_config['default_grid']; | |
if(is_single()) { | |
$list_view = 'grid'; |
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('init', 'ae_woocommerce_before_checkout_form'); | |
function ae_woocommerce_before_checkout_form(){ | |
add_filter( 'woocommerce_checkout_fields', 'ae_woocommerce_checkout_fields' ); | |
} | |
function ae_woocommerce_checkout_fields($checkout_fields){ | |
$checkout_fields['order']["new_comment"] = array( | |
'type' => 'textarea', | |
'class' => array('notes'), |
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 | |
if ( !class_exists( 'AEM_Autoload' ) ) { | |
/** | |
* Auto load core class and module class | |
* | |
* Class WFA_Autoload | |
* @author nguyenvanduocit | |
*/ |
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
http://codesymphony.co/writing-wordpress-plugin-unit-tests |
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 | |
/** | |
* Summary | |
* Description. | |
* | |
* @since 0.9.0 | |
* @package | |
* @subpackage | |
* @author nguyenvanduocit |
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
public function admin_page_content(){?> | |
<div class="wrap"> | |
<h1>Regenerate Thumbnail</h1> | |
<form action=""> | |
<p>Khi bạn click vào link dưới đây, tất cả các file thumbnail và các file ảnh đá được resize theo các size mà theme ( đang được active ) đã đăng ký với WordPress đều sẽ bị regenerate. Bất cứ lúc nào bạn muốn dừng lại, đều có thể ấn vào button "Dừng lại"</p> | |
<div id="regenerateStatus"> | |
<p> <span id="statusString">Đang xử lý</span> : <span id="processed">2</span>/<span id="total">10</span> files</p> | |
</div> | |
<p class="submit"><button type="submit" name="submit" id="startStopRegenerate" class="button button-primary">Bắt đầu</button></p> | |
</form> |
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 | |
/* | |
Plugin Name: WP Gist oEmbed | |
Plugin URI: https://laptrinh.senviet.org | |
Description: Embed source from gist.github. | |
Author: nguyenvanduocit | |
Version: 1.9.0 | |
Author URI: http://nvduoc.senviet.org | |
*/ |
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
public function admin_page_content() { | |
?> | |
<div class="wrap"> | |
<h1>Regenerate Thumbnail</h1> | |
<form action=""> | |
<p>Khi bạn click vào link dưới đây, tất cả các file thumbnail và các file ảnh đá được resize theo các | |
size mà theme ( đang được active ) đã đăng ký với WordPress đều sẽ bị regenerate. Bất cứ lúc nào bạn | |
muốn dừng lại, đều có thể ấn vào button "Dừng lại"</p> |
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($){ | |
$( document ).ready(function() { | |
var isProcessing = false; | |
var regenerateStatus = $('#regenerateStatus'); | |
var statusString = $('#statusString'); | |
$(document).on('click', '#startStopRegenerate', function(e){ | |
e.preventDefault(); | |
var $startStopRegenerateButton = $('#startStopRegenerate'); | |
if(!isProcessing){ |
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($){ | |
$( document ).ready(function() { | |
var isProcessing = false; | |
var regenerateStatus = $('#regenerateStatus'); | |
var statusString = $('#statusString'); | |
var processedCountText = $('#processed'); | |
var totalCountText = $('#total'); | |
var startStopRegenerateButton = $('#startStopRegenerate'); | |
$(document).on('click', '#startStopRegenerate', function(e){ |