Changeset 20302 for trunk/wp-includes/class-wp-customize-control.php
- Timestamp:
- 03/28/2012 09:45:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-control.php
r20299 r20302 169 169 } 170 170 171 public function get_link( $setting_key = 'default' ) { 172 if ( ! isset( $this->settings[ $setting_key ] ) ) 173 return ''; 174 175 return 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"'; 176 } 177 171 178 public function link( $setting_key = 'default' ) { 172 if ( ! isset( $this->settings[ $setting_key ] ) ) 173 return; 174 175 echo 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"'; 179 echo $this->get_link( $setting_key ); 176 180 } 177 181 … … 310 314 break; 311 315 case 'dropdown-pages': 316 $dropdown = wp_dropdown_pages( 317 array( 318 'name' => '_customize-dropdown-pages-' . $this->id, 319 'echo' => 0, 320 'show_option_none' => __( '— Select —' ), 321 'option_none_value' => '0', 322 'selected' => $this->value(), 323 ) 324 ); 325 326 // Hackily add in the data link parameter. 327 $dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown ); 328 312 329 printf( 313 330 '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>', 314 331 $this->label, 315 wp_dropdown_pages( 316 array( 317 // @todo: this is going to need fixing. 318 // 'name' => $this->get_name(), 319 'echo' => 0, 320 'show_option_none' => __( '— Select —' ), 321 'option_none_value' => '0', 322 'selected' => $this->value(), 323 ) 324 ) 332 $dropdown 325 333 ); 326 334 break;
Note: See TracChangeset
for help on using the changeset viewer.