Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Update settings.php
Browse files Browse the repository at this point in the history
add option to set a custom access token
  • Loading branch information
KathlynnS authored Sep 27, 2018
1 parent fa86b6b commit d2d18e3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function admin_menu() {
*/
public function register_settings() {
register_setting( 'fbfpi_options', 'fbfpi_fanpage_id' );
register_setting( 'fbfpi_options', 'fbapp_accesstoken' );
register_setting( 'fbfpi_options', 'fbfpi_fanpage_stream_language' );
register_setting( 'fbfpi_options', 'fbfpi_import_interval' );
register_setting( 'fbfpi_options', 'fbfpi_import_num' );
Expand Down Expand Up @@ -106,6 +107,7 @@ public function admin_page() {
do_settings_sections( 'fbfpi_options' );

$fanpage_id = get_option( 'fbfpi_fanpage_id' );
$fbapp_accesstoken = get_option( 'fbapp_accesstoken' );
$fanpage_stream_language = get_option( 'fbfpi_fanpage_stream_language' );
$import_interval = get_option( 'fbfpi_import_interval' );
$import_num = get_option( 'fbfpi_import_num' );
Expand Down Expand Up @@ -133,6 +135,17 @@ public function admin_page() {
echo '</div>';
echo '</div>';


/**
* fbapp_accesstoken
*/
echo '<div class="fbfpi-form-field">';
echo '<label for="fbapp_accesstoken">' . __( 'Facebook App Access Token', 'facebook-fanpage-import' ) . '</label>';
echo '<div class="input">';
echo '<input type="text" name="fbapp_accesstoken" id="fbapp_accesstoken" value="' . $fbapp_accesstoken . '" /><br /><small>' . __( 'Create a Facebook App and add the aceesstoken here.', 'facebook-fanpage-import' ) . '</small>';
echo '</div>';
echo '</div>';

/**
* Select stream languages
*/
Expand Down

0 comments on commit d2d18e3

Please sign in to comment.