Current File : /home/bravrvjk/cepurhuye.rw/wp-content/plugins/bopea-function/inc//core.php
<?php
defined('ABSPATH') || die();
if ( ! function_exists( 'bopea_active_plugin' ) ){
function bopea_active_plugin(){
$elementor_enable = get_option( 'elementor_cpt_support' );
if ( ! $elementor_enable ) {
update_option('elementor_cpt_support', array('post', 'page', 'jl_layout'));
}
}
}
add_action('admin_init', 'bopea_active_plugin');
if ( ! function_exists( 'bopea_lang' ) ){
function bopea_lang() {
load_plugin_textdomain( 'bopea-function', FALSE, BOPEA_ADDONS_DIR_PATH . 'languages/' );
}
}
add_action( 'init', [ 'jelly_header_footer_settings', 'get_instance' ], 10 );
add_action( 'init', 'bopea_lang' );
add_filter('wpcf7_autop_or_not', '__return_false');
add_filter( 'widget_text', 'do_shortcode' );
if ( ! function_exists( 'bopea_theme_init' ) ){
function bopea_theme_init() {
if ( get_theme_mod( 'disable_widget_block', true )){
remove_theme_support( 'widgets-block-editor' );
}
}
}
add_action( 'after_setup_theme', 'bopea_theme_init', 1 );
if ( ! function_exists( 'bopea_get_menus' ) ){
function bopea_get_menus(){
$menus = [];
$get_menus = wp_get_nav_menus();
if ( ! empty( $get_menus ) ){
$menus = wp_list_pluck( $get_menus, 'name', 'slug' );
}
return $menus;
}
}
if ( ! function_exists( 'bopea_get_all_posts' ) ){
function bopea_get_all_posts() {
$options = array();
$all_posts = get_posts(
array(
'posts_per_page' => -1,
'post_type' => array( 'jl_layout' ),
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'fields' => array( 'ids' ),
)
);
if ( ! empty( $all_posts ) && ! is_wp_error( $all_posts ) ) {
foreach ( $all_posts as $post ) {
$options[ $post->ID ] = strlen( $post->post_title ) > 30 ? substr( $post->post_title, 0, 30 ) . '...' : $post->post_title;
}
}
return $options;
}
}
if ( ! function_exists( 'bopea_contact_info' ) ){
function bopea_contact_info($contactmethods) {
$contactmethods['positions'] = esc_html__( 'Positions', 'bopea-function' );
$contactmethods['facebook'] = esc_html__( 'Facebook', 'bopea-function' );
$contactmethods['twitter'] = esc_html__( 'Twitter', 'bopea-function' );
$contactmethods['instagram'] = esc_html__( 'Instagram', 'bopea-function' );
$contactmethods['pinterest'] = esc_html__( 'Pinterest', 'bopea-function' );
$contactmethods['youtube'] = esc_html__( 'Youtube', 'bopea-function' );
$contactmethods['vimeo'] = esc_html__( 'Vimeo', 'bopea-function' );
$contactmethods['linkedin'] = esc_html__( 'Linkedin', 'bopea-function' );
$contactmethods['behance'] = esc_html__( 'Behance', 'bopea-function' );
$contactmethods['deviantart'] = esc_html__( 'DeviantArt', 'bopea-function' );
$contactmethods['dribble'] = esc_html__( 'Dribble', 'bopea-function' );
$contactmethods['rss'] = esc_html__( 'Rss feed', 'bopea-function' );
$contactmethods['tiktok'] = esc_html__( 'TikTok', 'bopea-function' );
$contactmethods['delicious'] = esc_html__( 'Delicious', 'bopea-function' );
$contactmethods['digg'] = esc_html__( 'Digg', 'bopea-function' );
$contactmethods['dribbble'] = esc_html__( 'Dribbble', 'bopea-function' );
$contactmethods['flickr'] = esc_html__( 'Flickr', 'bopea-function' );
$contactmethods['github'] = esc_html__( 'Github', 'bopea-function' );
$contactmethods['lastfm'] = esc_html__( 'Lastfm', 'bopea-function' );
$contactmethods['paypal'] = esc_html__( 'Paypal', 'bopea-function' );
$contactmethods['reddit'] = esc_html__( 'Reddit', 'bopea-function' );
$contactmethods['skype'] = esc_html__( 'Skype', 'bopea-function' );
$contactmethods['share'] = esc_html__( 'Share', 'bopea-function' );
$contactmethods['spotify'] = esc_html__( 'Spotify', 'bopea-function' );
$contactmethods['stack-exchange'] = esc_html__( 'Stackexchange', 'bopea-function' );
$contactmethods['stack-overflow'] = esc_html__( 'Stackoverflow', 'bopea-function' );
$contactmethods['steam'] = esc_html__( 'Steam', 'bopea-function' );
$contactmethods['stumbleupon'] = esc_html__( 'StumbleUpon', 'bopea-function' );
$contactmethods['tumblr'] = esc_html__( 'Tumblr', 'bopea-function' );
$contactmethods['vk'] = esc_html__( 'VKontakte', 'bopea-function' );
$contactmethods['windows'] = esc_html__( 'Windows', 'bopea-function' );
$contactmethods['wordpress'] = esc_html__( 'Woordpress', 'bopea-function' );
$contactmethods['yahoo'] = esc_html__( 'Yahoo', 'bopea-function' );
$contactmethods['patreon'] = esc_html__( 'Patreon', 'bopea-function' );
$contactmethods['twitch'] = esc_html__( 'Twitch', 'bopea-function' );
$contactmethods['medium'] = esc_html__( 'Medium', 'bopea-function' );
$contactmethods['quora'] = esc_html__( 'Quora', 'bopea-function' );
$contactmethods['bluesky'] = esc_html__( 'BlueSky', 'bopea-function' );
$contactmethods['mastodon'] = esc_html__( 'Mastodon', 'bopea-function' );
$contactmethods['flipboard'] = esc_html__( 'Flipboard', 'bopea-function' );
return $contactmethods;
}
}
add_filter('user_contactmethods', 'bopea_contact_info');
if ( ! function_exists( 'bopea_author_share_link' ) ){
function bopea_author_share_link( $author_id ) {?>
<ul class="jl_auth_link clearfix">
<?php if ((get_the_author_meta('url')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('url')); ?>" target="_blank" rel="nofollow" alt="website"><i class="jli-globe"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('facebook')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('facebook')); ?>" target="_blank" rel="nofollow" alt="facebook"><i class="jli-facebook"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('twitter')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('twitter')); ?>" target="_blank" rel="nofollow" alt="twitter"><svg fill="currentColor" height="0.8em" xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 462.8"><path fill-rule="nonzero" d="M403.229 0h78.506L310.219 196.04 512 462.799H354.002L230.261 301.007 88.669 462.799h-78.56l183.455-209.683L0 0h161.999l111.856 147.88L403.229 0zm-27.556 415.805h43.505L138.363 44.527h-46.68l283.99 371.278z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('instagram')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('instagram')); ?>" target="_blank" rel="nofollow" alt="instagram"><i class="jli-instagram"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('pinterest')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('pinterest')); ?>" target="_blank" rel="nofollow" alt="pinterest"><i class="jli-pinterest"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('youtube')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('youtube')); ?>" target="_blank" rel="nofollow" alt="youtube"><i class="jli-youtube"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('vimeo')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('vimeo')); ?>" target="_blank" rel="nofollow" alt="vimeo"><i class="jli-vimeo"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('linkedin')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('linkedin')); ?>" target="_blank" rel="nofollow" alt="linkedin"><i class="jli-linkedin"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('behance')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('behance')); ?>" target="_blank" rel="nofollow" alt="behance"><i class="jli-behance"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('deviantart')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('deviantart')); ?>" target="_blank" rel="nofollow" alt="deviantart"><i class="jli-deviantart"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('dribble')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('dribble')); ?>" target="_blank" rel="nofollow" alt="dribble"><i class="jli-dribble"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('rss')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('rss')); ?>" target="_blank" rel="nofollow" alt="rss"><i class="jli-rss"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('tiktok')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('tiktok')); ?>" target="_blank" rel="nofollow" alt="tiktok"><i class="jli-tiktok"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('delicious')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('delicious')); ?>" target="_blank" rel="nofollow" alt="delicious"><i class="jli-delicious"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('digg')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('digg')); ?>" target="_blank" rel="nofollow" alt="digg"><i class="jli-digg"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('dribbble')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('dribbble')); ?>" target="_blank" rel="nofollow" alt="dribble"><i class="jli-dribble"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('flickr')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('flickr')); ?>" target="_blank" rel="nofollow" alt="flickr"><i class="jli-flickr"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('github')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('github')); ?>" target="_blank" rel="nofollow" alt="github"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" data-name="Layer 1" viewBox="2 2.25 20 19.51"><path d="M12,2.2467A10.00042,10.00042,0,0,0,8.83752,21.73419c.5.08752.6875-.21247.6875-.475,0-.23749-.01251-1.025-.01251-1.86249C7,19.85919,6.35,18.78423,6.15,18.22173A3.636,3.636,0,0,0,5.125,16.8092c-.35-.1875-.85-.65-.01251-.66248A2.00117,2.00117,0,0,1,6.65,17.17169a2.13742,2.13742,0,0,0,2.91248.825A2.10376,2.10376,0,0,1,10.2,16.65923c-2.225-.25-4.55-1.11254-4.55-4.9375a3.89187,3.89187,0,0,1,1.025-2.6875,3.59373,3.59373,0,0,1,.1-2.65s.83747-.26251,2.75,1.025a9.42747,9.42747,0,0,1,5,0c1.91248-1.3,2.75-1.025,2.75-1.025a3.59323,3.59323,0,0,1,.1,2.65,3.869,3.869,0,0,1,1.025,2.6875c0,3.83747-2.33752,4.6875-4.5625,4.9375a2.36814,2.36814,0,0,1,.675,1.85c0,1.33752-.01251,2.41248-.01251,2.75,0,.26251.1875.575.6875.475A10.0053,10.0053,0,0,0,12,2.2467Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('lastfm')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('lastfm')); ?>" target="_blank" rel="nofollow" alt="lastfm"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0.4 0.4 19.2 19.2"><path d="M10 .4C4.698.4.4 4.698.4 10s4.298 9.6 9.6 9.6 9.6-4.298 9.6-9.6S15.302.4 10 .4zm2.644 12.43c-2.002 0-2.697-.91-3.066-2.043l-.371-1.166c-.277-.851-.501-1.467-1.519-1.467-.706 0-1.626.463-1.626 1.898 0 1.119.77 1.82 1.568 1.82.677 0 1.084-.381 1.296-.572l.354 1.012c-.241.174-.734.517-1.707.517-1.346 0-2.625-.957-2.625-2.73 0-1.844 1.333-2.93 2.705-2.93 1.54 0 2.113.56 2.6 2.078l.382 1.166c.278.852.865 1.471 2.034 1.471.787 0 1.204-.176 1.204-.607 0-.338-.197-.584-.787-.723l-.787-.188c-.961-.232-1.343-.734-1.343-1.529 0-1.271 1.018-1.668 2.061-1.668 1.181 0 1.898.432 1.99 1.482l-1.157.139c-.046-.5-.347-.711-.903-.711-.509 0-.821.234-.821.631 0 .35.15.559.66.676l.74.164c.995.233 1.528.723 1.528 1.668-.001 1.169-.974 1.612-2.41 1.612z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('paypal')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('paypal')); ?>" target="_blank" rel="nofollow" alt="paypal"><i class="jli-paypal"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('reddit')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('reddit')); ?>" target="_blank" rel="nofollow" alt="reddit"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0 2 16.07 13"><path d="m6 9.5-.5-.001V9.5zM10.5 9.5h.5l-.5-.001z"></path><path d="M16.07 8c0-1.103-.897-2-2-2-.441 0-.86.144-1.202.405-1.116-.775-2.578-1.237-4.133-1.354l.839-1.968 2.441.57C12.093 4.408 12.725 5 13.5 5c.827 0 1.5-.673 1.5-1.5S14.327 2 13.5 2c-.524 0-.985.271-1.253.68l-2.853-.667a.5.5 0 0 0-.575.291l-1.16 2.72c-1.679.058-3.279.531-4.487 1.355A2.002 2.002 0 0 0 0 8a1.98 1.98 0 0 0 1.011 1.731A2.978 2.978 0 0 0 1 10c0 2.757 3.14 5 7 5 3.859 0 7-2.243 7-5 0-.078-.003-.155-.008-.232A1.98 1.98 0 0 0 16.07 8zM13.5 3a.5.5 0 1 1-.002 1.002A.5.5 0 0 1 13.5 3zm-9 6.5c0-.551.449-1 1-1s1 .449 1 1a1.001 1.001 0 0 1-2 0zm5.809 3.317a3.936 3.936 0 0 1-4.618 0 .5.5 0 1 1 .586-.81 2.933 2.933 0 0 0 3.446 0 .5.5 0 1 1 .586.81zM10.5 10.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('skype')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('skype')); ?>" target="_blank" rel="nofollow" alt="skype"><i class="jli-skype"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('share')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('share')); ?>" target="_blank" rel="nofollow" alt="sharethis"><i class="jli-sharethis"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('spotify')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('spotify')); ?>" target="_blank" rel="nofollow" alt="spotify"><i class="jli-spotify"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('stack-exchange')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stack-exchange')); ?>" target="_blank" rel="nofollow" alt="stack exchange"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="8.66 6 22.68 28"><path d="M31.34 24.53A4.32 4.32 0 0 1 27 28.68h-1.24L20.45 34v-5.32H13a4.32 4.32 0 0 1-4.32-4.15ZM27 6H13a4.32 4.32 0 0 0-4.3 3.74h22.6A4.32 4.32 0 0 0 27 6ZM8.66 11.57v4.65h22.68v-4.65Zm0 11.13h22.68v-4.65H8.66Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('stack-overflow')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stack-overflow')); ?>" target="_blank" rel="nofollow" alt="stack overflow"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0 0 20.28 24"><path d="m17.12 21.857h-14.977v-6.428h-2.143v8.571h19.259v-8.571h-2.139zm-12.616-7.018.442-2.102 10.486 2.21-.442 2.09zm1.379-5.009.898-1.955 9.71 4.54-.898 1.942zm2.692-4.768 1.366-1.647 8.218 6.87-1.366 1.647zm5.313-5.062 6.388 8.585-1.716 1.286-6.386-8.585zm-9.616 19.701v-2.13h10.714v2.13z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('steam')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('steam')); ?>" target="_blank" rel="nofollow" alt="steam"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="4.83 4.79 38.24 38.42"><path d="M24 4.79A19.21 19.21 0 0 0 4.83 22.32l10 4.24a5.65 5.65 0 0 1 3.89-1l4.57-6.79a7 7 0 1 1 7.15 7.5l-6.66 4.31a4.44 4.44 0 0 1 0 .63 5.68 5.68 0 0 1-11.32.67l-7.18-3A19.21 19.21 0 1 0 24 4.79Z"></path><path d="M30.28 24a4.74 4.74 0 1 0-4.73-4.74A4.74 4.74 0 0 0 30.28 24zm0-8.41a3.67 3.67 0 1 1-3.67 3.67 3.67 3.67 0 0 1 3.67-3.67zM18.18 27h-.42a4.49 4.49 0 0 0-1.16.29l.75.32 1.45.61A2.88 2.88 0 0 1 20.33 32a2.83 2.83 0 0 1-1.63 1.57 2.86 2.86 0 0 1-2.15 0l-2.28-1a4.18 4.18 0 0 0 8.12-1.07v-.32A4.2 4.2 0 0 0 18.18 27z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('stumbleupon')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stumbleupon')); ?>" target="_blank" rel="nofollow" alt="stumbleupon"><i class="jli-stumbleupon"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('tumblr')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('tumblr')); ?>" target="_blank" rel="nofollow" alt="tumblr"><i class="jli-tumblr"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('vk')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('vk')); ?>" target="_blank" rel="nofollow" alt="vk"><i class="jli-vk"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('windows')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('windows')); ?>" target="_blank" rel="nofollow" alt="windows"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="2 2 20 20"><path d="M22 2 11.2 3.6v8l10.8-.1V2zM10.2 12.5 2 12.4v6.8l8.1 1.1.1-7.8zM2 4.8v6.8h8.1V3.7L2 4.8zm9.1 7.7v7.9L22 22v-9.4l-10.9-.1z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('wordpress')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('wordpress')); ?>" target="_blank" rel="nofollow" alt="wordpress"><i class="jli-wordpress"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('yahoo')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('yahoo')); ?>" target="_blank" rel="nofollow" alt="yahoo"><i class="jli-yahoo"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('patreon')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('patreon')); ?>" target="_blank" rel="nofollow" alt="patreon"><svg fill="none" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"> <path d="M3 0H0V15H3V0Z" fill="currentColor"></path> <path d="M9.5 0C6.46243 0 4 2.46243 4 5.5C4 8.53757 6.46243 11 9.5 11C12.5376 11 15 8.53757 15 5.5C15 2.46243 12.5376 0 9.5 0Z" fill="currentColor"></path> </svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('twitch')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('twitch')); ?>" target="_blank" rel="nofollow" alt="twitch"><svg fill="currentColor" height="1.1em" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M391.17,103.47H352.54v109.7h38.63ZM285,103H246.37V212.75H285ZM120.83,0,24.31,91.42V420.58H140.14V512l96.53-91.42h77.25L487.69,256V0ZM449.07,237.75l-77.22,73.12H294.61l-67.6,64v-64H140.14V36.58H449.07Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('medium')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('medium')); ?>" target="_blank" rel="nofollow" alt="medium"><svg fill="currentColor" height="1.1em" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M0 32v448h448V32H0zm372.2 106.1l-24 23c-2.1 1.6-3.1 4.2-2.7 6.7v169.3c-.4 2.6.6 5.2 2.7 6.7l23.5 23v5.1h-118V367l24.3-23.6c2.4-2.4 2.4-3.1 2.4-6.7V199.8l-67.6 171.6h-9.1L125 199.8v115c-.7 4.8 1 9.7 4.4 13.2l31.6 38.3v5.1H71.2v-5.1l31.6-38.3c3.4-3.5 4.9-8.4 4.1-13.2v-133c.4-3.7-1-7.3-3.8-9.8L75 138.1V133h87.3l67.4 148L289 133.1h83.2v5z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('quora')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('quora')); ?>" target="_blank" rel="nofollow" alt="quora"><svg width="1em" height="1em" viewBox="0 0 17 20"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Dribbble-Light-Preview" transform="translate(-141.000000, -7439.000000)" fill="currentColor"><g id="icons" transform="translate(56.000000, 160.000000)"><path d="M94.6307159,7294.53993 C94.2430139,7294.63693 93.8504042,7294.67493 93.4715358,7294.67493 C91.455485,7294.67493 89.0409353,7293.78793 89.0409353,7288.25196 C89.0409353,7282.71798 91.5693418,7281.18899 93.5853926,7281.18899 C95.6014434,7281.18899 97.9453233,7282.50598 97.9453233,7288.04196 C97.9453233,7290.55095 97.4437644,7292.14594 96.7076212,7293.14293 C96.695843,7293.14393 96.6870092,7293.14093 96.6870092,7293.14093 C95.0105658,7290.93694 92.8355081,7291.46494 92.3143187,7291.70494 C92.3143187,7291.70494 92.3800808,7292.20994 92.5184758,7293.12893 C93.6688222,7293.12793 94.2390878,7293.73593 94.6366051,7294.52093 C94.632679,7294.52993 94.6307159,7294.53993 94.6307159,7294.53993 M97.9090069,7295.59792 C97.9090069,7295.59792 97.91097,7295.59192 97.912933,7295.58492 C100.362818,7294.03693 102,7291.21394 102,7287.83196 C102,7281.31499 97.8579677,7279 93.5274827,7279 C89.4413972,7279 85,7282.27098 85,7287.95696 C85,7294.47393 89.1420323,7296.86392 93.4734988,7296.86392 C94.1546767,7296.86392 94.816224,7296.78092 95.4512702,7296.62592 C95.4512702,7296.62592 95.4610855,7296.62992 95.4669746,7296.63092 C97.1738453,7299.7369 99.7159931,7298.98591 100.371651,7298.74091 C100.371651,7298.74091 100.283314,7298.19391 100.129215,7297.17592 C98.903291,7297.14392 98.356582,7296.51692 97.9090069,7295.59792"></path></g></g></g></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('bluesky')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('bluesky')); ?>" target="_blank" rel="nofollow" alt="bluesky"><svg width="1em" height="1em" fill="none" viewBox="0 0 64 56.53"><path fill="currentColor" d="M13.873 3.805C21.21 9.332 29.103 20.537 32 26.55v15.882c0-.338-.13.044-.41.867-1.512 4.456-7.418 21.847-20.923 7.944-7.111-7.32-3.819-14.64 9.125-16.85-7.405 1.264-15.73-.825-18.014-9.015C1.12 23.022 0 8.51 0 6.55 0-3.268 8.579-.182 13.873 3.805ZM50.127 3.805C42.79 9.332 34.897 20.537 32 26.55v15.882c0-.338.13.044.41.867 1.512 4.456 7.418 21.847 20.923 7.944 7.111-7.32 3.819-14.64-9.125-16.85 7.405 1.264 15.73-.825 18.014-9.015C62.88 23.022 64 8.51 64 6.55c0-9.818-8.578-6.732-13.873-2.745Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('mastodon')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('mastodon')); ?>" target="_blank" rel="nofollow" alt="mastodon"><svg width="1.1em" height="1.1em" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0.16 74 78"> <path d="M73.7014 17.4323C72.5616 9.05152 65.1774 2.4469 56.424 1.1671C54.9472 0.950843 49.3518 0.163818 36.3901 0.163818H36.2933C23.3281 0.163818 20.5465 0.950843 19.0697 1.1671C10.56 2.41145 2.78877 8.34604 0.903306 16.826C-0.00357854 21.0022 -0.100361 25.6322 0.068112 29.8793C0.308275 35.9699 0.354874 42.0498 0.91406 48.1156C1.30064 52.1448 1.97502 56.1419 2.93215 60.0769C4.72441 67.3445 11.9795 73.3925 19.0876 75.86C26.6979 78.4332 34.8821 78.8603 42.724 77.0937C43.5866 76.8952 44.4398 76.6647 45.2833 76.4024C47.1867 75.8033 49.4199 75.1332 51.0616 73.9562C51.0841 73.9397 51.1026 73.9184 51.1156 73.8938C51.1286 73.8693 51.1359 73.8421 51.1368 73.8144V67.9366C51.1364 67.9107 51.1302 67.8852 51.1186 67.862C51.1069 67.8388 51.0902 67.8184 51.0695 67.8025C51.0489 67.7865 51.0249 67.7753 50.9994 67.7696C50.9738 67.764 50.9473 67.7641 50.9218 67.7699C45.8976 68.9569 40.7491 69.5519 35.5836 69.5425C26.694 69.5425 24.3031 65.3699 23.6184 63.6327C23.0681 62.1314 22.7186 60.5654 22.5789 58.9744C22.5775 58.9477 22.5825 58.921 22.5934 58.8965C22.6043 58.8721 22.621 58.8505 22.6419 58.8336C22.6629 58.8167 22.6876 58.8049 22.714 58.7992C22.7404 58.7934 22.7678 58.794 22.794 58.8007C27.7345 59.9796 32.799 60.5746 37.8813 60.5733C39.1036 60.5733 40.3223 60.5733 41.5447 60.5414C46.6562 60.3996 52.0437 60.1408 57.0728 59.1694C57.1983 59.1446 57.3237 59.1233 57.4313 59.0914C65.3638 57.5847 72.9128 52.8555 73.6799 40.8799C73.7086 40.4084 73.7803 35.9415 73.7803 35.4523C73.7839 33.7896 74.3216 23.6576 73.7014 17.4323ZM61.4925 47.3144H53.1514V27.107C53.1514 22.8528 51.3591 20.6832 47.7136 20.6832C43.7061 20.6832 41.6988 23.2499 41.6988 28.3194V39.3803H33.4078V28.3194C33.4078 23.2499 31.3969 20.6832 27.3894 20.6832C23.7654 20.6832 21.9552 22.8528 21.9516 27.107V47.3144H13.6176V26.4937C13.6176 22.2395 14.7157 18.8598 16.9118 16.3545C19.1772 13.8552 22.1488 12.5719 25.8373 12.5719C30.1064 12.5719 33.3325 14.1955 35.4832 17.4394L37.5587 20.8853L39.6377 17.4394C41.7884 14.1955 45.0145 12.5719 49.2765 12.5719C52.9614 12.5719 55.9329 13.8552 58.2055 16.3545C60.4017 18.8574 61.4997 22.2371 61.4997 26.4937L61.4925 47.3144Z" fill="inherit"></path> </svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('flipboard')) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('flipboard')); ?>" target="_blank" rel="nofollow" alt="flipboard"><svg fill="currentColor" height="1em" role="img" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="1 1 12 12"><path d="m 6.9999999,0.99982 5.9993001,0 0,1.99835 0,1.99357 -1.993367,0 -1.9980673,0 -0.014998,1.99357 -0.01,1.99835 -1.9980669,0.01 -1.9933674,0.0146 -0.014998,1.99835 -0.01,1.99357 -1.9834686,0 -1.9836686,0 0,-6.00006 0,-5.99994 5.9992001,0 z"></path></svg></a></li>
<?php }?>
</ul>
<?php }
}
if ( ! function_exists( 'bopea_author_list_share' ) ){
function bopea_author_list_share( $author_id ) {?>
<ul class="jl_auth_link clearfix">
<?php if ((get_the_author_meta('url', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('url', $author_id)); ?>" target="_blank" rel="nofollow" alt="website"><i class="jli-globe"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('facebook', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('facebook', $author_id)); ?>" target="_blank" rel="nofollow" alt="facebook"><i class="jli-facebook"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('twitter', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('twitter', $author_id)); ?>" target="_blank" rel="nofollow" alt="twitter"><svg fill="currentColor" height="0.8em" xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 462.8"><path fill-rule="nonzero" d="M403.229 0h78.506L310.219 196.04 512 462.799H354.002L230.261 301.007 88.669 462.799h-78.56l183.455-209.683L0 0h161.999l111.856 147.88L403.229 0zm-27.556 415.805h43.505L138.363 44.527h-46.68l283.99 371.278z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('instagram', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('instagram', $author_id)); ?>" target="_blank" rel="nofollow" alt="instagram"><i class="jli-instagram"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('pinterest', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('pinterest', $author_id)); ?>" target="_blank" rel="nofollow" alt="pinterest"><i class="jli-pinterest"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('youtube', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('youtube', $author_id)); ?>" target="_blank" rel="nofollow" alt="youtube"><i class="jli-youtube"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('vimeo', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('vimeo', $author_id)); ?>" target="_blank" rel="nofollow" alt="vimeo"><i class="jli-vimeo"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('linkedin', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('linkedin', $author_id)); ?>" target="_blank" rel="nofollow" alt="linkedin"><i class="jli-linkedin"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('behance', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('behance', $author_id)); ?>" target="_blank" rel="nofollow" alt="behance"><i class="jli-behance"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('deviantart', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('deviantart', $author_id)); ?>" target="_blank" rel="nofollow" alt="deviantart"><i class="jli-deviantart"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('dribble', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('dribble', $author_id)); ?>" target="_blank" rel="nofollow" alt="dribble"><i class="jli-dribble"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('rss', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('rss', $author_id)); ?>" target="_blank" rel="nofollow" alt="rss"><i class="jli-rss"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('tiktok', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('tiktok', $author_id)); ?>" target="_blank" rel="nofollow" alt="tiktok"><i class="jli-tiktok"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('delicious', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('delicious', $author_id)); ?>" target="_blank" rel="nofollow" alt="delicious"><i class="jli-delicious"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('digg', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('digg', $author_id)); ?>" target="_blank" rel="nofollow" alt="digg"><i class="jli-digg"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('dribbble', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('dribbble', $author_id)); ?>" target="_blank" rel="nofollow" alt="dribble"><i class="jli-dribble"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('flickr', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('flickr', $author_id)); ?>" target="_blank" rel="nofollow" alt="flickr"><i class="jli-flickr"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('github', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('github', $author_id)); ?>" target="_blank" rel="nofollow" alt="github"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" data-name="Layer 1" viewBox="2 2.25 20 19.51"><path d="M12,2.2467A10.00042,10.00042,0,0,0,8.83752,21.73419c.5.08752.6875-.21247.6875-.475,0-.23749-.01251-1.025-.01251-1.86249C7,19.85919,6.35,18.78423,6.15,18.22173A3.636,3.636,0,0,0,5.125,16.8092c-.35-.1875-.85-.65-.01251-.66248A2.00117,2.00117,0,0,1,6.65,17.17169a2.13742,2.13742,0,0,0,2.91248.825A2.10376,2.10376,0,0,1,10.2,16.65923c-2.225-.25-4.55-1.11254-4.55-4.9375a3.89187,3.89187,0,0,1,1.025-2.6875,3.59373,3.59373,0,0,1,.1-2.65s.83747-.26251,2.75,1.025a9.42747,9.42747,0,0,1,5,0c1.91248-1.3,2.75-1.025,2.75-1.025a3.59323,3.59323,0,0,1,.1,2.65,3.869,3.869,0,0,1,1.025,2.6875c0,3.83747-2.33752,4.6875-4.5625,4.9375a2.36814,2.36814,0,0,1,.675,1.85c0,1.33752-.01251,2.41248-.01251,2.75,0,.26251.1875.575.6875.475A10.0053,10.0053,0,0,0,12,2.2467Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('lastfm', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('lastfm', $author_id)); ?>" target="_blank" rel="nofollow" alt="lastfm"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0.4 0.4 19.2 19.2"><path d="M10 .4C4.698.4.4 4.698.4 10s4.298 9.6 9.6 9.6 9.6-4.298 9.6-9.6S15.302.4 10 .4zm2.644 12.43c-2.002 0-2.697-.91-3.066-2.043l-.371-1.166c-.277-.851-.501-1.467-1.519-1.467-.706 0-1.626.463-1.626 1.898 0 1.119.77 1.82 1.568 1.82.677 0 1.084-.381 1.296-.572l.354 1.012c-.241.174-.734.517-1.707.517-1.346 0-2.625-.957-2.625-2.73 0-1.844 1.333-2.93 2.705-2.93 1.54 0 2.113.56 2.6 2.078l.382 1.166c.278.852.865 1.471 2.034 1.471.787 0 1.204-.176 1.204-.607 0-.338-.197-.584-.787-.723l-.787-.188c-.961-.232-1.343-.734-1.343-1.529 0-1.271 1.018-1.668 2.061-1.668 1.181 0 1.898.432 1.99 1.482l-1.157.139c-.046-.5-.347-.711-.903-.711-.509 0-.821.234-.821.631 0 .35.15.559.66.676l.74.164c.995.233 1.528.723 1.528 1.668-.001 1.169-.974 1.612-2.41 1.612z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('paypal', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('paypal', $author_id)); ?>" target="_blank" rel="nofollow" alt="paypal"><i class="jli-paypal"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('reddit', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('reddit', $author_id)); ?>" target="_blank" rel="nofollow" alt="reddit"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0 2 16.07 13"><path d="m6 9.5-.5-.001V9.5zM10.5 9.5h.5l-.5-.001z"></path><path d="M16.07 8c0-1.103-.897-2-2-2-.441 0-.86.144-1.202.405-1.116-.775-2.578-1.237-4.133-1.354l.839-1.968 2.441.57C12.093 4.408 12.725 5 13.5 5c.827 0 1.5-.673 1.5-1.5S14.327 2 13.5 2c-.524 0-.985.271-1.253.68l-2.853-.667a.5.5 0 0 0-.575.291l-1.16 2.72c-1.679.058-3.279.531-4.487 1.355A2.002 2.002 0 0 0 0 8a1.98 1.98 0 0 0 1.011 1.731A2.978 2.978 0 0 0 1 10c0 2.757 3.14 5 7 5 3.859 0 7-2.243 7-5 0-.078-.003-.155-.008-.232A1.98 1.98 0 0 0 16.07 8zM13.5 3a.5.5 0 1 1-.002 1.002A.5.5 0 0 1 13.5 3zm-9 6.5c0-.551.449-1 1-1s1 .449 1 1a1.001 1.001 0 0 1-2 0zm5.809 3.317a3.936 3.936 0 0 1-4.618 0 .5.5 0 1 1 .586-.81 2.933 2.933 0 0 0 3.446 0 .5.5 0 1 1 .586.81zM10.5 10.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('skype', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('skype', $author_id)); ?>" target="_blank" rel="nofollow" alt="skype"><i class="jli-skype"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('share', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('share', $author_id)); ?>" target="_blank" rel="nofollow" alt="sharethis"><i class="jli-sharethis"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('spotify', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('spotify', $author_id)); ?>" target="_blank" rel="nofollow" alt="spotify"><i class="jli-spotify"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('stack-exchange', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stack-exchange', $author_id)); ?>" target="_blank" rel="nofollow" alt="stack exchange"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="8.66 6 22.68 28"><path d="M31.34 24.53A4.32 4.32 0 0 1 27 28.68h-1.24L20.45 34v-5.32H13a4.32 4.32 0 0 1-4.32-4.15ZM27 6H13a4.32 4.32 0 0 0-4.3 3.74h22.6A4.32 4.32 0 0 0 27 6ZM8.66 11.57v4.65h22.68v-4.65Zm0 11.13h22.68v-4.65H8.66Z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('stack-overflow', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stack-overflow', $author_id)); ?>" target="_blank" rel="nofollow" alt="stack overflow"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="0 0 20.28 24"><path d="m17.12 21.857h-14.977v-6.428h-2.143v8.571h19.259v-8.571h-2.139zm-12.616-7.018.442-2.102 10.486 2.21-.442 2.09zm1.379-5.009.898-1.955 9.71 4.54-.898 1.942zm2.692-4.768 1.366-1.647 8.218 6.87-1.366 1.647zm5.313-5.062 6.388 8.585-1.716 1.286-6.386-8.585zm-9.616 19.701v-2.13h10.714v2.13z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('steam', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('steam', $author_id)); ?>" target="_blank" rel="nofollow" alt="steam"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="4.83 4.79 38.24 38.42"><path d="M24 4.79A19.21 19.21 0 0 0 4.83 22.32l10 4.24a5.65 5.65 0 0 1 3.89-1l4.57-6.79a7 7 0 1 1 7.15 7.5l-6.66 4.31a4.44 4.44 0 0 1 0 .63 5.68 5.68 0 0 1-11.32.67l-7.18-3A19.21 19.21 0 1 0 24 4.79Z"></path><path d="M30.28 24a4.74 4.74 0 1 0-4.73-4.74A4.74 4.74 0 0 0 30.28 24zm0-8.41a3.67 3.67 0 1 1-3.67 3.67 3.67 3.67 0 0 1 3.67-3.67zM18.18 27h-.42a4.49 4.49 0 0 0-1.16.29l.75.32 1.45.61A2.88 2.88 0 0 1 20.33 32a2.83 2.83 0 0 1-1.63 1.57 2.86 2.86 0 0 1-2.15 0l-2.28-1a4.18 4.18 0 0 0 8.12-1.07v-.32A4.2 4.2 0 0 0 18.18 27z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('stumbleupon', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('stumbleupon', $author_id)); ?>" target="_blank" rel="nofollow" alt="stumbleupon"><i class="jli-stumbleupon"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('tumblr', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('tumblr', $author_id)); ?>" target="_blank" rel="nofollow" alt="tumblr"><i class="jli-tumblr"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('vk', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('vk', $author_id)); ?>" target="_blank" rel="nofollow" alt="vk"><i class="jli-vk"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('windows', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('windows', $author_id)); ?>" target="_blank" rel="nofollow" alt="windows"><svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" fill="currentColor" viewBox="2 2 20 20"><path d="M22 2 11.2 3.6v8l10.8-.1V2zM10.2 12.5 2 12.4v6.8l8.1 1.1.1-7.8zM2 4.8v6.8h8.1V3.7L2 4.8zm9.1 7.7v7.9L22 22v-9.4l-10.9-.1z"></path></svg></a></li>
<?php }?>
<?php if ((get_the_author_meta('wordpress', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('wordpress', $author_id)); ?>" target="_blank" rel="nofollow" alt="wordpress"><i class="jli-wordpress"></i></a></li>
<?php }?>
<?php if ((get_the_author_meta('yahoo', $author_id)) != ''){ ?>
<li><a href="<?php echo esc_url(get_the_author_meta('yahoo', $author_id)); ?>" target="_blank" rel="nofollow" alt="yahoo"><i class="jli-yahoo"></i></a></li>
<?php }?>
</ul>
<?php }
}
if ( ! function_exists( 'bopea_file_types_to_uploads' ) ) {
function bopea_file_types_to_uploads($file_types){
$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes );
return $file_types;
}
}
add_filter('upload_mimes', 'bopea_file_types_to_uploads');
function bopea_post_type_ads() {
$labels = array(
'name' => _x('Ads Script', 'post type general name', 'bopea-function'),
'singular_name' => _x('Ads Script', 'post type singular name', 'bopea-function'),
'add_new' => _x('Add New Ads', 'bopea-function'),
'add_new_item' => __('Add New Ads', 'bopea-function'),
'edit_item' => __('Edit Ads', 'bopea-function'),
'new_item' => __('New Ads', 'bopea-function'),
'view_item' => __('View Ads', 'bopea-function'),
'search_items' => __('Search Ads', 'bopea-function'),
'not_found' => __('No ads found', 'bopea-function'),
'not_found_in_trash' => __('No ads found in Trash', 'bopea-function'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => false,
'publicly_queryable' => false,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'hierarchical' => false,
'show_in_nav_menus' => false,
'show_in_admin_bar' => true,
'exclude_from_search' => true,
'menu_position' => 24,
'capability_type' => 'post',
'supports' => array('title'),
'menu_icon' => 'dashicons-megaphone'
);
register_post_type( 'jl_ads', $args );
}
add_action('init', 'bopea_post_type_ads');
function bopea_e_ads_add_column( $columns ) {
$columns['jl_e_adss'] = esc_html__( 'Ads Shortcode', 'bopea-function' );
return $columns;
}
add_filter( 'manage_jl_ads_posts_columns', 'bopea_e_ads_add_column' );
function bopea_cads_content( $column, $post_id ) {
if ( 'jl_e_adss' === $column ) {
echo '<input type="text" class="widefat" value=\'[jl_ads id="' . $post_id . '"]\' readonly="">';
}
}
add_action( 'manage_jl_ads_posts_custom_column', 'bopea_cads_content', 10, 2 );
function bopea_ads_add_shortcode() {
add_meta_box(
'bopea-meta-shortcode',
esc_html__( 'Ads Shortcode', 'bopea-function' ),
'bopea_ads_meta_shortcode',
'jl_ads',
'side',
'high'
);
}
add_action( 'add_meta_boxes', 'bopea_ads_add_shortcode' );
function bopea_ads_meta_shortcode( $post ) { ?>
<input type='text' class='widefat' value='[jl_ads id="<?php echo $post->ID; ?>"]' readonly="">
<?php
}
add_shortcode( 'jl_ads', 'bopea_ads_render' );
function bopea_ads_render( $post_id ) {
if(!empty($post_id)){
$result = '';
$args = array(
'post_type' => 'jl_ads',
'posts_per_page' => '1',
'publish_status' => 'published',
'post__in' => $post_id
);
$query = new WP_Query($args);
if($query->have_posts()){
while($query->have_posts()){
$query->the_post();
$cus_ads_script = get_post_meta( get_the_ID(), 'cus_ads_script', true );
$jl_ads_dk = get_post_meta( get_the_ID(), 'jl_ads_dk', true );
$jl_ads_tb = get_post_meta( get_the_ID(), 'jl_ads_tb', true );
$jl_ads_mb = get_post_meta( get_the_ID(), 'jl_ads_mb', true );
$jl_ads_items = '.jl_ads'.get_the_ID().', '.'.jl_ads'.get_the_ID().' .adsbygoogle';
if(!empty($cus_ads_script)){
$result .= '<style>';
if(!empty($jl_ads_mb)){
$result .= $jl_ads_items.bopea_ads_size($jl_ads_mb);
}
if(!empty($jl_ads_tb)){
$result .= '@media (min-width: 500px) {';
$result .= $jl_ads_items.bopea_ads_size($jl_ads_tb);
$result .= '}';
}
if(!empty($jl_ads_dk)){
$result .= '@media (min-width: 800px) {';
$result .= $jl_ads_items.bopea_ads_size($jl_ads_dk);
$result .= '}';
}
$result .= '</style>';
$result .= '<div class="jl_adsw jl_ads'.get_the_ID().'">';
$result .= $cus_ads_script;
$result .= '</div>';
}
}
wp_reset_postdata();
}
return $result;
}
}
if ( ! function_exists( 'bopea_ads_size' ) ):
function bopea_ads_size( $size ) {
switch ( $size ) {
case '1' :
return '{ width: 728px; height: 90px; }';
case '2' :
return '{ width: 468px; height: 60px; }';
case '3' :
return '{ width: 234px; height: 60px; }';
case '4' :
return '{ width: 125px; height: 125px; }';
case '5' :
return '{ width: 120px; height: 600px; }';
case '6' :
return '{ width: 160px; height: 600px; }';
case '7' :
return '{ width: 180px; height: 150px; }';
case '8' :
return '{ width: 120px; height: 240px; }';
case '9' :
return '{ width: 200px; height: 200px; }';
case '10' :
return '{ width: 250px; height: 250px; }';
case '11' :
return '{ width: 300px; height: 250px; }';
case '12' :
return '{ width: 336px; height: 280px; }';
case '13' :
return '{ width: 300px; height: 600px; }';
case '14' :
return '{ width: 300px; height: 1050px; }';
case '15' :
return '{ width: 320px; height: 50px; }';
case '16' :
return '{ width: 1024px; height: 90px; }';
case '17' :
return '{ width: 1024px; height: 250px; }';
default :
return '{ display: none; }';
}
}
endif;
function bopea_post_type_layout() {
$labels = array(
'name' => _x('Layouts', 'post type general name', 'bopea-function'),
'singular_name' => _x('Layout', 'post type singular name', 'bopea-function'),
'add_new' => _x('Add New Layout', 'bopea-function'),
'add_new_item' => __('Add New Layout', 'bopea-function'),
'edit_item' => __('Edit Layout', 'bopea-function'),
'new_item' => __('New Layout', 'bopea-function'),
'view_item' => __('View Layout', 'bopea-function'),
'search_items' => __('Search Layout', 'bopea-function'),
'not_found' => __('No Layout found', 'bopea-function'),
'not_found_in_trash' => __('No Layout found in Trash', 'bopea-function'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'hierarchical' => false,
'show_in_nav_menus' => false,
'show_in_admin_bar' => true,
'exclude_from_search' => true,
'menu_position' => 20,
'capability_type' => 'post',
'supports' => array('title', 'editor'),
'menu_icon' => 'dashicons-align-center'
);
register_post_type( 'jl_layout', $args );
}
add_action('init', 'bopea_post_type_layout');
if ( ! function_exists( 'bopea_e_layout_add_column' ) ) {
function bopea_e_layout_add_column( $columns ) {
$columns['jl_e_layouts'] = esc_html__( 'Layout Shortcode', 'bopea-function' );
return $columns;
}
}
add_filter( 'manage_jl_layout_posts_columns', 'bopea_e_layout_add_column' );
if ( ! function_exists( 'bopea_clayout_content' ) ) {
function bopea_clayout_content( $column, $post_id ) {
if ( 'jl_e_layouts' === $column ) {
echo '<input type="text" class="widefat" value=\'[jl_layout id="' . $post_id . '"]\' readonly="">';
}
}
}
add_action( 'manage_jl_layout_posts_custom_column', 'bopea_clayout_content', 10, 2 );
if ( ! function_exists( 'bopea_add_shortcode' ) ) {
function bopea_add_shortcode() {
add_meta_box(
'bopea-meta-shortcode',
esc_html__( 'Layout Shortcode', 'bopea-function' ),
'bopea_meta_shortcode',
'jl_layout',
'side',
'high'
);
}
}
add_action( 'add_meta_boxes', 'bopea_add_shortcode' );
if ( ! function_exists( 'bopea_meta_shortcode' ) ) {
function bopea_meta_shortcode( $post ) { ?>
<input type='text' class='widefat' value='[jl_layout id="<?php echo $post->ID; ?>"]' readonly="">
<?php
}
}
if ( ! function_exists( 'bopea_render_ecss' ) ) {
function bopea_render_ecss() {
if ( ! class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
return;
}
$template_ids = array();
$elayout = get_posts( array(
'post_type' => 'jl_layout',
'posts_per_page' => -1,
'fields' => 'ids',
'meta_query' => array(
array(
'key' => 'jl_erender',
'value' => 'on',
)
)
)
);
if( !empty( $elayout ) ){
$template_ids = $elayout;
}
if ( ! empty( $template_ids ) ) {
foreach ( $template_ids as $template_id ) {
$css_file = new \Elementor\Core\Files\CSS\Post( $template_id );
$css_file->enqueue();
}
}
}
}
add_action( 'wp_enqueue_scripts', 'bopea_render_ecss', 500 );
add_shortcode( 'jl_layout', 'bopea_e_template' );
function bopea_e_template( $atts ) {
if(!empty($atts)){
if (did_action('elementor/loaded')) {
return \Elementor\Plugin::$instance->frontend->get_builder_content("{$atts['id']}");
}else{
$args = array(
'post_type' => 'jl_layout',
'post_status' => array( 'publish' ),
'include' => $atts['id'],
);
$megamenus = get_posts($args);
if(!empty($megamenus)){
foreach ($megamenus as $megamenu){
return $megamenu->post_content;
}
}
}
}
}
function bopea_og_title() {
if ( is_singular() ) {
return get_the_title();
}
return wp_get_document_title();
}
function bopea_og_permalink() {
if ( is_singular() ) {
return get_permalink();
}
global $wp;
return home_url( add_query_arg( array(), $wp->request ) );
}
function bopea_meta_head() {
if ( !empty( get_theme_mod( 'jl_opt_seo' ) ) ) {
return;
}
if ( is_singular() ) {
global $post;
$image = get_the_post_thumbnail_url( $post, 'large' );
}
if ( empty( $image ) ) {
$image = get_theme_mod( 'bopea_seo_img' );
if ( empty( $image ) ) {
$image = get_site_icon_url();
}
}
?>
<?php if ( is_front_page() ) {?>
<meta name="description" content="<?php echo get_bloginfo( 'description' ); ?>">
<?php } elseif ( is_singular( 'post' ) ) {?>
<meta name="description" content="<?php echo wp_strip_all_tags(get_the_excerpt()); ?>">
<?php }?>
<?php if ( ! empty( $image ) ) { ?>
<meta property="og:image" content="<?php echo esc_url( $image ); ?>">
<?php }?>
<meta property="og:title" content="<?php echo bopea_og_title(); ?>">
<meta property="og:url" content="<?php echo bopea_og_permalink(); ?>">
<meta property="og:site_name" content="<?php echo get_bloginfo( 'name' ); ?>">
<?php if ( is_front_page() ) { ?>
<meta property="og:description" content="<?php echo get_bloginfo( 'description' ); ?>"/>
<?php } elseif ( is_singular( 'post' ) ) {?>
<meta property="og:description" content="<?php echo wp_strip_all_tags(get_the_excerpt()); ?>" />
<?php }?>
<?php if ( ! empty( get_theme_mod( 'jl_seo_fb_app_id' ) ) ) { ?>
<meta property="fb:facebook_app_id" content="<?php echo esc_attr( get_theme_mod( 'jl_seo_fb_app_id' ) ); ?>"/>
<?php }
if ( is_singular() ) { ?>
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="<?php echo gmdate( 'c', strtotime( $post->post_date_gmt ) ); ?>"/>
<meta property="article:modified_time" content="<?php echo gmdate( 'c', strtotime( $post->post_modified_gmt ) ); ?>"/>
<meta name="author" content="<?php the_author_meta( 'display_name', $post->post_author ); ?>"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:creator" content="<?php echo '@' . get_theme_mod( 'jl_seo_twiter_name','envato' ); ?>"/>
<?php if ( ! empty( get_theme_mod( 'jl_seo_twiter_label','Written by' ) ) ) { ?>
<meta name="twitter:label1" content="<?php echo get_theme_mod( 'jl_seo_twiter_label','Written by' ); ?>"/>
<?php }?>
<meta name="twitter:data1" content="<?php the_author_meta( 'display_name', $post->post_author ); ?>"/>
<?php
}
}
add_action( 'wp_head', 'bopea_meta_head', 5 );
function bopea_header_script() {
if ( empty( get_option( 'jl_cus_head_code' ) ) ) {
return;
}
if ( is_customize_preview() || \Elementor\Plugin::$instance->editor->is_edit_mode() ) {}else{
echo get_option( 'jl_cus_head_code' );
}
}
add_action( 'wp_head', 'bopea_header_script', 5 );
function bopea_footer_script() {
if ( empty( get_option( 'jl_cus_foot_code' ) ) ) {
return;
}
if ( is_customize_preview() || \Elementor\Plugin::$instance->editor->is_edit_mode() ) {}else{
echo get_option( 'jl_cus_foot_code' );
}
}
add_action( 'wp_footer', 'bopea_footer_script' );
function bopea_bac_PostViews($post_ID) {
$count_key = 'post_views_count';
$count = get_post_meta($post_ID, $count_key, true);
if($count == ''){
$count = 0; // set the counter to zero.
delete_post_meta($post_ID, $count_key);
add_post_meta($post_ID, $count_key, '0');
$input = number_format($count);
$input_count = substr_count($input, ',');
if($input_count != '0'){
if($input_count == '1'){
return ''.round($count/1000, 1) .'k';
} else if($input_count == '2'){
return ''.round($count/1000000, 1) .'k';
} else if($input_count == '3'){
return substr($input, 0, -12).'bil';
} else {
return;
}
} else {
return ''.$input;
}
}else{
$count++;
update_post_meta($post_ID, $count_key, $count);
if($count == '1'){
//return '<i class="icon-jl_fire"></i>'.$count;
$input = number_format($count);
$input_count = substr_count($input, ',');
if($input_count != '0'){
if($input_count == '1'){
return ''.round($count/1000, 1) .'k';
} else if($input_count == '2'){
return ''.round($count/1000000, 1) .'k';
} else if($input_count == '3'){
return substr($input, 0, -12).'bil';
} else {
return;
}
} else {
return ''.$input;
}
}
else {
//return '<i class="icon-jl_fire"></i>'.$count;
$input = number_format($count);
$input_count = substr_count($input, ',');
if($input_count != '0'){
if($input_count == '1'){
return ''.round($count/1000, 1) .'k';
} else if($input_count == '2'){
return ''.round($count/1000000, 1) .'k';
} else if($input_count == '3'){
return substr($input, 0, -12).'bil';
} else {
return;
}
} else {
return ''.$input;
}
}
}
}
function bopea_get_PostViews($post_ID){
$count_key = 'post_views_count';
$count = get_post_meta($post_ID, $count_key, true);
if($count){
$input = number_format($count);
$input_count = substr_count($input, ',');
if($input_count != '0'){
if($input_count == '1'){
return round($count/1000, 1) .'k';
} else if($input_count == '2'){
return round($count/1000000, 1) .'k';
} else if($input_count == '3'){
return substr($input, 0, -12).'bil';
} else {
return;
}
} else {
return $input;
}
}else{
return 0;
}
//return $count;
}
function bopea_post_column_views($newcolumn){
$newcolumn['post_views'] = esc_html__('Views', 'bopea-function');
return $newcolumn;
}
function bopea_post_custom_column_views($column_name, $id){
if($column_name === 'post_views'){
echo bopea_get_PostViews(get_the_ID());
}
}
if(empty(get_theme_mod('hide_view_backend'))){
add_filter('manage_post_posts_columns', 'bopea_post_column_views');
add_action('manage_post_posts_custom_column', 'bopea_post_custom_column_views',10,2);
}
function bopea_admin_action(){
add_menu_page('Bopea Welcome', 'Bopea Welcome', 'administrator', 'jlwelcome.php', 'bopea_welcome_pages', '', 3);
}
add_action('admin_menu', 'bopea_admin_action');
function bopea_welcome_pages() {?>
<div class="clear"></div>
<div class="wrap-theside jl-admin-pro-wrap">
<div class="wrap jl-admin-pro-inner theside-page-welcome about-wrap">
<div class="jl-admin-nav-wrap">
<ul>
<li><a class="active-nav" href="<?php echo esc_url( admin_url( 'admin.php?page=jlwelcome.php' ) ); ?>"><?php esc_html_e("Welcome On Board", 'bopea-function');?></a></li>
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=radium_demo_installer' ) ); ?>"><?php esc_html_e("Import Demo", 'bopea-function');?></a></li>
</ul>
<a class="jl-doc-nav" href="<?php echo esc_url( 'https://jellywp.com/wpt/bopea' ); ?>" target="_blank" rel="nofollow" alt=""><?php esc_html_e("Documentation", 'bopea-function');?></a>
</div>
<div class="wrap-jl-heading">
<p class="jl-name-wrap"><?php echo BOPEA_THEMENAME; ?><span>Version <?php echo wp_get_theme()->get( 'Version' );?></span></p>
<p class="jl-content-txt"><?php esc_html_e("Thank you for purchasing our theme, now you are an owner of Bopea - Newspaper & Magazine WordPress Theme", 'bopea-function');?></p>
</div>
<div class="jl_info_box jl_sp_box">
<h3>Help & Resources</h3>
<p>Whether you face some troubles while installing or using the Bopea - Newspaper & Magazine WordPress Theme, don't hesitate and write to us!</p>
<hr>
<div class="three-col">
<div class="col">
<h3><span class="dashicons dashicons-book"></span>Documentation</h3>
<p>Сlear and useful documentation gather all the answers for all questions that may arise in one place!</p>
<a href="https://jellywp.com/wpt/bopea" class="button button-primary button-large" target="_blank">Read Documentation</a>
</div>
<div class="col">
<h3><span class="dashicons dashicons-sos"></span>Support Center</h3>
<p>The team of competent and knowledgeable technical supporters is always ready to give a piece of advice and help you in any trouble!</p>
<a href="https://themeforest.net/user/jellywp" class="button button-primary button-large" target="_blank">Get Support</a>
</div>
<div class="col">
<h3><span class="dashicons dashicons-admin-comments"></span>Got Feedback?</h3>
<p>If you have time-sensitive questions regarding our products and/or services, please feel free to contact us</p>
<a href="https://jellywp.com/wp/contact-us/" class="button button-primary button-large" target="_blank">Send Feedback</a>
</div>
</div>
</div>
</div>
</div>
<?php
}
if ( ! function_exists('bopea_jlmedia_gallery_upload_get_images')) {
function bopea_jlmedia_gallery_upload_get_images(){
$ids=$_POST['ids'];
$ids=explode(",",$ids);
foreach($ids as $id):
$image = wp_get_attachment_image_src($id,'thumbnail', true);
echo '<li class="jlmedia-gallery-image-holder"><img src="'.esc_url($image[0]).'"/></li>';
endforeach;
exit;
}
}
add_action( 'wp_ajax_bopea_jlmedia_gallery_upload_get_images', 'bopea_jlmedia_gallery_upload_get_images');
add_action( 'wp_footer', 'bopea_gdpr' );
if ( ! function_exists( 'bopea_gdpr' ) ) :
function bopea_gdpr() {
$cookiebox = get_theme_mod('jl_cookie_enable');
if ( empty( $cookiebox ) ) {
return;
}
?>
<aside id="jl-gdpr" class="jl-gdpr">
<div class="jl-gdpr-inner">
<div class="cookie-content"><?php echo wp_kses_post(get_theme_mod('jl_cookie_dec')); ?></div>
<div class="jl-gdpr-w">
<a id="jl-gdpr-accept" class="jl-gdpr-accept" href="#"><?php echo esc_html__(get_theme_mod('jl_cookie_btn', 'Accept')); ?></a>
</div>
</div>
</aside>
<?php
}
endif;
add_action( 'wp_footer', 'bopea_link_bg' );
if ( ! function_exists( 'bopea_link_bg' ) ) :
function bopea_link_bg() {
$bopea_site_layout = get_theme_mod('bopea_site_layout', 'jl_lfull');
if(!empty($bopea_site_layout) && $bopea_site_layout == 'jl_lbox') {
$jl_bg_link = get_theme_mod('jl_bg_link');
if ( empty( $jl_bg_link ) ) {
return;
}?>
<a class="jl_cus_bgl" target="_blank" rel="nofollow" alt="" href="<?php echo esc_url($jl_bg_link);?>"></a>
<?php
}
}
endif;
function bopea_imgmlz( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
return str_replace( '<img', '<img loading="lazy"', $html );
}
function bopea_addimgclass( $html = '', $new_class = '' ) {
if(empty(get_theme_mod('jl_opt_lazy_img', false))){
$pattern = '/class="([^"]*)"/';
if ( preg_match( $pattern, $html, $matches ) ) {
$predefined_classes = explode( ' ', $matches[1] );
if ( ! in_array( $new_class, $predefined_classes, true ) && ! in_array( 'rev-slidebg', $predefined_classes, true ) && ! in_array( 'jl-bgs', $predefined_classes, true ) ) {
$predefined_classes[] = $new_class;
$html = str_replace(
$matches[0],
sprintf( 'class="%s"', implode( ' ', $predefined_classes ) ),
$html
);
}
} else {
$html = preg_replace( '/(\<.+("\s))/', sprintf( '$1class="%s" ', $new_class ), $html );
}
}
return $html;
}
function bopea_filimg( $content ) {
if(empty(get_theme_mod('jl_opt_lazy_img', false))){
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
return $content;
}
if ( is_feed()
|| intval( get_query_var( 'print' ) ) === 1
|| intval( get_query_var( 'printpage' ) ) === 1
|| strpos( $_SERVER['HTTP_USER_AGENT'], 'Opera Mini' ) !== false
) {
return $content;
}
$matches = array();
$resp_replace = 'data-sizes="auto" data-srcset=';
$skip_images_regex = '/class=".*lazyload.*"/';
$skip_images_regex2 = '/class=".*rev-slidebg.*"/';
$skip_images_regex3 = '/class=".*attachment-full.*"/';
$skip_images_regex4 = '/class=".*attachment-woocommerce_thumbnail.*"/';
$placeholder = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
preg_match_all( '/<img\s+.*?>/', $content, $matches );
$search = array();
$replace = array();
foreach ( $matches[0] as $img_html ) {
if ( ! preg_match( $skip_images_regex, $img_html ) && ! preg_match( $skip_images_regex2, $img_html ) && ! preg_match( $skip_images_regex3, $img_html ) && ! preg_match( $skip_images_regex4, $img_html ) ) {
$replace_html = preg_replace( '/<img(.*?)src=/i', '<img$1src="' . $placeholder . '" data-src=', $img_html );
$replace_html = preg_replace( '/srcset=/i', $resp_replace, $replace_html );
$replace_html = bopea_addimgclass( $replace_html, 'lazyload' );
array_push( $search, $img_html );
array_push( $replace, $replace_html );
}
}
$content = str_replace( $search, $replace, $content );
}
return $content;
}
function bopea_lsmall_img( $attr, $attachment, $size ) {
if(empty(get_theme_mod('jl_opt_lazy_img', false))){
if ( is_string( $size ) ) {
$placeholder = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
$name = explode( '_', $size );
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() || is_embed() ) {
$placeholder = wp_get_attachment_image_src( $attachment->ID, 'bopea_medium' );
$placeholder = $placeholder[0];
}else{
if ( 'bopea-function' === $name[0] ) {
$name[2] = 'sload';
$size = implode( '_', $name );
$placeholder = wp_get_attachment_image_src( $attachment->ID, $size );
$placeholder = $placeholder[0];
}else{
$placeholder = wp_get_attachment_image_src( $attachment->ID, 'bopea_large_sload' );
$placeholder = $placeholder[0];
}
}
$attr['data-src'] = $attr['src'];
$attr['src'] = $placeholder;
$attr['class'] .= ' jl-lazyload lazyload';
unset( $attr['sizes'] );
if ( isset( $attr['srcset'] ) ) {
$attr['data-srcset'] = $attr['srcset'];
unset( $attr['srcset'] );
unset( $attr['data-srcset'] );
}
}
}
return $attr;
}
function bopea_img_sizes($img_in) {
if(empty(get_theme_mod('jl_opt_lazy_img', false))){
$noscript_pos = strpos( $img_in, '</noscript>') + 11;
$noscript_img = substr ( $img_in , 0 , $noscript_pos );
$_img = substr ( $img_in , $noscript_pos );
return $noscript_img . str_replace( 'sizes=', 'data-sizes=', $_img );
}
}
if ( ! is_admin() ) {
if(empty(get_theme_mod('jl_opt_lazy_img', false))){
add_filter( 'the_content', 'bopea_filimg', 200 );
add_filter( 'wp_get_attachment_image_attributes', 'bopea_lsmall_img', 10, 3 );
add_filter('the_content','bopea_img_sizes');
}
}
function bopea_font_info() {
if (isset($_GET['taxonomy']) && $_GET['taxonomy'] == 'jl_custom_fonts') {
?>
<div class="notice notice-warning">
<ol>
<li>Prepare your webfont files by convert your <code>ttf</code> fonts at <a href="https://www.fontsquirrel.com/tools/webfont-generator" target="_blank" rel="nofollow" alt="">Font Squirrel</a></li>
<li>Upload your font files</li>
<li>Your font will show in Appearance → Customise → Theme options → Typography with prefix name Custom font</li>
</ol>
</div>
<?php
}}
add_action( 'admin_notices', 'bopea_font_info' );
function bopea_elementor_page() {
if ( ! is_page() ) {
return false;
}
$document = false;
if ( class_exists( 'Elementor\Plugin' ) ) {
$document = Elementor\Plugin::$instance->documents->get( get_the_ID() );
}
if ( $document && $document->is_built_with_elementor() ) {
return true;
}
return false;
}
function bopea_gfont() {
$in = ob_get_clean();
if ( ! get_theme_mod( 'jl_opt_google_font', true ) || is_admin() || ! empty( $_GET['elementor-preview'] ) ) {
echo $in;
return false;
}
$markup = preg_replace( '/<!--(.*)-->/Uis', '', $in );
preg_match_all( '#<link(?:\s+(?:(?!href\s*=\s*)[^>])+)?(?:\s+href\s*=\s*([\'"])((?:https?:)?\/\/fonts\.googleapis\.com\/css(?:(?!\1).)+)\1)(?:\s+[^>]*)?>#iU', $markup, $matches );
if ( ! $matches[2] ) {
echo $in;
return false;
}
$fonts_data = array();
$index = 0;
$fonts_string = '';
$subset_string = '';
$add_pos = '<link';
foreach ( $matches[2] as $font ) {
if ( ! preg_match( '/rel=["\']dns-prefetch["\']/', $matches[0][ $index ] ) ) {
$font = str_replace( array( '%7C', '%7c' ), '|', $font );
if ( strpos( $font, 'fonts.googleapis.com/css2' ) !== false ) {
$font = rawurldecode( $font );
$font = str_replace( array(
'css2?',
'ital,wght@',
'wght@',
'ital@',
'0,',
'1,',
':1',
';',
'&family='
), array( 'css?', '', '', '', '', 'italic', ':italic', ',', '%7C' ), $font );
}
$font = explode( 'family=', $font );
$font = ( isset( $font[1] ) ) ? explode( '&', $font[1] ) : array();
$this_font = array_values( array_filter( explode( '|', reset( $font ) ) ) );
if ( ! empty( $this_font ) ) {
$fonts_data[ $index ]['fonts'] = $this_font;
$subset = ( is_array( $font ) ) ? end( $font ) : '';
if ( false !== strpos( $subset, 'subset=' ) ) {
$subset = str_replace( array( '%2C', '%2c' ), ',', $subset );
$subset = explode( 'subset=', $subset );
$fonts_data[ $index ]['subsets'] = explode( ',', $subset[1] );
}
}
$in = str_replace( $matches[0][ $index ], '', $in );
}
$index ++;
}
foreach ( $fonts_data as $font ) {
$fonts_string .= '|' . trim( implode( '|', $font['fonts'] ), '|' );
if ( ! empty( $font['subsets'] ) ) {
$subset_string .= ',' . trim( implode( ',', $font['subsets'] ), ',' );
}
}
if ( ! empty( $subset_string ) ) {
$subset_string = str_replace( ',', '%2C', ltrim( $subset_string, ',' ) );
$fonts_string = $fonts_string . '&subset=' . $subset_string;
}
$fonts_string = str_replace( '|', '%7C', ltrim( $fonts_string, '|' ) );
$fonts_string .= '&display=swap';
$fonts_html = '<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>';
$fonts_html .= '<link rel="preload" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" id="bopea_fonts_url_preload" href="https://fonts.googleapis.com/css?family=' . $fonts_string . '" crossorigin>';
$fonts_html .= '<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=' . $fonts_string . '"></noscript>';
echo substr_replace( $in, $fonts_html . $add_pos, strpos( $in, $add_pos ), strlen( $add_pos ) );
return false;
}
add_action( 'wp_head', 'bopea_gfont', PHP_INT_MAX );
if( !function_exists('bopea_bb_img_size') ) {
function bopea_bb_img_size( $author_avatar, $topic_id, $size ) {
$author_avatar = '';
if ($size == 14) {
$size = 40;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
} else {
$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
}
}
return $author_avatar;
}
add_filter('bbp_get_topic_author_avatar', 'bopea_bb_img_size', 20, 3);
add_filter('bbp_get_reply_author_avatar', 'bopea_bb_img_size', 20, 3);
add_filter('bbp_get_current_user_avatar', 'bopea_bb_img_size', 20, 3);
}
add_action('wp', 'bopea_post_opt_check');
function bopea_post_opt_check(){
$single_auto_load_opt = get_theme_mod('single_auto_load_post','disable');
$single_auto_load = get_post_meta( get_the_ID(), 'single_auto_load_post', true );
if(empty($single_auto_load)){
$spl_load = $single_auto_load_opt;
}else{
$spl_load = $single_auto_load;
}
if($spl_load == 'disable'){
return;
}
if (is_single()) {
add_action('wp_footer', 'bopea_post_disp_opt');
}
}
function bopea_set_get_post($count, $check_type = 'previous', $check_term = false){
$single_auto_load_opt = get_theme_mod('single_auto_load_post','disable');
$single_auto_load = get_post_meta( get_the_ID(), 'single_auto_load_post', true );
if(empty($single_auto_load)){
$spl_load = $single_auto_load_opt;
}else{
$spl_load = $single_auto_load;
}
if($spl_load == 'disable'){
return;
}
wp_reset_query();
$check_post = get_queried_object();
if (!$check_post || !$check_post->ID) { return; }
$query_args = [ 'post_type' => 'post', 'posts_per_page' => $count, 'no_found_rows' => true, 'supress_filters' => true, 'ignore_sticky_posts' => true ];
if ($check_type !== 'random') {
$post_nav = $check_type === 'previous' ? 'before' : 'after';
$query_args += [ 'date_query' => [ [ $post_nav => $check_post->post_date, 'inclusive' => false ] ], 'order' => $post_nav === 'before' ? 'DESC' : 'ASC' ];
}else {
$query_args += [ 'orderby' => 'rand', 'post__not_in' => [$check_post->ID] ];
}
if ($check_term) {
$terms = wp_get_post_terms($check_post->ID, 'category', ['fields' => 'ids']);
if ($terms) { $query_args['tax_query'] = [ [ 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $terms ] ]; }
}
$posts_query = get_posts( apply_filters('jl_splq_opts', $query_args));
return $posts_query;
}
function bopea_post_disp_opt(){
$single_auto_load_opt = get_theme_mod('single_auto_load_post','disable');
$single_auto_load = get_post_meta( get_the_ID(), 'single_auto_load_post', true );
if(empty($single_auto_load)){
$spl_load = $single_auto_load_opt;
}else{
$spl_load = $single_auto_load;
}
if($spl_load == 'disable'){
return;
}
$auto_load_num = get_theme_mod('auto_load_num','10');
$single_auto_load_type = get_theme_mod('single_auto_load_type','previous');
$auto_same_cat = get_theme_mod('auto_same_cat',1);
$posts_query = bopea_set_get_post($auto_load_num, $single_auto_load_type, $auto_same_cat );
if (!$posts_query) { return; }
$posts_display = [];
foreach ($posts_query as $post) {
// 'title' => $post->post_title,
$posts_display[] = [ 'id' => $post->ID, 'title' => '', 'url' => get_permalink($post) ];
}
printf( '<script data-cfasync="false">JlOptPosts = %s;</script>', json_encode($posts_display) );
}
function bopea_datetime_init() {
if ( is_single() ) {
$enable_single_date_ago = get_theme_mod('enable_single_date_ago');
if(!empty($enable_single_date_ago)){
require_once BOPEA_ADDONS_DIR_PATH.'inc/date-time.php';
new bopea_ago_datetime();
}
}else{
$enable_front_date_ago = get_theme_mod('enable_front_date_ago');
if(!empty($enable_front_date_ago)){
require_once BOPEA_ADDONS_DIR_PATH.'inc/date-time.php';
new bopea_ago_datetime();
}
}
}
if (!is_admin() || (defined('DOING_AJAX') && DOING_AJAX) ) {
add_action('loop_start', 'bopea_datetime_init', 50);
}
add_action( 'wp_enqueue_scripts', 'bopea_enqueue_optimized', 999 );
function bopea_enqueue_optimized() {
if ( ! empty( $_GET['elementor-preview'] ) || is_admin() ) {
return false;
}
if ( get_theme_mod( 'jl_opt_dashicons', true ) && ! is_user_logged_in() ) {
wp_deregister_style( 'dashicons' );
}
if ( get_theme_mod( 'jl_opt_polyfill', false ) && ! is_admin() ) {
wp_deregister_script( 'wp-polyfill' );
}
if ( get_theme_mod( 'jl_opt_gutenberg', true ) && bopea_elementor_page() ) {
wp_deregister_style( 'wp-block-library' );
}
if ( get_theme_mod( 'jl_opt_woo_block', true ) ) {
wp_deregister_style( 'wc-blocks-vendors-style' );
wp_deregister_style( 'wc-blocks-style' );
}
}
if ( ! function_exists( 'bopea_core_enqueue' ) ) {
function bopea_core_enqueue() {
if ( is_admin() ) {
return false;
}
wp_enqueue_script( 'imagesloaded' );
}
}
add_action( 'wp_enqueue_scripts', 'bopea_core_enqueue', 1 );
function bopea_info_scripts(){
wp_enqueue_style('bopea-info', BOPEA_ADDONS_ASSETS . 'css/infom.css', null, BOPEA_ADDONS_VERSION);
}
add_action('elementor/editor/after_enqueue_styles', 'bopea_info_scripts');
function bopea_admin_enqueue() {
wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_media();
wp_enqueue_script( 'category-colorpicker-js', BOPEA_ADDONS_ASSETS . 'js/metas.js', array( 'wp-color-picker' ) );
wp_enqueue_style( 'category-template-style-admin', BOPEA_ADDONS_ASSETS .'css/metas.css', false, BOPEA_ADDONS_VERSION );
wp_localize_script( 'category-colorpicker-js', 'jlParamsOpt', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'vidimg' => esc_url(BOPEA_ADDONS_ASSETS.'images/video.png'), 'mp3img' => esc_url(BOPEA_ADDONS_ASSETS.'images/mp3.png') ) );
}
add_action('admin_enqueue_scripts', 'bopea_admin_enqueue' );