<?
add_filter('wp_mail', 'my_wp_mail');

function my_wp_mail($atts) {

    $message = do_shortcode($atts['message']);

    //cw_log($message);

    $message = str_replace(
    	array('[[content]]','[[sectii]]'),
    	array($message, get_sectii_email()), get_template_content('template-parts/email/transactional_email_template.php'));
    

    $header = '<img src="'.$website["email_logo"].'" width="'.$website['email_logo_width'].'"/>';

    $from = ['[[website_name]]','[[website_url]]','[[blog_description]]'];
    $to = [$header,'https://'.$website["url"],''];

    $atts['message']  = str_replace($from,$to,$message);

    
    return $atts;
}

function wpdocs_set_html_mail_content_type() {
    return 'text/html';
}
add_filter( 'wp_mail_content_type', 'wpdocs_set_html_mail_content_type' );
 

function smartwp_disable_new_user_notifications() {
	//Remove original use created emails
	remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
	remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
}
add_action( 'init', 'smartwp_disable_new_user_notifications' );
<?
function cwPaging() {
	// Don't print empty markup if there's only one page.
	if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
		return;
	}

	$paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
	$pagenum_link = html_entity_decode( get_pagenum_link() );
	$query_args   = array();
	$url_parts    = explode( '?', $pagenum_link );

	if ( isset( $url_parts[1] ) ) {
		wp_parse_str( $url_parts[1], $query_args );
	}

	$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
	$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';

	$format  = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
	$format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%';

	// Set up paginated links.
	$links = paginate_links( array(
		'base'     => $pagenum_link,
		'format'   => $format,
		'total'    => $GLOBALS['wp_query']->max_num_pages,
		'current'  => $paged,
		'mid_size' => 3,
		'add_args' => array_map( 'urlencode', $query_args ),
		'prev_text' => __( '&larr; Previous', 'yourtheme' ),
		'next_text' => __( 'Next &rarr;', 'yourtheme' ),
		'type'      => 'list',
	) );

	if ( $links ) :
 

	return '
	<nav class="paging" role="navigation">
			'.$links.'
	</nav>';
	
	endif;
}

<?
function wpd_testimonials_query( $query ){
	global $website;
    if( 
   
         $query->is_main_query() ){
            $query->set( 'posts_per_page',12 );
    }
}
if (!is_admin())
add_action( 'pre_get_posts', 'wpd_testimonials_query' );<?
add_filter( 'gform_pre_render_1', 'populate_posts' );
add_filter( 'gform_pre_validation_1', 'populate_posts' );
add_filter( 'gform_pre_submission_filter_1', 'populate_posts' );
add_filter( 'gform_admin_pre_render_1', 'populate_posts' );
function populate_posts( $form ) {
 

    foreach ( $form['fields'] as &$field ) {
 		//dump($field);
        if ( $field->id!=4 ) {
            continue;
        }
 
        $posts = get_sectii();

		 
        foreach ( $posts as $post ) {
            $choices[] = array( 'text' => $post->post_title, 'value' => $post->post_title );
        }
 
        // update 'Select a Post' to whatever you'd like the instructive option to be
        $field->placeholder = 'Alegeti specialitatea';
        $field->choices = $choices;
 
    }
 
    return $form;
}

add_filter( 'gform_pre_render_4', 'populate_posts' );
add_filter( 'gform_pre_validation_4', 'populate_posts' );
add_filter( 'gform_pre_submission_filter_4', 'populate_posts' );
add_filter( 'gform_admin_pre_render_4', 'populate_posts' );


<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//spitalsfantulioan.ro/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://spitalsfantulioan.ro/post-sitemap.xml</loc>
		<lastmod>2023-05-18T07:28:57+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/page-sitemap.xml</loc>
		<lastmod>2026-05-25T15:55:18+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/dictionar-sitemap.xml</loc>
		<lastmod>2022-08-15T12:10:35+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/analiza-sitemap.xml</loc>
		<lastmod>2022-10-12T19:49:35+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/category-sitemap.xml</loc>
		<lastmod>2023-05-18T07:28:57+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/categorie_analiza-sitemap.xml</loc>
		<lastmod>2022-10-12T19:49:35+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://spitalsfantulioan.ro/author-sitemap.xml</loc>
		<lastmod>2024-08-31T07:03:34+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->