AnsPress 4.1.8 is READY for release!!!

17.93K viewsUpdatesrelease
2

Hello Everyone,

AnsPress 4.1.8 is ready for release. Please give it a try on on your development site and let us know your feedback. It can be downloaded from GitHub [zip].

This time it took more time to release AnsPress. I wasn’t able to work due to my personal problems. Thanks for your understanding.

This version will be published to wp.org on 17th April, if no critical bug discovered by that time.

Thanks you, happy coding.

Question is closed for new answers.
Marked as closed

Kuddos Rahul!
Gonna try it on my staging site. 😀

Thanks Fred.

0

in lib/form/class-editor.php

$settings = array(
      'textarea_rows' => 10,
      'tinymce' => array(
        'content_css' => ap_get_theme_url( 'css/editor.css' ),
        'wp_autoresize_on' => true,
        'statusbar' => false,
        'codesample' => true,
        'anspress' => true,
        'toolbar1' => 'bold,italic,underline,strikethrough,bullist,numlist,link,unlink,blockquote,fullscreen,apmedia,apcode',
        'toolbar2' => '',
        'toolbar3' => '',
        'toolbar4' => '',
      ),
      'quicktags' => false,
      'media_buttons' => false,
      'textarea_name' => $this->field_name,
    );
 $editor_args = wp_parse_args( $this->get( 'editor_args' ), $settings );


I think it is not good to settle the ‘toolbar1’ buttons because other Editor Plugin not works. Your settings override other plugins button setting.
How about just use ‘mce_buttons’ hook?
wp-editor will merge your setting with other settings.
Now I’m using like this

function alp_remove_anspress_editor_buttons( $editor_args ) {
 unset($editor_args['tinymce']['toolbar1']);
 return $editor_args;
}
add_filter( 'ap_pre_editor_settings', 'alp_remove_anspress_editor_buttons' );
 function alp_add_anspress_default_editor_buttons( $buttons ) {
 $anspress_defualt_buttons = array( 
  'bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'link', 'unlink', 'blockquote', 'fullscreen', 'apmedia', 'apcode' );
 array_merge( $buttons, $anspress_defualt_buttons );
 return $buttons;
}
add_filter( 'mce_buttons', 'alp_add_anspress_default_editor_buttons', 1000, 1 );


Check this please.

Posted new comment

Hello,
That is is being done intentionally. This helps output controlled buttons to public users but if you want more buttons in tinymce you can override option using our hook.

You are viewing 1 out of 12 answers, click here to view all answers.