PHP Filter Hooks – Customizing Your WordPress Social Media Automation

Estimated reading: 2 minutes 703 views

Bit Social PHP Filter Hooks allow developers to customize and extend the functionality of Bit Social by adding their own code. Using these hooks, you can modify default behavior—like changing post content, controlling what gets shared, or integrating with other plugins—without changing the core plugin files.

Here are some Bit Social PHP filter hooks:​

bit_social_post_data

Description:

The bit_social_post_data filter hook in Bit Social allows you to modify the post content and images before the data is shared to a connected social media platform. You can use this hook to customize the message, adjust formatting, or extract specific fields from custom post types.

apply_filters('bit_social_post_data', function ($data, $priority)

Usage:

The following example shows how to modify the submitted data before it is saved to the database.

add_filter('bit_social_post_data', 'customize_bit_social_post_data', data, 2);

function customize_bit_social_post_data($data, $postId) {
    // Modify the post data before sending to social platforms
 
    return $data;
}

Parameters:

  • $data (array): This is the post data that Bit Social prepares to send to social platforms.
  • priority (int): This is the ID of the WordPress post currently being processed.

Share this Doc

PHP Filter Hooks – Customizing Your WordPress Social Media Automation

Or copy link

CONTENTS