$logo_height,
'width' => $logo_width,
'flex-width' => true,
'flex-height' => true,
'unlink-homepage-logo' => false,
)
);
add_theme_support( 'editor-styles' );
$editor_stylesheet_path = './assets/styler.css';
add_editor_style( $editor_stylesheet_path );
}
add_action( 'after_setup_theme', 'bluenest_setup', 11 );
function bluenest_style_sheet() {
wp_enqueue_script( 'bluenest_jquery', get_stylesheet_directory_uri() . '/assets/jquery/jquery3.6.0.min.js' );
wp_enqueue_style( 'bluenest_styler', get_stylesheet_directory_uri() . '/assets/styler.css' );
wp_enqueue_style( 'bluenest_bootstrap_css', get_stylesheet_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css' );
wp_enqueue_script( 'bluenest_bootstrap_js', get_stylesheet_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js' );
wp_enqueue_style( 'bluenest_fontawesome_css', get_stylesheet_directory_uri() . '/assets/fontawesome/css/all.min.css' );
wp_enqueue_script( 'bluenest_fontawesome_js', get_stylesheet_directory_uri() . '/assets/fontawesome/js/all.min.js' );
wp_enqueue_script( 'bluenest_preloader_js', get_stylesheet_directory_uri() . '/assets/preloader/preloader.min.js' );
}
add_action('wp_enqueue_scripts', 'bluenest_style_sheet');
function bluenest_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Footer Left', 'bluenest' ),
'id' => 'fleft',
'description' => esc_html__( 'Add widgets here to appear in your footer left side.', 'bluenest' ),
'before_widget' => '',
'before_title' => '
'
)
);
register_sidebar(array(
'name' => esc_html__( 'Footer Center 1', 'bluenest' ),
'id' => 'fcenter1',
'description' => esc_html__( 'Add widgets here to appear in your footer center column 1.', 'bluenest' ),
'before_widget' => '',
'before_title' => ''
)
);
register_sidebar(array(
'name' => esc_html__( 'Footer Center 2', 'bluenest' ),
'id' => 'fcenter2',
'description' => esc_html__( 'Add widgets here to appear in your footer center column 2.', 'bluenest' ),
'before_widget' => '',
'before_title' => ''
)
);
register_sidebar(array(
'name' => esc_html__( 'Footer Right', 'bluenest' ),
'id' => 'fright',
'description' => esc_html__( 'Add widgets here to appear in your footer right side.', 'bluenest' ),
'before_widget' => '',
'before_title' => ''
)
);
}
add_action( 'widgets_init', 'bluenest_widgets_init' );
function remove_parent_theme_footer_widget(){
unregister_sidebar( 'sidebar-1' );
}
add_action( 'widgets_init', 'remove_parent_theme_footer_widget', 11 );
function bluenest_block_editor_script() {
wp_enqueue_script( 'bluenest-block-editor-editor', get_theme_file_uri( '/assets/js/editor.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
}
add_action( 'enqueue_block_editor_assets', 'bluenest_block_editor_script' );
function create_bootstrap_menu( $theme_location ) {
if ( ($theme_location) && ($locations = get_nav_menu_locations()) && isset($locations[$theme_location]) ) {
$menu_list = '' ."\n";
} else {
$menu_list = '';
}
echo $menu_list;
}
function social_share_menu_item()
{
add_submenu_page("options-general.php", "Social Share", "Social Share", "manage_options", "social-share", "social_share_page");
}
add_action("admin_menu", "social_share_menu_item");
function social_share_page()
{
?>
Social Sharing Options
This plugin is a part of BlueNest theme.
/>
/>
/>
/>
Share on:
";
global $post;
$url = get_permalink($post->ID);
$url = esc_url($url);
if(get_option("social-share-facebook") == 1)
{
$html = $html . "";
}
if(get_option("social-share-twitter") == 1)
{
$html = $html . "";
}
if(get_option("social-share-linkedin") == 1)
{
$html = $html . "";
}
if(get_option("social-share-reddit") == 1)
{
$html = $html . "";
}
$html = $html . "";
endif;
endif;
endif;
return $content = $content . $html;
}
add_filter("the_content", "add_social_share_icons");
function social_media_links_menu_item()
{
add_submenu_page("options-general.php", "Social Media links", "Social Media links", "manage_options", "social-media-links", "social_media_links_page");
}
add_action("admin_menu", "social_media_links_menu_item");
function register_social_media_links_setting()
{
register_setting("social_media_links_config_section", "social-media-links-facebook");
register_setting("social_media_links_config_section", "social-media-links-twitter");
register_setting("social_media_links_config_section", "social-media-links-linkedin");
register_setting("social_media_links_config_section", "social-media-links-instagram");
}
add_action( 'admin_init', 'register_social_media_links_setting' );
function social_media_links_page()
{
?>
Social Media Links options
Please don't add http://, https://, social media domain or something else. Just write your page address!
This plugin is a part of BlueNest theme.
";
if(get_option("social-media-links-facebook"))
{
$output = $output . "";
}
if(get_option("social-media-links-twitter"))
{
$output = $output . "";
}
if(get_option("social-media-links-linkedin"))
{
$output = $output . "";
}
if(get_option("social-media-links-instagram"))
{
$output = $output . "";
}
$output = $output . " ";
return $sociallinks = $sociallinks . $output;
}
}
function bluenest_add_preloader() {
echo '';
}
add_action( 'wp_body_open', 'bluenest_add_preloader' );
function bluenest_add_preloader_js_footer() {
echo '
';
}
add_filter("wp_footer", "bluenest_add_preloader_js_footer", 100);