' . blogcentral_options_posts( 'featured_posts', $opts, $widget ) . ''; return $opts_str; } /** * Construct and display options for the related posts shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_related_posts( $opts_str, $opts = array(), $widget = false ) { $opts_str = '
' . blogcentral_options_posts( 'related_posts', $opts, $widget ) . '
'; return $opts_str; } /** * Construct and display options for the recent posts shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_recent_posts( $opts_str, $opts = array(), $widget = false ) { $opts_str = '
' . blogcentral_options_posts( 'recent_posts', $opts, $widget ) . '
'; return $opts_str; } /** * Construct and display options for popular posts shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_popular_posts( $opts_str, $opts = array(), $widget = false ) { $opts_str = '
' . blogcentral_options_posts( 'popular_posts', $opts, $widget ) . '
'; return $opts_str; } /** * Construct and display options for facebook comments shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_facebook_comments( $opts_str, $opts = array(), $widget = false ) { $opts['name'] = 'facebook_comments'; $opts_str = "
"; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean() . '

' . __( 'General', BLOGCENTRAL_TXT_DOMAIN ) . '

' . __( 'Limit', BLOGCENTRAL_TXT_DOMAIN ) . ' " . '
'; return $opts_str; } /** * Construct and display options for contact information for an organization or a user * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_contact_info( $opts_str, $opts = array(), $widget = false ) { // Get the global variables. global $blogcentral_opts; global $blogcentral_defaults; global $blogcentral_initial; global $fourbzcore_plugin; $opts_str = '
'; // need to unset name to populate the contact info fields with the information saved on the theme options page, if the options have never been saved. unset( $opts['name'] ); if ( ! empty( $opts ) ) { $opts = array_map( 'stripslashes_deep', $opts ); $opts = wp_parse_args( $opts, $blogcentral_defaults['contact_info'] ); } else { $opts = wp_parse_args( $blogcentral_opts['contact_info'], $blogcentral_defaults['contact_info'] ); } $opts['name'] = 'contact_info'; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean(); $opts_str .= '

' . __( 'Contact Info Specific Options', BLOGCENTRAL_TXT_DOMAIN ) . '

'; $opts_str .= ''; $opts_str .= '
' . __( 'General', BLOGCENTRAL_TXT_DOMAIN ) . '
'; ob_start(); blogcentral_display_contact_info_layout_opts( $opts, $widget ); $opts_str .= ob_get_clean() . '
' . __( 'Contact Information', BLOGCENTRAL_TXT_DOMAIN ) . ' '; if ( isset( $fourbzcore_plugin ) ) { ob_start(); $opts['name_attr_pre'] = 'blogcentral'; $fourbzcore_plugin->display_contact_opts( $opts, $widget ); $opts_str .= ob_get_clean(); } $opts_str .= '
'; return $opts_str; } /** * Construct and display options for a contact form. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_contact_form( $opts_str, $opts = array(), $widget = false ) { // Get the global variables. global $blogcentral_opts; global $blogcentral_defaults; global $blogcentral_initial; global $fourbzcore_plugin; $opts_str = '
'; // need to unset name to populate the contact info fields with the information saved on the theme options page, if the options have never been saved. unset( $opts['name'] ); if ( $opts ) { $opts = array_map( 'stripslashes_deep', $opts ); $opts = wp_parse_args( $opts, $blogcentral_defaults['contact_info'] ); } else { $opts = wp_parse_args( $blogcentral_opts['contact_info'], $blogcentral_defaults['contact_info'] ); } $opts['name'] = 'contact_form'; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean(); ob_start(); blogcentral_contact_form_specific_opts( $opts, $widget ); $opts_str .= ob_get_clean(); $opts_str .= '
'; return $opts_str; } /** * Construct and display options specific to the contact form shortcode and widget. * * Requires any plugin that displays a contact form via a shortcode. * * @since 1.1.0 * * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_contact_form_specific_opts( $opts = array(), & $widget = false ) { global $fourbzcore_plugin; $contact_opts_str = ''; if ( isset( $fourbzcore_plugin ) ) { ob_start(); $opts['name_attr_pre'] = 'blogcentral'; $fourbzcore_plugin->display_contact_opts( $opts, $widget ); $contact_opts_str = ob_get_clean(); } $defaults = array( 'contact_form_layout' => '1', 'show_contact' => false, 'show_map' => false, ); if ( $opts ) { $opts = wp_parse_args( $opts, $defaults ); } else { $opts = $defaults; } echo "

