This file contains hidden or 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 | |
function add_my_custom_product_data_tab( $product_data_tabs ) { | |
$product_data_tabs['my-custom-tab'] = array( | |
'label' => __( 'My Custom Tab', 'my_text_domain' ), | |
'target' => 'my_custom_product_data', | |
); | |
return $product_data_tabs; | |
} | |
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); |
This file contains hidden or 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 | |
/** | |
* CSV Export functionality using PHP. | |
* | |
* For development enquiries head over to https://mehulgohil.com/contact/ | |
* | |
* @author Mehul Gohil | |
*/ | |
// Start the output buffer. |
This file contains hidden or 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 | |
/** | |
* Filter WordPress Search for specific post types | |
* | |
* @param $query | |
* | |
* @return mixed | |
*/ | |
function bloggerpro_only_post_search( $query ) { | |
if ( $query->is_search ) { |
This file contains hidden or 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://rpc.pingomatic.com | |
http://rpc.technorati.com/rpc/ping | |
http://rpc.twingly.com | |
http://blogsearch.google.com/ping/RPC2 | |
http://api.feedster.com/ping | |
http://api.moreover.com/RPC2 | |
http://api.moreover.com/ping | |
http://api.my.yahoo.com/RPC2 | |
http://api.my.yahoo.com/rss/ping | |
http://bitacoras.net/ping |
This file contains hidden or 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 | |
/** | |
* This function will help to create different excerpt length for different post types. | |
* | |
*/ | |
function mg_variable_excerpt_length( $length ) { | |
// Declare $post global variable to detect current post type. | |
global $post; | |
// Check for the type of post type and based on which assign the excerpt length for each post type. |
This file contains hidden or 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 | |
/** | |
* This function will help to create different text for read more of different post types. | |
* | |
*/ | |
function mg_variable_excerpt_read_more( $more ) { | |
// Declare $post global variable to detect current post type. | |
global $post; | |
// Check for the post type based on which assign the read more text for each post type. |
This file contains hidden or 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 | |
/** | |
* Enable Dashicons for WordPress FrontEnd. | |
*/ | |
function mg_enable_dashicons_frontend() { | |
// Enable Dashicons Stylesheet. | |
wp_enqueue_style( 'dashicons' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'mg_enable_dashicons_frontend' ); |
This file contains hidden or 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 | |
/** | |
* The Class. | |
*/ | |
class Give_Sample_Meta_Box { | |
/** | |
* Hook into the appropriate actions when the class is constructed. | |
*/ | |
public function __construct() { |
This file contains hidden or 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 | |
function mg_woo_rename_tabs( $tabs ) { | |
// Rename the Description Tab. | |
$tabs['description']['title'] = __( 'Details', 'your-textdomain-here' ); | |
// Rename the Reviews Tab. | |
$tabs['reviews']['title'] = __( 'Ratings', 'your-textdomain-here' ); | |
// Rename the Additional Information Tab. | |
$tabs['additional_information']['title'] = __( 'More Information', 'your-textdomain-here' ); |
This file contains hidden or 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 | |
/** | |
* Remove Existing Product Data Tabs from Products Detail Page | |
* | |
* @param array $tabs List of Tabs displayed on Products Detail Page. | |
* | |
* @return array $tabs | |
*/ | |
function mg_woo_remove_product_tabs( $tabs ) { |
OlderNewer