Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/nandedex/www/s.nandedexpress.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : /home/nandedex/www/s.nandedexpress.com/better-facebook-comments.tar
js/script.min.js000064400000001262151213253250007604 0ustar00!function(){!function(){var e,n="facebook-jssdk",t=document.getElementsByTagName("script")[0];document.getElementById(n)||((e=document.createElement("script")).id=n,e.src="//connect.facebook.net/%%LOCALE%%/sdk.js#xfbml=1&appId=%%APP-ID%%&version=v2.0",t.parentNode.insertBefore(e,t),window.fbAsyncInit=function(){function e(e,n){jQuery.ajax({type:"GET",dataType:"json",url:"%%ADMIN-AJAX%%",data:{action:"clear_better_facebook_comments",post_id:"%%POST-ID%%"},success:function(e){},error:function(e,n){}})}FB.init({appId:"%%APP-ID%%",xfbml:!0,version:"v2.0"}),FB.Event.subscribe("comment.create",function(n){console.log(n),e()}),FB.Event.subscribe("comment.remove",function(n){e()})})}()}();js/script.js000064400000003250151213253250007021 0ustar00(function () {

    function appendFbScript() {
        var js, id = 'facebook-jssdk',
            fjs = document.getElementsByTagName('script')[0];

        if (document.getElementById(id)) return;
        js = document.createElement('script');
        js.id = id;
        js.src = "//connect.facebook.net/%%LOCALE%%/sdk.js#xfbml=1&appId=%%APP-ID%%&version=v2.0";
        fjs.parentNode.insertBefore(js, fjs);

        window.fbAsyncInit = function () {
            FB.init({
                appId: '%%APP-ID%%',
                xfbml: true,
                version: 'v2.0'
            });
            FB.Event.subscribe('comment.create', function (comment_data) {
                console.log(comment_data);
                update_comments_count();
            });
            FB.Event.subscribe('comment.remove', function (comment_data) {
                update_comments_count();
            });

            function update_comments_count(comment_data, comment_action) {
                jQuery.ajax({
                        type: 'GET',
                        dataType: 'json',
                        url: '%%ADMIN-AJAX%%',
                        data: {
                            action: 'clear_better_facebook_comments',
                            post_id: '%%POST-ID%%'
                        },
                        success: function (data) {
                            // todo sync comments count here! data have the counts
                        },
                        error: function (i, b) {
                            // todo
                        }
                    }
                )
            };
        };

        //%%TYPE%%
    }

    appendFbScript();

})();
better-facebook-comments.php000064400000025440151213253250012140 0ustar00<?php
/*
Plugin Name: Better Facebook Comments
Plugin URI: http://betterstudio.com
Description: Take advantage of powerful and unique features by integrating Facebook comments on your website instead of the standard WordPress commenting system.
Version: 1.5.3
Author: BetterStudio
Author URI: http://betterstudio.com
License: GPL2
*/

// TODO: sync comments on page when new comment was added

/**
 * Better_Facebook_Comments class wrapper for make changes safe in future
 *
 * @return Better_Facebook_Comments
 */
function Better_Facebook_Comments() {

	return Better_Facebook_Comments::self();
}


// Initialize Better Facebook Comments
Better_Facebook_Comments();


/**
 * Class Better_Facebook_Comments
 */
class Better_Facebook_Comments {


	/**
	 * Contains Better_Facebook_Comments version number that used for assets for preventing cache mechanism
	 *
	 * @var string
	 */
	private static $version = '1.5.3';


	/**
	 * Contains plugin option panel ID
	 *
	 * @var string
	 */
	private static $panel_id = 'better_facebook_comments';


	/**
	 * Comments loading type: ajaxified|plain
	 *
	 * @var string
	 */
	private $comments_type;

	/**
	 * Inner array of instances
	 *
	 * @var array
	 */
	protected static $instances = array();


