Forum Replies Created

Viewing 15 posts - 1 through 15 (of 36 total)
  • Author
    Posts
  • in reply to: Tutorial not working #11003
    thor
    Member

    If I have this:

    
    <?php
    /*
    Name: Test
    Description: Testing
    Shortcode: test
    Icon: dashicons-editor-quote
    */
    
    piklist('field', array(
        'type' => 'text'
        ,'field' => 'my_shortcode'
        ,'label' => 'Demo shortcode'
    ));
    

    and enter “This is a test” in the field, it encodes and outputs the shortcode to

    
    [test my_shortcode="This%20is%20a%20test"]
    

    I understand that this is safer in many cases, but it makes the shortcodes almost unreadable in some cases – and not easily editable – e.g. if it’s an URL as attribute or comma separated values like 1,2,3,4: [test my_shortcode="1%2C2%2C3%2C4"]

    in reply to: Tutorial not working #11000
    thor
    Member

    Thank you Steve. I understand how it works now 🙂

    Is there a way (filter?) to prevent the urlencoding of the shortcode fields/parameters that Piklist returns to the editor?

    in reply to: Add TinyMCE button to editor field #10995
    thor
    Member

    The weird thing is that if I add a teeny editor as the first Piklist field it prevents the next non-teeny editor from showing the buttons from various plugins. Is it a Piklist bug?

    
    piklist('field', array(
    	'type' => 'editor',
    	'field' => 'intro_content',
    	'label' => 'Intro text',
    	'template' => 'field',
    	'options' => array(
    		'wpautop' => true,
    		'media_buttons' => false,
    		'shortcode_buttons' => false,
    		'teeny' => true, // If true - next editor will not have various tinymce plugin buttons
    		'dfw' => false,
    		'quicktags' => true,
    		'drag_drop_upload' => false,
    		'tinymce' => array(
    			'resize' => false,
    			'wp_autoresize_on' => true,
    			'toolbar1' => 'bold,italic,underline,link,unlink',
    			'toolbar2' => '',
    		),
    		'textarea_rows' => 10,
    	),
    	'columns' => 12,
    ));
    
    piklist('field', array(
    	'type' => 'editor',
    	'field' => 'my_content', // 'post_content' is the field name of the WordPress default editor
    	'scope' => 'post', // Save to the wp_post table
    	'label' => 'Post Content',
    	'template' => 'field', // Only display the field not the label
    	'options' => array( // Pass any option that is accepted by wp_editor()
    		'wpautop' => true,
    		'media_buttons' => true,
    		'shortcode_buttons' => true,
    		'teeny' => false,
    		'dfw' => false,
    		'quicktags' => true,
    		'drag_drop_upload' => true,
    		'tinymce' => array(
    			'resize' => false,
    			'wp_autoresize_on' => true,
    		)
    	),
    	'columns' => 12,
    ));
    
    in reply to: Add TinyMCE button to editor field #10994
    thor
    Member

    'teeny' => true
    – was the problem 😀

    And perhaps buttons can be added in teeny mode – https://wordpress.stackexchange.com/questions/248019/how-to-add-button-in-tinymce-teeny-mode. But for now I’ll just set teeny to false

    in reply to: Add TinyMCE button to editor field #10993
    thor
    Member

    Hmm, there must be another plugin interfering. I just tried the approach on a clean install and it works. It has something to to with custom post type since it works on pages.

    in reply to: Add TinyMCE button to editor field #10992
    thor
    Member

    Thanks Steve,but I can’t get it working. I had a similar plugin (only for bringing back the anchor). It works in the regular editor but it is not appearing piklist. The same with tinymce-advanced.

    Any other suggestions? Are there any settings in the piklist editor field that prevents the tinymce plugin from inserting the buttons?

    in reply to: PHP 7.4 error #10886
    thor
    Member

    it is in the admin when editing a page og post (that is, if the post type had any piklist metaboxes). 5-10 lines with that error.

    in reply to: PHP 7.4 error #10883
    thor
    Member

    But I do get a (possibly) new error/notice:
    Notice: Trying to access array offset on value of type bool in /var/www/.../wp-content/plugins/piklist/includes/class-piklist-meta.php on line 126

    I am not sure if this came with the new version? Or what to try in order to fix the problem.

    in reply to: PHP 7.4 error #10882
    thor
    Member

    Perfect! I can confirm it works on multiple Piklist-powered sites. Keep up the excellent work 🙂

    in reply to: PHP 7.4 error #10843
    thor
    Member

    I have the same warnings/notices on various sites:

    Around 20 notice lines lines with:

    Notice: Trying to access array offset on value of type null in /var/www/example.com/public_html/wp-content/plugins/piklist/includes/class-piklist-meta.php on line 352
    Notice: Trying to access array offset on value of type null in /var/www/example.com/public_html/wp-content/plugins/piklist/includes/class-piklist-meta.php on line 354

    and one of these:
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/example.com/public_html/wp-content/plugins/piklist/includes/class-piklist-meta.php:352) in /var/www/example.com/public_html/wp-admin/admin-header.php on line 9

    in reply to: .piklist-field select – padding in admin bug #10666
    thor
    Member

    Perfect. Thanks 🙂

    in reply to: .piklist-field select – padding in admin bug #10662
    thor
    Member

    Yes and no 🙂 I would say it should still avoid text and arrow graphics on top of each other.

    If I have a longer select value in the defualt WordPress selects the do it right (see attachment).

    Attachments:
    You must be logged in to view attached files.
    in reply to: .piklist-field select – padding in admin bug #10659
    thor
    Member

    Sure, it is attached here 🙂

    As you can see the normal non-piklist fields are appearing right.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Conditional resets fields when hiding fields #9558
    thor
    Member

    Ok – looking forward to piklist 2.0 🙂

    in reply to: piklist 1.0.5 + WP 5.3.1 – menu error #9549
    thor
    Member

    That was fast! Thank you very much 🙂

Viewing 15 posts - 1 through 15 (of 36 total)