• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Genesis Theme Framework a2z

Genesis Theme Framework a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Parsed Source / Parsed: 51648
  public function form( $instance ) {

    // Merge with defaults.
    $instance = wp_parse_args( (array) $instance, $this->defaults );

    ?>
		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'genesis' ); ?>:</label>
			<input type="text" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" class="widefat" />
		</p>

		<p>
			<label for="<?php echo esc_attr( $this->get_field_name( 'user' ) ); ?>"><?php esc_html_e( 'Select a user. The email address for this account will be used to pull the Gravatar image.', 'genesis' ); ?></label><br />
			<?php
      wp_dropdown_users(
        [
          'who'      => 'authors',
          'name'     => $this->get_field_name( 'user' ),
          'selected' => $instance['user'],
        ]
      );
      ?>
		</p>

		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'size' ) ); ?>"><?php esc_html_e( 'Gravatar Size', 'genesis' ); ?>:</label>
			<select id="<?php echo esc_attr( $this->get_field_id( 'size' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'size' ) ); ?>">
				<?php
        $sizes = [
          __( 'Small', 'genesis' )       => 45,
          __( 'Medium', 'genesis' )      => 65,
          __( 'Large', 'genesis' )       => 85,
          __( 'Extra Large', 'genesis' ) => 125,
        ];
        $sizes = apply_filters( 'genesis_gravatar_sizes', $sizes );
        foreach ( (array) $sizes as $label => $size ) {
          ?>
					<option value="<?php echo absint( $size ); ?>" <?php selected( $size, $instance['size'] ); ?>><?php printf( '%s (%spx)', esc_html( $label ), esc_html( $size ) ); ?></option>
				<?php } ?>
			</select>
		</p>

		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'alignment' ) ); ?>"><?php esc_html_e( 'Gravatar Alignment', 'genesis' ); ?>:</label>
			<select id="<?php echo esc_attr( $this->get_field_id( 'alignment' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'alignment' ) ); ?>">
				<option value="">- <?php esc_html_e( 'None', 'genesis' ); ?> -</option>
				<option value="left" <?php selected( 'left', $instance['alignment'] ); ?>><?php esc_html_e( 'Left', 'genesis' ); ?></option>
				<option value="right" <?php selected( 'right', $instance['alignment'] ); ?>><?php esc_html_e( 'Right', 'genesis' ); ?></option>
			</select>
		</p>

		<fieldset>
			<legend><?php esc_html_e( 'Select which text you would like to use as the author description', 'genesis' ); ?></legend>
			<p>
				<input type="radio" name="<?php echo esc_attr( $this->get_field_name( 'author_info' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'author_info' ) ); ?>_val1" value="bio" <?php checked( $instance['author_info'], 'bio' ); ?>/>
				<label for="<?php echo esc_attr( $this->get_field_id( 'author_info' ) ); ?>_val1"><?php esc_html_e( 'Author Bio', 'genesis' ); ?></label><br />
				<input type="radio" name="<?php echo esc_attr( $this->get_field_name( 'author_info' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'author_info' ) ); ?>_val2" value="text" <?php checked( $instance['author_info'], 'text' ); ?>/>
				<label for="<?php echo esc_attr( $this->get_field_id( 'author_info' ) ); ?>_val2"><?php esc_html_e( 'Custom Text (below)', 'genesis' ); ?></label><br />
				<label for="<?php echo esc_attr( $this->get_field_id( 'bio_text' ) ); ?>" class="screen-reader-text"><?php esc_html_e( 'Custom Text Content', 'genesis' ); ?></label>
				<textarea id="<?php echo esc_attr( $this->get_field_id( 'bio_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'bio_text' ) ); ?>" class="widefat" rows="6" cols="4"><?php echo esc_html( $instance['bio_text'] ); ?></textarea>
			</p>
		</fieldset>

		<p>
			<label for="<?php echo esc_attr( $this->get_field_name( 'page' ) ); ?>"><?php esc_html_e( 'Choose your extended "About Me" page from the list below. This will be the page linked to at the end of the about me section.', 'genesis' ); ?></label><br />
			<?php
      wp_dropdown_pages(
        [
          'name'             => $this->get_field_name( 'page' ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- False positive.
          'show_option_none' => esc_html__( 'None', 'genesis' ), // WP core uses this value without further escaping, so we escape it here.
          'selected'         => $instance['page'], // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- False positive.
        ]
      );
      ?>
		</p>

		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'page_link_text' ) ); ?>"><?php esc_html_e( 'Extended page link text', 'genesis' ); ?>:</label>
			<input type="text" id="<?php echo esc_attr( $this->get_field_id( 'page_link_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'page_link_text' ) ); ?>" value="<?php echo esc_attr( $instance['page_link_text'] ); ?>" class="widefat" />
		</p>

		<p>
			<input id="<?php echo esc_attr( $this->get_field_id( 'posts_link' ) ); ?>" type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'posts_link' ) ); ?>" value="1" <?php checked( $instance['posts_link'] ); ?>/>
			<label for="<?php echo esc_attr( $this->get_field_id( 'posts_link' ) ); ?>"><?php esc_html_e( 'Show Author Archive Link?', 'genesis' ); ?></label>
		</p>
		<?php

  }
 

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Source ref: Genesis_User_Profile_Widget::form() – Echo the settings update form.
Parse count / Source file date: 1569839049
MD5 hash: 2f3559672151e2d88f6b7c2fedd0aed3

Footer

Genesis a2z
Genesis Theme Framework a2z
WordPress Dynamic API Reference
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  genesis.wp-a2z.org
© Copyright Genesis a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites