Skip to content

Instantly share code, notes, and snippets.

@brianleejackson
brianleejackson / disable-wordpress-fetch-priority.php
Created December 8, 2023 03:58
Disable WordPress core fetch priority
function disable_fetchpriority_high( $loading_attrs ) {
unset( $loading_attrs['fetchpriority'] );
return $loading_attrs;
}
add_filter(
'wp_get_loading_optimization_attributes',
'disable_fetchpriority_high'
);
@hasinhayder
hasinhayder / gmap_ui.php
Created July 29, 2018 16:35
শর্টকোডের UI বিল্ডার এবং ওয়ার্ডপ্রেসের এডিটরের মাঝেই শর্টকোডের ভিজ্যুয়াল আউটপুট দেখা
<?php
function philosophy_google_map_ui() {
$fields = array(
array(
'label'=>__('Place','philosophy'),
'attr'=>'place',
'type'=>'text',
'meta'=>array(
'placeholder'=>__('Place','philosophy')
@jsit
jsit / functions.php
Last active May 29, 2022 17:03
Customize WordPress comment form output
<?php
/**
* Rewrite the HTML for the author, email, and url comment fields
*/
function custom_comment_fields( $fields ) {
// https://codex.wordpress.org/Function_Reference/comment_form
$commenter = wp_get_current_commenter();