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 | |
| add_theme_support( 'my-plugin-style' ); |
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 | |
| $args = array( | |
| 'label' => '', // Text in Label | |
| 'class' => '', | |
| 'style' => '', | |
| 'wrapper_class' => '', | |
| 'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
| 'id' => '', // required | |
| 'name' => '', //name will set from id if empty |
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 | |
| /** | |
| * Adding the Featured Class | |
| * @param array $classes | |
| * @return array | |
| */ | |
| function ibenic_edd_featured_class( $classes ) { | |
| global $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
| <?php | |
| /** | |
| * Process Order Refund through Code | |
| * @return WC_Order_Refund|WP_Error | |
| */ | |
| function ibenic_wc_refund_order( $order_id, $refund_reason = '' ) { | |
| $order = wc_get_order( $order_id ); | |
| // IF it's something else such as a WC_Order_Refund, we don't want that. |
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 change_yoast_seo_og_meta() { | |
| add_filter( 'wpseo_opengraph_desc', 'change_desc' ); | |
| } | |
| function change_desc( $desc ) { | |
| // This article is actually a landing page for an eBook | |
| if( is_singular( 123 ) ) { |
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 | |
| add_filter( 'edd_add_to_cart_item', 'dp_check_item_to_add' ); | |
| /** | |
| * Check the item we want to add in cart (Step #7) | |
| * @param array $item | |
| * @return array|boolean | |
| */ | |
| function dp_check_item_to_add( $item ) { |
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 | |
| //... Somewhere in a class that works with hooks | |
| // Get the global Renderer | |
| global $edd_points_render; | |
| // Remove the Old Renderer Methods | |
| remove_action( 'edd_before_purchase_form', array( $edd_points_render,'edd_points_guest_user_message' ) ); | |
| remove_action( 'edd_before_download_content', array( $edd_points_render,'edd_points_message_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 | |
| /** | |
| * Function to decide if the user can view the content | |
| * @return boolean | |
| */ | |
| function ibenic_can_user_view() { | |
| $ret = false; | |
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 | |
| /** | |
| * Add the Presenters tab to the Members Directory | |
| * @return void | |
| */ | |
| function bp_my_administrators_tab() { | |
| $button_args = array( |
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 | |
| /** | |
| * Replacing the original image source with a placeholder | |
| * Placing the original source under attribute data-original | |
| * @param array $img_match | |
| * @return string | |
| */ | |
| function my_preg_lazyload($img_match) { | |