Settings';
array_unshift($links, $settings_link);
return $links;
}
/* function run_on_activate()
{
add_action( 'admin_notices', array($this, 'display_message') );
// add_action('admin_head', array($this,'custom_print_footer_scripts') );
}
function display_message(){
$screen = get_current_screen();
if($screen->id == "plugins")
{
$plugin = site_url().'/wp-admin/admin.php?page=rich_snippet_dashboard';
echo '
'.__( "All in One Schema.org Rich Snippets is installed ! New features are added. Click Here to configure.", "rich-snippets" ).'
';
}
}*/
//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_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() {
?>
'.
''.
( $req ? '*' : '' ).
'';
$fields[ 'email' ] = '';
return $fields;
}
function additional_fields () {
global $post;
$id = $post->ID;
$type = get_post_meta($id, '_bsf_post_type', true);
if($type == '7')
{
echo '
';
echo '
';
echo '';
$text = $text . $commentrating;
return $text;
} else {
return $text;
}
}
}
}
require_once('functions.php');
add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' );
// Instantiating the Class
if (class_exists("RichSnippets")) {
$RichSnippets= new RichSnippets();
}
?>