/* ————————————————————————- * * Gravity Form: Replace custom merge tags /* ————————————————————————- */ add_filter( ‘gform_replace_merge_tags’, function ( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) { if ( strpos( $text, ‘{current_hour}’ ) !== false ) { $text = str_replace( ‘{current_hour}’,…Continue reading
/** * Allow JS uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * Allow CSS uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
// Shortcode for the site title function site_title_shortcode() { $name = get_bloginfo(‘name’); return $name; } add_shortcode(‘site-title’, ‘site_title_shortcode’);Continue reading
// Shortcode for current year function year_shortcode() { $year = date_i18n(‘Y’); return $year; } add_shortcode(‘year’, ‘year_shortcode’);Continue reading
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );Continue reading
function add_link_to_admin_bar($admin_bar) { $args = array( ‘id’ => ‘orders’, ‘title’ => ‘~ ORDERS ~’, ‘href’ => esc_url( admin_url( ‘edit.php?post_type=shop_order’ ) ) ); $admin_bar->add_node($args); } add_action(‘admin_bar_menu’, ‘add_link_to_admin_bar’, 999);Continue reading
function add_link_to_admin_bar($admin_bar) { $args = array( ‘id’ => ‘orders’, ‘title’ => ‘~ ORDERS ~’, ‘href’ => esc_url( admin_url( ‘edit.php?post_type=shop_order’ ) ) ); $admin_bar->add_node($args); } add_action(‘admin_bar_menu’, ‘add_link_to_admin_bar’, 999);Continue reading
function add_link_to_admin_bar_2($admin_bar) { $args = array( ‘id’ => ‘products’, ‘title’ => ‘# PRODUCTS #’, ‘href’ => esc_url( admin_url( ‘edit.php?post_type=product’ ) ) ); $admin_bar->add_node($args); } add_action(‘admin_bar_menu’, ‘add_link_to_admin_bar_2’, 999);Continue reading
function add_link_to_admin_bar_2($admin_bar) { $args = array( ‘id’ => ‘products’, ‘title’ => ‘# PRODUCTS #’, ‘href’ => esc_url( admin_url( ‘edit.php?post_type=product’ ) ) ); $admin_bar->add_node($args); } add_action(‘admin_bar_menu’, ‘add_link_to_admin_bar_2’, 999);Continue reading