Skip to content

Instantly share code, notes, and snippets.

View man4toman's full-sized avatar
:octocat:
A Bit Git!

Morteza Geransayeh man4toman

:octocat:
A Bit Git!
View GitHub Profile
@man4toman
man4toman / www-post-thumb.php
Created October 15, 2018 11:19 — forked from gmazzap/www-post-thumb.php
WordPress plugin that allow to use an external image url as featured image.
<?php namespace GM\WWWPostThumbnail;
/**
* Plugin Name: WWW Post Thumbnail
* Description: Allow to use an external image url as featured image.
* Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/928bc22e5f49a654cf7c
* Author: Giuseppe Mazzapica
* Author URI: https://github.com/Giuseppe-Mazzapica
* License: MIT
* Version: 0.1.0
*
@man4toman
man4toman / woo-tabs.php
Created April 26, 2021 21:14 — forked from heldervilela/woo-tabs.php
WooCommerce Admin Custom Product Data Tab
// First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' );
function add_my_custom_product_data_tab( $product_data_tabs ) {
$product_data_tabs['my-custom-tab'] = array(
'label' => __( 'My Custom Tab', 'woocommerce' ),
'target' => 'my_custom_product_data',
'class' => array( 'show_if_simple' ),
);
return $product_data_tabs;
}