<commit_before><?php
/**
* WicketPixie Home Editor
* Now you finally do not have to dig into the template files to
* modify your home page! Whee! \o/
**/

// Arrays that hold our options
$homeoptions = array(
    array(
    "name" => "Flickr Widget",
    "description" => "Display the Flickr widget on the home page.",
    "id" => "home_flickr",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Video Embed",
    "description" => "Enable the Video Embed Code entered below.",
    "id" => "home_video",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Video Embed Code",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_video_code",
    "std" => "No video embed code yet...",
    "type" => "textarea"),
    array(
    "name" => "Show 'My Videos' heading",
    "description" => "Show the 'My Videos' heading above the video embed.",
    "id" => "home_show_vid_heading",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Show 'Recent Photos' heading",
    "description" => "Show the 'Recent Photos' heading above the video embed.",
    "id" => "home_show_photo_heading",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Enable Social Buttons Widget",
    "description" => "Show the Social Buttons Widget in the homepage sidebar.",
    "id" => "home_sidebar_buttons",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Ustream Widget",
    "description" => "Check to enable the Ustream embed on the homepage sidebar.",
    "id" => "home_ustream",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Autoplay Ustream",
    "description" => "Check if you want the Ustream object to automatically play on page load.",
    "id" => "home_ustream_autoplay",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Ustream Object Heading",
    "description" => "The heading that will appear above the Ustream Object.",
    "id" => "home_ustream_heading",
    "std" => "Live Video",
    "type" => "textbox"),
    array(
    "name" => "Ustream Object Height",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_ustream_height",
    "std" => "293",
    "type" => "textbox"),
    array(
    "name" => "Ustream Object Width",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_ustream_width",
    "std" => "340",
    "type" => "textbox"),
    array(
    "name" => "Custom Code",
    "description" => "Content that is displayed after the post meta data but before the Flickr Widget, Embedded Video, etc.",
    "id" => "home_custom",
    "std" => "No custom code yet...",
    "type" => "textarea")
);
class HomeAdmin {

	/**
	* Just calling WP's method to add a new menu to the design section.
	*/
	function addMenu()
	{
	    global $homeoptions;
        if ( 'save' == $_POST['action'] ) {
            foreach ( $homeoptions as $value ) {
	            if(!wp_add_option($value['id'],$_POST[$value['id']])) {
                    wp_update_option($value['id'],$_POST[$value['id']]);
                }
			}
            foreach ( $homeoptions as $value ) { 
                if( $value['type'] == 'checkbox' ) {
                    if(isset($_POST[$value['id']])) {
                        if(!wp_add_option($value['id'],'1')) {
                            wp_update_option($value['id'],'1');
                        }
                    } else {
                        if(!wp_add_option($value['id'],'0')) {
                            wp_update_option($value['id'],'0');
                        }
                    }	<commit_msg>Added the custome code default to be a comment rather than raw text<commit_after><?php
/**
* WicketPixie Home Editor
* Now you finally do not have to dig into the template files to
* modify your home page! Whee! \o/
**/

// Arrays that hold our options
$homeoptions = array(
    array(
    "name" => "Flickr Widget",
    "description" => "Display the Flickr widget on the home page.",
    "id" => "home_flickr",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Video Embed",
    "description" => "Enable the Video Embed Code entered below.",
    "id" => "home_video",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Video Embed Code",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_video_code",
    "std" => "No video embed code yet...",
    "type" => "textarea"),
    array(
    "name" => "Show 'My Videos' heading",
    "description" => "Show the 'My Videos' heading above the video embed.",
    "id" => "home_show_vid_heading",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Show 'Recent Photos' heading",
    "description" => "Show the 'Recent Photos' heading above the video embed.",
    "id" => "home_show_photo_heading",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Enable Social Buttons Widget",
    "description" => "Show the Social Buttons Widget in the homepage sidebar.",
    "id" => "home_sidebar_buttons",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Ustream Widget",
    "description" => "Check to enable the Ustream embed on the homepage sidebar.",
    "id" => "home_ustream",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Autoplay Ustream",
    "description" => "Check if you want the Ustream object to automatically play on page load.",
    "id" => "home_ustream_autoplay",
    "std" => 1,
    "status" => "checked",
    "type" => "checkbox"),
    array(
    "name" => "Ustream Object Heading",
    "description" => "The heading that will appear above the Ustream Object.",
    "id" => "home_ustream_heading",
    "std" => "Live Video",
    "type" => "textbox"),
    array(
    "name" => "Ustream Object Height",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_ustream_height",
    "std" => "293",
    "type" => "textbox"),
    array(
    "name" => "Ustream Object Width",
    "description" => "Enter code for a video object. For example, a YouTube custom player.",
    "id" => "home_ustream_width",
    "std" => "340",
    "type" => "textbox"),
    array(
    "name" => "Custom Code",
    "description" => "Content that is displayed after the post meta data but before the Flickr Widget, Embedded Video, etc.",
    "id" => "home_custom",
    "std" => "<!-- No custom code yet... -->",
    "type" => "textarea")
);
class HomeAdmin {

	/**
	* Just calling WP's method to add a new menu to the design section.
	*/
	function addMenu()
	{
	    global $homeoptions;
        if ( 'save' == $_POST['action'] ) {
            foreach ( $homeoptions as $value ) {
	            if(!wp_add_option($value['id'],$_POST[$value['id']])) {
                    wp_update_option($value['id'],$_POST[$value['id']]);
                }
			}
            foreach ( $homeoptions as $value ) { 
                if( $value['type'] == 'checkbox' ) {
                    if(isset($_POST[$value['id']])) {
                        if(!wp_add_option($value['id'],'1')) {
                            wp_update_option($value['id'],'1');
                        }
                    } else {
                        if(!wp_add_option($value['id'],'0')) {
                            wp_update_option($value['id'],'0');
                        }
                    }	
{'fraction_non_alphanumeric': 0.17641090678503488, 'fraction_numerical': 0.004311984781230184, 'mean_word_length': 2.4391626689925863, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 138, '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': '3902891', 'n_tokens_mistral': 2504, 'n_tokens_neox': 2419, 'n_words': 736}