ob_start(); define('SPRITZ', '1.0.0'); define('SPRITZ__PLUGIN_URL', plugin_dir_url(__FILE__)); define('SPRITZ__PLUGIN_DIR', plugin_dir_path(__FILE__)); $upload_dir = wp_upload_dir(); $spritz['box'] = false; /* ********************************************* */ /* Plugin Activation & Deactivation Code Start * */ /* ********************************************* */ register_activation_hook(__FILE__, 'spritz_install'); register_deactivation_hook(__FILE__, 'spritz_deactivate'); register_uninstall_hook('wordpress.with.spritz.uninstall.php', 'spritz_uninstall'); include_once 'class/class.wordpress.with.spritz.widget.php'; include_once 'class/class.wordpress.with.spritz.helper.php'; define('SPRITZ__EXCLUDE', Spritz_Helper::fieldsToOmit()); define('SPRITZ__INCLUDE', Spritz_Helper::fieldsToInclude()); /* ********************************************* */ /* Upgrading Files if Required ***************** */ /* ********************************************* */ function spritz_install() { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; add_option('spritz_admin_email', '*****@*****.**'); add_option('spirtz_exclude', SPRITZ__EXCLUDE); add_option('content_region_include', SPRITZ__INCLUDE); add_option('spritz_start_text', 'Please Wait'); add_option('spritz_end_text', 'The End'); add_option('spritz_flyout_display_type', 'tab'); add_option('popup_position', 'left'); add_option('activate_spritz_reader_content_types', get_all_post()); add_option('include_spritz_reader_onfollowing_certain_post', 'Y');
<?php include 'class/class.wordpress.with.spritz.helper.php'; $global = Spritz_Helper::usedFields(); if (isset($_POST['isconfic']) && $_POST['isconfic'] == 'isconfic') { $_POST['spritz_speed_option'] = isset($_POST['spritz_speed_option']) ? 'Y' : 'N'; $_POST['spritz_controlls'] = isset($_POST['spritz_controlls']) ? 'Y' : 'N'; $_POST['spritz_auto_detect'] = isset($_POST['spritz_auto_detect']) ? 'Y' : 'N'; $_POST['spritz_wpm'] = implode(',', isset($_POST['spritz_wpm']) ? $_POST['spritz_wpm'] : array()); $_POST['pause_play_control'] = isset($_POST['pause_play_control']) ? 'Y' : 'Y'; $_POST['rewind_control'] = isset($_POST['rewind_control']) ? 'Y' : 'Y'; $_POST['back_control'] = isset($_POST['back_control']) ? 'Y' : 'Y'; $_POST['forward_control'] = isset($_POST['forward_control']) ? 'Y' : 'Y'; $_POST['go_to_end_control'] = isset($_POST['go_to_end_control']) ? 'Y' : 'N'; $_POST['activate_spritz_reader_content_types'] = implode(',', isset($_POST['activate_spritz_reader_content_types']) ? $_POST['activate_spritz_reader_content_types'] : array()); $_POST['spritz_contents'] = implode(',', isset($_POST['spritz_contents']) ? $_POST['spritz_contents'] : array()); $_POST['activate_spritz_box_on_certain_post'] = isset($_POST['activate_spritz_box_on_certain_post']) ? 'Y' : 'N'; $_POST['include_spritz_reader_onfollowing_certain_post'] = isset($_POST['include_spritz_reader_onfollowing_certain_post']) ? 'Y' : 'N'; $_POST['automatically_put_the_spritz_reader_at_the_top_of_my_content'] = isset($_POST['automatically_put_the_spritz_reader_at_the_top_of_my_content']) ? 'Y' : 'N'; } if (isset($_POST['controlls_hidden'])) { $_POST['image_tab_popup'] = isset($_POST['image_tab_popup']) ? 'Y' : 'N'; $_POST['image_inline_popup'] = isset($_POST['image_inline_popup']) ? 'Y' : 'N'; $_POST['created_by'] = isset($_POST['created_by']) ? 'Y' : 'N'; $_POST['make_responsive'] = isset($_POST['make_responsive']) ? 'Y' : 'N'; $_POST['enable_spritzer_in_home_page'] = isset($_POST['enable_spritzer_in_home_page']) ? 'Y' : 'N'; } if (isset($_POST['spirtz_exclude'])) { $_POST['spirtz_exclude'] = str_replace("#", '|', $_POST['spirtz_exclude']); } if (isset($_POST['include_spritz_reader_on_following'])) {