	function __construct() {

		// make sure following code only one time run
		static $initialized;
		if ( $initialized ) {
			return;
		} else {
			$initialized = TRUE;
		}

		// Admin panel options
		include self::dir_path( 'includes/options/panel.php' );

		// Initialize
		add_action( 'better-framework/after_setup', array( $this, 'bf_init' ) );

		load_plugin_textdomain( 'better-studio', FALSE, 'better-facebook-comments/languages' );

	}


	/**
	 * Used for accessing plugin directory URL
	 *
	 * @param string $address
	 *
	 * @return string
	 */
	public static function dir_url( $address = '' ) {

		static $url;

		if ( is_null( $url ) ) {
			$url = plugin_dir_url( __FILE__ );
		}

		return $url . $address;
	}


	/**
	 * Used for accessing plugin directory path
	 *
	 * @param string $address
	 *
	 * @return string
	 */
	public static function dir_path( $address = '' ) {

		static $path;

		if ( is_null( $path ) ) {
			$path = plugin_dir_path( __FILE__ );
		}

		return $path . $address;
	}


	/**
	 * Returns plugin current Version
	 *
	 * @return string
	 */
	public static function get_version() {

		return self::$version;

	}


	/**
	 * Build the required object instance
	 *
	 * @param   string $object
	 * @param   bool   $fresh
	 * @param   bool   $just_include
	 *
	 * @return  Better_Facebook_Comments|null
	 */
	public static function factory( $object = 'self', $fresh = FALSE, $just_include = FALSE ) {

		if ( isset( self::$instances[ $object ] ) && ! $fresh ) {
			return self::$instances[ $object ];
		}

		switch ( $object ) {

			/**
			 * Main Better_Facebook_Comments Class
			 */
			case 'self':
				$class = 'Better_Facebook_Comments';
				break;

			default:
				return NULL;
		}


		// Just prepare/includes files
		if ( $just_include ) {
			return;
		}

		// don't cache fresh objects
		if ( $fresh ) {
			return new $class;
		}

		self::$instances[ $object ] = new $class;

		return self::$instances[ $object ];
	}


	/**
	 * Used for accessing alive instance of Better_Facebook_Comments
	 *
	 * @since 1.0
	 *
	 * @return Better_Facebook_Comments
	 */
	public static function self() {

		return self::factory();

	}


	/**
	 * Used for retrieving options simply and safely for next versions
	 *
	 * @param $option_key
	 *
	 * @return mixed|null
	 */
	public static function get_option( $option_key ) {

		return bf_get_option( $option_key, self::$panel_id );
	}


	/**
	 *  Init the plugin
	 */
	function bf_init() {

		if ( is_admin() && ! apply_filters( 'better-facebook-comments/allow-multiple', FALSE ) ) {

			if ( $this->get_option( 'app_id' ) && function_exists( 'Better_Disqus_Comments' ) && Better_Disqus_Comments()->get_option( 'shortname' ) ) {
				Better_Framework()->admin_notices()->add_notice( array(
					'id'  => 'facebook-and-disqus-same-time',
					'msg' => __( 'You activated both <strong>Facebook Comments</strong> and <strong>Disqus Comments</strong>. Please ensure that only one comment plugin is active at a time.', 'better-studio' )
				) );
			} else {
				Better_Framework()->admin_notices()->remove_notice( 'facebook-and-disqus-same-time' );
			}
		}

		if ( $this->get_option( 'app_id' ) === '' ) {
			return;
		}

		// Add ajax action to do views increment
		add_action( 'wp_ajax_clear_better_facebook_comments', array( $this, 'clear_comments_cache' ) );
		add_action( 'wp_ajax_nopriv_clear_better_facebook_comments', array( $this, 'clear_comments_cache' ) );

		// Change default template
		if ( apply_filters( 'better-facebook-comments/override-template', TRUE ) ) {
			add_filter( 'comments_template', array( $this, 'custom_comments_template' ), 40 );

			if ( ! is_admin() ) {
				// Add App ID Meta
				add_action( 'wp_head', array( $this, 'wp_head' ) );

				// Clear themes comments count text in meta
				add_filter( 'better-studio/themes/meta/comments/text', array(
					$this,
					'better_studio_themes_comment_text'
				) );

				// Add JS
				add_action( 'wp_footer', array( $this, 'wp_footer' ) );

			}
		}

		add_filter( 'get_comments_number', array( $this, 'filter_get_comments_number' ), 10, 2 );

	}


