/** * Run LiveChat page */ public static function menu_chat() { if (isset($_GET['allow_comments_id'])) { $allow_id = sanitize_text_field($_GET['allow_comments_id']); if ($allow_id == 'all_posts') { self::update_posts_nc(false); } else { if ($allow_id == 'all_pages') { self::update_posts_nc(false); } else { self::update_posts_nc($allow_id, false); } } } LFAPPS_View::render('general', array(), 'chat'); }
/** * Run Livefyre Comments page */ public static function menu_comments() { //hide import message call if (isset($_GET['hide_import_message'])) { update_option('livefyre_apps-livefyre_import_status', 'complete'); wp_redirect(Livefyre_Apps_Admin::get_page_url('livefyre_apps_comments')); exit; } //check for import status updates if (isset($_GET['status'])) { update_option('livefyre_apps-' . 'livefyre_import_status', sanitize_text_field($_GET['status'])); if (isset($_GET['message'])) { update_option('livefyre_apps-' . 'livefyre_import_message', urldecode(sanitize_text_field($_GET['message']))); } } if (isset($_GET['allow_comments_id'])) { $allow_id = sanitize_text_field($_GET['allow_comments_id']); if ($allow_id == 'all_posts') { self::update_posts_nc(false); } else { if ($allow_id == 'all_pages') { self::update_posts_nc(false); } else { self::update_posts_nc($allow_id, false); } } } //process settings form if (isset($_POST['livefyre_comments_general']) && check_admin_referer('form-livefyre_comments_general')) { $excludes = array('_builtin' => false); $post_types = get_post_types($args = $excludes); $post_types = array_merge(array('post' => 'post', 'page' => 'page'), $post_types); foreach ($post_types as $post_type) { $post_type_name = 'livefyre_display_' . $post_type; if (isset($_POST[$post_type_name])) { update_option('livefyre_apps-' . $post_type_name, true); } else { update_option('livefyre_apps-' . $post_type_name, false); } } Livefyre_Apps::$form_saved = true; } LFAPPS_View::render('general', array(), 'comments'); }
/** * Run Livefyre Apps General page */ public static function menu_general() { $conflicting_plugins = Livefyre_Apps::get_conflict_plugins(); if (count($conflicting_plugins) > 0) { self::menu_plugin_conflict(); return; } //process data returned from livefyre.com community sign up if (self::verified_blog()) { update_option('livefyre_apps-livefyre_domain_name', 'livefyre.com'); update_option('livefyre_apps-livefyre_site_id', sanitize_text_field($_GET["site_id"])); update_option('livefyre_apps-livefyre_site_key', sanitize_text_field($_GET["secretkey"])); } LFAPPS_View::render('general'); }
/** * Run Livefyre Comments page */ public static function menu_sidenotes() { LFAPPS_View::render('general', array(), 'sidenotes'); }
/** * Run LiveBlog page */ public static function menu_blog() { LFAPPS_View::render('general', array(), 'blog'); }