- This topic has 4 replies, 2 voices, and was last updated 3 years, 7 months ago by
cbmarc.
-
AuthorPosts
-
-
June 28, 2018 at 4:32 pm #9094
-
June 29, 2018 at 12:27 pm #9096
SteveKeymasterWordPress has a
media_buttonsaction that we hook into:I suggest you ask the SiteOrigin team if they have the equivalent. And then use something like this:
https://github.com/piklist/piklist/blob/develop/includes/class-piklist-shortcode.php#L72 -
June 29, 2018 at 6:17 pm #9100
cbmarcParticipantThanks for the info and the fast reply
Media button only activated on ‘content’ variable in includes/class-piklist-shortcode.php:
———————-
23 /**
24 * @var array Registered editors that use shortcodes.
25 * @access private
26 */
27 private static $shortcode_editors = array(‘content’);
———————-
289 /**
290 * media_buttons
291 * Adds a shortcode media button to editors.
292 *
293 * @param string $editor_id The editor id.
294 *
295 * @access public
296 * @static
297 * @since 1.0
298 */
299 public static function media_buttons($editor_id)
300 {
301 if (in_array($editor_id, self::$shortcode_editors))
302 {
303 echo ‘<button type=”button” id=”piklist-shortcode-button” class=”button piklist-shortcode-button” title=”‘ . __(‘Add Shortcode’, ‘piklist’) . ‘” data-editor=”‘ . $editor_id . ‘”><span class=”wp-media-buttons-icon”></span> ‘ . __(‘Add Shortcode’, ‘piklist’) . ‘</button>’;
304 }
305 }
———————-But in SiteOrigin need to set ‘widget-sow-editor-c36-text’ and in enfold ‘aviaTBcontent’ and in divi ‘et_pb_content_new’
Don’t know how to add those variables in the list for activate the button in those editors -
July 5, 2018 at 10:06 pm #9115
SteveKeymasterThis reply has been marked as private. -
July 12, 2018 at 1:32 pm #9125
cbmarcParticipantThis reply has been marked as private.
-
-
AuthorPosts
- You must be logged in to reply to this topic.