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 | |
| /** | |
| * Allows you to change the default message for variable products. | |
| * | |
| * @param string $message stock Easy Content Restriction message | |
| * @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
| * @return string Your custom message | |
| */ | |
| function change_variable_product_message( $message, $product_id ) { | |
| return 'Our custom message'; |
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 | |
| /** | |
| * Allows you to change the default message for grouped products. | |
| * | |
| * @param string $message stock Easy Content Restriction message | |
| * @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
| * @return string Your custom message | |
| */ | |
| function change_grouped_product_message( $message, $product_id ) { | |
| return 'Our custom message'; |
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 | |
| /** | |
| * Allows you to change the default message for simple products. | |
| * | |
| * @param string $message stock Easy Content Restriction message | |
| * @param int $product_id The post_id for the product the message would be tied to, may be a product variation id | |
| * @return string Your custom message | |
| */ | |
| function change_simple_product_message( $message, $product_id ) { | |
| return 'Our custom message'; |
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 | |
| class CT_Config_Ajax{ | |
| function __construct(){ | |
| add_action( 'wp_ajax_ct_get_sku', array( $this, 'get_sku' ) ); | |
| add_action( 'wp_ajax_nopriv_ct_get_sku', array( $this, 'get_sku' ) ); | |
| } // __construct | |
| public function get_sku(){ |
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 | |
| /** | |
| * Removes the restricted content display from the account page | |
| * | |
| * Don't forget that you are now responsible to show the restricted content to your users somewhere else | |
| */ | |
| function remove_from_account_page(){ | |
| remove_action( 'woocommerce_before_my_account', array( $GLOBALS['wecr_show_content'], 'show_content' ) ); | |
| } |
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 | |
| /** | |
| * Override topic feedback message | |
| * | |
| * @param string $translated_text_out the original feedback text | |
| * @param string $translated_text_in The text that bbPress sent in to the function, or the 'default' text bbPres uses here | |
| * | |
| * @return string $translated_text_out the filtered feedback text | |
| */ | |
| function custom_topic_feedback_messages( $translated_text_out, $translated_text_in ) { |
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
| /** | |
| * Changes the post types that show the 'remove from menu' and 'remove from my account' checkboxes in the WordPress admin | |
| * | |
| * @param array $types required The existing allowed CPTs | |
| * @return array $types Our modified array of CPTs | |
| */ | |
| function change_allowed( $types ){ | |
| $types[] = 'forum'; // change this to your registered custom post type name | |
| return $types; | |
| } |
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 wpse147453_remove_child_categories_from_permalinks( $permalink, $post, $leavename, $sample ) { | |
| if ( in_array( $post->post_type, array( 'focus_courses' ) ) ) { | |
| // Allow for slug to be editable | |
| $slug = $leavename ? '%' . $post->post_type . '%' : $post->post_name; | |
| // Generate premalink prefix based on post type | |
| $prefix = 'courses'; | |
| // add parent term slug | |
| $term_slug = focus_top_term( $post ); |
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
| <a href="#" target="_blank">Edit Content</a> |
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
| {"name":"Mac Curtis","device":1,"model":5,"type":"layout","data":{"layer0":[41,30,31,32,33,34,35,36,37,38,39,45,46,42,43,20,26,8,21,23,28,24,12,18,19,47,48,49,41,4,22,7,9,10,11,13,14,15,51,52,40,225,29,27,6,25,5,17,16,54,55,56,229,224,226,227,44,227,192,193,228],"layer1":[53,244,243,60,61,62,63,173,171,172,168,170,169,0,0,0,82,0,0,0,0,0,82,0,70,74,77,0,0,80,81,79,0,0,0,80,81,79,75,78,0,0,0,0,0,0,0,0,0,0,73,76,0,0,0,0,0,0,192,193,0],"layer2":[0,200,201,202,203,0,0,0,246,241,240,244,243,0,0,0,82,0,0,0,0,0,82,0,70,74,77,0,0,80,81,79,0,0,0,80,81,79,75,78,0,0,0,0,0,0,0,0,0,0,73,76,0,0,0,0,0,0,192,193,0],"taps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0,0,0,0,80,81,79]},"crc":"d4ee7910"} |