开发者 | experttextingintegrations |
---|---|
更新时间 | 2021年12月2日 04:20 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 5.8.1 |
版权: | GPLv3 |
版权网址: | 版权信息 |
experttexting-official
to the /wp-content/plugins/
directoryYes! ExpertTexting Plugin is compatible with PHP version 8.0+
No! Not right now but we will add support of REST API in future versions.
You can check the use and details of Functions in ExpertTexting Plugin.
After install plugin, go to "Hooks & Functions" Page
expt_send_sms()
Run the below function to send SMS through PHP
$to = array("10000000001","10000000002"); $msg = "This is your message"; expt_send_sms( $to, $msg );
You can check the use and details of Action Hooks in ExpertTexting Plugin. After install plugin, go to "Hooks & Functions" Page expttxt_send_message Run the action when sending SMS with this plugin. Example: Send mail when send SMS. Parameters: Recipient number: $recipient Sent message: $message `function send_mail_when_send_sms( $recipient, $message ) { $mail = "Recipient is " . $recipient . " And Message is " . $message; wp_mail('you@mail.com', 'Send SMS', $mail); } add_action('expttxt_send_message', 'send_mail_when_send_sms');` expttxt_add_subscriber Run the action when a new user is added or subscribes. Example: Send mail when adding subscriber. Parameters: Subscriber name: $name Subscriber mobile number: $mobile `function send_mail_when_add_subcriber( $name, $mobile ) { $mail = "Subscriber name is " . $name . " And Mobile number is " . $mobile; wp_mail('you@mail.com', 'Adding Subscriber', $mail); } add_action('expttxt_add_subscriber', 'send_mail_when_add_subcriber');` expttxt_add_group Run the action when a group is added. Example: Send mail when adding group. Parameters: Group name: $group_name `function send_mail_when_add_group( $group_name ) { $mail = "New Group name " . $group_name . " is added."; wp_mail('you@mail.com', 'Adding Group', $mail); } add_action('expttxt_add_group', 'send_mail_when_add_group');` expttxt_update_subscriber Run the action when updating the subscriber. Example: Send mail when updating the subscriber. Parameters: Subscriber (array): $subscriber `function send_mail_when_update_subscriber( $subscriber ) { $mail = "Subscriber name " . $subscriber['name'] . " is updated."; wp_mail('you@mail.com', 'Update Subscriber', $mail); } add_action('expttxt_update_subscriber', 'send_mail_when_update_subscriber');` expttxt_update_group Run the action when updating Group. Example: Send mail when updating group. Parameters: Group name: $group_name Group ID: $id `function send_mail_when_update_group( $group_name, $id ) { $mail = "Group name " . $group_name . " is updated."; wp_mail('you@mail.com', 'Update Group', $mail); } add_action('expttxt_update_group', 'send_mail_when_update_group');`
You can check the use and details of Filter Hooks in ExpertTexting Plugin. After install plugin, go to "Hooks & Functions" Page expttxt_from Use the filter to modify the sender's number before sending a message. Example: Change default sender to 'ExpertTexting'. Parameters: Sender id/number: $from `function modify_expt_sender( $from ) { $from = 'ExpertTexting'; return $from; } add_filter('expttxt_from', 'modify_expt_sender');` expttxt_to Use the filter to modify recipient numbers before sending a message. Example: Add a new recipient number to send the message. Parameters: Recipients' numbers (array): $to `function modify_expt_recipient( $to ) { $to[] = '18455xxxxx'; return $to; } add_filter('expttxt_to', 'modify_expt_recipient');` expttxt_msgtext Use the filter to modify text message before sending a message. Example: Include signatures in sent messages. Parameters: Text message: $txtMsg `function modify_expt_textmsg( $txtMsg ) { $txtMsg = $txtMsg . ' Powered by ExpertTexting'; return $txtMsg; } add_filter('expttxt_msgtext', 'modify_expt_textmsg');` expttxt_resend_update_prev_values Use the filter to enable to update the previous entry when resend message. Example: To enable, set the value to TRUE. Parameters: Enable/Disable: $set `function modify_expt_update_previous_entry( $set ) { $set = true; return $set; } add_filter('expttxt_resend_update_prev_values', 'modify_expt_update_previous_entry');` expttxt_main_menu Use the filter to add a submenu page to ExpertTexting menu. Example: Adding a submenu page to ExpertTexting menu. Parameters: Enable/Disable: $subpages `function add_expt_main_menu( $subpages ) { $subpages[] = array( 'parent_slug' => 'et_menu', 'page_title' => 'New Page Title', 'menu_title' => 'New Page', 'capability' => 'manage_options', 'menu_slug' => 'my_new_page', 'callback' => 'new_page_callback', ); return $subpages; } add_filter('expttxt_main_menu', 'add_expt_main_menu'); function new_page_callback() { echo ' '; echo ' Submenu New Page Title'; echo ''; }`