	/**
	 * Creates script for comments loading
	 *
	 * @return mixed|string
	 */
	public function get_script() {

		$script = bf_get_local_file_content( $this->dir_path( 'js/script.js' ) );

		if ( $this->comments_type === 'ajaxified' ) {
			$type = 'jQuery(document).on("ajaxified-comments-loaded",appendFbScript);';
		} else {
			$type = 'appendFbScript();';
		}

		$script = str_replace(
			array(
				'%%LOCALE%%',
				'%%APP-ID%%',
				'%%ADMIN-AJAX%%',
				'//%%TYPE%%',
				'%%POST-ID%%',
			),
			array(
				$this->get_option( 'locale' ),
				$this->get_option( 'app_id' ),
				admin_url( 'admin-ajax.php' ),
				$type,
				get_the_ID(),
			),
			$script
		);

		return $script;
	}


	public function output() {

		ob_start();
		?>
		<div id="fb-root"></div>
		<script>
			<?php echo $this->get_script() ?>
		</script>
		<?php

		return ob_get_clean();
	}


	/**
	 *  Add FB js and tags
	 */
	function wp_footer() {

		$print = is_singular() && ! ( is_front_page() || is_home() );

		// Print fb.js only in homepages that was not create with Visual Composer.
		if ( is_front_page() && function_exists( 'publisher_is_pagebuilder_used' ) ) {
			$print = ! publisher_is_pagebuilder_used();
		}

		// Add Facebook js and tags
		if ( $print ) {
			echo $this->output();
		}
	}


	/**
	 * Finds appropriate template file and return path
	 * This make option to change template in themes
	 *
	 * @return string
	 */
	function get_template() {

		if ( is_child_theme() ) {
			// Use child theme specified template for comments page
			if ( file_exists( get_stylesheet_directory() . '/better-facebook-comments.php' ) ) {
				return get_stylesheet_directory() . '/better-facebook-comments.php';
			}
		}

		// Use theme specified template for comments page
		if ( file_exists( get_template_directory() . '/better-facebook-comments.php' ) ) {
			return get_template_directory() . '/better-facebook-comments.php';
		}

		return $this->dir_path( 'templates/better-facebook-comments.php' );
	}


	/**
	 * Changes WP comments template with Facebook template
	 *
	 * @param string $template absolute path to comment template file
	 *
	 * @return string
	 */
	function custom_comments_template( $template ) {

		// Automatic AMP
		if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
			return $template;
		}

		// Better AMP
		if ( function_exists( 'is_better_amp' ) && is_better_amp() ) {
			return $template;
		}

		if ( ! apply_filters( 'better-facebook-comments/override-template', TRUE ) ) {
			return $template;
		}

		$is_ajaxified = basename( $template ) === 'comments-ajaxified.php';

		$this->comments_type = $is_ajaxified ? 'ajaxified' : 'plain';
		if ( $is_ajaxified ) {
			return $template;
		}

