Initial Commit - Plugin v1.0.0

This commit is contained in:
2018-05-22 23:40:58 +02:00
parent 0ef7665850
commit 09b279d447
119 changed files with 12872 additions and 0 deletions

21
process/select-page.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
function fbr_select_page() {
if( !current_user_can( 'edit_theme_options' ) ){
wp_die( __( 'You are not allowed to access this page.', 'wp-fb-ratings' ) );
}
check_admin_referer( 'fbr_select_page_verify' );
$fbr_opts = get_option( 'fbr_opts' );
$data = explode(',', $_POST['fbr_page_selected']);
$fbr_opts['fbr_page_id'] = sanitize_text_field( $data[0] );
$fbr_opts['fbr_page_access_token'] = sanitize_text_field( $data[1] );
update_option( 'fbr_opts', $fbr_opts );
wp_redirect( admin_url( 'admin.php?page=fbr_plugin_opts&status=3' ) );
exit;
}