* @link http://looks-awesome.com * @copyright Looks Awesome */ $moderation = $context['moderation'] && $context['can_moderate']; $stream = $context['stream']; if (FF_USE_WP) $admin = $moderation ? $moderation : function_exists('current_user_can') && current_user_can('manage_options'); else $admin = ff_user_can_moderate(); $id = $stream->id; $domain = $context['domain']; $public_url = ($context['boosted'] && isset($context['public_url']) && !empty($context['public_url'])) ? $context['public_url'] : $context['ajax_url']; $hash = $context['hashOfStream']; $seo = $context['seo']; $disableCache = isset($_REQUEST['disable-cache']); $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : '0'; if ( isset ( $context['ads_distrubution'] ) ) { $ads = $context['ads_distrubution']; } $version = LAUtils::version($this->context); $opts = LAUtils::dbm($this->context)->getOption('options', true); $plugin_directory = $this->context['plugin_url'] . $this->context['plugin_dir_name']; $js_opts = [ 'streams' => new stdClass(), 'open_in_new' => isset($opts['general-settings-open-links-in-new-window']) ? $opts['general-settings-open-links-in-new-window'] : 'yep', 'filter_all' => __('All', 'flow-flow'), 'filter_search' => __('Search', 'flow-flow'), 'expand_text' => __('Expand', 'flow-flow'), 'collapse_text' => __('Collapse', 'flow-flow'), 'posted_on' => __('Posted on', 'flow-flow'), 'followers' => __('Followers', 'flow-flow'), 'following' => __('Following', 'flow-flow'), 'posts' => __('Posts', 'flow-flow'), 'show_more' => __('Show more', 'flow-flow'), 'date_style' => isset($opts['general-settings-date-format']) ? $opts['general-settings-date-format'] : 'agoStyleDate', 'dates' => [ 'Yesterday' => __('Yesterday', 'flow-flow'), 's' => __('s', 'flow-flow'), 'm' => __('m', 'flow-flow'), 'h' => __('h', 'flow-flow'), 'ago' => __('ago', 'flow-flow'), 'months' => [ __('Jan', 'flow-flow'), __('Feb', 'flow-flow'), __('March', 'flow-flow'), __('April', 'flow-flow'), __('May', 'flow-flow'), __('June', 'flow-flow'), __('July', 'flow-flow'), __('Aug', 'flow-flow'), __('Sept', 'flow-flow'), __('Oct', 'flow-flow'), __('Nov', 'flow-flow'), __('Dec', 'flow-flow') ], ], 'lightbox_navigate' => __('Navigate with arrow keys', 'flow-flow'), 'view_on' => __('View on', 'flow-flow'), 'view_on_site' => __('View on site', 'flow-flow'), 'view_all' => __('View all', 'flow-flow'), 'comments' => __('comments', 'flow-flow'), 'scroll' => __('Scroll for more', 'flow-flow'), 'no_comments' => __('No comments yet.', 'flow-flow'), 'check_comments' => __('Check all comments', 'flow-flow'), 'be_first' => __('Be the first!', 'flow-flow'), 'loading' => __('Loading', 'flow-flow'), 'server_time' => current_time( 'timestamp', (isset($context['boosted']) && $context['boosted']) ), 'forceHTTPS' => isset($opts['general-settings-https']) ? $opts['general-settings-https'] : 'nope', 'isAdmin' => function_exists('current_user_can') && current_user_can( 'manage_options' ), 'ajaxurl' => $public_url, 'isLog' => isset($_REQUEST['fflog']) && $_REQUEST['fflog'] == 1, 'plugin_base' => $plugin_directory, 'plugin_ver' => $this->context['version'], 'domain' => $domain ]; $js_opts['token'] = ($admin && $moderation) ? $context['token'] : ''; ?>