		return $this->get_template();
	}


	/**
	 * Ajax callback: clears comments count.
	 *
	 * @return string|void
	 */
	function clear_comments_cache() {

		if ( empty( $_GET['post_id'] ) ) {
			wp_send_json( array(
				'status'  => 'error',
				'message' => __( 'Post ID was not received.', 'better-studio' ),
			) );
		}

		delete_transient( 'bfc_post_' . $_GET['post_id'] );

		$result = array(
			'status'   => 'success',
			'post'     => $_GET['post_id'],
			'fb_count' => $this->get_comment_count( $_GET['post_id'] ),
		);

		add_filter( 'better-facebook-comments/disable-aggregate', '__return_false' );
		add_filter( 'better-facebook-comments/allow-multiple', '__return_true' );

		$result['count'] = get_comments_number( $_GET['post_id'] );

		wp_send_json( $result );

	}


	/**
	 * Retrieves post Facebook comments count.
	 *
	 * @return int|mixed
	 */
	function get_comment_count( $post_id = 0 ) {

		if ( $post_id == 0 ) {
			$post_id = get_the_ID();
		}

		$id = 'bfc_post_' . $post_id;

		if ( ( $count = get_transient( $id ) ) === FALSE ) {

			$request = wp_remote_get( 'https://graph.facebook.com/v2.1/?fields=share{comment_count}&id=' . esc_url( get_permalink( $post_id ) ) );

			if ( ! is_wp_error( $request ) ) {

				$request = json_decode( wp_remote_retrieve_body( $request ), TRUE );

				if ( isset( $request['error'] ) ) {
					$count = 0;
					set_transient( $id, $count, MINUTE_IN_SECONDS * 10 );
				} elseif ( ! empty( $request['share']['comment_count'] ) ) {
					$count = $request['share']['comment_count'];
					set_transient( $id, $count, HOUR_IN_SECONDS * 2 );
					add_post_meta( $post_id, '_facebook_comments_count', $count, TRUE );
				}
			}
		}

		if ( $count === FALSE ) {
			if ( get_post_meta( $post_id, '_facebook_comments_count', TRUE ) !== FALSE ) {
				$count = get_post_meta( $post_id, '_facebook_comments_count', TRUE );
			} else {
				$count = 0;
			}
		}

		if ( empty( $count ) ) {
			$count = 0;
		}

		return $count;
	}


	/**
	 * Filters comment count and multiplies comments count in when multiple comments is active
	 *
	 * @param $count
	 * @param $post_id
	 *
	 * @return int|mixed
	 */
	function filter_get_comments_number( $count, $post_id ) {

		if ( apply_filters( 'better-facebook-comments/disable-aggregate', FALSE ) ) {
			return $count;
		}

		$fb_count = $this->get_comment_count( $post_id );

		if ( apply_filters( 'better-facebook-comments/allow-multiple', FALSE ) ) {
			$fb_count += $count;
		}

		return $fb_count;
	}


	/**
	 * Callback: Used to clear themes meta text to better style in front-end
	 *
	 * Filter: better-studio/themes/meta/comments/text
	 *
	 * @param $text
	 *
	 * @return string
	 */
	function better_studio_themes_comment_text( $text ) {

		return is_int( $text ) ? $text : $this->get_comment_count();
	}


	/**
	 * Callback: Adds Facebook App data to header
	 *
	 * Action: wp_head
	 */
	function wp_head() {

		echo '<meta property="fb:app_id" content="' . $this->get_option( 'app_id' ) . '">';
	}
}
gulpfile.js000064400000001621151213253250006710 0ustar00var gulp = require('gulp'),
    cleanCSS = require('gulp-minify-css'),
    rename = require('gulp-rename'),
    uglify = require('gulp-uglify');

gulp.task('styles', function () {
    return gulp.src(['./css/*.css', '!./css/*.min.css'])
        .pipe(cleanCSS({
            keepSpecialComments: 1,
            level: 2
        }))
        .pipe(rename({suffix: '.min'}))
        .pipe(gulp.dest(function (file) {
            return file.base;
        }));
});

gulp.task('scripts', function () {
    return gulp.src(['./js/*.js', '!./js/*.min.js'])
        .pipe(uglify())
        .pipe(rename({suffix: '.min'}))
        .pipe(gulp.dest(function (file) {
            return file.base;
        }));
});

gulp.task('watch', function () {
    gulp.watch(['./css/*.css', '!./css/*.min.css'], ['styles']);
    gulp.watch(['./js/*.js', '!./js/*.min.js'], ['scripts']);
});

