|
|
|
|
Strumenti |
20-01-2023, 09:00 | #1 |
Junior Member
Iscritto dal: Aug 2010
Messaggi: 4
|
modifiche al codice PHP annullate
dovrei inserire questo codice
Codice:
/** * Filter hook & function for outputs a PNG image file */ * * @param string $image_data image_data. * @param string $name name. * @param string $form_value form_value. * @param string $form_value2 form_value2. * @param string $form_value3 form_value3. */ function canvas_save( $image_data, $name, $form_value, $form_value2, $form_value3 ) { $wp_uploads = wp_upload_dir(); $relation_path_true = strpos( $wp_uploads['baseurl'], '../' ); if ( $relation_path_true > 0 ) { $upload_dir = wp_normalize_path( realpath( $wp_uploads['basedir'] ) ); } else { $upload_dir = wp_normalize_path( $wp_uploads['basedir'] ); } $filename = $upload_dir . '/' . $name . '.png'; $image = imagecreatefromstring( $image_data ); imagepng( $image, $filename ); } add_filter( 'free_canvas_save', 'canvas_save', 10, 5 ); |
20-01-2023, 12:10 | #2 |
Senior Member
Iscritto dal: May 2005
Messaggi: 8686
|
Il commento si chiude dove non dovrebbe
Codice:
/** * Filter hook & function for outputs a PNG image file */ * * @param string $image_data image_data. * @param string $name name. * @param string $form_value form_value. * @param string $form_value2 form_value2. * @param string $form_value3 form_value3. */ Codice:
/** * Filter hook & function for outputs a PNG image file * * @param string $image_data image_data. * @param string $name name. * @param string $form_value form_value. * @param string $form_value2 form_value2. * @param string $form_value3 form_value3. */
__________________
. Thread Ufficiali: EasyCrypt ~ Old Files Manager ~ OSD Clock The real me is no match for the legend . |
20-01-2023, 17:07 | #3 |
Junior Member
Iscritto dal: Aug 2010
Messaggi: 4
|
|
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:19.