Settings'; array_unshift($links, $settings_link); return $links; } //print the star rating style on post edit page function post_enqueue($hook) { if( 'post.php' != $hook ) return; // wp_enqueue_script( 'bsf_jquery' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bsf_jquery_star' ); wp_enqueue_script( 'bsf_toggle' ); wp_enqueue_style( 'star_style' ); } function post_new_enqueue($hook) { if('post-new.php' != $hook ) return; // wp_enqueue_script( 'bsf_jquery' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bsf_jquery_star' ); wp_enqueue_script( 'bsf_toggle' ); wp_enqueue_style( 'star_style' ); } //Initialize the metabox class function wp_initialize_bsf_meta_boxes() { if ( ! class_exists( 'bsf_Meta_Box' ) ) require_once(plugin_dir_path( __FILE__ ) . 'init.php'); } function set_styles() { wp_register_style( 'star_style', plugins_url('/css/jquery.rating.css', __FILE__) ); wp_register_style( 'meta_style', plugins_url('admin/css/style.css', __FILE__) ); wp_register_style( 'admin_style', plugins_url('admin/css/admin.css', __FILE__) ); wp_register_script( 'bsf_jquery_ui', plugins_url('/js/jquery-ui.js', __FILE__) ); wp_register_script( 'bsf_jquery_star', plugins_url('/js/jquery.rating.min.js', __FILE__) ); wp_register_script( 'bsf_toggle', plugins_url('/js/toggle.js', __FILE__) ); } // Define icon styles for the custom post type function star_icons() { ?> "; $from = $_POST['email']; $site = $_POST['site_url']; $sub = $_POST['subject']; $message = $_POST['message']; $name = $_POST['name']; if($sub == "question") $subject = "[AIOSRS] New question received from ".$name; else if($sub == "bug") $subject = "[AIOSRS] New bug found by ".$name; else if($sub == "help") $subject = "[AIOSRS] New help request received from ".$name; else if($sub == "professional") $subject = "[AIOSRS] New service quote request received from ".$name; else if($sub == "contribute") $subject = "[AIOSRS] New development contribution request by ".$name; else if($sub == "other") $subject = "[AIOSRS] New contact request received from ".$name; $html = ' All in One Schema.org Rich Snippets
All in One Schema.org Rich Snippets Support
Name : '.$name.'
Email : '.$from.'
Website : '.$site.'
Message :
'.$message.'
'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From:'.$name.'<'.$from.'>' . "\r\n"; $headers .= 'Cc: Sujay Pawar ' . "\r\n"; $headers .= 'Bcc: Nitin Yawalkar ' . "\r\n"; echo mail($to,$subject,$html,$headers) ? "Thank you!" : "Something went wrong !"; die(); } function submit_color() { $snippet_box_bg = $_POST['snippet_box_bg']; $snippet_title_bg = $_POST['snippet_title_bg']; $border_color = $_POST['snippet_border']; $title_color = $_POST['snippet_title_color']; $box_color = $_POST['snippet_box_color']; $color_opt = array( 'snippet_box_bg' => $snippet_box_bg, 'snippet_title_bg' => $snippet_title_bg, 'snippet_border' => $border_color, 'snippet_title_color' => $title_color, 'snippet_box_color' => $box_color, ); echo update_option('bsf_custom',$color_opt) ? 'Settings saved !' : 'Error occured. Satings were not saved !' ; die(); } function bsf_color_scripts() { global $wp_version; $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' ); // styles required for cmb $bsf_style_array = array( 'thickbox' ); // if we're 3.5 or later, user wp-color-picker if ( 3.5 <= $wp_version ) { $bsf_script_array[] = 'wp-color-picker'; $bsf_style_array[] = 'wp-color-picker'; } else { // otherwise use the older 'farbtastic' $bsf_script_array[] = 'farbtastic'; $bsf_style_array[] = 'farbtastic'; } wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', $bsf_script_array, '0.9.1' ); wp_enqueue_script( 'bsf-scripts' ); } } } require_once('functions.php'); add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' ); // Instantiating the Class if (class_exists("RichSnippets")) { $RichSnippets= new RichSnippets(); } ?>