| 1 |
<?php |
| 2 |
// If this file is called directly, abort. |
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
$ife_options = get_option( IFE_OPTIONS ); |
| 5 |
$facebook_options = isset( $ife_options )? $ife_options : array(); |
| 6 |
$facebook_app_id = isset( $facebook_options['facebook_app_id'] ) ? $facebook_options['facebook_app_id'] : ''; |
| 7 |
$facebook_app_secret = isset( $facebook_options['facebook_app_secret'] ) ? $facebook_options['facebook_app_secret'] : ''; |
| 8 |
?> |
| 9 |
<div class="ife_container"> |
| 10 |
<div class="ife_row"> |
| 11 |
|
| 12 |
<form method="post" id="ife_setting_form"> |
| 13 |
|
| 14 |
<h3 class="setting_bar"><?php esc_attr_e( 'Facebook Settings', 'import-facebook-events' ); ?></h3> |
| 15 |
<p><?php _e( 'You need a Facebook App ID and App Secret to import your events from Facebook.','import-facebook-events' ); ?> </p> |
| 16 |
|
| 17 |
<table class="form-table"> |
| 18 |
<tbody> |
| 19 |
<tr> |
| 20 |
<th scope="row"> |
| 21 |
<?php _e( 'Facebook App ID','import-facebook-events' ); ?> : |
| 22 |
</th> |
| 23 |
<td> |
| 24 |
<input class="facebook_app_id" name="facebook[facebook_app_id]" type="text" value="<?php if ( isset( $facebook_options['facebook_app_id'] ) ) { echo $facebook_options['facebook_app_id']; } ?>" /> |
| 25 |
<span class="xtei_small"> |
| 26 |
<?php |
| 27 |
printf( '%s <a href="https://developers.facebook.com/apps" target="_blank">%s</a>', |
| 28 |
__('You can veiw or create your Facebook Apps', 'import-facebook-events'), |
| 29 |
__('from here', 'import-facebook-events') |
| 30 |
); |
| 31 |
?> |
| 32 |
</span> |
| 33 |
</td> |
| 34 |
</tr> |
| 35 |
|
| 36 |
<tr> |
| 37 |
<th scope="row"> |
| 38 |
<?php _e( 'Facebook App secret','import-facebook-events' ); ?> : |
| 39 |
</th> |
| 40 |
<td> |
| 41 |
<input class="facebook_app_secret" name="facebook[facebook_app_secret]" type="text" value="<?php if ( isset( $facebook_options['facebook_app_secret'] ) ) { echo $facebook_options['facebook_app_secret']; } ?>" /> |
| 42 |
<span class="xtei_small"> |
| 43 |
<?php |
| 44 |
printf( '%s <a href="https://developers.facebook.com/apps" target="_blank">%s</a>', |
| 45 |
__('You can veiw or create your Facebook Apps', 'import-facebook-events'), |
| 46 |
__('from here', 'import-facebook-events') |
| 47 |
); |
| 48 |
?> |
| 49 |
</span> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
|
| 53 |
<tr> |
| 54 |
<th scope="row"> |
| 55 |
<?php _e( 'Update existing events', 'import-facebook-events' ); ?> : |
| 56 |
</th> |
| 57 |
<td> |
| 58 |
<?php |
| 59 |
$update_facebook_events = isset( $facebook_options['update_events'] ) ? $facebook_options['update_events'] : 'no'; |
| 60 |
?> |
| 61 |
<input type="checkbox" name="facebook[update_events]" value="yes" <?php if( $update_facebook_events == 'yes' ) { echo 'checked="checked"'; } ?> /> |
| 62 |
<span class="xtei_small"> |
| 63 |
<?php _e( 'Check to updates existing events.', 'import-facebook-events' ); ?> |
| 64 |
</span> |
| 65 |
</td> |
| 66 |
</tr> |
| 67 |
|
| 68 |
<tr> |
| 69 |
<th scope="row"> |
| 70 |
<?php _e( 'Advanced Synchronization', 'import-facebook-events' ); ?> : |
| 71 |
</th> |
| 72 |
<td> |
| 73 |
<input type="checkbox" disabled="disabled" /> |
| 74 |
<span> |
| 75 |
<?php _e( 'Check to enable advanced synchronization, this will delete events which are removed from Facebook. Also, it deletes passed events.', 'import-facebook-events' ); ?> |
| 76 |
</span> |
| 77 |
<?php do_action( 'ife_render_pro_notice' ); ?> |
| 78 |
</td> |
| 79 |
</tr> |
| 80 |
|
| 81 |
<tr> |
| 82 |
<th scope="row"> |
| 83 |
<?php _e( 'Disable Facebook events', 'import-facebook-events' ); ?> : |
| 84 |
</th> |
| 85 |
<td> |
| 86 |
<?php |
| 87 |
$deactive_fbevents = isset( $facebook_options['deactive_fbevents'] ) ? $facebook_options['deactive_fbevents'] : 'no'; |
| 88 |
?> |
| 89 |
<input type="checkbox" name="facebook[deactive_fbevents]" value="yes" <?php if( $deactive_fbevents == 'yes' ) { echo 'checked="checked"'; } ?> /> |
| 90 |
<span class="xtei_small"> |
| 91 |
<?php _e( 'Check to disable inbuilt event management system.', 'import-facebook-events' ); ?> |
| 92 |
</span> |
| 93 |
</td> |
| 94 |
</tr> |
| 95 |
|
| 96 |
<tr> |
| 97 |
<th scope="row"> |
| 98 |
<?php _e( 'Delete Import Facebook Events data on Uninstall', 'import-facebook-events' ); ?> : |
| 99 |
</th> |
| 100 |
<td> |
| 101 |
<?php |
| 102 |
$delete_ifedata = isset( $facebook_options['delete_ifedata'] ) ? $facebook_options['delete_ifedata'] : 'no'; |
| 103 |
?> |
| 104 |
<input type="checkbox" name="facebook[delete_ifedata]" value="yes" <?php if( $delete_ifedata == 'yes' ) { echo 'checked="checked"'; } ?> /> |
| 105 |
<span class="xtei_small"> |
| 106 |
<?php _e( 'Delete Import Facebook Events data like settings, scheduled imports, import history on Uninstall', 'import-facebook-events' ); ?> |
| 107 |
</span> |
| 108 |
</td> |
| 109 |
</tr> |
| 110 |
|
| 111 |
</tbody> |
| 112 |
</table> |
| 113 |
<br/> |
| 114 |
|
| 115 |
<div class="ife_element"> |
| 116 |
<input type="hidden" name="ife_action" value="ife_save_settings" /> |
| 117 |
<?php wp_nonce_field( 'ife_setting_form_nonce_action', 'ife_setting_form_nonce' ); ?> |
| 118 |
<input type="submit" class="button-primary xtei_submit_button" style="" value="<?php esc_attr_e( 'Save Settings', 'import-facebook-events' ); ?>" /> |
| 119 |
</div> |
| 120 |
</form> |
| 121 |
|
| 122 |
<?php |
| 123 |
if( $facebook_app_id != '' && $facebook_app_secret != '' ){ |
| 124 |
?> |
| 125 |
<h3 class="setting_bar"><?php esc_attr_e( 'Authorize your Facebook Account (Optional)', 'import-facebook-events' ); ?></h3> |
| 126 |
<div class="fb_authorize"> |
| 127 |
<table class="form-table"> |
| 128 |
<tbody> |
| 129 |
<tr> |
| 130 |
<th scope="row"> |
| 131 |
<?php _e( 'Facebook Authorization','import-facebook-events' ); ?> : |
| 132 |
</th> |
| 133 |
<td> |
| 134 |
<?php |
| 135 |
$button_value = __('Authorize', 'import-facebook-events'); |
| 136 |
?> |
| 137 |
<input type="submit" class="button" name="ife_facebook_authorize" value="<?php echo $button_value; ?>" disabled="disabled" /> |
| 138 |
<?php do_action( 'ife_render_pro_notice' ); ?> |
| 139 |
<span class="ife_small"> |
| 140 |
<?php _e( 'By Authorize your account you are able to import private facebook events which you can see with your profile and import events by group. Authorization is not require if you want to import only public events.','import-facebook-events' ); ?> |
| 141 |
</span> |
| 142 |
</td> |
| 143 |
</tr> |
| 144 |
</tbody> |
| 145 |
</table> |
| 146 |
</div> |
| 147 |
<?php |
| 148 |
} |
| 149 |
?> |
| 150 |
</div> |
| 151 |
</div> |
| 152 |
|