array( 'type' => 'tab', 'name' => __( 'General', 'publisher' ), 'id' => 'general', ), array( 'name' => __( 'Title', 'publisher' ), 'type' => 'text', 'id' => 'title', ), array( 'name' => '', 'id' => 'accordion_settings', 'type' => 'repeater', 'add_label' => ' ' . __( 'Add New Accordion', 'publisher' ), 'delete_label' => __( 'Delete Accordion', 'publisher' ), 'item_title' => __( 'Accordion', 'publisher' ), 'section_class' => 'full-with-both', 'options' => array( 'title' => array( 'name' => __( 'Accordion Title', 'publisher' ), 'id' => 'title', 'type' => 'text', ), 'content' => array( 'name' => __( 'Tab Title', 'publisher' ), 'id' => 'content', 'type' => 'textarea', 'shortcode_content' => true, ), 'load' => array( 'name' => __( 'Default Status', 'publisher' ), 'type' => 'select', 'id' => 'load', 'options' => array( 'hide' => __( 'Hidden', 'publisher' ), 'show' => __( 'Visible', 'publisher' ), ), ), ), ), ); } /** * TinyMCE view settings * * @return array */ function tinymce_settings() { return array( 'name' => __( 'Accordion', 'publisher' ), 'sub_shortcodes' => array( 'accordion_settings' => 'accordion' ), 'scripts' => array( array( 'type' => 'registered', 'handles' => array( 'theme-libs' ), ) ), ); } /** * Registers Page Builder Add-on */ function page_builder_settings() { $settings = parent::page_builder_settings(); return array_merge( $settings, array( 'name' => __( 'Accordion', 'publisher' ), "id" => $this->id, "category" => publisher_white_label_get_option( 'publisher' ), 'icon_url' => PUBLISHER_THEME_URI . 'images/shortcodes/accordion.png', 'click_able' => true, ) ); } // page_builder_settings /** * @param array $settings * * @return array */ public function parse_attr_pane_list( $settings ) { if ( ! $settings ) { return array(); } $tabs_list = array(); foreach ( $settings as $index => $tab ) { if ( isset( $tab['title'] ) && isset( $tab['content'] ) ) { $tabs_list[] = array( 'title' => sprintf( $tab['title'], $index ), 'content' => wpautop( do_shortcode( $tab['content'] ) ), 'load' => ! empty( $tab['load'] ), ); } } return $tabs_list; } /** * @param string $content * * @return array */ public function parse_content_pane_list( $content ) { global $publisher_sh_accordion_panes; $publisher_sh_accordion_panes = array(); // parse nested shortcodes and collect data do_shortcode( $content ); return $publisher_sh_accordion_panes; } } {"id":2095,"count":1,"description":"","link":"https:\/\/justeinfos.net\/tag\/president-du-cesec\/","name":"Pr\u00e9sident du CESEC","slug":"president-du-cesec","taxonomy":"post_tag","meta":[],"_links":{"self":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/tags\/2095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/tags"}],"about":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/taxonomies\/post_tag"}],"wp:post_type":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/posts?tags=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}