<commit_before><?php
/**
 * @package MailChimp Subscribe For Food & Cook Theme by Global Food Book
 * @version 1.30
 */
/*
Plugin Name: MailChimp Subscribe For Food & Cook Theme
Plugin URI: http://wordpress.org/extend/plugins/mailchimp-subscribe-for-food-cook-theme/
Description: This plugin is an extract from <a href='http://globalfoodbook.com' target='_blank'>globalfoodbook.com</a>. This plugin will work only on websites that have the <a href='http://themeforest.net/item/food-cook-multipurpose-food-recipe-wp-theme/4915630'>food-cook</a> template installed  and have setup mailchimp connect url, See food-cooke docs and <a href='http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id' target='_blank'>this</a> for more details. This plugin is built to help other <a href='http://themeforest.net/item/food-cook-multipurpose-food-recipe-wp-theme/4915630'>food-cook</a> site owners (from the support group) who require this utility. It is implemented to allow easy setup and customization of a website's newsletter subscription widget and modal popup. It is best used with food and cook recipe theme made with woo themes.
Author: <NAME>
Version: 1.30
Author URI: http://ikennaokpala.com/
*/
// File Security Check
if (!empty($_SERVER['SCRIPT_FILENAME']) && basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME'])) {
    die('You do not have sufficient permissions to access this page');
}

// Enqueue script and styles
if ( !function_exists( 'gfb_add_to_head' ) ):
  function gfb_add_to_head() {
     wp_register_script( 'add-gfb-sub-js', plugin_dir_url( __FILE__ ) . 'includes/assets/javascript/gfb_subscribe.js', '', null,''  );
     wp_register_style( 'add-gfb-sub-css', plugin_dir_url( __FILE__ ) . 'includes/assets/css/gfb_subscribe.css','','', 'screen' );
     wp_enqueue_script( 'add-gfb-sub-js' );
     wp_enqueue_style( 'add-gfb-sub-css' );
  }
endif;

add_action( 'wp_enqueue_scripts', 'gfb_add_to_head' );

/*---------------------------------------------------------------------------------*/
/* GFB Newsletter Subscribe widget */
/*---------------------------------------------------------------------------------*/

class GFB_MailChimp_Subscribe extends WP_Widget
{
    var $plugin_name = 'MailChimp Subscribe For Food & Cook Theme.';
    var $settings = array('title', 'summary', 'button_txt', 'button_color', 'm_title', 'm_summary', 'm_img', 'privacy_policy', 'scroller_activity_status');

    function GFB_MailChimp_Subscribe()
    {
        $widget_ops = array(
            'classname' => 'gfb_subscribe',
            'description' => $this->plugin_name
        );
        parent::WP_Widget(false, __('MailChimp Subscribe For Food Cook Theme', 'woothemes'), $widget_ops);
    }

