Skip to content

Instantly share code, notes, and snippets.

View pickplugins's full-sized avatar
🏠
Working from home

PickPlugins pickplugins

🏠
Working from home
View GitHub Profile
@pickplugins
pickplugins / gist:ffc60bef0323716ab9678ec9c3589813
Created January 3, 2026 18:05
accordions_content_body_allowed_tags
function accordions_content_body_allowed_tags( $allowed_tags ) {
$allowed_tags['iframe'] = array(
'src' => true,
'width' => true,
'height' => true,
'frameborder' => true,
);
return $allowed_tags;
}
@pickplugins
pickplugins / gist:e4ce8bdb78f2a3307beb972ada49084b
Created November 8, 2025 05:28
User Verification - Email templates
New User Registration
<p>Hi {user_name},</p>
<p>Thank you for signing up! Please verify your email address by clicking the link below:</p>
<p><a class="btn" href="{ac_activaton_url}">Verify My Email</a>
</p>
<p>This link will expire in 24 hours. If you didn’t create this account, please ignore this email.</p>
<p>Welcome aboard,</p>
<p>{site_name} - {site_description}</p>
add_action('wcps_layout_element_post_title', 'wcps_layout_element_post_title_20200331', 90);
function wcps_layout_element_post_title_20200331($args)
{
$product_id = isset($args['product_id']) ? $args['product_id'] : '';
$elementData = isset($args['elementData']) ? $args['elementData'] : array();
$element_index = isset($args['element_index']) ? $args['element_index'] : '';
$product = new WC_Product($product_id);
add_action('wcps_layout_element_post_title', 'wcps_layout_element_post_title_20200331', 90);
function wcps_layout_element_post_title_20200331($args)
{
$product_id = isset($args['product_id']) ? $args['product_id'] : '';
$elementData = isset($args['elementData']) ? $args['elementData'] : array();
$element_index = isset($args['element_index']) ? $args['element_index'] : '';
$product = new WC_Product($product_id);
@pickplugins
pickplugins / gist:0fdd932280cdebebca06aff08c1048df
Created March 12, 2024 07:22
Post Grid - Related post by current post categories
function post_grid_query_args_20200429($query_args, $args)
{
$current_post_id = get_the_ID();
$taxonomy = "category";
$post_categories = get_the_terms($current_post_id, $taxonomy);
$tax_query = isset($query_args['tax_query']) ? $query_args['tax_query'] : [];
Remove all DS_Store files
git rm --cached -f *.DS_Store
{"kind":"webfonts#webfontList","items":[{"family":"ABeeZee","variants":["regular","italic"],"subsets":["latin","latin-ext"],"version":"v22","lastModified":"2022-09-22","files":{"regular":"http://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN6tKukbcHCpE.ttf","italic":"http://fonts.gstatic.com/s/abeezee/v22/esDT31xSG-6AGleN2tCklZUCGpG-GQ.ttf"},"category":"sans-serif","kind":"webfonts#webfont"},{"family":"Abel","variants":["regular"],"subsets":["latin"],"version":"v18","lastModified":"2022-09-22","files":{"regular":"http://fonts.gstatic.com/s/abel/v18/MwQ5bhbm2POE6VhLPJp6qGI.ttf"},"category":"sans-serif","kind":"webfonts#webfont"},{"family":"Abhaya Libre","variants":["regular","500","600","700","800"],"subsets":["latin","latin-ext","sinhala"],"version":"v13","lastModified":"2022-09-22","files":{"500":"http://fonts.gstatic.com/s/abhayalibre/v13/e3t5euGtX-Co5MNzeAOqinEYj2ryqtxI6oYtBA.ttf","600":"http://fonts.gstatic.com/s/abhayalibre/v13/e3t5euGtX-Co5MNzeAOqinEYo23yqtxI6oYtBA.ttf","700":"http://fonts.gstatic.com
function custom_wpkses_post_tags( $tags, $context ) {
if ( 'post' === $context ) {
$tags['iframe'] = array(
'src' => true,
'height' => true,
'width' => true,
'frameborder' => true,
add_filter('post_grid_share_buttons', 'post_grid_share_buttons_custom', 90, 2);
function post_grid_share_buttons_custom($share_button_html, $args)
{
$element = isset($args['element']) ? $args['element'] : array();
$post_id = isset($args['post_id']) ? $args['post_id'] : '';
$post_title = get_the_title($post_id);
$post_link = get_permalink($post_id);