gulp.task('default', ['styles', 'scripts']);
templates/better-facebook-comments.php000064400000001612151213253250014131 0ustar00<?php

/**
 * Custom Template For Better Facebook Comments Plugin
 *
 * Copy this to your site theme and make it more compatible with your site layout
 */

?>
<div id="comments" class="better-comments-area better-facebook-comments-area">
	<div id="comments" class="better-comments-area better-facebook-comments-area">
		<div class="fb-comments" data-href="<?php the_permalink(); ?>"
		     data-numposts="<?php echo Better_Facebook_Comments::get_option( 'numposts' ); ?>"
		     data-colorscheme="<?php echo Better_Facebook_Comments::get_option( 'colorscheme' ); ?>"
		     data-order-by="<?php echo Better_Facebook_Comments::get_option( 'order_by' ); ?>" data-width="100%"
		     data-mobile="false"><?php echo Better_Facebook_Comments::get_option( 'text_loading' ); ?></div>

		<?php if ( bf_is_doing_ajax() ) { ?>
			<script> FB.XFBML.parse();</script>
		<?php } ?>
	</div>
</div>
includes/options/panel-config.php000064400000003640151213253250013122 0ustar00<?php

// Language  name for smart admin texts
$lang = bf_get_current_lang_raw();
if ( $lang != 'none' ) {
	$lang = bf_get_language_name( $lang );
} else {
	$lang = '';
}

$panel = array(
	'config'     => array(
		'parent'              => 'better-studio',
		'slug'                => 'better-studio/better-facebook-comments',
		'name'                => __( 'Better Facebook Comments', 'better-studio' ),
		'page_title'          => __( 'Better Facebook Comments', 'better-studio' ),
		'menu_title'          => __( 'Facebook Comments', 'better-studio' ),
		'capability'          => 'manage_options',
		'icon_url'            => NULL,
		'position'            => 80.08,
		'exclude_from_export' => FALSE,
	),
	'texts'      => array(

		'panel-desc-lang'     => '<p>' . __( '%s Language Options.', 'better-studio' ) . '</p>',
		'panel-desc-lang-all' => '<p>' . __( 'All Languages Options.', 'better-studio' ) . '</p>',

		'reset-button'     => ! empty( $lang ) ? sprintf( __( 'Reset %s Options', 'better-studio' ), $lang ) : __( 'Reset Options', 'better-studio' ),
		'reset-button-all' => __( 'Reset All Options', 'better-studio' ),

		'reset-confirm'     => ! empty( $lang ) ? sprintf( __( 'Are you sure to reset %s options?', 'better-studio' ), $lang ) : __( 'Are you sure to reset options?', 'better-studio' ),
		'reset-confirm-all' => __( 'Are you sure to reset all options?', 'better-studio' ),

		'save-button'     => ! empty( $lang ) ? sprintf( __( 'Save %s Options', 'better-studio' ), $lang ) : __( 'Save Options', 'better-studio' ),
		'save-button-all' => __( 'Save All Options', 'better-studio' ),

		'save-confirm-all' => __( 'Are you sure to save all options? this will override specified options per languages', 'better-studio' )

	),
	'panel-name' => _x( 'Better Facebook Comments', 'Panel title', 'better-studio' ),
	'panel-desc' => '<p>' . __( 'Take advantage of integrating Facebook comments on your website.', 'better-studio' ) . '</p>',
);
includes/options/panel-fields.php000064400000014554151213253250013131 0ustar00<?php