    function widget($args, $instance)
    {
        $settings = $this->woo_get_settings();
        extract($args, EXTR_SKIP);
        $instance = wp_parse_args($instance, $settings);
        extract($instance, EXTR_SKIP);

        // Enforce defaults
        foreach (array(
            'title',
            'summary',
            'button_txt',
            'button_color',
            'm_title',
            'm_summary',
            'm_img',
            'privacy_policy',
            'scroller_activity_status'
        ) as $setting) {
            if (!$$setting)
                $$setting = $settings[$setting];
        }

        echo $before_widget;
        if (function_exists('woo_get_dynamic_values')){
          if ($title) {
              echo "<h3 style='margin:0;padding:0;'>" . $title . "</h3>";
          }
          if ($summary) {
              echo "<center><p style='margin-top:5px;padding:0;font-size:14px;'>" . $summary . "</center></p>";
          }?>

          <center style="font-family:georgia, serif;vertical-align:baseline;border:0;margin:0;padding:0;color:#fff;"><commit_msg>Update settings<commit_after><?php
/**
 * @package MailChimp Subscribe For Food & Cook Theme by Global Food Book
 * @version 1.30
 */
/*
Plugin Name: MailChimp Subscribe For Food & Cook Theme
Plugin URI: http://wordpress.org/extend/plugins/mailchimp-subscribe-for-food-cook-theme/
Description: This plugin is an extract from <a href='http://globalfoodbook.com' target='_blank'>globalfoodbook.com</a>. This plugin will work only on websites that have the <a href='http://themeforest.net/item/food-cook-multipurpose-food-recipe-wp-theme/4915630'>food-cook</a> template installed  and have setup mailchimp connect url, See food-cooke docs and <a href='http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id' target='_blank'>this</a> for more details. This plugin is built to help other <a href='http://themeforest.net/item/food-cook-multipurpose-food-recipe-wp-theme/4915630'>food-cook</a> site owners (from the support group) who require this utility. It is implemented to allow easy setup and customization of a website's newsletter subscription widget and modal popup. It is best used with food and cook recipe theme made with woo themes.
Author: <NAME>
Version: 1.30
Author URI: http://ikennaokpala.com/
*/
// File Security Check
if (!empty($_SERVER['SCRIPT_FILENAME']) && basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME'])) {
    die('You do not have sufficient permissions to access this page');
}

// Enqueue script and styles
if ( !function_exists( 'gfb_add_to_head' ) ):
  function gfb_add_to_head() {
     wp_register_script( 'add-gfb-sub-js', plugin_dir_url( __FILE__ ) . 'includes/assets/javascript/gfb_subscribe.js', '', null,''  );
     wp_register_style( 'add-gfb-sub-css', plugin_dir_url( __FILE__ ) . 'includes/assets/css/gfb_subscribe.css','','', 'screen' );
     wp_enqueue_script( 'add-gfb-sub-js' );
     wp_enqueue_style( 'add-gfb-sub-css' );
  }
endif;

add_action( 'wp_enqueue_scripts', 'gfb_add_to_head' );

/*---------------------------------------------------------------------------------*/
/* GFB Newsletter Subscribe widget */
/*---------------------------------------------------------------------------------*/

class GFB_MailChimp_Subscribe extends WP_Widget
{
    var $plugin_name = 'MailChimp Subscribe For Food & Cook Theme.';
    var $settings = array('title', 'summary', 'button_txt', 'button_color', 'm_title', 'm_summary', 'm_img', 'privacy_policy', 'm_button_text', 'scroller_activity_status');

    function GFB_MailChimp_Subscribe()
    {
        $widget_ops = array(
            'classname' => 'gfb_subscribe',
            'description' => $this->plugin_name
        );
        parent::WP_Widget(false, __('MailChimp Subscribe For Food Cook Theme', 'woothemes'), $widget_ops);
    }

    function widget($args, $instance)
    {
        $settings = $this->woo_get_settings();
        extract($args, EXTR_SKIP);
        $instance = wp_parse_args($instance, $settings);
        extract($instance, EXTR_SKIP);

        // Enforce defaults
        foreach (array(
            'title',
            'summary',
            'button_txt',
            'button_color',
            'm_title',
            'm_summary',
            'm_img',
            'm_button_text',
            'privacy_policy',
            'scroller_activity_status'
        ) as $setting) {
            if (!$$setting)
                $$setting = $settings[$setting];
        }

        echo $before_widget;
        if (function_exists('woo_get_dynamic_values')){
          if ($title) {
              echo "<h3 style='margin:0;padding:0;'>" . $title . "</h3>";
          }
          if ($summary) {
              echo "<center><p style='margin-top:5px;padding:0;font-size:14px;'>" . $summary . "</center></p>";
          }?>

          <center style="font-family:georgia, serif;vertical-align:baseline;border:0;margin:0;padding:0;color:#fff;">
{'fraction_non_alphanumeric': 0.1793336803748048, 'fraction_numerical': 0.008068714211348256, 'mean_word_length': 2.7451267056530213, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1021365', 'n_tokens_mistral': 2361, 'n_tokens_neox': 2297, 'n_words': 532}