" . __( 'Contact Form Specific Options', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Layout', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Contact Form', BLOGCENTRAL_TXT_DOMAIN ) . '
" . __( 'Contact Information', BLOGCENTRAL_TXT_DOMAIN ) . "

"; echo "
"; blogcentral_display_contact_info_layout_opts( $opts, $widget ); echo $contact_opts_str; echo "
" . __( 'Google Map', BLOGCENTRAL_TXT_DOMAIN ) . "
"; } /** * Construct and display options for a flexslider slideshow * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_slideshow( $opts_str, $opts = array(), $widget = false ) { $opts['name'] = 'slideshow'; $opts_str = '
'; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean(); ob_start(); blogcentral_slideshow_specific_opts( $opts, $widget ); $opts_str .= ob_get_clean(); $opts_str .= '
'; return $opts_str; } /** * Construct and display options specific to the flexslider slideshow shortcode and widget. * * @since 1.1.0 * * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_slideshow_specific_opts( $opts = array(), & $widget = false ) { $defaults = array( 'slideshow_layout' => '2', 'animation' => '2', 'useCSS' => '0', 'template' => '1', ); if ( $opts ) { $opts = array_map( 'stripslashes_deep', $opts ); $opts = wp_parse_args( $opts, $defaults ); } else { $opts = $defaults; } $slides = isset( $opts['slides'] ) ? $opts['slides'] : ''; $slides_name = blogcentral_get_field_name_wrap( 'slides', "blogcentral[slideshow]", $widget ); echo "

" . __( 'Slideshow Specific Options', BLOGCENTRAL_TXT_DOMAIN ) . "

"; echo ""; echo "
" . __( 'Layout', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Animation', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Sync', BLOGCENTRAL_TXT_DOMAIN ) . "
" . __( 'Navigation for', BLOGCENTRAL_TXT_DOMAIN ) . "
" . __( 'Easing', BLOGCENTRAL_TXT_DOMAIN ) . "
" . __( 'useCSS', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Slides', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Sort the slides by hovering over a slide until a hand appears, drag and drop where desired.', BLOGCENTRAL_TXT_DOMAIN ) . "


    "; if ( is_array( $slides ) && 0 < count( $slides ) ) { $i = 0; foreach ( $slides as $slide ) { echo "


  • "; echo "

    "; echo "
  • "; ++$i; } } echo "
"; } /** * Construct and display options for the progressbars shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Saved options. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_progressbars( $opts_str, $opts = array(), $widget = false ) { $progressbars_name = blogcentral_get_field_name_wrap( 'items', "blogcentral[progressbars]", $widget ); $skills_html = ''; $skills = isset( $opts['items'] ) ? $opts['items'] : array(); $opts['name'] = 'progressbars'; $defaults = array( 'cols' => '1', ); if ( $opts ) { $opts = wp_parse_args( $opts, $defaults ); } else { $opts = $defaults; } ob_start(); echo '
'; blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str = ob_get_clean(); // Construct options for the actual progressbars items. $opts_str .= "

" . __( 'Progressbars Specific Options', BLOGCENTRAL_TXT_DOMAIN ) . '

' . __( 'Items', BLOGCENTRAL_TXT_DOMAIN ) . "

" . __( 'Sort the progressbars by hovering over an item until a hand appears, drag and drop where desired.', BLOGCENTRAL_TXT_DOMAIN ) . '


    '; if ( is_array( $skills ) && 0 < count( $skills ) ) { $i = 0; foreach ( $skills as $key => $val ) { $opts_str .= '



  • ' . '
    ' . '
    ' . '' . __( 'Enter percentage as a number 0-100', BLOGCENTRAL_TXT_DOMAIN ) . '
  • '; ++$i; } } $opts_str .= "