$fields[]              = array(
	'name'          => __( 'Facebook Comments Instructions', 'better-studio' ),
	'id'            => 'facebook-help',
	'type'          => 'info',
	'std'           => __( '<ol>
            <li>Read <a href="https://goo.gl/0WBQTi">official documentation to create new app</a>.</li>
            <li>Paste created "APP ID" it in the below "App ID" input box.</li>
          </ol>
                    ', 'better-studio' ),
	'state'         => 'open',
	'info-type'     => 'help',
	'section_class' => 'widefat',
);
$fields['app_id']      = array(
	'name' => __( 'App ID', 'better-studio' ),
	'id'   => 'app_id',
	'desc' => __( 'Enter in your Facebook App ID.', 'better-studio' ),
	'type' => 'text',
);
$fields['numposts']    = array(
	'name' => __( 'Number Posts', 'better-studio' ),
	'id'   => 'numposts',
	'desc' => __( 'Select the amount of posts per page to display.', 'better-studio' ),
	'type' => 'text',
);
$fields['order_by']    = array(
	'name'    => __( 'Posts Order', 'better-studio' ),
	'id'      => 'order_by',
	'desc'    => __( 'Choose the order for your posts. Selecting "Social" will bring what Facebook deems the highest quality comments to the surface.', 'better-studio' ),
	'type'    => 'select',
	'options' => array(
		'social'       => __( 'Social', 'better-studio' ),
		'time'         => __( 'Time', 'better-studio' ),
		'reverse_time' => __( 'Reverse Time', 'better-studio' ),
	)
);
$fields['colorscheme'] = array(
	'name'    => __( 'Color Scheme', 'better-studio' ),
	'id'      => 'colorscheme',
	'desc'    => __( 'Choose which color scheme you would like for your comments.', 'better-studio' ),
	'type'    => 'select',
	'options' => array(
		'light' => __( 'Light', 'better-studio' ),
		'dark'  => __( 'Dark', 'better-studio' ),
	)
);
$fields['locale']      = array(
	'name'    => __( 'Adjust Language', 'better-studio' ),
	'id'      => 'locale',
	'desc'    => __( 'You can adjust the language of the Comments by changing this option.', 'better-studio' ),
	'type'    => 'select',
	'options' => array()
);

// Add locales only in admin to reduce memory usage in front end!
if ( is_admin() ) {
	$fields['locale']['options'] = array(
		'en_US' => '-- English (US) -- ',
		'af_ZA' => 'Afrikaans',
		'ak_GH' => 'Akan',
		'am_ET' => 'Amharic',
		'ar_AR' => 'Arabic',
		'as_IN' => 'Assamese',
		'ay_BO' => 'Aymara',
		'az_AZ' => 'Azerbaijani',
		'be_BY' => 'Belarusian',
		'bg_BG' => 'Bulgarian',
		'bn_IN' => 'Bengali',
		'br_FR' => 'Breton',
		'bs_BA' => 'Bosnian',
		'ca_ES' => 'Catalan',
		'cb_IQ' => 'Sorani Kurdish',
		'ck_US' => 'Cherokee',
		'co_FR' => 'Corsican',
		'cs_CZ' => 'Czech',
		'cx_PH' => 'Cebuano',
		'cy_GB' => 'Welsh',
		'da_DK' => 'Danish',
		'de_DE' => 'German',
		'el_GR' => 'Greek',
		'en_GB' => 'English (UK)',
		'en_IN' => 'English (India)',
		'en_PI' => 'English (Pirate)',
		'en_UD' => 'English (Upside Down)',
		'eo_EO' => 'Esperanto',
		'es_CO' => 'Spanish (Colombia)',
		'es_ES' => 'Spanish (Spain)',
		'es_LA' => 'Spanish',
		'et_EE' => 'Estonian',
		'eu_ES' => 'Basque',
		'fa_IR' => 'Persian',
		'fb_LT' => 'Leet Speak',
		'ff_NG' => 'Fulah',
		'fi_FI' => 'Finnish',
		'fo_FO' => 'Faroese',
		'fr_CA' => 'French (Canada)',
		'fr_FR' => 'French (France)',
		'fy_NL' => 'Frisian',
		'ga_IE' => 'Irish',
		'gl_ES' => 'Galician',
		'gn_PY' => 'Guarani',
		'gu_IN' => 'Gujarati',
		'gx_GR' => 'Classical Greek',
		'ha_NG' => 'Hausa',
		'he_IL' => 'Hebrew',
		'hi_IN' => 'Hindi',
		'hr_HR' => 'Croatian',
		'hu_HU' => 'Hungarian',
		'hy_AM' => 'Armenian',
		'id_ID' => 'Indonesian',
		'ig_NG' => 'Igbo',
		'is_IS' => 'Icelandic',
		'it_IT' => 'Italian',
		'ja_JP' => 'Japanese',
		'ja_KS' => 'Japanese (Kansai)',
		'jv_ID' => 'Javanese',
		'ka_GE' => 'Georgian',
		'kk_KZ' => 'Kazakh',
		'km_KH' => 'Khmer',
		'kn_IN' => 'Kannada',
		'ko_KR' => 'Korean',
		'ku_TR' => 'Kurdish (Kurmanji)',
		'la_VA' => 'Latin',
		'lg_UG' => 'Ganda',
		'li_NL' => 'Limburgish',
		'ln_CD' => 'Lingala',
		'lo_LA' => 'Lao',
		'lt_LT' => 'Lithuanian',
		'lv_LV' => 'Latvian',
		'mg_MG' => 'Malagasy',
		'mk_MK' => 'Macedonian',
		'ml_IN' => 'Malayalam',
		'mn_MN' => 'Mongolian',
		'mr_IN' => 'Marathi',
		'ms_MY' => 'Malay',
		'mt_MT' => 'Maltese',
		'my_MM' => 'Burmese',
		'nb_NO' => 'Norwegian (bokmal)',
		'nd_ZW' => 'Ndebele',
		'ne_NP' => 'Nepali',
		'nl_BE' => 'Dutch (België)',
		'nl_NL' => 'Dutch',
		'nn_NO' => 'Norwegian (nynorsk)',
		'ny_MW' => 'Chewa',
		'or_IN' => 'Oriya',
		'pa_IN' => 'Punjabi',
		'pl_PL' => 'Polish',
		'ps_AF' => 'Pashto',
		'pt_BR' => 'Portuguese (Brazil)',
		'pt_PT' => 'Portuguese (Portugal)',
		'qu_PE' => 'Quechua',
		'rm_CH' => 'Romansh',
		'ro_RO' => 'Romanian',
		'ru_RU' => 'Russian',
		'rw_RW' => 'Kinyarwanda',
		'sa_IN' => 'Sanskrit',
		'sc_IT' => 'Sardinian',
		'se_NO' => 'Northern Sámi',
		'si_LK' => 'Sinhala',
		'sk_SK' => 'Slovak',
		'sl_SI' => 'Slovenian',
		'sn_ZW' => 'Shona',
		'so_SO' => 'Somali',
		'sq_AL' => 'Albanian',
		'sr_RS' => 'Serbian',
		'sv_SE' => 'Swedish',
		'sw_KE' => 'Swahili',
		'sy_SY' => 'Syriac',
		'sz_PL' => 'Silesian',
		'ta_IN' => 'Tamil',
		'te_IN' => 'Telugu',
		'tg_TJ' => 'Tajik',
		'th_TH' => 'Thai',
		'tk_TM' => 'Turkmen',
		'tl_PH' => 'Filipino',
		'tl_ST' => 'Klingon',
		'tr_TR' => 'Turkish',
		'tt_RU' => 'Tatar',
		'tz_MA' => 'Tamazight',
		'uk_UA' => 'Ukrainian',
		'ur_PK' => 'Urdu',
		'uz_UZ' => 'Uzbek',
		'vi_VN' => 'Vietnamese',
		'wo_SN' => 'Wolof',
		'xh_ZA' => 'Xhosa',
		'yi_DE' => 'Yiddish',
		'yo_NG' => 'Yoruba',
		'zh_CN' => 'Simplified Chinese (China)',
		'zh_HK' => 'Traditional Chinese (Hong Kong)',
		'zh_TW' => 'Traditional Chinese (Taiwan)',
		'zu_ZA' => 'Zulu',
		'zz_TR' => 'Zazaki',
	);
}
$fields[]                   = array(
	'name'  => __( 'Comment Texts', 'better-studio' ),
	'type'  => 'group',
	'state' => 'close',
);
$fields['text_no_comment']  = array(
	'name' => __( 'No Comment Text', 'better-studio' ),
	'id'   => 'text_no_comment',
	'type' => 'text',
);
$fields['text_one_comment'] = array(
	'name' => __( 'One Comment Text', 'better-studio' ),
	'id'   => 'text_one_comment',
	'type' => 'text',
);
$fields['text_two_comment'] = array(
	'name' => __( 'Two Comment Text', 'better-studio' ),
	'id'   => 'text_two_comment',
	'type' => 'text',
);
$fields['text_comments']    = array(
	'name' => __( 'Comments Text', 'better-studio' ),
	'id'   => 'text_comments',
	'type' => 'text',
);
$fields['text_loading']     = array(
	'name' => __( 'Comments Loading', 'better-studio' ),
	'id'   => 'text_loading',
	'type' => 'text',
);
includes/options/panel.php000064400000004732151213253250011662 0ustar00<?php

add_filter( 'better-framework/panel/add', 'better_facebook_comments_panel_add', 10 );

if ( ! function_exists( 'better_facebook_comments_panel_add' ) ) {
	/**
	 * Callback: Ads panel
	 *
	 * Filter: better-framework/panel/options
	 *
	 * @param $panels
	 *
	 * @return array
	 */
	function better_facebook_comments_panel_add( $panels ) {

		$panels[ 'better_facebook_comments' ] = array(
			'id' => 'better_facebook_comments',
		);

		return $panels;
	}
}


add_filter( 'better-framework/panel/better_facebook_comments/config', 'better_facebook_comments_panel_config', 10 );

if ( ! function_exists( 'better_facebook_comments_panel_config' ) ) {
	/**
	 * Callback: Init's BF options
	 *
	 * @param $panel
	 *
	 * @return array
	 */
	function better_facebook_comments_panel_config( $panel ) {

		include Better_Facebook_Comments::dir_path( 'includes/options/panel-config.php' );

		return $panel;
	} // better_facebook_comments_panel_config
}


add_filter( 'better-framework/panel/better_facebook_comments/std', 'better_facebook_comments_panel_std', 10 );

if ( ! function_exists( 'better_facebook_comments_panel_std' ) ) {
	/**
	 * Callback: Init's BF options
	 *
	 * Filter: better-framework/panel/options
	 *
	 * @param $fields
	 *
	 * @return array
	 */
	function better_facebook_comments_panel_std( $fields ) {

		$fields['app_id']           = array(
			'std' => '',
		);
		$fields['numposts']         = array(
			'std' => '10',
		);
		$fields['order_by']         = array(
			'std' => 'social',
		);
		$fields['colorscheme']      = array(
			'std' => 'light',
		);
		$fields['locale']           = array(
			'std' => 'en_US',
		);
		$fields['text_no_comment']  = array(
			'std' => 'No Comment',
		);
		$fields['text_one_comment'] = array(
			'std' => 'One Comment',
		);
		$fields['text_two_comment'] = array(
			'std' => 'Two Comment',
		);
		$fields['text_comments']    = array(
			'std' => '%%NUMBER%% Comment',
		);
		$fields['text_loading']    = array(
			'std' => 'Loading...',
		);
		

		return $fields;
	}
}


add_filter( 'better-framework/panel/better_facebook_comments/fields', 'better_facebook_comments_panel_fields', 10 );

if ( ! function_exists( 'better_facebook_comments_panel_fields' ) ) {
	/**
	 * Callback: Init's BF options
	 *
	 * Filter: better-framework/panel/options
	 *
	 * @param $fields
	 *
	 * @return array
	 */
	function better_facebook_comments_panel_fields( $fields ) {

		include Better_Facebook_Comments::dir_path( 'includes/options/panel-fields.php' );

		return $fields;
	}
}

F1le Man4ger