This topic contains 1 reply, has 1 voice, and was last updated by  cdcorey 3 years, 3 months ago.

  • Author
    Posts
  • #6395

    cdcorey
    Participant

    I’ve noticed a minor issue when using editors in add mores that seems to recur for me across various sites and custom Piklist-powered plugins. It’s cosmetic and somewhat intermittent, but I couldn’t find any references on the forum so I thought it should be noted.

    When using an editor inside an add more, I’ve noticed that the label of the editor sometimes shows up outside its add more item. I think when this happens, it’s usually on the first item, and then the subsequent ones look fine. Odd.

    Here’s one example of some code where I’ve seen this happen:

    piklist('field', array(
    	'type' => 'group',
    	'template' => 'field',
    	'add_more' => true,
    	'fields' => array(
    		array(
    			'type' => 'text',
    			'field' => '_cd_custom_tab_title',
    			'label' => 'Title',
    		),
    		array(
    			'type' => 'text',
    			'field' => '_cd_custom_tab_priority',
    			'label' => 'Order',
    		),
    		array(
    			'type' => 'editor',
    			'field' => '_cd_custom_tab_content',
    			'label' => 'Content',
    			'options' => array(
    				'wpautop' => true,
    		      'media_buttons' => true,
    		      'teeny' => true,
    		      'textarea_rows' => 5,
    		      'drag_drop_upload' => true,
    			),
    		),
    	),
    	'on_post_status' => array(
    		'value' => 'lock',
    	),
    ));
    Attachments:
    You must be logged in to view attached files.
  • #6397

    cdcorey
    Participant

    Also, I’m not sure if this is related or not, but I’ve noticed that adding and removing add more items sometimes causes the text in a middle item to seem to disappear. Upon selecting the text, it has apparently turned white.

    Attachments:
    You must be logged in to view attached files.

You must be logged in to reply to this topic.