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( 'buddyxpro_register_page_login_url', 'custom_register_page_login_url' ); | |
| function custom_register_page_login_url( $default_login_url ) { | |
| // Replace 'your-custom-login-page' with the slug or URL of your custom login page. | |
| $custom_login_url = home_url( '/your-custom-login-page/' ); | |
| // Return the custom login URL. | |
| return $custom_login_url; | |
| } |
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 | |
| /** | |
| * Business Single Custom Tab template file | |
| * | |
| * @package WordPress | |
| * @subpackage bp-business-profile | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; |
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( 'bp_business_profile_single_menu_items', 'custom_business_tabs', 10, 2); | |
| function custom_business_tabs($items, $endpoints) { | |
| $items['custom-tab'] = 'Custom Tab'; | |
| return $items; | |
| } |
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( 'bp_business_profile_filter', 'bp_business_profile_search_filter', 99); | |
| function bp_business_profile_search_filter( $args ) { | |
| if ( isset( $_REQUEST['search_terms'] ) && ! empty( $_REQUEST['search_terms'] ) ) { | |
| $new_args = $args; | |
| $new_args['posts_per_page'] = '-1'; | |
| $new_args['meta_query']['relation'] = 'OR'; | |
| /* | |
| * Add Multipal Meta Meta which also want to search results. |
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('gettext', 'remove_admin_stuff', 20, 3); | |
| /** | |
| * Remove the text at the bottom of the Custom fields box in WordPress Post/Page Editor. | |
| * | |
| * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function remove_admin_stuff( $translated_text, $untranslated_text, $domain ) { | |
| $ld_dashboard_logout_message = 'Please try to login to website to access dashboard. Dashboard are disabled for logout members. '; |
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_more_fields_to_quotation_form() { | |
| ?> | |
| <tr> | |
| <th><?php esc_html_e( 'Phone', 'woocommerce-price-quote-pro' ); ?></th> | |
| <td> | |
| <input type="text" value="" id="mobile" name="mobile"> | |
| </td> | |
| </tr> | |
| <tr> |
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 | |
| /** | |
| * Change business hr in 24hr format | |
| */ | |
| function wbcom_business_work_hour_24_hr_format( $work_hours ) { | |
| $work_hours = array( | |
| '00:00' => '00:00', | |
| '00:15' => '00:15', | |
| '00:30' => '00:30', | |
| '00:45' => '00:45', |
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 | |
| * Wbcom shortcode activity | |
| * | |
| */ | |
| add_action('wp_head','wbcom_shortcode_activity_hide'); | |
| function wbcom_shortcode_activity_hide(){ | |
| global $post; | |
| if( has_shortcode( $post->post_content, 'activity-listing' ) ){ | |
| ?> |
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 restrict_cart_quantity( $item ) { | |
| $cart_items = edd_get_cart_contents(); | |
| if ( ! empty( $cart_items ) ) { | |
| foreach ( $cart_items as $cart_item ) { | |
| $product_type = get_post_meta( $cart_item['id'], '_edd_product_type', true ); | |
| if ( 'service' === $product_type ) { | |
| edd_set_error( 'edd_one_product_limit', __( 'You can only add one service product to the cart.', 'your-textdomain' ) ); |
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( 'ld_dashboard_course_form_fields', function( $fields ) { | |
| if( ! empty( $fields ) ) { //First we check fields are not empty | |
| foreach ( $fields as $key => $field ) { | |
| if( 'field_61fcef414383d' === $fields[$key]['key'] ){ | |
| $fields[$key]['max_width'] = 600; //Provide the value of maximum with of image that would be uploaded by instructor | |
| $fields[$key]['max_height'] = 600; //Provide the value of maximum height of image that would be uploaded by instructor | |
| $fields[$key]['max_size'] = 600; //Provide the value of size of image that would be uploaded by instructor | |
| } |
NewerOlder