equal
deleted
inserted
replaced
54 */ |
54 */ |
55 public function render_content() { |
55 public function render_content() { |
56 if ( empty( $this->choices ) ) { |
56 if ( empty( $this->choices ) ) { |
57 return; |
57 return; |
58 } |
58 } |
|
59 |
|
60 $value_hidden_class = $no_value_hidden_class = ''; |
|
61 if ( $this->value() ) { |
|
62 $value_hidden_class = ' hidden'; |
|
63 } else { |
|
64 $no_value_hidden_class = ' hidden'; |
|
65 } |
59 ?> |
66 ?> |
60 <label> |
67 <label> |
61 <?php if ( ! empty( $this->label ) ) : ?> |
68 <?php if ( ! empty( $this->label ) ) : ?> |
62 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
69 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
63 <?php endif; ?> |
70 <?php endif; ?> |
72 echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>'; |
79 echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>'; |
73 endforeach; |
80 endforeach; |
74 ?> |
81 ?> |
75 </select> |
82 </select> |
76 </label> |
83 </label> |
77 <button type="button" class="button-link create-menu<?php if ( $this->value() ) { echo ' hidden'; } ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button> |
84 <button type="button" class="button-link create-menu<?php echo $value_hidden_class; ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button> |
78 <button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button> |
85 <button type="button" class="button-link edit-menu<?php echo $no_value_hidden_class; ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button> |
79 <?php |
86 <?php |
80 } |
87 } |
81 } |
88 } |