|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#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 );
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 8699
|
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 . |
|
|
|
|
|
#3 |
|
Junior Member
Iscritto dal: Aug 2010
Messaggi: 4
|
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 20:01.




















