standarized values in php

This commit is contained in:
jorge 2022-12-29 16:58:39 +01:00
parent a9085ce02c
commit dbdd3c3b51
4 changed files with 118 additions and 10 deletions

View File

@ -0,0 +1,51 @@
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Oficina_de_Suport_theme
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
<?php if ( 'ofisuport-ajut' === get_post_type() ) : ?>
<div class="entry-meta">
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'ofisuport' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'ofisuport' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php ofisuport_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -0,0 +1,57 @@
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Oficina_de_Suport_theme
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php
//ofisuport_posted_on();
//ofisuport_posted_by();
?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'ofisuport' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'ofisuport' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php ofisuport_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->

View File

@ -56,12 +56,12 @@
<?php the_excerpt() ?> <?php the_excerpt() ?>
</section> </section>
<aside> <aside>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_target') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_source') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_field') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_field') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_apply_begin') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_apply_begin') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_apply_end') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_apply_end') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'os_fund_call') ); ?> <?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_call') ); ?>
</aside> </aside>
<button class="button button-more" > <button class="button button-more" >
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">accedeix</a> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">accedeix</a>

View File

@ -10,10 +10,10 @@
?> ?>
<?php <?php
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130 // https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
// var_dump( $args ); //will display everythin imported from // to display this template use
// get_template_part( 'template-parts/section', 'list-checkbox', array('os_acf_field' => 'CHANGETHIS') ); // get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'CHANGETHIS') );
$fielditerate = $args['os_acf_field']; $fielditerate = $args['iterate_field'];
?> ?>
<?php <?php