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
| /** | |
| * Add filter in the CPT | |
| */ | |
| function CPT_filter_by_taxonomies( $post_type, $which ) { | |
| // Apply this only on a specific post type | |
| if ( 'CPT' !== $post_type ) { | |
| return; | |
| } |
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
| DELETE FROM wp_postmeta where post_id IN (SELECT ID from wp_posts where post_type = 'shop_subscription' ); | |
| DELETE FROM wp_comments where comment_post_ID IN (SELECT ID from wp_posts where post_type = 'shop_subscription' ); | |
| DELETE from wp_posts where post_type = 'shop_subscription' | |
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 | |
| /** | |
| * Plugin Name: Custom WooCommerce Webhook | |
| * Plugin URI: https://raftaar1191.com/ | |
| * Description: This plugin provided a demo of Custom WooCommerce Webhook | |
| * Author: raftaar1191 | |
| * Author URI: https://profiles.wordpress.org/raftaar1191/ | |
| * Version: 1.0.0 | |
| */ |
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
| /** | |
| * This will translate the string | |
| */ | |
| function child_theme_slug_setup() { | |
| load_child_theme_textdomain( 'buddyboss-theme-child', get_stylesheet_directory() . '/languages' ); | |
| } | |
| add_action( 'after_setup_theme', 'child_theme_slug_setup' ); |
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
| 1 step-> Install and Activated the WP Migrate DB plugin to the sites where you want to export the CSV | |
| 2 Step-> Now in the Dashboard browse to Tools > Migrate DB Menu | |
| 3 Step-> | |
| Click on Export radio button and check the both the checkbox option inside it `Save as file to your computer` and `Compress file with gzip` | |
| In the Find and replace section | |
| In the Find Box enter the Live sites URL and in the Replace box enter the Local site URL | |
| https://prnt.sc/pq1019 | |
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
| Login to a server | |
| SSH USERNAME@SERVER DOMAIN NAME/SERVERIP ADDRESS | |
| Example: ssh deepak@raftaar1191.com or ssh deepak@102.345.23.34.com |
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
| /** | |
| * Hide the Wp-admin for all the user other then admin | |
| */ | |
| function buddyboss_child_wp_head_hide_admin_bar() { | |
| if ( is_user_logged_in() ) { | |
| global $current_user; | |
| $roles = (array) $current_user->roles; | |
| if ( ! in_array( 'administrator', $roles ) ) { | |
| ?> |
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 | |
| /** | |
| * Plugin Name: BuddyBoss Platform | |
| * Plugin URI: https://buddyboss.com/ | |
| * Description: The BuddyBoss Platform adds community features to WordPress. Member Profiles, Activity Feeds, Direct Messaging, Notifications, and more! | |
| * Author: BuddyBoss | |
| * Author URI: https://buddyboss.com/ | |
| * Version: 1.1.9 | |
| * Text Domain: buddyboss | |
| * Domain Path: /languages/ |
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
| function BP_theme_child_profile_link( $atts ) { | |
| $text = isset( $atts['text'] ) ? $atts['text'] : 'Profile Link'; | |
| $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ); | |
| $profile_link = trailingslashit( $profile_link . 'change-avatar' ); | |
| return sprintf( '<a href="%s">%s</a>', $profile_link, $text ); | |
| } | |
| add_shortcode( 'BP_profile_link', 'BP_theme_child_profile_link' ); | |
| add_filter( 'bp_core_render_message_content', 'do_shortcode' ); |
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 | |
| /** | |
| * Template part for displaying posts | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
| * | |
| * @package BuddyBoss_Theme | |
| */ | |
| ?> |