Spital & Policlinica Sfantul Ioan str. Republicii, nr. 30, Baia Mare
*/ ?> Contact 0262 20 66 20 Rezultate analize Programare onlineadd_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 = '';
$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' => __( '← Previous', 'yourtheme' ),
'next_text' => __( 'Next →', 'yourtheme' ),
'type' => 'list',
) );
if ( $links ) :
return '
';
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' );
Spital & Policlinica Sfantul Ioan str. Republicii, nr. 30, Baia Mare
*/ ?> Contact 0262 20 66 20 Rezultate analize Programare onlineDescoperă cum investițiile în echipamente medicale de ultimă generație ne permit să oferim servicii de imagistică și diagnosticare non-invazivă, contribuind la îmbunătățirea sănătății în comunitatea noastră.