Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,881 through 2,895 (of 3,707 total)
  • Author
    Posts
  • in reply to: โœ…Remove Cloned Field Conditional #4999
    Anh TranAnh Tran
    Keymaster

    That works but it affects your performance as the action "check-update" runs on every request to your website. This triggers the query to the database. Running only on your settings page reduces the load. But that also means the value is updated only when users visit the settings page, so it's kind of manual reset.

    in reply to: New plugin suggestion #4998
    Anh TranAnh Tran
    Keymaster

    Ah, I got it. I will check that ๐Ÿ™‚

    Thanks for your suggestion!

    in reply to: Custom_html callback markup is broken #4997
    Anh TranAnh Tran
    Keymaster

    Here it is:

    function hello() {
        return '<b style="color:red;">Hello</b>';
    }
    in reply to: rwmb_meta_boxes filter #4984
    Anh TranAnh Tran
    Keymaster

    Hi,

    How do you get the $post_id and how do you use the code above inside your code to register meta boxes?

    in reply to: โœ…Remove Cloned Field Conditional #4983
    Anh TranAnh Tran
    Keymaster

    I got it. In this case, the problem is handling the "saved meta value". I'd suggest using WP cron to perform a regular check on the meta value (posts). When a condition occurs (date is passed), then update the meta value.

    This is the pseudo code:

    register_activation_hook(__FILE__, 'prefix_activation');
    
    function prefix_activation() {
        if (! wp_next_scheduled ( 'prefix_daily_check' )) {
    	wp_schedule_event(time(), 'hourly', 'prefix_daily_check');
        }
    }
    
    add_action('prefix_daily_check', 'prefix_update_posts_daily');
    function prefix_update_posts_daily() {
        $now = time();
        $option = get_option( 'featured_position_1' );
        foreach ( $option as $key => $value ) {
            if ( $time > strtotime( $value['featured_item_1_schedule_start'] ) ) {
                unset( $option[$key] );
            }
        }
        update_option( 'featured_position_1', $option );
    }
    in reply to: Active Sticky Menu Via MetaBox #4973
    Anh TranAnh Tran
    Keymaster

    Hi Locke2,

    I'm not very clear about your question. Do you want a checkbox that when it's checked, the post will be set to "sticky"?

    in reply to: โœ…Remove Cloned Field Conditional #4972
    Anh TranAnh Tran
    Keymaster

    Hi,

    If an user selects:

    - Post A from Feb 6 to Feb 10
    - Post B from Feb 8 to Feb 12

    Then after Feb 6, the post A is removed from the selection (in the admin area)? Is that what you want?

    in reply to: Custom_html callback markup is broken #4971
    Anh TranAnh Tran
    Keymaster

    Just looked at the code again and found that you "echo" the content instead of returning it. The callback function "must" return the content.

    If your content is complicated, you should use output buffering to return it.

    in reply to: New plugin suggestion #4970
    Anh TranAnh Tran
    Keymaster

    Do you mean using it for the ajax request for select_advanced field as you talked in another topic?

    in reply to: Custom_html callback markup is broken #4969
    Anh TranAnh Tran
    Keymaster

    Hi Jackky, let me check and fix that. Thanks for reporting!

    in reply to: Select advanced load remote data #4960
    Anh TranAnh Tran
    Keymaster

    Hi Jackky,

    Thanks for the idea. It's a good idea. We haven't implemented that feature yet in the plugin. I'll try that ๐Ÿ™‚

    in reply to: โœ…Remove Cloned Field Conditional #4955
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think you can do that by looping through the meta box definition and remove the fields when a condition happens. The idea is similar to this documentation. Please try it.

    in reply to: Place Meta Boxes In Columns Layout #4954
    Anh TranAnh Tran
    Keymaster

    Hi,

    Unfortunately, there's no ways to setup 4 columns at the moment. The settings extension uses the WordPress layouts, which supports only 1 and 2 columns.

    in reply to: Date / Datetime field with clone and timestamp wont work #4953
    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just found that bug and fixed it on Github. Please try the development version on Github. The new version of the plugin will be released soon.

    Thanks.

    Anh TranAnh Tran
    Keymaster

    Hi, continuing from the previous topic, we've just updated the plugin on Github with a new parameter max_file_size that limit the file size for file/image upload fields.

    Please try it and let me know what you think.

Viewing 15 posts - 2,881 through 2,895 (of 3,707 total)