Pastoid

The page you are looking at now is at this URL: http://pastoid.com/bzw

This paste was last updated on February 12, 2010 at 9:35 pm.

Pasted Coderaw

public function action_form_publish ( $form, $post )
{
  if ( $form->content_type->value == Post::type( 'imprint' ) ) {
 
    $form->append( 'fieldset', 'imprint_controls', 'Enter details of IMPRINT edition' );
    $form->move_before($form->imprint_controls, $form->title);
 
    // Add necessary control template
    $this->add_template('imprint_control_text', dirname(__FILE__).'/formcontrols/imprint_control_text.php');
 
    $form->imprint_controls->append( 'text', 'year', 'null:null', 'Year', 'imprint_control_text' );
    $form->year->value = $post->info->year;
    $form->year->add_validator(array($this, 'validate_year'));
  }
}
 

Toggle wordwrap

Pasted Coderaw

public function validate_year( $year, $control, $form )
{
  return('douche!');
}
 
 

Toggle wordwrap

Referring DomainHits
Unknown Referer 158
pastoid.com 3
drunkenmonkey.org 1
Is this paste spam?
<Hide