Changeset 12050 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-params.php
- Timestamp:
- 09/05/2022 05:14:31 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-params.php
r9823 r12050 17 17 <?php foreach ( $params as $param ) : ?> 18 18 <?php if ( ! empty( $param['variable'] ) ) : ?> 19 <dt><?php echo esc_html( $param['variable'] ); ?></dt> 19 <dt> 20 <code><?php echo esc_html( $param['variable'] ); ?></code> 21 <?php if ( ! empty( $param['types'] ) ) : ?> 22 <span class="type"><?php echo wp_kses_post( $param['types'] ); ?></span> 23 <?php endif; ?> 24 <?php if ( ! empty( $param['required'] ) && 'wp-parser-hook' !== get_post_type() ) : ?> 25 <span class="required"><?php echo esc_html( $param['required'] ); ?></span> 26 <?php endif; ?> 27 </dt> 20 28 <?php endif; ?> 21 29 <dd> 22 <p class="desc"> 23 <?php if ( ! empty( $param['types'] ) ) : ?> 24 <span class="type"><?php printf( __( '(%s)', 'wporg' ), wp_kses_post( $param['types'] ) ); ?></span> 30 <div class="desc"> 31 <?php if ( ! empty( $param['content'] ) ) : ?> 32 <?php if ( $extra = get_param_reference( $param ) ) : ?> 33 <span class="description"><?php echo wp_kses_post( $param['content'] ); ?></span> 34 <details class="extended-description"> 35 <summary> 36 <?php echo esc_html( sprintf( __( 'More Arguments from %s( ... %s )', 'wporg' ), $extra[ 'parent' ], $extra['parent_var'] ) ); ?> 37 </summary> 38 <span class="description"><?php echo wp_kses_post( $extra['content'] ); ?></span> 39 </details> 40 <?php else : ?> 41 <span class="description"><?php echo wp_kses_post( $param['content'] ); ?></span> 42 <?php endif; ?> 25 43 <?php endif; ?> 26 <?php if ( ! empty( $param['required'] ) && 'wp-parser-hook' !== get_post_type() ) : ?> 27 <span class="required"><?php printf( __( '(%s)', 'wporg' ), esc_html( $param['required'] ) ); ?></span> 28 <?php endif; ?> 29 <?php if ( ! empty( $param['content'] ) ) : ?> 30 <span class="description"><?php echo wp_kses_post( $param['content'] ); ?></span> 31 <?php endif; ?> 32 </p> 44 </div> 33 45 <?php if ( ! empty( $param['default'] ) ) : ?> 34 <p class="default"><?php _e( 'Default value:', 'wporg' );?> <?php echo htmlentities( $param['default'] ); ?></p>46 <p class="default"><?php _e( 'Default:', 'wporg' );?> <code><?php echo htmlentities( $param['default'] ); ?></code></p> 35 47 <?php endif; ?> 36 48 </dd>
Note: See TracChangeset
for help on using the changeset viewer.