← Back
Editing: fbomatic-facebook-list.php
<?php if(is_admin()) { $fbomatic_Main_Settings = get_option('fbomatic_Main_Settings', false); $fbomaticredirect = admin_url('admin.php?page=fbomatic_facebook_panel&fb_auth_done=true'); $fbomaticredirect = str_replace('http://', 'https://', $fbomaticredirect); $fbomaticredirect_url = urlencode($fbomaticredirect); $app_secret = ''; $app_id = ''; if (isset($fbomatic_Main_Settings['app_secret2']) && $fbomatic_Main_Settings['app_secret2'] != '') { $app_secret = $fbomatic_Main_Settings['app_secret2']; } else { if (isset($fbomatic_Main_Settings['app_secret']) && $fbomatic_Main_Settings['app_secret'] != '') { $app_secret = $fbomatic_Main_Settings['app_secret']; } } if (isset($fbomatic_Main_Settings['app_id2']) && $fbomatic_Main_Settings['app_id2'] != '') { $app_id = $fbomatic_Main_Settings['app_id2']; } else { if (isset($fbomatic_Main_Settings['app_id']) && $fbomatic_Main_Settings['app_id'] != '') { $app_id = $fbomatic_Main_Settings['app_id']; } } if (isset($fbomatic_Main_Settings['api_version']) && $fbomatic_Main_Settings['api_version'] != 'default' && $fbomatic_Main_Settings['api_version'] != '') { $api_ver = $fbomatic_Main_Settings['api_version']; } else { $api_ver = '16.0'; } if(isset($_POST['fbomatic_auth']) && isset($_REQUEST['page']) && $_REQUEST['page'] == 'fbomatic_facebook_panel') { $fbomatic_unique_id = md5(uniqid(rand(), TRUE)); setcookie("fbomatic_unique_id", $fbomatic_unique_id, "0", "/"); $redir_url = "https://www.facebook.com/v" . $api_ver . "/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . $fbomaticredirect_url . "&state=" . $fbomatic_unique_id . "&auth_type=rerequest&scope=email,public_profile"; $redir_url .= ',pages_manage_posts'; $redir_url .= ',pages_read_user_content'; $redir_url .= ',pages_show_list'; $redir_url .= ',pages_read_engagement'; if(!function_exists('wp_redirect')) { include_once( ABSPATH . 'wp-includes/pluggable.php' ); } wp_redirect($redir_url); exit(); } $code=""; if(isset($_REQUEST['code']) && isset($_REQUEST['page']) && $_REQUEST['page'] == 'fbomatic_facebook_panel') { $code = $_REQUEST["code"]; } if(isset($_COOKIE['fbomatic_unique_id']) && isset($_REQUEST['state']) && ($_COOKIE['fbomatic_unique_id'] === $_REQUEST['state']) && $code != '') { $token_url = "https://graph.facebook.com/v".$api_ver."/oauth/access_token?" . "client_id=" . $app_id . "&redirect_uri=" . $fbomaticredirect_url . "&client_secret=" . $app_secret . "&code=" . $code; $params = null; $access_token=""; $response = wp_remote_get($token_url); if(is_array($response)) { if(isset($response['body'])) { $params= json_decode($response['body']); if(isset($params->access_token)) $access_token = $params->access_token; } } if($access_token!="") { $long_token_url = "https://graph.facebook.com/v{$api_ver}/oauth/access_token?" . "grant_type=fb_exchange_token" . "&client_id={$app_id}" . "&client_secret={$app_secret}" . "&fb_exchange_token={$access_token}"; $response = wp_remote_get($long_token_url); if (is_array($response) && !empty($response['body'])) { $params = json_decode($response['body']); if (!empty($params->access_token)) { $access_token = $params->access_token; fbomatic_log_to_file('Exchanged short-lived token for long-lived token.'); } } } if($access_token!="") { update_option('fbomatic_access_token',$access_token); $offset=0; $limit=3; $url = 'https://graph.facebook.com/v'.$api_ver."/me?access_token=" . $access_token; $content=wp_remote_get($url); $user_fb_id="0"; if(is_array($content)) { $result = $content['body']; $json = json_decode($result); if(isset($json->id)) { $user_fb_id=$json->id; } } $data = array(); $next_url = "https://graph.facebook.com/v{$api_ver}/me/accounts?access_token={$access_token}&limit={$limit}"; do { usleep(300000); fbomatic_log_to_file('next_url: ' . print_r($next_url, true)); $pp = wp_remote_get($next_url); if (!is_array($pp) || empty($pp['body'])) { break; } $pagearray1 = json_decode($pp['body']); fbomatic_log_to_file('Fetching Facebook pages: ' . print_r($pagearray1, true)); if (isset($pagearray1->error)) { if ( isset($pagearray1->error->error_user_msg) && stripos($pagearray1->error->error_user_msg, 'limit to 3 instances') !== false ) { break; } break; } if (!empty($pagearray1->data) && is_array($pagearray1->data)) { $data = array_merge($data, $pagearray1->data); } if (isset($pagearray1->paging->next)) { $next_url = $pagearray1->paging->next; } elseif (isset($pagearray1->paging->cursors->after)) { $after = $pagearray1->paging->cursors->after; $next_url = "https://graph.facebook.com/v{$api_ver}/me/accounts" . "?access_token={$access_token}" . "&limit={$limit}" . "&after={$after}"; } else { $next_url = null; } } while ($next_url); $count=count($data); $store = $user_fb_id . '-' . $access_token . '-Profile Page,'; for($i=0;$i<$count;$i++) { $store.=$data[$i]->id . "-" . $data[$i]->access_token . "-" . $data[$i]->name . ","; } $store=rtrim($store,","); update_option('fbomatic_page_ids',$store); $offset=0; $store=''; $data = array(); $next_url = "https://graph.facebook.com/v{$api_ver}/me/groups?access_token={$access_token}&limit={$limit}"; do { usleep(300000); $pp = wp_remote_get($next_url); if (!is_array($pp) || empty($pp['body'])) { break; } $pagearray1 = json_decode($pp['body']); if (!empty($pagearray1->data) && is_array($pagearray1->data)) { $data = array_merge($data, $pagearray1->data); } if (isset($pagearray1->paging->next)) { $next_url = $pagearray1->paging->next; } elseif (isset($pagearray1->paging->cursors->after)) { $after = $pagearray1->paging->cursors->after; $next_url = "https://graph.facebook.com/v{$api_ver}/me/groups" . "?access_token={$access_token}" . "&limit={$limit}" . "&after={$after}"; } else { $next_url = null; } } while ($next_url); $count=count($data); for($i=0;$i<$count;$i++) { $store.=$data[$i]->id . "-" . $access_token . "-" . $data[$i]->name . ","; } $store=rtrim($store,","); update_option('fbomatic_group_ids',$store); update_option('fbomatic_auth_id', $app_id); update_option('fbomatic_auth_secret', $app_secret); } } } function fbomatic_facebook_panel() { $fbomatic_Main_Settings = get_option('fbomatic_Main_Settings', false); $app_secret = ''; $app_id = ''; if (isset($fbomatic_Main_Settings['app_secret2']) && $fbomatic_Main_Settings['app_secret2'] != '') { $app_secret = $fbomatic_Main_Settings['app_secret2']; } else { if (isset($fbomatic_Main_Settings['app_secret']) && $fbomatic_Main_Settings['app_secret'] != '') { $app_secret = $fbomatic_Main_Settings['app_secret']; } } if (isset($fbomatic_Main_Settings['app_id2']) && $fbomatic_Main_Settings['app_id2'] != '') { $app_id = $fbomatic_Main_Settings['app_id2']; } else { if (isset($fbomatic_Main_Settings['app_id']) && $fbomatic_Main_Settings['app_id'] != '') { $app_id = $fbomatic_Main_Settings['app_id']; } } $authorized = false; if(isset($app_id) && $app_id != '') { if(isset($app_secret) && $app_secret != '') { $GLOBALS['wp_object_cache']->delete('fbomatic_auth_id', 'options'); $GLOBALS['wp_object_cache']->delete('fbomatic_auth_secret', 'options'); if(get_option('fbomatic_auth_id', false) !== FALSE) { if(get_option('fbomatic_auth_secret', false) !== FALSE) { if($app_id == get_option('fbomatic_auth_id', false) && $app_secret == get_option('fbomatic_auth_secret', false)) { $authorized = true; } } } } else { ?> <h1><?php echo esc_html__("You must add a Facebook App Secret before you can use this feature!", 'fbomatic-facebook-post-generator');?></h1> <?php update_option('fbomatic_auth_id', 'null'); update_option('fbomatic_auth_secret', 'null'); return; } } else { ?> <h1><?php echo esc_html__("You must add a Facebook App ID and Secret before you can use this feature!", 'fbomatic-facebook-post-generator');?></h1> <?php update_option('fbomatic_auth_id', 'null'); update_option('fbomatic_auth_secret', 'null'); return; } ?> <div class="wp-header-end"></div> <div class="wrap gs_popuptype_holder seo_pops"> <div> <?php if($authorized === FALSE) { ?> <div class="hideThis"> <h1><?php echo esc_html__("Some Required Steps Before You Can Use This Feature", 'fbomatic-facebook-post-generator');?>:</h1> - <a href="https://youtu.be/9-hsVu7hg78" target="_blank"><?php echo esc_html__("Tutorial Video", 'facelive-live-stream-broadcaster');?></a> <b>1)</b> <?php echo esc_html__("You have to create a Facebook App before filling the following details.", 'fbomatic-facebook-post-generator');?></i> <b><a href="https://developers.facebook.com/apps" target="_blank"><?php echo esc_html__("Click here", 'fbomatic-facebook-post-generator');?></a></b> <?php echo esc_html__("to create new Facebook App. ", 'fbomatic-facebook-post-generator');?> <br><b>2)</b> <?php echo esc_html__("In the application permissions, add the following permissions to your app: ", 'fbomatic-facebook-post-generator');?> <span class="cr_red">email, public_profile, pages_read_user_content, pages_manage_posts, pages_read_engagement, pages_show_list</span> <br><b>3)</b> <?php echo esc_html__("In the application settings page in Facebook, set the 'Privacy Policy URL' settings as follows (or to your privacy policy URL, if you have one):", 'fbomatic-facebook-post-generator');?> <span class="cr_red"><?php echo (is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; ?></span> <br><b>4)</b> <?php echo esc_html__("In the application settings page in Facebook, go to 'Facebook Login' -> 'Settings' and the following to the 'Valid OAuth redirect URIs' field: ", 'fbomatic-facebook-post-generator');?> <span class="cr_red"><?php $xredirect = admin_url('admin.php?page=fbomatic_facebook_panel&fb_auth_done=true'); $xredirect = str_replace('http://', 'https://', $xredirect); echo $xredirect; ?></span> <br><b>5)</b> <?php echo esc_html__("Publish your app (if it is new). Make it public.", 'fbomatic-facebook-post-generator');?> <br/><b>6)</b> <strong><?php echo esc_html__("Authorize Your App to Post on Facebook (click the 'Login with Facebook' button from below):", 'fbomatic-facebook-post-generator');?></strong> </div> <form id="myForm2" method="post" action=""> <div> <br/><button name="fbomatic_auth" id="btnSubmit2" class="loginBtn loginBtn--facebook" onclick="unsaved = false;"><?php echo esc_html__('Login with Facebook', 'fbomatic-facebook-post-generator');?></button> </form> <?php update_option('fbomatic_auth_id', 'null'); update_option('fbomatic_auth_secret', 'null'); ?> <h1><?php echo esc_html__("You must login with Facebook before using this plugin feature!", 'fbomatic-facebook-post-generator');?></h1> <?php } else { if(isset($_REQUEST['fb_auth_done'])) { ?> <div id="message" class="updated"> <p class="cr_saved_notif"><strong> <i><?php echo esc_html__("Facebook authorization successful!", 'fbomatic-facebook-post-generator');?></i> <?php echo esc_html__("Note that authorization expires after 60 days (Facebook Policy) and you need to reauthorize it afterwards.", 'fbomatic-facebook-post-generator');?></strong></p> </div> <?php } ?> <form id="myForm2" method="post" action=""><div><br/><button name="fbomatic_auth" id="btnSubmit2" class="loginBtn loginBtn--facebook" onclick="unsaved = false;"><?php echo esc_html__('Login with Facebook', 'fbomatic-facebook-post-generator');?></button></form> <form id="myForm" method="post" action="<?php if(is_multisite() && is_network_admin()){echo '../options.php';}else{echo 'options.php';}?>"> <?php settings_fields('fbomatic_option_group2'); do_settings_sections('fbomatic_option_group2'); $fbomatic_Facebook_Settings = get_option('fbomatic_Facebook_Settings', false); if (isset($fbomatic_Facebook_Settings['fbomatic_posting'])) { $fbomatic_posting = $fbomatic_Facebook_Settings['fbomatic_posting']; } else { $fbomatic_posting = ''; } if (isset($fbomatic_Facebook_Settings['facebook_format'])) { $facebook_format = $fbomatic_Facebook_Settings['facebook_format']; } else { $facebook_format = ''; } if (isset($fbomatic_Facebook_Settings['create_photo'])) { $create_photo = $fbomatic_Facebook_Settings['create_photo']; } else { $create_photo = ''; } if (isset($fbomatic_Facebook_Settings['first_url'])) { $first_url = $fbomatic_Facebook_Settings['first_url']; } else { $first_url = ''; } if (isset($fbomatic_Facebook_Settings['limit_content_word_count'])) { $limit_content_word_count = $fbomatic_Facebook_Settings['limit_content_word_count']; } else { $limit_content_word_count = ''; } if (isset($fbomatic_Facebook_Settings['post_posts'])) { $post_posts = $fbomatic_Facebook_Settings['post_posts']; } else { $post_posts = ''; } if (isset($fbomatic_Facebook_Settings['group_post_id'])) { $group_post_id = $fbomatic_Facebook_Settings['group_post_id']; } else { $group_post_id = ''; } if (isset($fbomatic_Facebook_Settings['post_pages'])) { $post_pages = $fbomatic_Facebook_Settings['post_pages']; } else { $post_pages = ''; } if (isset($fbomatic_Facebook_Settings['post_custom'])) { $post_custom = $fbomatic_Facebook_Settings['post_custom']; } else { $post_custom = ''; } if (isset($fbomatic_Facebook_Settings['except_type'])) { $except_type = $fbomatic_Facebook_Settings['except_type']; } else { $except_type = ''; } if (isset($fbomatic_Facebook_Settings['always_manual'])) { $always_manual = $fbomatic_Facebook_Settings['always_manual']; } else { $always_manual = ''; } if (isset($fbomatic_Facebook_Settings['facebook_pages'])) { $facebook_pages = $fbomatic_Facebook_Settings['facebook_pages']; } else { $facebook_pages = array(); } if (isset($fbomatic_Facebook_Settings['facebook_groups'])) { $facebook_groups = $fbomatic_Facebook_Settings['facebook_groups']; } else { $facebook_groups = array(); } if (isset($fbomatic_Facebook_Settings['include_blog_name'])) { $include_blog_name = $fbomatic_Facebook_Settings['include_blog_name']; } else { $include_blog_name = ''; } if (isset($fbomatic_Facebook_Settings['include_image'])) { $include_image = $fbomatic_Facebook_Settings['include_image']; } else { $include_image = ''; } if (isset($fbomatic_Facebook_Settings['include_description'])) { $include_description = $fbomatic_Facebook_Settings['include_description']; } else { $include_description = ''; } if (isset($fbomatic_Facebook_Settings['include_title'])) { $include_title = $fbomatic_Facebook_Settings['include_title']; } else { $include_title = ''; } if (isset($fbomatic_Facebook_Settings['include_link'])) { $include_link = $fbomatic_Facebook_Settings['include_link']; } else { $include_link = ''; } if (isset($fbomatic_Facebook_Settings['include_message'])) { $include_message = $fbomatic_Facebook_Settings['include_message']; } else { $include_message = ''; } if (isset($fbomatic_Facebook_Settings['disabled_categories'])) { $disabled_categories = $fbomatic_Facebook_Settings['disabled_categories']; } else { $disabled_categories = ''; } if (isset($fbomatic_Facebook_Settings['disable_tags'])) { $disable_tags = $fbomatic_Facebook_Settings['disable_tags']; } else { $disable_tags = ''; } if (isset($fbomatic_Facebook_Settings['target_country'])) { $target_country = $fbomatic_Facebook_Settings['target_country']; } else { $target_country = ''; } if (isset($fbomatic_Facebook_Settings['target_region'])) { $target_region = $fbomatic_Facebook_Settings['target_region']; } else { $target_region = ''; } if (isset($fbomatic_Facebook_Settings['target_city'])) { $target_city = $fbomatic_Facebook_Settings['target_city']; } else { $target_city = ''; } if (isset($fbomatic_Facebook_Settings['min_age'])) { $min_age = $fbomatic_Facebook_Settings['min_age']; } else { $min_age = ''; } if (isset($fbomatic_Facebook_Settings['vimeo_embedded'])) { $vimeo_embedded = $fbomatic_Facebook_Settings['vimeo_embedded']; } else { $vimeo_embedded = ''; } if (isset($fbomatic_Facebook_Settings['youtube_embedded'])) { $youtube_embedded = $fbomatic_Facebook_Settings['youtube_embedded']; } else { $youtube_embedded = ''; } if (isset($fbomatic_Facebook_Settings['tiktok_embedded'])) { $tiktok_embedded = $fbomatic_Facebook_Settings['tiktok_embedded']; } else { $tiktok_embedded = ''; } if (isset($fbomatic_Facebook_Settings['dm_embedded'])) { $dm_embedded = $fbomatic_Facebook_Settings['dm_embedded']; } else { $dm_embedded = ''; } if (isset($fbomatic_Facebook_Settings['fb_embedded'])) { $fb_embedded = $fbomatic_Facebook_Settings['fb_embedded']; } else { $fb_embedded = ''; } if (isset($fbomatic_Facebook_Settings['tw_embedded'])) { $tw_embedded = $fbomatic_Facebook_Settings['tw_embedded']; } else { $tw_embedded = ''; } if (isset($fbomatic_Facebook_Settings['only_local'])) { $only_local = $fbomatic_Facebook_Settings['only_local']; } else { $only_local = ''; } if (isset($fbomatic_Facebook_Settings['only_remote'])) { $only_remote = $fbomatic_Facebook_Settings['only_remote']; } else { $only_remote = ''; } if (isset($fbomatic_Facebook_Settings['post_videos'])) { $post_videos = $fbomatic_Facebook_Settings['post_videos']; } else { $post_videos = ''; } if (isset($fbomatic_Facebook_Settings['only_video'])) { $only_video = $fbomatic_Facebook_Settings['only_video']; } else { $only_video = ''; } if (isset($fbomatic_Facebook_Settings['delay_post'])) { $delay_post = $fbomatic_Facebook_Settings['delay_post']; } else { $delay_post = ''; } if (isset($fbomatic_Facebook_Settings['run_background'])) { $run_background = $fbomatic_Facebook_Settings['run_background']; } else { $run_background = ''; } if (isset($fbomatic_Facebook_Settings['shortcode_percentage'])) { $shortcode_percentage = $fbomatic_Facebook_Settings['shortcode_percentage']; } else { $shortcode_percentage = ''; } if (isset($fbomatic_Facebook_Settings['shortcode_content'])) { $shortcode_content = $fbomatic_Facebook_Settings['shortcode_content']; } else { $shortcode_content = ''; } if (isset($fbomatic_Facebook_Settings['only_photo'])) { $only_photo = $fbomatic_Facebook_Settings['only_photo']; } else { $only_photo = ''; } if (isset($fbomatic_Facebook_Settings['max_at_once'])) { $max_at_once = $fbomatic_Facebook_Settings['max_at_once']; } else { $max_at_once = ''; } if (isset($fbomatic_Facebook_Settings['max_posts_interval'])) { $max_posts_interval = $fbomatic_Facebook_Settings['max_posts_interval']; } else { $max_posts_interval = ''; } if (isset($fbomatic_Facebook_Settings['max_posts'])) { $max_posts = $fbomatic_Facebook_Settings['max_posts']; } else { $max_posts = ''; } if (isset($_GET['settings-updated'])) { ?> <div id="message" class="updated"> <p class="cr_saved_notif"><strong> <?php echo esc_html__('Settings saved.', 'fbomatic-facebook-post-generator');?></strong></p> </div> <?php $get = get_option('coderevolution_settings_changed', 0); if($get == 1) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_failed_notif"><strong> <?php echo esc_html__('Plugin registration failed!', 'fbomatic-facebook-post-generator');?></strong></p> </div> <?php } elseif($get == 2) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_saved_notif"><strong> <?php echo esc_html__('Plugin registration successful!', 'fbomatic-facebook-post-generator');?></strong></p> </div> <?php } elseif($get != 0) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_failed_notif"><strong> <?php echo esc_html($get);?></strong></p> </div> <?php } } ?> <div> <div class="fbomatic_class"> <table class="widefat"> <tr> <td> <h1><span class="gs-sub-heading"><b>F-omatic Automatic Post to Facebook - <?php echo esc_html__('Main Switch:', 'fbomatic-facebook-post-generator');?></b> </span> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Enable or disable automatic posting to Facebook every time you publish a new post (manually or automatically).", 'fbomatic-facebook-post-generator'); ?> </div> </div></h1> </td> <td> <div class="slideThree"> <input class="input-checkbox" type="checkbox" id="fbomatic_posting" name="fbomatic_Facebook_Settings[fbomatic_posting]"<?php if ($fbomatic_posting == 'on') echo ' checked '; ?>> <label for="fbomatic_posting"></label> </div> </td> </tr> </table> </div> <div><?php if($fbomatic_posting != 'on'){echo '<div class="crf_bord cr_color_red cr_auto_update">' . esc_html__('This feature of the plugin is disabled! Please enable it from the above switch.', 'fbomatic-facebook-post-generator') . '</div>';}?> <hr/> <table class="widefat"> <tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want delay posting with this amount of seconds from post publish? This will create a single cron job for each post (cron is a requirement for this to function). If you leave this field blank, posts will be automatically published on post creation.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Delay Posting By (Seconds):", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="number" min="0" step="1" id="delay_post" name="fbomatic_Facebook_Settings[delay_post]" class="cr_450" value="<?php echo esc_html($delay_post);?>" placeholder="Delay posting by X seconds"> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("This option will allow you to select if you want to run posting in async mode. This means that each time you publish a post, the plugin will try to execute it's task in the background - it will no longer block new post posting, while it finishes it's job.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Use Async Posting Method:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="run_background" name="fbomatic_Facebook_Settings[run_background]"<?php if ($run_background == 'on') echo ' checked '; ?>> </div> </td></tr><tr><td colspan="2"><h3><?php echo esc_html__("Publishing Options:", 'fbomatic-facebook-post-generator');?></h3></td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Select the pages associated with your App ID, where you want to publish your posts. To select multiple entries, please hold down the 'Control' key.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b class="cr_red12"><?php echo esc_html__("Pages Where to Publish Posts:", 'fbomatic-facebook-post-generator');?></b> <a onclick="uncheckAll()" class="cr_pointer"><?php echo esc_html__("Clear List", 'fbomatic-facebook-post-generator');?></a> </div> </td><td> <div> <select name="fbomatic_Facebook_Settings[facebook_pages][]" id="PagesSelect" multiple="multiple" class="cr_auto"> <?php $store = get_option('fbomatic_page_ids', false); if($store !== FALSE) { $store = explode(',', $store); $count = count($store); for($i=0;$i<$count;$i++) { $exploding = explode('-', $store[$i]); if(!isset($exploding[2])) { continue; } ?> <option value="<?php echo esc_html($exploding[0]);?>" <?php if(in_array($exploding[0], $facebook_pages)) echo " selected" ?>> <?php echo esc_html($exploding[2]); ?> </option> <?php } }?> </select> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Select the groups associated with your App ID (where you are administrator), where you want to publish your posts. To select multiple entries, please hold down the 'Control' key.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b class="cr_red12"><?php echo esc_html__("Groups Where To Publish Post:", 'fbomatic-facebook-post-generator');?></b> <a onclick="uncheckAll2()" class="cr_pointer"><?php echo esc_html__("Clear List", 'fbomatic-facebook-post-generator');?></a> </div> </td><td> <div> <select name="fbomatic_Facebook_Settings[facebook_groups][]" id="GroupsSelect" multiple="multiple" class="cr_auto"> <?php $store = get_option('fbomatic_group_ids', false); if($store !== FALSE) { $store = explode(',', $store); $count = count($store); for($i=0;$i<$count;$i++) { $exploding = explode('-', $store[$i]); if(!isset($exploding[2])) { continue; } ?> <option value="<?php echo esc_html($exploding[0]);?>" <?php if(in_array($exploding[0], $facebook_groups)) echo " selected" ?>> <?php echo esc_html($exploding[2]); ?> </option> <?php } }?> </select> </div> </td></tr><tr><td> <div class="hideGroup"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( "Input the additional group/event IDs where you want to publish your posts. <a href='%s' target='_blank'>How do I get a group ID</a>? Note that you must have permission to post in the respective group (you must be member of the group)! You can input more group/event IDs or page IDs, separated by comma. Ex:12343242,123123123,12321312313. Note that group policy may prevent the automatic publishing of posts, so in some cases, this feature may not work. To disable this feature, leave this field blank.", 'fbomatic-facebook-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://lookup-id.com/' ) ); ?> </div> </div> <b class="cr_red12"><?php echo esc_html__("Additional Group/Event IDs Where To Post:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div class="hideGroup"> <textarea name="fbomatic_Facebook_Settings[group_post_id]" placeholder="Please insert the additional group/event IDs where you want to post"><?php echo esc_textarea($group_post_id); ?></textarea> </div> </td></tr><tr><td colspan="2"><h3><?php echo esc_html__("Posting Template Options:", 'fbomatic-facebook-post-generator');?></h3></td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose the template of your Facebook posts. You can use the following shortcodes: %%variable_content%%, %%featured_image%%, %%post_cats%%, %%post_tags%%, %%smart_hashtags%%, %%blog_title%%, %%author_name%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%post_title%%, %%post_content%%, %%post_excerpt%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%% - Update: nested shortcodes also supported (shortcodes generated by rules from other plugins).", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Facebook Post Message Template:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div> <textarea rows="4" name="fbomatic_Facebook_Settings[facebook_format]" placeholder="Please insert your Facebook post template"><?php echo esc_textarea($facebook_format); ?></textarea> </div> </td></tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to limit the posted content's length to a specific word count? To disable this feature, leave this field blank.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Limit Posted Content Word Count:", 'fbomatic-facebook-post-generator');?></b> </td> <td> <input type="number" min="1" step="1" id="limit_content_word_count" name="fbomatic_Facebook_Settings[limit_content_word_count]" value="<?php echo esc_attr($limit_content_word_count); ?>" placeholder="Word count limit for posted content" class="cr_width_full"> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to link Facebook post to first link in post's content instead of the published post URL? If the post does not contain any links, the published post URL will be used.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Link Facebook Post To First Link In Post Content:", 'fbomatic-facebook-post-generator');?></b> </td> <td> <input type="checkbox" id="first_url" name="fbomatic_Facebook_Settings[first_url]"<?php if ($first_url == 'on') echo ' checked '; ?>> </td> </tr> <tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to create photo posts when possible, instead of status updates?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Create Photo Posts When Possible, Instead Of Status Updates:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="create_photo" onchange="mainChanged()" name="fbomatic_Facebook_Settings[create_photo]"<?php if ($create_photo == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div class="hidePhoto"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to not post status updates when there is no image available for the current post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Post Only Photo Posts To Facebook:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div class="hidePhoto"> <input type="checkbox" id="only_photo" name="fbomatic_Facebook_Settings[only_photo]"<?php if ($only_photo == 'on') echo ' checked '; ?>> </div> </td></tr><tr><td colspan="2"><h3><?php echo esc_html__("Posting Restrictions:", 'fbomatic-facebook-post-generator');?></h3></td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the maximum number of posts to be submitted each predefined time interval (default is 1 hour, you can change this in the 'Maximum Post Count Interval' settings from below. To disable this feature, leave this field blank.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Maximum Post Count Per Time Interval:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="number" min="0" step="1" id="max_posts" name="fbomatic_Facebook_Settings[max_posts]" class="cr_450" value="<?php echo esc_html($max_posts);?>" placeholder="Maximum post count per time interval"> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the maximum number of posts to be submitted each predefined time interval.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Maximum Post Count Interval (Minutes):", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="number" min="0" step="1" id="max_posts_interval" name="fbomatic_Facebook_Settings[max_posts_interval]" class="cr_450" value="<?php echo esc_html($max_posts_interval);?>" placeholder="60"> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to disable automatically posting of WordPress 'posts' to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Disable Autoposting of 'Posts':", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="post_posts" name="fbomatic_Facebook_Settings[post_posts]"<?php if ($post_posts == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to disable automatically posting of WordPress 'pages' to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Disable Autoposting of 'Pages':", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="post_pages" name="fbomatic_Facebook_Settings[post_pages]"<?php if ($post_pages == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to disable automatically posting of WordPress 'pages' to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Disable Autoposting of 'Custom Post Types':", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="post_custom" name="fbomatic_Facebook_Settings[post_custom]"<?php if ($post_custom == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("If you checked the above checkbox to disable processing of custom post types, you can define here a comma separated list of posts types which should still be process (excepted from skipping).", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Excepting This Comma Separated List Of Custom Post Types:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="text" id="except_type" name="fbomatic_Facebook_Settings[except_type]" value="<?php echo esc_html($except_type);?>" placeholder="Excepted custom post types"> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to always allow the publishing of manual posts, regardless if they meet the requirements from this page?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Always Allow Publishing of Manual Posts:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="always_manual" name="fbomatic_Facebook_Settings[always_manual]"<?php if ($always_manual == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to disable automatically posting of WordPress 'posts' to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Disable Autoposting of Selected Categories:", 'fbomatic-facebook-post-generator');?></b><br/> <a onclick="toggleCats()" class="cr_pointer"><?php echo esc_html__("Show/Hide Categories List", 'fbomatic-facebook-post-generator');?></a> </td><td> <br/> <div id="hideCats" class="hideCats"> <?php $cat_args = array( 'orderby' => 'name', 'hide_empty' => 0, 'order' => 'ASC' ); $categories = get_categories($cat_args); foreach ($categories as $category) { ?> <div> <label> <input <?php if (isset($fbomatic_Facebook_Settings['disabled_categories']) && !empty($fbomatic_Facebook_Settings['disabled_categories'])) { checked(true, in_array($category->term_id, $fbomatic_Facebook_Settings['disabled_categories'])); } ?> type="checkbox" name="fbomatic_Facebook_Settings[disabled_categories][]" value="<?php echo esc_html($category->term_id); ?>" /> <span><?php echo esc_html(sanitize_text_field($category->name)); ?></span> </label> </div> <?php } ?> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Input the tags for which you want to disable posting. You can enter more tags, separated by comma. Ex: cars, vehicles, red, luxury. To disable this feature, leave this field blank.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Disable Autoposting of Selected Tags:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div> <textarea rows="1" name="fbomatic_Facebook_Settings[disable_tags]" placeholder="Please insert the tags for which you want to disable posting"><?php echo esc_textarea($disable_tags); ?></textarea> </div> </td></tr><tr><td colspan="2"><h3><?php echo esc_html__("Event Targeting Options:", 'fbomatic-facebook-post-generator');?></h3></td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( "Input a list of comma separated <a href='%s' target='_blank'>2-digit ISO 3166 format country codes</a> that you wish to target with the live event.", 'fbomatic-facebook-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://www.iso.org/obp/ui/#search' ) ); ?> </div> </div> <b><?php echo esc_html__("Targeted Countries:", 'fbomatic-facebook-post-generator');?> </b> </div> </td><td> <div> <textarea rows="2" name="fbomatic_Facebook_Settings[target_country]" placeholder="Target country list"><?php echo esc_textarea($target_country); ?></textarea> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Input a list of comma separated region numeric IDs (up to 200 regions) that you wish to target with the live event.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Targeted Regions", 'fbomatic-facebook-post-generator');?> - <a href="https://developers.facebook.com/tools/explorer/?method=GET&path=search%3Ftype%3Dadgeolocation%26q%3Dtexas&version=v11.0" target="_blank"> <?php echo esc_html__("GET REGION NUMERIC IDs", 'fbomatic-facebook-post-generator');?></a>: </b> </div> </td><td> <div> <textarea rows="2" name="fbomatic_Facebook_Settings[target_region]" placeholder="Target region list"><?php echo esc_textarea($target_region); ?></textarea> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Input a list of comma separated city numeric IDs that you wish to target with the live event.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Targeted Cities", 'fbomatic-facebook-post-generator');?> - <a href="https://developers.facebook.com/tools/explorer/?method=GET&path=search%3Ftype%3Dadgeolocation%26q%3Dnew%20york&version=v11.0" target="_blank"> <?php echo esc_html__("GET CITY NUMERIC IDs", 'fbomatic-facebook-post-generator');?></a>: </b> </div> </td><td> <div> <textarea rows="2" name="fbomatic_Facebook_Settings[target_city]" placeholder="Target city list"><?php echo esc_textarea($target_city); ?></textarea> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Select the minimum age for this live event.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Minimum Age:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div> <select id="min_age" name="fbomatic_Facebook_Settings[min_age]"> <option value="any"<?php if($min_age == 'any')echo ' selected'?>><?php echo esc_html__("Any", 'fbomatic-facebook-post-generator');?></option> <option value="13"<?php if($min_age == '13')echo ' selected'?>>13</option> <option value="17"<?php if($min_age == '17')echo ' selected'?>>17</option> <option value="18"<?php if($min_age == '18')echo ' selected'?>>18</option> <option value="19"<?php if($min_age == '19')echo ' selected'?>>19</option> <option value="21"<?php if($min_age == '21')echo ' selected'?>>21</option> </select> </div> </td></tr><tr><td> <h3><?php echo esc_html__("Select What The Posts Should Contain:", 'fbomatic-facebook-post-generator');?></h3> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the post message in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Post Message:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_message" name="fbomatic_Facebook_Settings[include_message]"<?php if ($include_message == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the post link in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Post Link:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_link" name="fbomatic_Facebook_Settings[include_link]"<?php if ($include_link == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the post title in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Post Title:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_title" name="fbomatic_Facebook_Settings[include_title]"<?php if ($include_title == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the post description in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Post Description:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_description" name="fbomatic_Facebook_Settings[include_description]"<?php if ($include_description == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the post featured image in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Post Featured Image:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_image" name="fbomatic_Facebook_Settings[include_image]"<?php if ($include_image == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to include the blog name in the Facebook post?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Include the Blog Name:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="include_blog_name" name="fbomatic_Facebook_Settings[include_blog_name]"<?php if ($include_blog_name == 'on') echo ' checked '; ?>> </td></tr><tr><td colspan="2"> <h3><?php echo esc_html__("Video Posting Options:", 'fbomatic-facebook-post-generator');?></h3> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to post also videos found in WordPress posts? Acceptable videos are locally linked videos, youtube videos or vimeo videos linked from content.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Post Also Videos Found In Posts:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="post_videos" name="fbomatic_Facebook_Settings[post_videos]"<?php if ($post_videos == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to post only videos to Facebook? This will disable the above features (normal posts).", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Post Only Video Posts:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="only_video" name="fbomatic_Facebook_Settings[only_video]"<?php if ($only_video == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Select the maximum number of videos to be uploaded at once.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Maximum Number of Videos At Once:", 'fbomatic-facebook-post-generator');?></b> </div> </td><td> <div> <input type="number" id="max_at_once" step="1" min="0" placeholder="Input the maximum number of videos to upload at once" name="fbomatic_Facebook_Settings[max_at_once]" value="<?php echo esc_html($max_at_once); ?>"/> </div> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to post locally linked videos (from server)?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked Local Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="only_local" name="fbomatic_Facebook_Settings[only_local]"<?php if ($only_local == 'on') echo ' checked '; ?>> </td></tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to allow to post to YouTube, links from content that are on remote websites?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Remote Videos Linked From Content:", 'fbomatic-facebook-post-generator');?></b> </td> <td> <input type="checkbox" id="only_remote" name="fbomatic_Facebook_Settings[only_remote]"<?php if ($only_remote == 'on') echo ' checked '; ?>> </td> </tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to automatically post embeded YouTube videos to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked YouTube Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="youtube_embedded" name="fbomatic_Facebook_Settings[youtube_embedded]"<?php if ($youtube_embedded == 'on') echo ' checked '; ?>> </td></tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to try to upload TikTok videos that are embedded from your content? Warning! This will upload to your channel any TikTok video that you link in your post content. This is an experimental feature, use it on your own risk.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked TikTok Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td> <td> <input type="checkbox" id="tiktok_embedded" name="fbomatic_Facebook_Settings[tiktok_embedded]"<?php if ($tiktok_embedded == 'on') echo ' checked '; ?>> </td> </tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to automatically post embeded Vimeo videos to Facebook?", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked Vimeo Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="vimeo_embedded" name="fbomatic_Facebook_Settings[vimeo_embedded]"<?php if ($vimeo_embedded == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to try to upload DailyMotion videos that are embedded from your content? Warning! This will upload to your channel any YouTube video that you link in your post content. This is an experimental feature, use it on your own risk.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked DailyMotion Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="dm_embedded" name="fbomatic_Facebook_Settings[dm_embedded]"<?php if ($dm_embedded == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to try to upload Facebook videos that are embedded from your content? Warning! This will upload to your channel any YouTube video that you link in your post content. This is an experimental feature, use it on your own risk.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked Facebook Videos From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="fb_embedded" name="fbomatic_Facebook_Settings[fb_embedded]"<?php if ($fb_embedded == 'on') echo ' checked '; ?>> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to try to upload Twitch clips that are embedded from your content? Warning! This will upload to your channel any YouTube video that you link in your post content. This is an experimental feature, use it on your own risk.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Try to Upload Linked Twitch Clips From Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="checkbox" id="tw_embedded" name="fbomatic_Facebook_Settings[tw_embedded]"<?php if ($tw_embedded == 'on') echo ' checked '; ?>> </td></tr><tr><td> <h3><?php echo esc_html__("Shortcode Options (%%variable_content%%):", 'fbomatic-facebook-post-generator');?></h3> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the %%variable_content%% shortcode content.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("%%variable_content%% Shortcode Content:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="text" id="shortcode_content" name="fbomatic_Facebook_Settings[shortcode_content]" placeholder="%%variable_content%% content" value="<?php echo esc_html($shortcode_content);?>"> </td></tr><tr><td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the occurance rate of the %%variable_content%% shortcode. In this percentage, the shortcode will be filled with content and posted.", 'fbomatic-facebook-post-generator'); ?> </div> </div> <b><?php echo esc_html__("%%variable_content%% Shortcode Occurance Rate:", 'fbomatic-facebook-post-generator');?></b> </td><td> <input type="number" min="0" max="100" step="1" id="shortcode_percentage" name="fbomatic_Facebook_Settings[shortcode_percentage]" placeholder="%%variable_content%% occurance rate" value="<?php echo esc_html($shortcode_percentage);?>"> </td></tr> </table> <br/><br/> <div> <b><?php echo esc_html__("Help! App is authorized and still no posts appearing on Facebook?", 'fbomatic-facebook-post-generator');?></b> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("In this case you can try the following: 1) Check Your app's privacy settings is public. Otherwise, make it to public. To Change App's Privacy settings,Go to settings Click on App -> App Review -> Make 'app name' public?. Change this value to 'YES' (APP review required for this). 2) Create a new App and try linking the new one in the plugin.", 'fbomatic-facebook-post-generator'); ?> </div> </div> </div> <?php echo esc_html__("New! AI generated shortcodes supported, click for details:", 'fbomatic-facebook-post-generator');?> <a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-ai-generated-content-from-any-plugin-built-by-coderevolution/" target="_blank"><img src="https://i.ibb.co/WGQ1rtF/ai.webp" alt="artificial-intelligence-badge" title="AI content generator support, when used together with the Aiomatic plugin"></a><br/><br/><a href="https://www.youtube.com/watch?v=5rbnu_uis7Y" target="_blank"><?php echo esc_html__("Nested Shortcodes also supported!", 'fbomatic-facebook-post-generator');?></a> <div><p class="crsubmit"><input type="submit" name="btnSubmit" id="btnSubmit" class="button button-primary" onclick="unsaved = false;" value="<?php echo esc_html__("Save Settings", 'fbomatic-facebook-post-generator');?>"/></p></div> </form> <?php } ?> </div> </div> <?php } ?>
Save File
Cancel