', esc_url(get_bloginfo('pingback_url'))); } } add_action('wp_head', 'businessroy_themes_pingback_header'); /** * Adds a box to the main column on the Post and Page edit screens. */ function businessroy_themes_sidebar_layout_meta_box() { $screens = array('post', 'page'); add_meta_box( 'businessroy_themes_sidebar_layout', esc_html__('Page Layout', 'business-roy'), 'businessroy_themes_sidebar_layout_meta_box_callback', $screens, 'side', 'high' ); } add_action('add_meta_boxes', 'businessroy_themes_sidebar_layout_meta_box'); /** * Prints the box content. * * @param WP_Post $post The object for the current post/page. */ function businessroy_themes_sidebar_layout_meta_box_callback($post) { // Add a nonce field so we can check for it later. wp_nonce_field('businessroy_themes_sidebar_layout_save_meta_box', 'businessroy_themes_sidebar_layout_meta_box_nonce'); /* * Use get_post_meta() to retrieve an existing value * from the database and use the value for the form. */ $businessroy_themes_sidebar_layout = get_post_meta($post->ID, 'businessroy_themes_sidebar_layout', true); if (!$businessroy_themes_sidebar_layout) { $businessroy_themes_sidebar_layout = 'no'; } echo '
'; echo ''; echo ''; echo ''; echo '
'; } /** * When the post is saved, saves our custom data. * * @param int $post_id The ID of the post being saved. */ function businessroy_themes_sidebar_layout_save_meta_box($post_id) { /* * We need to verify this came from our screen and with proper authorization, * because the save_post action can be triggered at other times. */ // Check if our nonce is set. if (!isset($_POST['businessroy_themes_sidebar_layout_meta_box_nonce'])) { return; } // Verify that the nonce is valid. if (!wp_verify_nonce(sanitize_key($_POST['businessroy_themes_sidebar_layout_meta_box_nonce']), 'businessroy_themes_sidebar_layout_save_meta_box')) { return; } // If this is an autosave, our form has not been submitted, so we don't want to do anything. if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return; } // Check the user's permissions. if (!current_user_can('edit_post', $post_id)) { return; } /* OK, it's safe for us to save the data now. */ // Make sure that it is set. if (isset($_POST['businessroy_themes_sidebar_layout'])) { // Sanitize user input. $businessroy_themes_data = sanitize_text_field(wp_unslash($_POST['businessroy_themes_sidebar_layout'])); // Update the meta field in the database. update_post_meta($post_id, 'businessroy_themes_sidebar_layout', $businessroy_themes_data); } } add_action('save_post', 'businessroy_themes_sidebar_layout_save_meta_box'); if(!function_exists('businessroy_themes_single_post_meta')){ function businessroy_themes_single_post_meta(){ do_action( 'businessroy_themes_post_meta', 10 ); } } if(!function_exists('businessroy_themes_single_content')){ function businessroy_themes_single_content(){ echo '
'; the_content( sprintf( wp_kses( __( 'Read More "%s"', 'business-roy' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo '
'; } } if(!function_exists('businessroy_themes_single_title')){ function businessroy_themes_single_title(){ the_title( '

', '

' ); } } if(!function_exists('businessroy_themes_single_pagination')){ function businessroy_themes_single_pagination(){ $next_post = get_next_post(); $prev = get_previous_post(); if( !empty( $next_post ) || !empty( $prev ) ): ?>
'.esc_html__('Previous article','business-roy').'' ); ?>
'.esc_html__('Next article','business-roy').'' ); ?>
4, 'post__not_in' => array($post->ID) ) ); $article_wrap_class = array("ikthemes-article-wrap", "d-grid", "d-grid-column-2"); if(!empty($related ) ){ ?> esc_html__('Elementor', 'business-roy'), 'slug' => 'elementor', 'required' => true, ), array( 'name' => esc_html__('Contact Form 7', 'business-roy'), 'slug' => 'contact-form-7', 'required' => true, ), array( 'name' => esc_html__('CookieYes (Compliance for GDPR / CCPA)', 'business-roy'), 'slug' => 'cookie-law-info', 'required' => true, ), array( 'name' => esc_html__('Loco Translate', 'business-roy'), 'slug' => 'loco-translate', 'required' => false, ), array( 'name' => esc_html__('Hash Form - Drag & Drop Form Builder', 'business-roy'), 'slug' => 'hash-form', 'required' => true, ) ); $config = array( 'default_path' => '', 'menu' => 'tgmpa-install-plugins', // Menu slug. ); tgmpa( $plugins, $config ); } } add_action( 'tgmpa_register', 'businessroy_themes_register_required_plugins' );