Support Forum ยป User Profile

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • lhkeeperlhkeeper
    Participant

    Hello Anh,

    My apologies for delay in response. At the beginning they didn't appear on the page at all. I deleted and then uploaded my plugin few times in a row and then suddenly they showed up. So everything is working fine at the moment. However I'm wondering what could be the reason for this behavior...

    Thank you,
    Kasia

    in reply to: Invalid argument supplied... #9318
    lhkeeperlhkeeper
    Participant

    Hi Anh,

    I hope you had a good weekend. Thank you for all your help and concern. I checked everything once again and.... instead of returning each meta box (code) in each file I assigned it to meta boxes array..so in the end, I was trying to nest a meta boxes array in meta boxes array ๐Ÿ™‚ I am not sure if I explain it clearly enough ๐Ÿ™‚ Long story short, my each file started like this:

    $meta_boxes[] = [
    'title' => esc_html__( 'Service Testimonials', 'lhk' ),
    'post_types' => [
    'page',
    ],.....
    etc......

    and should like this:

    return[
    'title' => esc_html__( 'Service Testimonials', 'lhk' ),
    'post_types' => [
    'page',
    ],......
    etc.......
    It caused all these errors.

    Thank you again Anh
    Best,
    Kasia

    in reply to: Invalid argument supplied... #9285
    lhkeeperlhkeeper
    Participant

    As an example I am giving you the code for a one meta box I created. If you wish to see all files please let me know.

    All the meta boxes are created in this way:

    https://pastebin.com/3VPA1skm

    in reply to: Invalid argument supplied... #9282
    lhkeeperlhkeeper
    Participant

    Ahn, I am just wondering... If I registered some fields e.g. email filed this way:

    [
    'id' => 'contact_email',
    'type' => 'email',
    'name' => esc_html__( 'Email:', 'lhk' ),
    'desc' => esc_html__( 'Please insert your email here.', 'lhk' ),
    'size' => 50,
    ],

    where 'type' is 'email' instead of e.g. 'text' could it caused the problem?
    I have a few fields registered as 'type' => 'url' .... when I checked the documentation there are no these types of fields...

    in reply to: Invalid argument supplied... #9280
    lhkeeperlhkeeper
    Participant

    By the way I am using TGM Activation Class to include your plugins, if it can help anyhow...

    in reply to: Invalid argument supplied... #9279
    lhkeeperlhkeeper
    Participant

    Hi Anh ๐Ÿ™‚

    There you go:

    /**
     * Displaying all custom metaboxes
     */
    
    add_filter( 'rwmb_meta_boxes', 'lhk_register_home_meta_boxes' );
    
    function lhk_register_home_meta_boxes( $meta_boxes ) {
    
    $files_contact          =  glob( get_template_directory() .'/inc/contact-mod/<em>.php' );
    $files_csi              =  glob( get_template_directory() .'/inc/csi-mod/</em>.php' );
    $files_general          =  glob( get_template_directory() .'/inc/general-mod/<em>.php' );
    $files_home             =  glob( get_template_directory() .'/inc/home-mod/</em>.php' );
    $files_how              =  glob( get_template_directory() .'/inc/how-mod/<em>.php' );
    $files_prod             =  glob( get_template_directory() .'/inc/product-mod/</em>.php' );
    $files_post             =  glob( get_template_directory() .'/inc/post-mod/<em>.php' );
    $files_testimonials     =  glob( get_template_directory() .'/inc/testimonials-mod/</em>.php' );
    
    $all_files = [ $files_contact, $files_csi, $files_general , $files_home, $files_how , $files_prod , $files_post, $files_testimonials  ];
    
    foreach ( $all_files as $key => $files ) {
        foreach( $files as $file ){
    
        $meta_boxes[] = include $file;
    
        }
    }
    
    return $meta_boxes;
    }

    Thank you ๐Ÿ™‚

    in reply to: Invalid argument supplied... #9277
    lhkeeperlhkeeper
    Participant

    ah also those two lines in the end I have:

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\wordpress\wp-content\plugins\meta-box\inc\meta-box.php:369) in C:\xampp\htdocs\wordpress\wp-content\plugins\unyson\framework\includes\hooks.php on line 256
    Warning: array_unique() expects parameter 1 to be array, null given in C:\xampp\htdocs\wordpress\wp-includes\post-template.php on line 772

    Warning: join(): Invalid arguments passed in C:\xampp\htdocs\wordpress\wp-includes\post-template.php on line 557
    class="">

    in reply to: Mime-types url validation #9238
    lhkeeperlhkeeper
    Participant

    Thank you very much Anh.
    Have a great day!
    Kasia

    in reply to: Mime-types url validation #9207
    lhkeeperlhkeeper
    Participant

    Hi Anh,

    Please look at my code below:

    https://pastebin.com/Q8xf3tXS

    I'm using "url" type field as the videos will be stored in the other place.
    Thank you

Viewing 9 posts - 1 through 9 (of 9 total)