" . __( 'How many columns?', BLOGCENTRAL_TXT_DOMAIN ) . "
"; return $opts_str; } /** * Construct and display options for the image text shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_image_text( $opts_str, $opts = array(), $widget = false ) { $opts['name'] = 'image_text'; $opts_str = "
"; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean(); $image_url = isset( $opts['image_url'] ) ? esc_attr( $opts['image_url'] ) : ''; $image_width = isset( $opts['image_url_width'] ) ? esc_attr( $opts['image_url_width'] ) : ''; $image_height = isset( $opts['image_url_height'] ) ? esc_attr( $opts['image_url_height'] ) : ''; $image_alt = isset( $opts['image_url_alt'] ) ? esc_attr( $opts['image_url_alt'] ) : ''; $content = isset( $opts['content'] ) ? esc_textarea( $opts['content'] ) : ''; $layout = isset( $opts['layout'] ) ? $opts['layout'] : 'img-float'; $opts_str .= "

" . __( 'Image Text Specific Options', BLOGCENTRAL_TXT_DOMAIN ) . '

' . __( 'Layout', BLOGCENTRAL_TXT_DOMAIN ) . "
" . "

' . __( 'Image', BLOGCENTRAL_TXT_DOMAIN ) . '
' . __( 'Description', BLOGCENTRAL_TXT_DOMAIN ) . '
'; return $opts_str; } /** * Construct and display options for the author bio shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_author_bio( $opts_str, $opts = array(), $widget = false ) { $opts['name'] = 'author_bio'; $opts_str = "
"; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean() . '
'; return $opts_str; } /** * Construct and display options for the flickr photos shortcode and widget. * * Filters 4bzCore plugin's options. * * @since 1.1.0 * * @param string $opts_str Required. 4bzCore plugin's default options. * @param array $opts Optional. Only relative if displaying a widget's options because these shortcode options are not saved to the database, they are used in the shortcode builder to generate the shortcode string. * @param object $widget Optional. Widget object if displaying options for a widget. */ function blogcentral_options_flickr_photos( $opts_str, $opts, $widget ) { $opts['name'] = 'flickr_photos'; $opts_str = ''; $opts_str .= "
"; ob_start(); blogcentral_display_custom_text_class_options( $opts, $widget ); $opts_str .= ob_get_clean(); $opts_str .= '

' . __( 'General', BLOGCENTRAL_TXT_DOMAIN ) . '

' . __( 'Limit', BLOGCENTRAL_TXT_DOMAIN ) . ' "; $opts_str .= '
'; $opts_str .= "
" . __( 'User id', BLOGCENTRAL_TXT_DOMAIN ) . '
'; return $opts_str; } /** * Start of filter functions for the 4bzCore shortcodes and * widgets display *-----------------------------------------------------------------------*/ /** * 4bzCore Widget title filter function. * * @since 1.1.0 * * @param string $default_title Required. The default display of the title, wrapped in $begin and $end. * @param string $title Required. The unfiltered title. * @param string $begin Required. String to display before the title. * @param string $end Required. String to display after the title. */ function blogcentral_widget_title( $default_title, $title, $begin, $end ) { return $title; } /** * Recent Posts shortcode filter function. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param WP_POST $resultset Required. The posts to display. */ function blogcentral_recent_posts( $default_output, $atts, $resultset ) { // Get global variables global $fourbzcore_plugin; if ( ! isset( $fourbzcore_plugin ) ) { return; } global $blogcentral_opts; global $blogcentral_defaults; // Get general posts options. $posts_general = isset( $blogcentral_opts['posts_general'] ) && is_array( $blogcentral_opts['posts_general'] ) ? $blogcentral_opts['posts_general'] : array(); // Merge shortcode atts with general component layout defaults. $recent_posts_options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'recent_posts_options' ); $recent_posts_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_recent_posts->get_id(); /* * Html fragments for classes and styles to be added to each component item, in this shortcode, the * component item is a post. */ $wrapper = blogcentral_get_styles( $recent_posts_options ); $wrapper['wrapper_class'] .= ' recent-posts'; // Passed to the posts shortcode display function: options, and the actual posts to display. $recent_posts_atts = array( 'blogcentral_layout_opts' => array_merge( $recent_posts_options, $posts_general ), 'blogcentral_query' => $resultset, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; // Use the posts shortcode to display the content. $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $recent_posts_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $recent_posts_atts ); } return ob_get_clean(); } /** * Related Posts shortcode filter function. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param WP_POST $resultset Required. The posts to display. */ function blogcentral_related_posts( $default_output, $atts, $resultset ) { // Get global variables global $fourbzcore_plugin; if ( ! isset( $fourbzcore_plugin ) ) { return; } global $blogcentral_opts; global $blogcentral_defaults; // Get general posts options. $posts_general = isset( $blogcentral_opts['posts_general'] ) && is_array( $blogcentral_opts['posts_general'] ) ? $blogcentral_opts['posts_general'] : array(); // Merge shortcode atts with general component layout defaults. $related_posts_options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'related_posts_options' ); $related_posts_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_related_posts->get_id(); /* * Html fragments for classes and styles to be added to each component item, in this shortcode, the * component item is a post. */ $wrapper = blogcentral_get_styles( $related_posts_options ); $wrapper['wrapper_class'] .= ' related-posts'; // Passed to the posts shortcode display function: options, and the actual posts to display. $related_posts_atts = array( 'blogcentral_layout_opts' => array_merge( $related_posts_options, $posts_general ), 'blogcentral_query' => $resultset, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; // Use the posts shortcode to display the content. $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $related_posts_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $related_posts_atts ); } return ob_get_clean(); } /** * Featured Posts shortcode filter function. * * Display only sticky posts. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param WP_POST $resultset Required. The posts to display. */ function blogcentral_featured_posts( $default_output, $atts, $resultset ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Get general posts options. $posts_general = isset( $blogcentral_opts['posts_general'] ) && is_array( $blogcentral_opts['posts_general'] ) ? $blogcentral_opts['posts_general'] : array(); // Merge shortcode atts with general component layout defaults. $posts_options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'posts_options' ); $posts_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_featured_posts->get_id(); /* * An indicator variable used to differentiate posts shortcodes from other shortcodes. If slideshow is * true, then will display component with customized controls. */ $posts_options['flex_comp'] = true; /* * Html fragments for classes and styles to be added to each component item, in this shortcode, the * component item is a post. */ $wrapper = blogcentral_get_styles( $posts_options ); $wrapper['wrapper_class'] .= ' featured-posts'; // Passed to the posts shortcode display function: options, and the actual posts to display. $posts_atts = array( 'blogcentral_layout_opts' => array_merge( $posts_options, $posts_general ), 'blogcentral_query' => $resultset, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; // Use the posts shortcode to display the content. $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $posts_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $posts_atts ); } return ob_get_clean(); } /** * Popular Posts shortcode filter function. * * Display popular posts based on number of comments. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param WP_POST $resultset Required. The posts to display. */ function blogcentral_popular_posts( $default_output, $atts, $resultset ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Get general posts options. $posts_general = isset( $blogcentral_opts['posts_general'] ) && is_array( $blogcentral_opts['posts_general'] ) ? $blogcentral_opts['posts_general'] : array(); // Merge shortcode atts with general component layout defaults. $posts_options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'posts_options' ); $posts_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_popular_posts->get_id(); /* * An indicator variable used to differentiate posts shortcodes from other shortcodes. If slideshow is * true, then will display component with customized controls. */ $posts_options['flex_comp'] = true; /* * Html fragments for classes and styles to be added to each component item, in this shortcode, the * component item is a post. */ $wrapper = blogcentral_get_styles( $posts_options ); $wrapper['wrapper_class'] .= ' popular-posts'; // Passed to the posts shortcode display function: options, and the actual posts to display. $posts_atts = array( 'blogcentral_layout_opts' => array_merge( $posts_options, $posts_general ), 'blogcentral_query' => $resultset, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; // Use the posts shortcode to display the content. $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $posts_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_posts->display( $posts_atts ); } return ob_get_clean(); } /** * Progressbars shortcode filter function. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Required. Options for the shortcode or widget, including the list of items to display as progressbars. * @param array $items Required. The items to be shown as progressbars. */ function blogcentral_progressbars( $default_output, $atts, $items ) { if ( empty( $atts ) ) { return; } // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Default settings specific to progressbars. $defaults = array( 'items' => array(), ); // Merge shortcode atts with general component layout defaults. $options = shortcode_atts( array_merge( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $defaults ), $atts, 'options' ); $options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_progressbars->get_id(); // Html fragments for classes and styles to be added to each component item, in this shortcode the component item is a progressbar. $wrapper = blogcentral_get_styles( $options ); $wrapper['wrapper_class'] .= ' progressbars'; $progressbar_atts = array( 'blogcentral_layout_opts' => $options, 'blogcentral_items' => $items, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; // Use the progressbars shortcode to display the content. $fourbzcore_plugin->fourbzcore_shortcode_progressbars->display( $progressbar_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_progressbars->display( $progressbar_atts ); } return ob_get_clean(); } /** * Contact Info shortcode filter function. * * Method to display the contact information for an organization or a user. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param array $contact_info Required. The contact info to display. */ function blogcentral_contact_info( $default_output, $atts, $contact_info ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Merge shortcode atts with general component layout defaults. $general_info = isset( $blogcentral_defaults ) ? array_merge( $blogcentral_defaults['contact_info'], $blogcentral_defaults['posts_landing'] ) : array(); $contact_options = shortcode_atts( $general_info, $atts, 'contact_options' ); $contact_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_contact_info->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $contact_options ); $wrapper['wrapper_class'] .= ' contact-info'; // Passed to the contact info shortcode display function: options, and the actual posts to display. $contact_atts = array( 'blogcentral_layout_opts' => $contact_options, 'blogcentral_contact_info' => $contact_info, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_contact_info->display( $contact_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_contact_info->display( $contact_atts ); } return ob_get_clean(); } /** * Contact Form shortcode filter function. * * Method to display a contact form powered by any plugin that uses a shortcode for its display, along with an optional display of contact information. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param array $form_options Required. Form options augmented with extra options from the 4bzCore plugin. */ function blogcentral_contact_form( $default_output, $atts, $form_options ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Defaults specific to the contact form and contact info shortcodes. $defaults = array( 'contact_form_layout' => '1', 'contact_info_layout' => '1', 'show_address' => null, 'show_phone' => null, 'show_email' => null, 'show_url' => null, 'show_social' => null, 'share_title' => '', ); // Merge contact form specific defaults with shortcode atts and general component layout defaults. $form_options = array_merge( $defaults, $form_options ); $form_options = shortcode_atts( array_merge( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $form_options ), $atts, 'form_options' ); // Html fragments for classes and styles to be added to each component item, in this shortcode, the component is a contact form. $wrapper = blogcentral_get_styles( $form_options ); $wrapper['wrapper_class'] .= ' contact-form'; /* * Class specific to the contact form shortcode. If contact form layout is 1 then add the boxed class to display the * contact form in boxed format. */ if ( isset( $atts['contact_form_layout'] ) && '2' === $atts['contact_form_layout'] ) { $wrapper['wrapper_class'] .= ' boxed'; } $form_atts = array( 'blogcentral_layout_opts' => $form_options, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_contact_form->display( $form_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_contact_form->display( $form_atts ); } return ob_get_clean(); } /** * Slideshow shortcode filter function. * * Display a flexslider slider. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Required. Options for the shortcode or widget. * @param array $slides Required. The slides to display. */ function blogcentral_slideshow( $default_output, $atts, $slides ) { if ( empty( $atts['slides'] ) ) { return; } // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Defaults specific to the slideshow shortcode. $defaults = array( 'slideshow' => true, 'slides' => array(), 'flex_comp' => false, 'slideshow_layout' => '', 'animation' => "fade", 'easing' => "swing", 'sync' => "", 'asNavFor' => "", 'useCSS' => false, ); // Merge slideshow specific defaults with shortcode atts and general component layout defaults. $slideshow_options = shortcode_atts( array_merge( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $defaults ), $atts, 'slideshow_options' ); $slideshow_options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_slideshow->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $slideshow_options ); $wrapper['wrapper_class'] .= ' slideshow'; $slideshow_atts = array( 'blogcentral_layout_opts' => $slideshow_options, 'blogcentral_items' => $slides, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_slideshow->display( $slideshow_atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_slideshow->display( $slideshow_atts ); } return ob_get_clean(); } /** * Facebook Comments shortcode filter function. * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param array $default_opts Optional. Default options. */ function blogcentral_facebook_comments( $default_output, $atts, $default_opts ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Merge shortcode atts with general component layout defaults. $options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'options' ); $options['limit'] = isset( $atts['limit'] ) ? $atts['limit'] : 5; $options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_facebook_comments->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $options ); $wrapper['wrapper_class'] .= ' facebook-comments'; $atts = array( 'blogcentral_layout_opts' => $options, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_facebook_comments->display( $atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_facebook_comments->display( $atts ); } return ob_get_clean(); } /** * Flickr Photos Shortcode Filter Function * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Required. Options for the shortcode or widget. * @param array $default_opts Optional. */ function blogcentral_flickr_photos( $default_output, $atts, $default_opts ) { if ( ! isset( $atts['user_id'] ) ) { return; } // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Merge shortcode atts with general component layout defaults. $options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'options' ); $options['limit'] = isset( $atts['limit'] ) ? $atts['limit'] : '6'; $options['user_id'] = $atts['user_id']; $options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_flickr_photos->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $options ); $wrapper['wrapper_class'] .= ' flickr-photos'; $atts = array( 'blogcentral_layout_opts' => $options, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_flickr_photos->display( $atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_flickr_photos->display( $atts ); } return ob_get_clean(); } /** * Image Text Shortcode Filter Function * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Required. Options for the shortcode or widget. * @param array $default_opts Optional. */ function blogcentral_image_text( $default_output, $atts, $default_opts ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Merge shortcode atts with general component layout defaults. $options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'options' ); $options['content'] = isset( $atts['content'] ) ? $atts['content'] : ''; $options['image_url'] = isset( $atts['image_url'] ) ? $atts['image_url'] : ''; $options['image_url_width'] = isset( $atts['image_url_width'] ) ? $atts['image_url_width'] : ''; $options['image_url_height'] = isset( $atts['image_url_height'] ) ? $atts['image_url_height'] : ''; $options['image_url_alt'] = isset( $atts['image_url_alt'] ) ? $atts['image_url_alt'] : ''; $options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_image_text->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $options ); $wrapper['wrapper_class'] .= ' image-text'; $atts = array( 'blogcentral_layout_opts' => $options, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_image_text->display( $atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_image_text->display( $atts ); } return ob_get_clean(); } /** * Author Bio shortcode filter function * * @since 1.1.0 * * @param string $default_output Required. 4bzCore plugin's default shortcode output. * @param array $atts Optional. Options for the shortcode or widget. * @param array $default_opts Optional. */ function blogcentral_author_bio( $default_output, $atts, $default_opts ) { // Get global variables. global $fourbzcore_plugin; global $blogcentral_opts; global $blogcentral_defaults; // Merge shortcode atts with general component layout defaults. $options = shortcode_atts( isset( $blogcentral_defaults['posts_landing'] ) && is_array( $blogcentral_defaults['posts_landing'] ) ? $blogcentral_defaults['posts_landing'] : array(), $atts, 'options' ); $options['id'] = $fourbzcore_plugin->fourbzcore_shortcode_author_bio->get_id(); // Html fragments for classes and styles to be added to each component item. $wrapper = blogcentral_get_styles( $options ); $wrapper['wrapper_class'] .= ' author-bio-wrap'; $atts = array( 'blogcentral_layout_opts' => $options, ); // Construct wrapper using the classes and styles previously constructed in the blogcentral_get_styles() function. $frag = blogcentral_construct_wrapper( $wrapper ); ob_start(); if ( isset( $frag ) && is_array( $frag ) ) { echo $frag[0]; $fourbzcore_plugin->fourbzcore_shortcode_author_bio->display( $atts ); echo $frag[1]; } else { $fourbzcore_plugin->fourbzcore_shortcode_author_bio->display( $atts ); } return ob_get_clean(); }