Viewing 4 replies - 1 through 4 (of 4 total)
  • @pochi555

    You can use this filter hook, $key is the fields meta_key.

    /**
    			 * UM hook
    			 *
    			 * @type filter
    			 * @title um_get_field__{$key}
    			 * @description Extend field data by field $key
    			 * @input_vars
    			 * [{"var":"$data","type":"array","desc":"Field Data"}]
    			 * @change_log
    			 * ["Since: 2.0"]
    			 * @usage add_filter( 'um_get_field__{$key}', 'function_name', 10, 1 );
    			 * @example
    			 * <?php
    			 * add_filter( 'um_get_field__{$key}', 'my_get_field', 10, 1 );
    			 * function my_get_field( $data ) {
    			 *     // your code here
    			 *     return $data;
    			 * }
    			 * ?>
    			 */
    			$array = apply_filters( "um_get_field__{$key}", $array );
    Thread Starter pochi555

    (@pochi555)

    @missveronicatv

    Thank you for your reply.
    I want to change from 600px to 300px or more.
    I added the following to “functions.php” but it didn’t work.
    I am not familiar with the program.

    /*—————————————————————–
    Profile photo upload min size 300px
    —————————————————————–*/
    add_filter( ‘um_get_field__{$key}’, ‘my_get_field’, 10, 1 );
    function my_get_field( $data_array ) {
    $data_array[‘min_width’] = 300;
    $data_array[‘min_height’] = 300;
    return $data_array;
    }

    Could you please tell me how to write the program?

    Regards,

    @pochi555

    You must replace {$key} with the meta_key you want to change these values for.

    Example:

    add_filter( 'um_get_field__profile_photo', 'my_get_field', 10, 1 );

    Thread Starter pochi555

    (@pochi555)

    @missveronicatv

    It worked fine if I changed it to metakey like the reference description.
    Thank you for your support!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Profile photo upload locked at 600px’ is closed to new replies.